diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..9547b8c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,152 @@ +# AGENTS.md — Sandbox Deployment Platform + +## Build, lint, test + +The build script is the only way to compile — local Go can't fetch the +1.24 toolchain. Run: + +``` +./scripts/build.sh # cross-compiles 3 Go binaries + builds the Next.js dashboard +./scripts/deploy.sh # SSHes the artifacts to 92 and 186; needs sshpass +``` + +The script uses a `golang:1.24-alpine` container with a persistent +`sdp-gocache` named volume. `GO_IMAGE=...` overrides the image. Outputs: +`bin/{control-plane,agent-micro,agent-gateway}` (Linux/amd64, static) and +`dashboard/out/`. + +Per-module Go work uses the same container: + +``` +docker run --rm -v "$PWD:/src" -w /src/ golang:1.24-alpine sh -c \ + "apk add --no-cache git >/dev/null && git config --global --add safe.directory /src && go vet ./..." +``` + +For a single test: + +``` +docker run --rm -v "$PWD:/src" -w /src/control-plane golang:1.24-alpine sh -c \ + "apk add --no-cache git >/dev/null && git config --global --add safe.directory /src && go test ./internal/store/..." +``` + +There is one test file today: `control-plane/internal/store/store_test.go` +(round-trips all Slice-2 CRUD). + +The dashboard has no separate typecheck or lint script — `npm run build` +runs both. `cd dashboard && npm run build` locally is fine; node_modules +is gitignored. + +## Layout + +Five Go modules in a workspace (`go.work`): + +- `protocol/` — wire types shared by CP and agents. Keep small. +- `agentlib/` — `gitutil` (askpass-via-stdin credential helper; + `git ls-remote`, `fetch`, `checkout`, `pull`, `for-each-ref`, + `reset --hard`) and `deployer` (per-deployment state machine; `NewGo` + for microservices, `NewPHP` for erangel). +- `control-plane/` — HTTP API + WS hub + SQLite. Routes split across + `internal/api/{login,sandboxes,templates,environments,routes,deployments,repos}.go`. + `internal/ws/hub.go` exposes `CallAgent` for sync RPCs. +- `agent-micro/` — runs on 172.18.136.92. +- `agent-gateway/` — runs on 172.18.139.186; owns erangel at + `/var/www/html/erangel-ocean` and the `_url` patching. + +Dashboard is a separate `next build` static export under +`dashboard/src/app/`. Static export means dynamic routes need +`generateStaticParams` (see the `sandboxes/[id]` page for the pattern). + +## Wire protocol + +The agent → control-plane channel is one `protocol.Event` per WS text +message. The control-plane → agent channel is an ad-hoc envelope +`{op, id, data}`. `op` values: `deploy`, `stop`, `list_repos`, +`list_branches`, `list_routes`, `probe`, `push_routes`. RPC replies have +`{op:"reply", id, ok, error?}` and a `data` field. The two shapes are +disambiguated by `kind` (event) vs `op` (rpc reply). New ops go in +`agentlib/.../main.go`'s switch and the control-plane's `repos.go` / +`sandboxes.go` / `routes.go` handlers — there is no central registry. + +## Conventions + +- `ponytail:` comments mark intentional shortcuts and "TODO: real + impl"-style carve-outs. They survive into main. Don't remove without + fixing the underlying limitation. +- Slice-2 stable container name: `sdp-` (no deployment id). The + next deploy force-removes the existing one. One live container per + repo at a time. +- Gateway agent persists the per-branch OCP-default snapshot to + `/.sdp/ocp-defaults.json`. Re-captured on every deploy so + branch switches don't break "Restore OCP" buttons. +- `NewPHP` runs `git reset --hard` before fetch (via + `Spec.PreGitReset`), and the agent passes an `AfterStart` closure + that re-applies active route overrides after the container is up. + This is what survives `git reset --hard` + checkout. +- `protocol.Event.ContainerID` is set on the deployer side; the + deployer writes it back via `Store.SetContainerID`. (Currently the + field on the event is unused; container id is recorded in SQLite.) +- Cookie auth: `sdp_session` HttpOnly cookie; the `withAuth` middleware + skips `/api/login`. WebSocket endpoints are NOT auth-gated by the + middleware — they rely on the agent being on a private network. +- Crendentials travel with each deploy/probe/push_routes frame from + control plane to agent. Never logged. Never persisted on the agent. + +## Gotchas + +- Host Go (`/usr/bin/go`) is older than the `go 1.24` modules require + and the toolchain download is blocked. Use the `golang:1.24-alpine` + container. Do not edit code expecting `go build` to work locally. +- The micro agent and gateway agent `main.go` files duplicate most + logic (dial / writer / readLoop / runDeploy). The shared code is in + `agentlib/`. When adding a new op, both files need a switch case. +- `moby/moby/client` v0.5.0 uses `netip.Addr` for `PortBinding.HostIP`, + not a string. +- `sdp-` containers must be in a state where `docker rm -f` works + (the `Slice-2` "one live per repo" rule). Don't manually `docker run` + a second container with the same name. +- The erangel repo path is `/var/www/html/erangel-ocean` on 186, NOT + `~/SDP` (README's earlier value is wrong; the spec was fixed in + Slice 2). `APACHE_DOCUMENT_ROOT` is set to the same path so the + gateway is served at `/erangel/`. +- `agent-gateway/.../main.go` re-imports the `routesState` type and + uses `rs` as both a value and a parameter name in some helpers. + Compiles fine; just be aware when grepping. +- Static-export dynamic routes: `generateStaticParams` must return at + least one placeholder; the actual id is read at runtime in the + client component. See `dashboard/src/app/dashboard/sandboxes/[id]/`. + +## Verifying changes locally + +``` +# Typecheck + build everything +./scripts/build.sh + +# Run the only Go test +docker run --rm -v "$PWD:/src" -w /src/control-plane golang:1.24-alpine sh -c \ + "apk add --no-cache git >/dev/null && git config --global --add safe.directory /src && go test ./..." + +# Smoke the control plane +./bin/control-plane -addr :3452 -data /tmp/sdp-data & +curl -i -X POST http://127.0.0.1:3452/api/login -d '{"username":"x","password":"y"}' +# Expects 401 ("login failed — git ls-remote rejected") when no gateway agent is connected. +``` + +## Out of scope + +RBAC, suspend/resume, sandbox cloning beyond "clone template into +sandbox", per-sandbox Docker networks, per-sandbox resource limits, +health monitoring, the 172.18.136.93 infra agent, notifications. +These are listed as `later` in REQUIREMENTS.md. + +## Do not + +- Do not commit or push unless the user explicitly says "commit" or + "push". +- Do not change the gateway repo path back to `~/SDP` (old docs say + so; reality is `/var/www/html/erangel-ocean`). +- Do not rebuild the dashboard via `next start` for production; the + output is served by nginx on 186. Configure nginx by hand; the + reference config is in `nginx/nginx.conf` and uses + `root /home/administrator/SDP/dashboard;` (i.e. the path + `deploy.sh` scp's the static export to). +- Do not log or persist Bitbucket creds anywhere. diff --git a/README.md b/README.md index dc218a1..69f2f1c 100644 --- a/README.md +++ b/README.md @@ -5,27 +5,42 @@ branch into an isolated sandbox, with the API Gateway routing selected services to the sandbox and the rest to OCP. See [REQUIREMENTS.md](REQUIREMENTS.md) for the full spec. -## Status (Slice 1 — build green, MVP core flow) +## Status (Slice 2 — sandboxes, routes, real auth, all MVP features) `./scripts/build.sh` produces three Linux/amd64 binaries and a static -dashboard. The MVP core flow — login, deploy a microservice or the PHP -gateway, watch progress and logs in real time — works end to end. The -sandbox / template / route management described in REQUIREMENTS.md is -**deferred to Slice 2** and is not yet built. See -[REQUIREMENTS.md](REQUIREMENTS.md#status) for a per-feature checklist. +dashboard. The full MVP flow works end to end: + +- Real Bitbucket auth via `git ls-remote` against the api-gateway. +- Real repo and branch listing via agent WS frames. +- Sandbox / template / environment CRUD with persisted metadata in + SQLite. +- Route overrides per sandbox, with live read-back of the + `_url` map from the gateway's `config.php` after every + branch switch. The agent patches the file and gracefully reloads + apache. +- Per-deploy port binding: the user picks the host port per service + (e.g. eredar at `172.18.136.92:9001`), the container's exposed port + is published to that port. +- Erangel deploy: `git reset --hard → fetch → checkout → pull → + composer install → start container → re-apply route overrides`. + Per-branch OCP-default snapshot persisted to + `/.sdp/ocp-defaults.json`. + +See [REQUIREMENTS.md](REQUIREMENTS.md#status) for the per-feature +checklist. ## Layout ``` . -├── protocol/ # shared wire types (Event, DeployRequest) +├── protocol/ # shared wire types (Event, DeployRequest, RouteOverride, ...) ├── agentlib/ # Go. Shared agent library: gitutil + deployer (Go/PHP flavours) ├── control-plane/ # Go. HTTP API + WS hub + SQLite/.log persistence ├── agent-micro/ # Go. Runs on 172.18.136.92, deploys Go microservices ├── agent-gateway/ # Go. Runs on 172.18.139.186, deploys the PHP API Gateway ├── dashboard/ # NextJS static export, served by nginx -├── nginx/ # reverse proxy + try_files for the dashboard -├── scripts/ # build, deploy, ssh wrappers, nginx patch +├── nginx/ # reference nginx config (manually applied on 186) +├── scripts/ # build, deploy, ssh wrappers ├── docker-compose.yml # all three services on alpine:latest ├── go.work # Go workspace — one build, five modules └── bin/ # build output (gitignored) @@ -39,10 +54,14 @@ for two build flavours: `docker run alpine:3.20` with the host repo bind-mounted at `/src` and the binary as the container command. `alpine:3.20` must be pre-loaded on the host (see [Offline VMs](#offline-vms)). -- **`NewPHP`** — for the API Gateway. Runs `composer install --no-dev` - on the host as a best-effort step (skipped if `composer` or - `composer.json` are absent), then `docker run php:8.3-apache` with the - repo bind-mounted at `/app`. `php:8.3-apache` must be pre-loaded on +- **`NewPHP`** — for the API Gateway (erangel). Runs + `git reset --hard → fetch → checkout → pull → composer install + (best-effort) → docker run php:8.3-apache`, with the repo + bind-mounted at `/var/www/html/erangel-ocean` and + `APACHE_DOCUMENT_ROOT=/var/www/html/erangel-ocean` so the gateway is + served at `/erangel/`, mirroring production. After the container is + up, the agent's `AfterStart` callback re-applies the active route + overrides and reloads apache. `php:8.3-apache` must be pre-loaded on the host. The agent is written in Go; the thing it deploys is a PHP project. @@ -93,8 +112,10 @@ This script: 2. SSHs to **172.18.139.186** (`administrator`) and pushes `bin/control-plane`, `bin/agent-gateway`, and `dashboard/out/` to `~/SDP/` -3. Idempotently splices the SDP location block into - `/etc/nginx/sites-available/default` on 186 and reloads nginx + +Nginx on 186 is configured by hand; the dashboard ends up at +`/home/administrator/SDP/dashboard/`. The required location block is +in [nginx/nginx.conf](nginx/nginx.conf). Override the creds via `SDP_92_PASS` / `SDP_186_PASS` env vars. @@ -108,7 +129,7 @@ docker compose up -d ``` Three services come up on `alpine:latest`: -- `control-plane` → `:8080` +- `control-plane` → `:3452` (an unusual port to avoid collisions) - `agent-micro` (connects to control plane, has docker socket + repos mounted) - `agent-gateway` (same shape) @@ -135,24 +156,32 @@ Three services come up on `alpine:latest`: `/ws/agent` on the control plane; the dashboard subscribes to `/ws/deployments/{id}`. -## MVP stubs (intentional, not Slice 1 scope) +## MVP stubs (intentional, deferred) These are marked with `ponytail:` comments in the code and are -scheduled for later slices. They are **not** in scope for Slice 1. +scheduled for later slices. -- `validateViaAgent` (login) — accepts any creds if an agent is - connected. Real impl: a `git ls-remote` probe frame to the agent - (`control-plane/internal/api/api.go:126`). -- `handleListRepos` / `handleListBranches` — hardcoded fixtures. - Real impl: a `list_repos` / `list_branches` frame to the connected - agent. The `gitutil.ListBranches` helper and the `agentlib` frame - protocol are not yet wired up. -- `handleListDeployments` (GET) — returns `[]`. Real impl reads SQLite - (`control-plane/internal/api/api.go:182`). -- WS auth on `/ws/deployments/*` — open. Real impl checks session token. -- Sandbox, Template, Route, Environment CRUD — entirely deferred to - Slice 2. The data model, REST endpoints, and dashboard pages do not - exist yet. +- `CheckOrigin` in the WS upgrader — open CORS, intentional for an + internal tool. +- "Drop on backpressure" policy for slow WS subscribers — replace with + flow control or persistent event log if the dashboard ever needs + catch-up replay. +- O(n) log tail scan in `store.TailLogs` — fine for tail use; swap to + a ring buffer if logs get huge. + +## Slice 2 dashboard + +The dashboard has these pages: + +- `/` — login (real git-ls-remote via the gateway agent). +- `/dashboard` — quick deploy (ad-hoc single-service deploy). +- `/dashboard/sandboxes` — list, create, clone-from-template. +- `/dashboard/sandboxes/{id}` — sandbox detail. Live routes from the + gateway's `config.php`, per-route toggle (OCP / sandbox override), + microservice deploys with per-service host port and env. +- `/dashboard/templates` — template CRUD. +- `/dashboard/environments` — env CRUD. +- `/dashboard/history` — deployment history (filterable by sandbox). ## See also diff --git a/REQUIREMENTS.md b/REQUIREMENTS.md index 0545f40..3116e80 100644 --- a/REQUIREMENTS.md +++ b/REQUIREMENTS.md @@ -1,17 +1,25 @@ # Sandbox Deployment Platform (SDP) -## Status (Slice 1 — build green, MVP core flow) +## Status (Slice 2 — sandboxes, routes, real auth, all MVP features) The build is green: `./scripts/build.sh` produces three Linux/amd64 -binaries and a static dashboard. The core MVP loop works end to end — -login, deploy a microservice or the PHP gateway, watch progress and -logs in real time. +binaries and a static dashboard. The full MVP flow works end to end: -Sandbox / Template / Route / Environment management is **deferred to -Slice 2** and is not yet built. Real auth via agent-mediated -`git ls-remote` and real branch/repo listing from agents are also -deferred (the current code has hardcoded fixtures and an "accept any -creds if an agent is connected" stub for these). +- Real Bitbucket auth via `git ls-remote` against the api-gateway. +- Real repo and branch listing via agent WS frames. +- Sandbox / template / environment CRUD with persisted metadata in + SQLite. +- Route overrides per sandbox, with live read-back of the + `_url` map from the gateway's `config.php` after every + branch switch. The agent patches the file and gracefully reloads + apache. +- Per-deploy port binding: the user picks the host port per service + (e.g. eredar at `172.18.136.92:9001`), the container's exposed port + is published to that port. +- Erangel deploy: `git reset --hard → fetch → checkout → pull → + composer install → start container → re-apply route overrides`. + Per-branch OCP-default snapshot persisted to + `/.sdp/ocp-defaults.json`. See [Status checklist](#status-checklist) at the bottom of this document for a per-feature status. @@ -114,16 +122,19 @@ IP Address: 172.18.139.186 Repository Root: -~/SDP +/var/www/html/erangel-ocean ``` Contains: ```text -~/SDP +/var/www/html/erangel-ocean ``` -The API Gateway repository. +The API Gateway repository (erangel). The container +`php:8.3-apache` bind-mounts this path at the same path inside the +container and serves the gateway at `/erangel/`, mirroring the +production URL space. --- @@ -1460,37 +1471,45 @@ scheduled for Slice 2. `later` = out of scope for MVP. the per-operation Bitbucket creds. - `done` Micro agent runs `git fetch → checkout → pull → go build → docker run` and streams progress and logs back. -- `done` Gateway agent runs `git fetch → checkout → pull → composer - install (best-effort) → docker run` and streams progress and logs +- `done` Gateway agent runs `git reset --hard → fetch → checkout → + pull → composer install (best-effort) → docker run → re-apply route + overrides → apache graceful reload` and streams progress and logs back. - `done` Dashboard subscribes to a deployment by id over WebSocket and renders stages + live log tail. - `done` SQLite persistence for deployment rows, stage transitions, and append-only log files. -- `next` Replace `validateViaAgent` stub with a real - `git ls-remote` frame. -- `next` Replace hardcoded `handleListRepos` / - `handleListBranches` with agent frames (the `gitutil.ListBranches` - helper and the `agentlib` frame protocol are partially set up but - not wired through). +- `done` Real `validateViaAgent` via the agent's `git ls-remote` + frame. +- `done` Real `list_repos` / `list_branches` via agent frames; the + hardcoded fixtures are gone. +- `done` `list_routes` RPC exposes the live `_url` map from + the gateway's `config.php` after every branch switch. +- `done` `GET /api/deployments` reads deployment history from + SQLite (filterable by sandbox). -## Sandbox & routing (Slice 2) +## Sandbox & routing -- `next` Sandbox CRUD (data model + REST endpoints + dashboard page). -- `next` Sandbox template CRUD and "clone template into sandbox". -- `next` Route management (sandbox vs OCP per service). -- `next` Environment CRUD (persisted named envs, not just inline). -- `next` Actual route push to the API Gateway (the gateway agent - has to update the gateway's routing config, currently this is - the manual `scripts/patch-nginx.sh` step). -- `next` Port allocation table and helpers. +- `done` Sandbox CRUD (data model + REST endpoints + dashboard + pages). +- `done` Sandbox template CRUD and "clone template into sandbox". +- `done` Route management (sandbox vs OCP per service) with live + read-back from the gateway's `config.php`. +- `done` Environment CRUD (persisted named envs, not just inline). +- `done` Actual route push to the API Gateway: the gateway agent + rewrites `application/config/production/config.php` and gracefully + reloads apache. A per-branch OCP-default snapshot is captured + automatically and persisted to `/.sdp/ocp-defaults.json`. +- `done` Per-deploy port binding: the user specifies the host port; + the agent publishes the container's exposed port to it. Concurrency + is "one live container per repo" (the stable name is `sdp-`). ## Auth -- `done` Login endpoint accepts any creds if an agent is connected - (MVP stub). -- `done` Session cookie + in-memory session store. -- `next` Real auth via agent-mediated `git ls-remote`. +- `done` Real auth via agent-mediated `git ls-remote` against the + api-gateway. Login fails fast if no gateway agent is connected. +- `done` Session cookie + in-memory session store, 12-hour TTL, + logout invalidates the token. - `later` RBAC roles (admin / backend / qa / viewer). ## Out of scope for MVP (per the "Future Enhancements" section) diff --git a/control-plane/internal/config/config.go b/control-plane/internal/config/config.go index 9e7add5..e8b0f59 100644 --- a/control-plane/internal/config/config.go +++ b/control-plane/internal/config/config.go @@ -5,8 +5,13 @@ import ( "os" ) +// Slice-2: the control plane listens on an unusual port to avoid +// collisions with anything else on the VM. Nginx on 186 proxies +// /sandbox/credit-card/api/ and /sandbox/credit-card/ws/ to it. +const defaultAddr = ":3452" + type Config struct { - Addr string // listen addr, e.g. ":8080" + Addr string // listen addr, default :3452 DataDir string // SQLite + .log files live here AgentHealth string // map of nodeID -> agent base URL (TODO: real map) } @@ -14,7 +19,7 @@ type Config struct { // Load reads flags and env. Env wins over defaults; flags win over env. func Load() Config { c := Config{ - Addr: envOr("SDP_ADDR", ":8080"), + Addr: envOr("SDP_ADDR", defaultAddr), DataDir: envOr("SDP_DATA", "./data"), AgentHealth: envOr("SDP_AGENT_HEALTH", ""), } diff --git a/dashboard/out/404.html b/dashboard/out/404.html new file mode 100644 index 0000000..a2859f4 --- /dev/null +++ b/dashboard/out/404.html @@ -0,0 +1 @@ +404: This page could not be found.SDP

404

This page could not be found.

\ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/303-30e01c8e944885c6.js b/dashboard/out/_next/static/chunks/303-30e01c8e944885c6.js new file mode 100644 index 0000000..2c5c854 --- /dev/null +++ b/dashboard/out/_next/static/chunks/303-30e01c8e944885c6.js @@ -0,0 +1,16 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[303],{7461:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(4090),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),l=(e,t)=>{let n=(0,r.forwardRef)((n,l)=>{let{color:a="currentColor",size:u=24,strokeWidth:c=2,absoluteStrokeWidth:s,className:d="",children:f,...p}=n;return(0,r.createElement)("svg",{ref:l,...o,width:u,height:u,stroke:a,strokeWidth:s?24*Number(c)/Number(u):c,className:["lucide","lucide-".concat(i(e)),d].join(" "),...p},[...t.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(f)?f:[f]])});return n.displayName="".concat(e),n}},9259:function(e,t,n){n.d(t,{Z:function(){return r}});/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */let r=(0,n(7461).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},3441:function(e,t,n){n.d(t,{Z:function(){return r}});/** + * @license lucide-react v0.344.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */let r=(0,n(7461).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},1266:function(e,t,n){n.d(t,{e:function(){return i}});var r=n(4090);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(){for(var e=arguments.length,t=Array(e),n=0;n{let n=!1,r=t.map(t=>{let r=o(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e(0,i.jsx)(o.WV.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));l.displayName="Label";var a=l},9586:function(e,t,n){n.d(t,{WV:function(){return a},jH:function(){return u}});var r=n(4090),o=n(9542),i=n(9143),l=n(3827),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,i.Z8)("Primitive.".concat(t)),o=r.forwardRef((e,r)=>{let{asChild:o,...i}=e,a=o?n:t;return window[Symbol.for("radix-ui")]=!0,(0,l.jsx)(a,{...i,ref:r})});return o.displayName="Primitive.".concat(t),{...e,[t]:o}},{});function u(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},8961:function(e,t,n){let r,o;n.d(t,{VY:function(){return nF},ZA:function(){return nQ},JO:function(){return nM},ck:function(){return n5},wU:function(){return n8},eT:function(){return n6},h_:function(){return nW},fC:function(){return nA},xz:function(){return nL},B4:function(){return nk},l_:function(){return n$}});var i,l,a,u,c,s,d,f,p=n(4090),v=n.t(p,2),m=n(9542);function h(e,t){let[n,r]=t;return Math.min(r,Math.max(n,e))}function g(e,t){let{checkForDefaultPrevented:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}window.document&&window.document.createElement;var y=n(3827);function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=()=>{let t=n.map(e=>p.createContext(e));return function(n){let r=(null==n?void 0:n[e])||t;return p.useMemo(()=>({["__scope".concat(e)]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=p.createContext(r);o.displayName=t+"Context";let i=n.length;n=[...n,r];let l=t=>{var n;let{scope:r,children:l,...a}=t,u=(null==r?void 0:null===(n=r[e])||void 0===n?void 0:n[i])||o,c=p.useMemo(()=>a,Object.values(a));return(0,y.jsx)(u.Provider,{value:c,children:l})};return l.displayName=t+"Provider",[l,function(n,l){var a;let u=(null==l?void 0:null===(a=l[e])||void 0===a?void 0:a[i])||o,c=p.useContext(u);if(c)return c;if(void 0!==r)return r;throw Error("`".concat(n,"` must be used within `").concat(t,"`"))}]},function(){for(var e=arguments.length,t=Array(e),n=0;n{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let n=e.reduce((e,n)=>{let{useScope:r,scopeName:o}=n,i=r(t)["__scope".concat(o)];return{...e,...i}},{});return p.useMemo(()=>({["__scope".concat(r.scopeName)]:n}),[n])}};return o.scopeName=r.scopeName,o}(r,...t)]}var b=n(1266),x=n(9143);Map;var E=p.createContext(void 0),S=n(9586);function C(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>function(){for(var e,n=arguments.length,r=Array(n),o=0;o{var n,r;let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...f}=e,v=p.useContext(T),[m,h]=p.useState(null),w=null!==(r=null==m?void 0:m.ownerDocument)&&void 0!==r?r:null===(n=globalThis)||void 0===n?void 0:n.document,[,x]=p.useState({}),E=(0,b.e)(t,e=>h(e)),A=Array.from(v.layers),[P]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),k=A.indexOf(P),M=m?A.indexOf(m):-1,O=v.layersWithOutsidePointerEventsDisabled.size>0,j=M>=k,D=p.useRef(!1),W=function(e,t){var n;let{ownerDocument:r=null===(n=globalThis)||void 0===n?void 0:n.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:l}=t,a=C(e),u=p.useRef(!1),c=p.useRef(!1),s=p.useRef(new Map),d=p.useRef(()=>{});return p.useEffect(()=>{function e(){c.current=!1,i.current=!1,s.current.clear()}function t(e){if(!c.current)return;let t=e.target;t instanceof Node&&[...l].some(e=>e.contains(t))||s.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{c.current&&d.current()},0)}function n(e){c.current&&s.current.set(e.type,!1)}let f=t=>{if(t.target&&!u.current){let n=function(){r.removeEventListener("click",d.current);let t=Array.from(s.current.values()).some(Boolean);e(),t||L("dismissableLayer.pointerDownOutside",a,l,{discrete:!0})},l={originalEvent:t};c.current=!0,i.current=o&&0===t.button,s.current.clear(),o&&0===t.button?(r.removeEventListener("click",d.current),d.current=n,r.addEventListener("click",d.current,{once:!0})):n()}else r.removeEventListener("click",d.current),e();u.current=!1},p=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of p)r.addEventListener(e,t,!0),r.addEventListener(e,n);let v=window.setTimeout(()=>{r.addEventListener("pointerdown",f)},0);return()=>{for(let e of(window.clearTimeout(v),r.removeEventListener("pointerdown",f),r.removeEventListener("click",d.current),p))r.removeEventListener(e,t,!0),r.removeEventListener(e,n)}},[r,a,o,i,l]),{onPointerDownCapture:()=>u.current=!0}}(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[...v.branches].some(e=>e.contains(t));!j||n||(null==a||a(e),null==c||c(e),e.defaultPrevented||null==d||d())},{ownerDocument:w,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:v.dismissableSurfaces}),I=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=C(e),o=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!o.current&&L("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{if(i&&D.current)return;let t=e.target;[...v.branches].some(e=>e.contains(t))||(null==u||u(e),null==c||c(e),e.defaultPrevented||null==d||d())},w);return!function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=C(e);p.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{M!==v.layers.size-1||(null==l||l(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},w),p.useEffect(()=>{if(m)return o&&(0===v.layersWithOutsidePointerEventsDisabled.size&&(s=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(m)),v.layers.add(m),N(),()=>{o&&(v.layersWithOutsidePointerEventsDisabled.delete(m),0===v.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=s))}},[m,w,o,v]),p.useEffect(()=>()=>{m&&(v.layers.delete(m),v.layersWithOutsidePointerEventsDisabled.delete(m),N())},[m,v]),p.useEffect(()=>{let e=()=>x({});return document.addEventListener(R,e),()=>document.removeEventListener(R,e)},[]),(0,y.jsx)(S.WV.div,{...f,ref:E,style:{pointerEvents:O?j?"auto":"none":void 0,...e.style},onFocusCapture:g(e.onFocusCapture,I.onFocusCapture),onBlurCapture:g(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:g(e.onPointerDownCapture,W.onPointerDownCapture)})});function N(){let e=new CustomEvent(R);document.dispatchEvent(e)}function L(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?(0,S.jH)(i,l):i.dispatchEvent(l)}A.displayName="DismissableLayer",p.forwardRef((e,t)=>{let n=p.useContext(T),r=p.useRef(null),o=(0,b.e)(t,r);return p.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,y.jsx)(S.WV.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var P=0,k=null;function M(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var O="focusScope.autoFocusOnMount",j="focusScope.autoFocusOnUnmount",D={bubbles:!1,cancelable:!0},W=p.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[a,u]=p.useState(null),c=C(o),s=C(i),d=p.useRef(null),f=(0,b.e)(t,e=>u(e)),v=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let e=function(e){if(v.paused||!a)return;let t=e.target;a.contains(t)?d.current=t:V(d.current,{select:!0})},t=function(e){if(v.paused||!a)return;let t=e.relatedTarget;null===t||a.contains(t)||V(d.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&V(a)});return a&&n.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,a,v.paused]),p.useEffect(()=>{if(a){_.add(v);let e=document.activeElement;if(!a.contains(e)){let t=new CustomEvent(O,D);a.addEventListener(O,c),a.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(V(r,{select:t}),document.activeElement!==n)return}(I(a).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&V(a))}return()=>{a.removeEventListener(O,c),setTimeout(()=>{let t=new CustomEvent(j,D);a.addEventListener(j,s),a.dispatchEvent(t),t.defaultPrevented||V(null!=e?e:document.body,{select:!0}),a.removeEventListener(j,s),_.remove(v)},0)}}},[a,c,s,v]);let m=p.useCallback(e=>{if(!n&&!r||v.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,i]=function(e){let t=I(e);return[F(t,e),F(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&V(i,{select:!0})):(e.preventDefault(),n&&V(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,v.paused]);return(0,y.jsx)(S.WV.div,{tabIndex:-1,...l,ref:f,onKeyDown:m})});function I(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function F(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function V(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}W.displayName="FocusScope";var _=(o=[],{add(e){let t=o[0];e!==t&&(null==t||t.pause()),(o=H(o,e)).unshift(e)},remove(e){var t;null===(t=(o=H(o,e))[0])||void 0===t||t.resume()}});function H(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var B=(null===(d=globalThis)||void 0===d?void 0:d.document)?p.useLayoutEffect:()=>{},z=v[" useId ".trim().toString()]||(()=>void 0),U=0;function K(e){let[t,n]=p.useState(z());return B(()=>{e||n(e=>null!=e?e:String(U++))},[e]),e||(t?"radix-".concat(t):"")}let Z=["top","right","bottom","left"],Y=Math.min,X=Math.max,$=Math.round,q=Math.floor,G=e=>({x:e,y:e}),J={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(e,t){return"function"==typeof e?e(t):e}function ee(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function en(e){return"x"===e?"y":"x"}function er(e){return"y"===e?"height":"width"}function eo(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function ei(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let el=["left","right"],ea=["right","left"],eu=["top","bottom"],ec=["bottom","top"];function es(e){let t=ee(e);return J[t]+e.slice(t.length)}function ed(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function ef(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ep(e,t,n){let r,{reference:o,floating:i}=e,l=eo(t),a=en(eo(t)),u=er(a),c=ee(t),s="y"===l,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(c){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(et(t)){case"start":r[a]-=p*(n&&s?-1:1);break;case"end":r[a]+=p*(n&&s?-1:1)}return r}async function ev(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Q(t,e),v=ed(p),m=a[f?"floating"===d?"reference":"floating":d],h=ef(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=ef(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:u}):g);return{top:(h.top-b.top+v.top)/w.y,bottom:(b.bottom-h.bottom+v.bottom)/w.y,left:(h.left-b.left+v.left)/w.x,right:(b.right-h.right+v.right)/w.x}}let em=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:ev},u=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:d}=ep(c,r,u),f=r,p=0,v={};for(let n=0;ne[t]>=0)}let ey=new Set(["left","top"]);async function ew(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=ee(n),a=et(n),u="y"===eo(n),c=ey.has(l)?-1:1,s=i&&u?-1:1,d=Q(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),u?{x:p*s,y:f*c}:{x:f*c,y:p*s}}function eb(e){return eS(e)?(e.nodeName||"").toLowerCase():"#document"}function ex(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eE(e){var t;return null==(t=(eS(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function eS(e){return e instanceof Node||e instanceof ex(e).Node}function eC(e){return e instanceof Element||e instanceof ex(e).Element}function eR(e){return e instanceof HTMLElement||e instanceof ex(e).HTMLElement}function eT(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ex(e).ShadowRoot)}function eA(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=eD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function eN(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let eL=/transform|translate|scale|rotate|perspective|filter/,eP=/paint|layout|strict|content/,ek=e=>!!e&&"none"!==e;function eM(e){let t=eC(e)?eD(e):e;return ek(t.transform)||ek(t.translate)||ek(t.scale)||ek(t.rotate)||ek(t.perspective)||!eO()&&(ek(t.backdropFilter)||ek(t.filter))||eL.test(t.willChange||"")||eP.test(t.contain||"")}function eO(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function ej(e){return/^(html|body|#document)$/.test(eb(e))}function eD(e){return ex(e).getComputedStyle(e)}function eW(e){return eC(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eI(e){if("html"===eb(e))return e;let t=e.assignedSlot||e.parentNode||eT(e)&&e.host||eE(e);return eT(t)?t.host:t}function eF(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=eI(t);return ej(n)?t.ownerDocument?t.ownerDocument.body:t.body:eR(n)&&eA(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=ex(o);if(!i)return t.concat(o,eF(o,[],n));{let e=eV(l);return t.concat(l,l.visualViewport||[],eA(o)?o:[],e&&n?eF(e):[])}}function eV(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function e_(e){let t=eD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=eR(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=$(n)!==i||$(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function eH(e){return eC(e)?e:e.contextElement}function eB(e){let t=eH(e);if(!eR(t))return G(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=e_(t),l=(i?$(n.width):n.width)/r,a=(i?$(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}let ez=G(0);function eU(e){let t=ex(e);return eO()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ez}function eK(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=eH(e),a=G(1);t&&(r?eC(r)&&(a=eB(r)):a=eB(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===ex(l))&&o)?eU(l):G(0),c=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(l){let e=ex(l),t=r&&eC(r)?ex(r):r,n=e,o=eV(n);for(;o&&r&&t!==n;){let e=eB(o),t=o.getBoundingClientRect(),r=eD(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,f*=e.y,c+=i,s+=l,o=eV(n=ex(o))}}return ef({width:d,height:f,x:c,y:s})}function eZ(e,t){let n=eW(e).scrollLeft;return t?t.left+n:eK(eE(e)).left+n}function eY(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eZ(e,n),y:n.top+t.scrollTop}}function eX(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=ex(e),r=eE(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,u=0;if(o){i=o.width,l=o.height;let e=eO();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}let c=eZ(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)r=function(e){let t=eE(e),n=eW(e),r=e.ownerDocument.body,o=X(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=X(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),l=-n.scrollLeft+eZ(e),a=-n.scrollTop;return"rtl"===eD(r).direction&&(l+=X(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(eE(e));else if(eC(t))r=function(e,t){let n=eK(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=eR(e)?eB(e):G(1),l=e.clientWidth*i.x;return{width:l,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=eU(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ef(r)}function e$(e){return"static"===eD(e).position}function eq(e,t){if(!eR(e)||"fixed"===eD(e).position)return null;if(t)return t(e);let n=e.offsetParent;return eE(e)===n&&(n=n.ownerDocument.body),n}function eG(e,t){var n;let r=ex(e);if(eN(e))return r;if(!eR(e)){let t=eI(e);for(;t&&!ej(t);){if(eC(t)&&!e$(t))return t;t=eI(t)}return r}let o=eq(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(eb(n)))&&e$(o);)o=eq(o,t);return o&&ej(o)&&e$(o)&&!eM(o)?r:o||function(e){let t=eI(e);for(;eR(t)&&!ej(t);){if(eM(t))return t;if(eN(t))break;t=eI(t)}return null}(e)||r}let eJ=async function(e){let t=this.getOffsetParent||eG,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=eR(t),o=eE(t),i="fixed"===n,l=eK(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=G(0);if(r||!r&&!i){if(("body"!==eb(t)||eA(o))&&(a=eW(t)),r){let e=eK(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=eZ(o))}i&&!r&&o&&(u.x=eZ(o));let c=!o||r||i?G(0):eY(o,a);return{x:l.left+a.scrollLeft-u.x-c.x,y:l.top+a.scrollTop-u.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eQ={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=eE(r),a=!!t&&eN(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=G(1),s=G(0),d=eR(r);if((d||!d&&!i)&&(("body"!==eb(r)||eA(l))&&(u=eW(r)),d)){let e=eK(r);c=eB(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let f=!l||d||i?G(0):eY(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+s.x+f.x,y:n.y*c.y-u.scrollTop*c.y+s.y+f.y}},getDocumentElement:eE,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?eN(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eF(e,[],!1).filter(e=>eC(e)&&"body"!==eb(e)),o=null,i="fixed"===eD(e).position,l=i?eI(e):e;for(;eC(l)&&!ej(l);){let t=eD(l),n=eM(l);n||"fixed"!==t.position||(o=null),(i?n||o:!(!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||eA(l)&&!n&&function e(t,n){let r=eI(t);return!(r===n||!eC(r)||ej(r))&&("fixed"===eD(r).position||e(r,n))}(e,l)))?o=t:r=r.filter(e=>e!==l),l=eI(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=eX(t,i[0],o),a=l.top,u=l.right,c=l.bottom,s=l.left;for(let e=1;e({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:u}=t,{element:c,padding:s=0}=Q(e,t)||{};if(null==c)return{};let d=ed(s),f={x:n,y:r},p=en(eo(o)),v=er(p),m=await l.getDimensions(c),h="y"===p,g=h?"clientHeight":"clientWidth",y=i.reference[v]+i.reference[p]-f[p]-i.floating[v],w=f[p]-i.reference[p],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(c)),x=b?b[g]:0;x&&await (null==l.isElement?void 0:l.isElement(b))||(x=a.floating[g]||i.floating[v]);let E=x/2-m[v]/2-1,S=Y(d[h?"top":"left"],E),C=Y(d[h?"bottom":"right"],E),R=x-m[v]-C,T=x/2-m[v]/2+(y/2-w/2),A=X(S,Y(T,R)),N=!u.arrow&&null!=et(o)&&T!==A&&i.reference[v]/2-(T{let r=new Map,o={platform:eQ,...n},i={...o.platform,_c:r};return em(e,t,{...o,platform:i})};var e4="undefined"!=typeof document?p.useLayoutEffect:function(){};function e5(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!e5(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!e5(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function e9(e){return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e6(e,t){let n=e9(e);return Math.round(t*n)/n}function e3(e){let t=p.useRef(e);return e4(()=>{t.current=e}),t}let e8=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?e1({element:n.current,padding:r}).fn(t):{}:n?e1({element:n,padding:r}).fn(t):{}}}),e7=(e,t)=>{var n;let r=(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:o,y:i,placement:l,middlewareData:a}=e,u=await ew(e,n);return l===(null==(t=a.offset)?void 0:t.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}});return{name:r.name,fn:r.fn,options:[e,t]}},te=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:o,platform:i}=e,{mainAxis:l=!0,crossAxis:a=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Q(n,e),s={x:t,y:r},d=await i.detectOverflow(e,c),f=eo(ee(o)),p=en(f),v=s[p],m=s[f];if(l){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=v+d[e],r=v-d[t];v=X(n,Y(v,r))}if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=m+d[e],r=m-d[t];m=X(n,Y(m,r))}let h=u.fn({...e,[p]:v,[f]:m});return{...h,data:{x:h.x-t,y:h.y-r,enabled:{[p]:l,[f]:a}}}}});return{name:r.name,fn:r.fn,options:[e,t]}},tt=(e,t)=>{var n;return{fn:(void 0===(n=e)&&(n={}),{options:n,fn(e){let{x:t,y:r,placement:o,rects:i,middlewareData:l}=e,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=Q(n,e),s={x:t,y:r},d=eo(o),f=en(d),p=s[f],v=s[d],m=Q(a,e),h="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+h.mainAxis,n=i.reference[f]+i.reference[e]-h.mainAxis;pn&&(p=n)}if(c){var g,y;let e="y"===f?"width":"height",t=ey.has(ee(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=l.offset)?void 0:g[d])||0)+(t?0:h.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[d])||0)-(t?h.crossAxis:0);vr&&(v=r)}return{[f]:p,[d]:v}}}).fn,options:[e,t]}},tn=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"flip",options:n,async fn(e){var t,r,o,i,l;let{placement:a,middlewareData:u,rects:c,initialPlacement:s,platform:d,elements:f}=e,{mainAxis:p=!0,crossAxis:v=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=Q(n,e);if(null!=(t=u.arrow)&&t.alignmentOffset)return{};let b=ee(a),x=eo(s),E=ee(s)===s,S=await (null==d.isRTL?void 0:d.isRTL(f.floating)),C=m||(E||!y?[es(s)]:function(e){let t=es(e);return[ei(e),t,ei(t)]}(s)),R="none"!==g;!m&&R&&C.push(...function(e,t,n,r){let o=et(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?ea:el;return t?el:ea;case"left":case"right":return t?eu:ec;default:return[]}}(ee(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(ei)))),i}(s,y,g,S));let T=[s,...C],A=await d.detectOverflow(e,w),N=[],L=(null==(r=u.flip)?void 0:r.overflows)||[];if(p&&N.push(A[b]),v){let e=function(e,t,n){void 0===n&&(n=!1);let r=et(e),o=en(eo(e)),i=er(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=es(l)),[l,es(l)]}(a,c,S);N.push(A[e[0]],A[e[1]])}if(L=[...L,{placement:a,overflows:N}],!N.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=T[e];if(t&&(!("alignment"===v&&x!==eo(t))||L.every(e=>eo(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(i=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(h){case"bestFit":{let e=null==(l=L.filter(e=>{if(R){let t=eo(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}});return{name:r.name,fn:r.fn,options:[e,t]}},tr=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"size",options:n,async fn(e){var t,r;let o,i;let{placement:l,rects:a,platform:u,elements:c}=e,{apply:s=()=>{},...d}=Q(n,e),f=await u.detectOverflow(e,d),p=ee(l),v=et(l),m="y"===eo(l),{width:h,height:g}=a.floating;"top"===p||"bottom"===p?(o=p,i=v===(await (null==u.isRTL?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(i=p,o="end"===v?"top":"bottom");let y=g-f.top-f.bottom,w=h-f.left-f.right,b=Y(g-f[o],y),x=Y(h-f[i],w),E=!e.middlewareData.shift,S=b,C=x;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(C=w),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(S=y),E&&!v){let e=X(f.left,0),t=X(f.right,0),n=X(f.top,0),r=X(f.bottom,0);m?C=h-2*(0!==e||0!==t?e+t:X(f.left,f.right)):S=g-2*(0!==n||0!==r?n+r:X(f.top,f.bottom))}await s({...e,availableWidth:C,availableHeight:S});let R=await u.getDimensions(c.floating);return h!==R.width||g!==R.height?{reset:{rects:!0}}:{}}});return{name:r.name,fn:r.fn,options:[e,t]}},to=(e,t)=>{var n;let r=(void 0===(n=e)&&(n={}),{name:"hide",options:n,async fn(e){let{rects:t,platform:r}=e,{strategy:o="referenceHidden",...i}=Q(n,e);switch(o){case"referenceHidden":{let n=eh(await r.detectOverflow(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:eg(n)}}}case"escaped":{let n=eh(await r.detectOverflow(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:eg(n)}}}default:return{}}}});return{name:r.name,fn:r.fn,options:[e,t]}},ti=(e,t)=>{let n=e8(e);return{name:n.name,fn:n.fn,options:[e,t]}};var tl=p.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,y.jsx)(S.WV.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,y.jsx)("polygon",{points:"0,0 30,0 15,10"})})});tl.displayName="Arrow";var ta="Popper",[tu,tc]=w(ta),[ts,td]=tu(ta),tf=e=>{let{__scopePopper:t,children:n}=e,[r,o]=p.useState(null),[i,l]=p.useState(void 0);return(0,y.jsx)(ts,{scope:t,anchor:r,onAnchorChange:o,placementState:i,setPlacementState:l,children:n})};tf.displayName=ta;var tp="PopperAnchor",tv=p.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,i=td(tp,n),l=p.useRef(null),a=i.onAnchorChange,u=p.useCallback(e=>{l.current=e,e&&a(e)},[a]),c=(0,b.e)(t,u),s=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=s.current;s.current=r.current,e!==s.current&&a(s.current)});let d=i.placementState&&tC(i.placementState),f=null==d?void 0:d[0],v=null==d?void 0:d[1];return r?null:(0,y.jsx)(S.WV.div,{"data-radix-popper-side":f,"data-radix-popper-align":v,...o,ref:c})});tv.displayName=tp;var tm="PopperContent",[th,tg]=tu(tm),ty=p.forwardRef((e,t)=>{var n,r,o,i,l,a,u,c;let{__scopePopper:s,side:d="bottom",sideOffset:f=0,align:v="center",alignOffset:h=0,arrowPadding:g=0,avoidCollisions:w=!0,collisionBoundary:x=[],collisionPadding:E=0,sticky:R="partial",hideWhenDetached:T=!1,updatePositionStrategy:A="optimized",onPlaced:N,...L}=e,P=td(tm,s),[k,M]=p.useState(null),O=(0,b.e)(t,e=>M(e)),[j,D]=p.useState(null),W=function(e){let[t,n]=p.useState(void 0);return B(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(j),I=null!==(u=null==W?void 0:W.width)&&void 0!==u?u:0,F=null!==(c=null==W?void 0:W.height)&&void 0!==c?c:0,V="number"==typeof E?E:{top:0,right:0,bottom:0,left:0,...E},_=Array.isArray(x)?x:[x],H=_.length>0,z={padding:V,boundary:_.filter(tE),altBoundary:H},{refs:U,floatingStyles:K,placement:Z,isPositioned:$,middlewareData:G}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[s,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=p.useState(r);e5(f,r)||v(r);let[h,g]=p.useState(null),[y,w]=p.useState(null),b=p.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),x=p.useCallback(e=>{e!==R.current&&(R.current=e,w(e))},[]),E=i||h,S=l||y,C=p.useRef(null),R=p.useRef(null),T=p.useRef(s),A=null!=u,N=e3(u),L=e3(o),P=e3(c),k=p.useCallback(()=>{if(!C.current||!R.current)return;let e={placement:t,strategy:n,middleware:f};L.current&&(e.platform=L.current),e2(C.current,R.current,e).then(e=>{let t={...e,isPositioned:!1!==P.current};M.current&&!e5(T.current,t)&&(T.current=t,m.flushSync(()=>{d(t)}))})},[f,t,n,L,P]);e4(()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let M=p.useRef(!1);e4(()=>(M.current=!0,()=>{M.current=!1}),[]),e4(()=>{if(E&&(C.current=E),S&&(R.current=S),E&&S){if(N.current)return N.current(E,S,k);k()}},[E,S,k,N,A]);let O=p.useMemo(()=>({reference:C,floating:R,setReference:b,setFloating:x}),[b,x]),j=p.useMemo(()=>({reference:E,floating:S}),[E,S]),D=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=e6(j.floating,s.x),r=e6(j.floating,s.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...e9(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,j.floating,s.x,s.y]);return p.useMemo(()=>({...s,update:k,refs:O,elements:j,floatingStyles:D}),[s,k,O,j,D])}({strategy:"fixed",placement:d+("center"!==v?"-"+v:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let f=s&&u?function(e,t){let n,r=null,o=eE(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();let c=e.getBoundingClientRect(),{left:s,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=q(d),m=q(o.clientWidth-(s+f)),h={rootMargin:-v+"px "+-m+"px "+-q(o.clientHeight-(d+p))+"px "+-q(s)+"px",threshold:X(0,Y(1,u))||1},g=!0;function y(t){let r=t[0].intersectionRatio;if(r!==u){if(!g)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||e0(c,e.getBoundingClientRect())||l(),g=!1}try{r=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,h)}r.observe(e)}(!0),i}(s,n):null,p=-1,v=null;a&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),s&&!c&&v.observe(s),t&&v.observe(t));let m=c?eK(e):null;return c&&function t(){let r=eK(e);m&&!e0(m,r)&&n(),m=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=v)||e.disconnect(),v=null,c&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===A})},elements:{reference:P.anchor},middleware:[e7({mainAxis:f+F,alignmentAxis:h}),w&&te({mainAxis:!0,crossAxis:!1,limiter:"partial"===R?tt():void 0,...z}),w&&tn({...z}),tr({...z,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),j&&ti({element:j,padding:g}),tS({arrowWidth:I,arrowHeight:F}),T&&to({strategy:"referenceHidden",...z,boundary:H?z.boundary:void 0})]}),J=P.setPlacementState;B(()=>(J(Z),()=>{J(void 0)}),[Z,J]);let[Q,ee]=tC(Z),et=C(N);B(()=>{$&&(null==et||et())},[$,et]);let en=null===(n=G.arrow)||void 0===n?void 0:n.x,er=null===(r=G.arrow)||void 0===r?void 0:r.y,eo=(null===(o=G.arrow)||void 0===o?void 0:o.centerOffset)!==0,[ei,el]=p.useState();return B(()=>{k&&el(window.getComputedStyle(k).zIndex)},[k]),(0,y.jsx)("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:$?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ei,"--radix-popper-transform-origin":[null===(i=G.transformOrigin)||void 0===i?void 0:i.x,null===(l=G.transformOrigin)||void 0===l?void 0:l.y].join(" "),...(null===(a=G.hide)||void 0===a?void 0:a.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,y.jsx)(th,{scope:s,placedSide:Q,placedAlign:ee,onArrowChange:D,arrowX:en,arrowY:er,shouldHideArrow:eo,children:(0,y.jsx)(S.WV.div,{"data-side":Q,"data-align":ee,...L,ref:O,style:{...L.style,animation:$?void 0:"none"}})})})});ty.displayName=tm;var tw="PopperArrow",tb={top:"bottom",right:"left",bottom:"top",left:"right"},tx=p.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=tg(tw,n),i=tb[o.placedSide];return(0,y.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,y.jsx)(tl,{...r,ref:t,style:{...r.style,display:"block"}})})});function tE(e){return null!==e}tx.displayName=tw;var tS=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:u,middlewareData:c}=t,s=(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[p,v]=tC(a),m={start:"0%",center:"50%",end:"100%"}[v],h=(null!==(i=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==i?i:0)+d/2,g=(null!==(l=null===(o=c.arrow)||void 0===o?void 0:o.y)&&void 0!==l?l:0)+f/2,y="",w="";return"bottom"===p?(y=s?m:"".concat(h,"px"),w="".concat(-f,"px")):"top"===p?(y=s?m:"".concat(h,"px"),w="".concat(u.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),w=s?m:"".concat(g,"px")):"left"===p&&(y="".concat(u.floating.width+f,"px"),w=s?m:"".concat(g,"px")),{data:{x:y,y:w}}}});function tC(e){let[t,n="center"]=e.split("-");return[t,n]}var tR=p.forwardRef((e,t)=>{var n,r;let{container:o,...i}=e,[l,a]=p.useState(!1);B(()=>a(!0),[]);let u=o||l&&(null===(r=globalThis)||void 0===r?void 0:null===(n=r.document)||void 0===n?void 0:n.body);return u?m.createPortal((0,y.jsx)(S.WV.div,{...i,ref:t}),u):null});tR.displayName="Portal";var tT=e=>{var t,n;let r,o;let{present:i,children:l}=e,a=function(e){var t,n;let[r,o]=p.useState(),i=p.useRef(null),l=p.useRef(e),a=p.useRef("none"),[u,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},p.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return p.useEffect(()=>{let e=tN(i.current);a.current="mounted"===u?e:"none"},[u]),B(()=>{let t=i.current,n=l.current;if(n!==e){let r=a.current,o=tN(t);e?c("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?c("UNMOUNT"):n&&r!==o?c("ANIMATION_OUT"):c("UNMOUNT"),l.current=e}},[e,c]),B(()=>{if(r){var e;let t;let n=null!==(e=r.ownerDocument.defaultView)&&void 0!==e?e:window,o=e=>{let o=tN(i.current).includes(CSS.escape(e.animationName));if(e.target===r&&o&&(c("ANIMATION_END"),!l.current)){let e=r.style.animationFillMode;r.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=e)})}},u=e=>{e.target===r&&(a.current=tN(i.current))};return r.addEventListener("animationstart",u),r.addEventListener("animationcancel",o),r.addEventListener("animationend",o),()=>{n.clearTimeout(t),r.removeEventListener("animationstart",u),r.removeEventListener("animationcancel",o),r.removeEventListener("animationend",o)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:p.useCallback(e=>{i.current=e?getComputedStyle(e):null,o(e)},[])}}(i),u="function"==typeof l?l({present:a.isPresent}):p.Children.only(l),c=function(){for(var e=arguments.length,t=Array(e),n=0;n{let t=r.current,n=!1,o=t.map(t=>{let r=tA(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e{},caller:o}=e,[i,l,a]=function(e){let{defaultProp:t,onChange:n}=e,[r,o]=p.useState(t),i=p.useRef(r),l=p.useRef(n);return tL(()=>{l.current=n},[n]),p.useEffect(()=>{if(i.current!==r){var e;null===(e=l.current)||void 0===e||e.call(l,r),i.current=r}},[r,i]),[r,o,l]}({defaultProp:n,onChange:r}),u=void 0!==t,c=u?t:i;{let e=p.useRef(void 0!==t);p.useEffect(()=>{let t=e.current;if(t!==u){let e=u?"controlled":"uncontrolled";console.warn("".concat(o," is changing from ").concat(t?"controlled":"uncontrolled"," to ").concat(e,". Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component."))}e.current=u},[u,o])}return[c,p.useCallback(e=>{if(u){let r="function"==typeof e?e(t):e;if(r!==t){var n;null===(n=a.current)||void 0===n||n.call(a,r)}}else l(e)},[u,t,l,a])]}Symbol("RADIX:SYNC_STATE");var tk=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});p.forwardRef((e,t)=>(0,y.jsx)(S.WV.span,{...e,ref:t,style:{...tk,...e.style}})).displayName="VisuallyHidden";var tM=new WeakMap,tO=new WeakMap,tj={},tD=0,tW=function(e){return e&&(e.host||tW(e.parentNode))},tI=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=tW(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});tj[n]||(tj[n]=new WeakMap);var i=tj[n],l=[],a=new Set,u=new Set(o),c=function(e){!e||a.has(e)||(a.add(e),c(e.parentNode))};o.forEach(c);var s=function(e){!e||u.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))s(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(tM.get(e)||0)+1,c=(i.get(e)||0)+1;tM.set(e,u),i.set(e,c),l.push(e),1===u&&o&&tO.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return s(t),a.clear(),tD++,function(){l.forEach(function(e){var t=tM.get(e)-1,o=i.get(e)-1;tM.set(e,t),i.set(e,o),t||(tO.has(e)||e.removeAttribute(r),tO.delete(e)),o||e.removeAttribute(n)}),--tD||(tM=new WeakMap,tM=new WeakMap,tO=new WeakMap,tj={})}},tF=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),tI(r,o,n,"aria-hidden")):function(){return null}},tV=function(){return(tV=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}"function"==typeof SuppressedError&&SuppressedError;var tH="right-scroll-bar-position",tB="width-before-scroll-bar";function tz(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var tU=p.useLayoutEffect,tK=new WeakMap,tZ=(void 0===i&&(i={}),(void 0===l&&(l=function(e){return e}),a=[],u=!1,c={read:function(){if(u)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:null},useMedium:function(e){var t=l(e,u);return a.push(t),function(){a=a.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(u=!0;a.length;){var t=a;a=[],t.forEach(e)}a={push:function(t){return e(t)},filter:function(){return a}}},assignMedium:function(e){u=!0;var t=[];if(a.length){var n=a;a=[],n.forEach(e),t=a}var r=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(r)};o(),a={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),a}}}}).options=tV({async:!0,ssr:!1},i),c),tY=function(){},tX=p.forwardRef(function(e,t){var n,r,o,i,l=p.useRef(null),a=p.useState({onScrollCapture:tY,onWheelCapture:tY,onTouchMoveCapture:tY}),u=a[0],c=a[1],s=e.forwardProps,d=e.children,f=e.className,v=e.removeScrollBar,m=e.enabled,h=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,b=e.inert,x=e.allowPinchZoom,E=e.as,S=e.gapMode,C=t_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=(n=[l,t],r=function(e){return n.forEach(function(t){return tz(t,e)})},(o=(0,p.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,i=o.facade,tU(function(){var e=tK.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||tz(e,null)}),r.forEach(function(e){t.has(e)||tz(e,o)})}tK.set(i,n)},[n]),i),T=tV(tV({},C),u);return p.createElement(p.Fragment,null,m&&p.createElement(g,{sideCar:tZ,removeScrollBar:v,shards:h,noRelative:y,noIsolation:w,inert:b,setCallbacks:c,allowPinchZoom:!!x,lockRef:l,gapMode:S}),s?p.cloneElement(p.Children.only(d),tV(tV({},T),{ref:R})):p.createElement(void 0===E?"div":E,tV({},T,{className:f,ref:R}),d))});tX.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tX.classNames={fullWidth:tB,zeroRight:tH};var t$=function(e){var t=e.sideCar,n=t_(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return p.createElement(r,tV({},n))};t$.isSideCarExport=!0;var tq=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=f||n.nc;return t&&e.setAttribute("nonce",t),e}())){var o,i;(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tG=function(){var e=tq();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tJ=function(){var e=tG();return function(t){return e(t.styles,t.dynamic),null}},tQ=function(e){return parseInt(e||"",10)||0},t0=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[tQ(n),tQ(r),tQ(o)]},t1=function(e){void 0===e&&(e="margin");var t=t0(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},t2=tJ(),t4="data-scroll-locked",t5=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(t4,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tH," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(tB," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(tH," .").concat(tH," {\n right: 0 ").concat(r,";\n }\n \n .").concat(tB," .").concat(tB," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(t4,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},t9=function(){var e=parseInt(document.body.getAttribute(t4)||"0",10);return isFinite(e)?e:0},t6=function(){p.useEffect(function(){return document.body.setAttribute(t4,(t9()+1).toString()),function(){var e=t9()-1;e<=0?document.body.removeAttribute(t4):document.body.setAttribute(t4,e.toString())}},[])},t3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;t6();var i=p.useMemo(function(){return t1(o)},[o]);return p.createElement(t2,{styles:t5(i,!t,o,n?"":"!important")})},t8=!1;try{var t7=Object.defineProperty({},"passive",{get:function(){return t8=!0,!0}});window.addEventListener("test",t7,t7),window.removeEventListener("test",t7,t7)}catch(e){t8=!1}var ne=!!t8&&{passive:!1},nt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},nn=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),nr(e,r)){var o=no(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nr=function(e,t){return"v"===e?nt(t,"overflowY"):nt(t,"overflowX")},no=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},ni=function(e,t,n,r,o){var i,l=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=l*r,u=n.target,c=t.contains(u),s=!1,d=a>0,f=0,p=0;do{if(!u)break;var v=no(e,u),m=v[0],h=v[1]-v[2]-l*m;(m||h)&&nr(e,u)&&(f+=h,p+=m);var g=u.parentNode;u=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return d&&(o&&1>Math.abs(f)||!o&&a>f)?s=!0:!d&&(o&&1>Math.abs(p)||!o&&-a>p)&&(s=!0),s},nl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},na=function(e){return[e.deltaX,e.deltaY]},nu=function(e){return e&&"current"in e?e.current:e},nc=0,ns=[],nd=(tZ.useMedium(function(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(nc++)[0],i=p.useState(tJ)[0],l=p.useRef(e);p.useEffect(function(){l.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;oMath.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===s||p.contains(s)))return!1;var v=nn(d,s);if(!v)return!0;if(v?o=d:(o="v"===d?"h":"v",v=nn(d,s)),!v)return!1;if(!r.current&&"changedTouches"in e&&(u||c)&&(r.current=o),!o)return!0;var m=r.current||o;return ni(m,t,e,"h"===m?u:c,!0)},[]),u=p.useCallback(function(e){if(ns.length&&ns[ns.length-1]===i){var n="deltaY"in e?na(e):nl(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(nu).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?a(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=p.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),s=p.useCallback(function(e){n.current=nl(e),r.current=void 0},[]),d=p.useCallback(function(t){c(t.type,na(t),t.target,a(t,e.lockRef.current))},[]),f=p.useCallback(function(t){c(t.type,nl(t),t.target,a(t,e.lockRef.current))},[]);p.useEffect(function(){return ns.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,ne),document.addEventListener("touchmove",u,ne),document.addEventListener("touchstart",s,ne),function(){ns=ns.filter(function(e){return e!==i}),document.removeEventListener("wheel",u,ne),document.removeEventListener("touchmove",u,ne),document.removeEventListener("touchstart",s,ne)}},[]);var v=e.removeScrollBar,m=e.inert;return p.createElement(p.Fragment,null,m?p.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,v?p.createElement(t3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),t$),nf=p.forwardRef(function(e,t){return p.createElement(tX,tV({},e,{ref:t,sideCar:nd}))});nf.classNames=tX.classNames;var np=[" ","Enter","ArrowUp","ArrowDown"],nv=[" ","Enter"],nm="Select",[nh,ng,ny]=function(e){let t=e+"CollectionProvider",[n,r]=w(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{let{scope:t,children:n}=e,r=p.useRef(null),i=p.useRef(new Map).current;return(0,y.jsx)(o,{scope:t,itemMap:i,collectionRef:r,children:n})};l.displayName=t;let a=e+"CollectionSlot",u=(0,x.Z8)(a),c=p.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=i(a,n),l=(0,b.e)(t,o.collectionRef);return(0,y.jsx)(u,{ref:l,children:r})});c.displayName=a;let s=e+"CollectionItemSlot",d="data-radix-collection-item",f=(0,x.Z8)(s),v=p.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,l=p.useRef(null),a=(0,b.e)(t,l),u=i(s,n);return p.useEffect(()=>(u.itemMap.set(l,{ref:l,...o}),()=>void u.itemMap.delete(l))),(0,y.jsx)(f,{[d]:"",ref:a,children:r})});return v.displayName=s,[{Provider:l,Slot:c,ItemSlot:v},function(t){let n=i(e+"CollectionConsumer",t);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(d,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}(nm),[nw,nb]=w(nm,[ny,tc]),nx=tc(),[nE,nS]=nw(nm),[nC,nR]=nw(nm);function nT(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:a,onValueChange:u,dir:c,name:s,autoComplete:d,disabled:f,required:v,form:m,internal_do_not_use_render:h}=e,g=nx(t),[w,b]=p.useState(null),[x,S]=p.useState(null),[C,R]=p.useState(!1),T=function(e){let t=p.useContext(E);return e||t||"ltr"}(c),[A,N]=tP({prop:r,defaultProp:null!=o&&o,onChange:i,caller:nm}),[L,P]=tP({prop:l,defaultProp:a,onChange:u,caller:nm}),k=p.useRef(null),M=!w||!!m||!!w.closest("form"),[O,j]=p.useState(new Set),D=K(),W=Array.from(O).map(e=>e.props.value).join(";"),I=p.useCallback(e=>{j(t=>new Set(t).add(e))},[]),F=p.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),V={required:v,trigger:w,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:R,contentId:D,value:L,onValueChange:P,open:A,onOpenChange:N,dir:T,triggerPointerDownPosRef:k,disabled:f,name:s,autoComplete:d,form:m,nativeOptions:O,nativeSelectKey:W,isFormControl:M};return(0,y.jsx)(tf,{...g,children:(0,y.jsx)(nE,{scope:t,...V,children:(0,y.jsx)(nh.Provider,{scope:t,children:(0,y.jsx)(nC,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:F,children:"function"==typeof h?h(V):n})})})})}nT.displayName="SelectProvider";var nA=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,y.jsx)(nT,{__scopeSelect:t,...r,internal_do_not_use_render:e=>{let{isFormControl:r}=e;return(0,y.jsxs)(y.Fragment,{children:[n,r?(0,y.jsx)(ro,{__scopeSelect:t}):null]})}})};nA.displayName=nm;var nN="SelectTrigger",nL=p.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,i=nx(n),l=nS(nN,n),a=l.disabled||r,u=(0,b.e)(t,l.onTriggerChange),c=ng(n),s=p.useRef("touch"),[d,f,v]=rl(e=>{let t=c().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=ra(t,e,n);void 0!==r&&l.onValueChange(r.value)}),m=e=>{a||(l.onOpenChange(!0),v()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,y.jsx)(tv,{asChild:!0,...i,children:(0,y.jsx)(S.WV.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":ri(l.value)?"":void 0,...o,ref:u,onClick:g(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==s.current&&m(e)}),onPointerDown:g(o.onPointerDown,e=>{s.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())}),onKeyDown:g(o.onKeyDown,e=>{let t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),(!t||" "!==e.key)&&np.includes(e.key)&&(m(),e.preventDefault())})})})});nL.displayName=nN;var nP="SelectValue",nk=p.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...a}=e,u=nS(nP,n),{onValueNodeHasChildrenChange:c}=u,s=void 0!==i,d=(0,b.e)(t,u.onValueNodeChange);B(()=>{c(s)},[c,s]);let f=ri(u.value);return(0,y.jsx)(S.WV.span,{...a,asChild:!f&&a.asChild,ref:d,style:{pointerEvents:"none"},children:(0,y.jsx)(p.Fragment,{children:f?l:i},f?"placeholder":"value")})});nk.displayName=nP;var nM=p.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,y.jsx)(S.WV.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nM.displayName="SelectIcon";var nO="SelectPortal",[nj,nD]=nw(nO,{forceMount:void 0}),nW=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,y.jsx)(nj,{scope:e.__scopeSelect,forceMount:n,children:(0,y.jsx)(tR,{asChild:!0,...r})})};nW.displayName=nO;var nI="SelectContent",nF=p.forwardRef((e,t)=>{let n=nD(nI,e.__scopeSelect),{forceMount:r=n.forceMount,...o}=e,i=nS(nI,e.__scopeSelect),[l,a]=p.useState();return B(()=>{a(new DocumentFragment)},[]),(0,y.jsx)(tT,{present:r||i.open,children:e=>{let{present:n}=e;return n?(0,y.jsx)(nz,{...o,ref:t}):(0,y.jsx)(nV,{...o,fragment:l})}})});nF.displayName=nI;var nV=p.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:o}=e;return o?m.createPortal((0,y.jsx)(n_,{scope:n,children:(0,y.jsx)(nh.Slot,{scope:n,children:(0,y.jsx)("div",{ref:t,children:r})})}),o):null});nV.displayName="SelectContentFragment";var[n_,nH]=nw(nI),nB=(0,x.Z8)("SelectContent.RemoveScroll"),nz=p.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:a,sideOffset:u,align:c,alignOffset:s,arrowPadding:d,collisionBoundary:f,collisionPadding:v,sticky:m,hideWhenDetached:h,avoidCollisions:w,...x}=e,E=nS(nI,n),[S,C]=p.useState(null),[R,T]=p.useState(null),N=(0,b.e)(t,e=>C(e)),[L,O]=p.useState(null),[j,D]=p.useState(null),I=ng(n),[F,V]=p.useState(!1),_=p.useRef(!1);p.useEffect(()=>{if(S)return tF(S)},[S]),p.useEffect(()=>{k||(k={start:M(),end:M()});let{start:e,end:t}=k;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),P++,()=>{1===P&&(null==k||k.start.remove(),null==k||k.end.remove(),k=null),P=Math.max(0,P-1)}},[]);let H=p.useCallback(e=>{let[t,...n]=I().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&R&&(R.scrollTop=0),n===r&&R&&(R.scrollTop=R.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[I,R]),B=p.useCallback(()=>H([L,S]),[H,L,S]);p.useEffect(()=>{F&&B()},[F,B]);let{onOpenChange:z,triggerPointerDownPosRef:U}=E;p.useEffect(()=>{if(S){let e={x:0,y:0},t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(o=null===(n=U.current)||void 0===n?void 0:n.x)&&void 0!==o?o:0)),y:Math.abs(Math.round(t.pageY)-(null!==(i=null===(r=U.current)||void 0===r?void 0:r.y)&&void 0!==i?i:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(S)||z(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[S,z,U]),p.useEffect(()=>{let e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[z]);let[K,Z]=rl(e=>{let t=I().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=ra(t,e,n);r&&setTimeout(()=>{var e;return null===(e=r.ref.current)||void 0===e?void 0:e.focus()})}),Y=p.useCallback((e,t,n)=>{let r=!_.current&&!n;(void 0!==E.value&&E.value===t||r)&&(O(e),r&&(_.current=!0))},[E.value]),X=p.useCallback(()=>null==S?void 0:S.focus(),[S]),$=p.useCallback((e,t,n)=>{let r=!_.current&&!n;(void 0!==E.value&&E.value===t||r)&&D(e)},[E.value]),q="popper"===r?nK:nU,G=q===nK?{side:a,sideOffset:u,align:c,alignOffset:s,arrowPadding:d,collisionBoundary:f,collisionPadding:v,sticky:m,hideWhenDetached:h,avoidCollisions:w}:{};return(0,y.jsx)(n_,{scope:n,content:S,viewport:R,onViewportChange:T,itemRefCallback:Y,selectedItem:L,onItemLeave:X,itemTextRefCallback:$,focusSelectedItem:B,selectedItemText:j,position:r,isPositioned:F,searchRef:K,children:(0,y.jsx)(nf,{as:nB,allowPinchZoom:!0,children:(0,y.jsx)(W,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:g(o,e=>{var t;null===(t=E.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,y.jsx)(A,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,y.jsx)(q,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...x,...G,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:g(x.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>H(t)),e.preventDefault()}})})})})})})});nz.displayName="SelectContentImpl";var nU=p.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,i=nS(nI,n),l=nH(nI,n),[a,u]=p.useState(null),[c,s]=p.useState(null),d=(0,b.e)(t,e=>s(e)),f=ng(n),v=p.useRef(!1),m=p.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:x,focusSelectedItem:E}=l,C=p.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&g&&w&&x){let e=i.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=x.getBoundingClientRect();if("rtl"!==i.dir){let r=o.left-t.left,i=n.left-r,l=e.left-i,u=e.width+l,c=Math.max(u,t.width),s=h(i,[10,Math.max(10,window.innerWidth-10-c)]);a.style.minWidth=u+"px",a.style.left=s+"px"}else{let r=t.right-o.right,i=window.innerWidth-n.right-r,l=window.innerWidth-e.right-i,u=e.width+l,c=Math.max(u,t.width),s=h(i,[10,Math.max(10,window.innerWidth-10-c)]);a.style.minWidth=u+"px",a.style.right=s+"px"}let l=f(),u=window.innerHeight-20,s=g.scrollHeight,d=window.getComputedStyle(c),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=p+m+s+parseInt(d.paddingBottom,10)+y,E=Math.min(5*w.offsetHeight,b),S=window.getComputedStyle(g),C=parseInt(S.paddingTop,10),R=parseInt(S.paddingBottom,10),T=e.top+e.height/2-10,A=w.offsetHeight/2,N=p+m+(w.offsetTop+A);if(N<=T){let e=l.length>0&&w===l[l.length-1].ref.current;a.style.bottom="0px";let t=c.clientHeight-g.offsetTop-g.offsetHeight;a.style.height=N+Math.max(u-T,A+(e?R:0)+t+y)+"px"}else{let e=l.length>0&&w===l[0].ref.current;a.style.top="0px";let t=Math.max(T,p+g.offsetTop+(e?C:0)+A);a.style.height=t+(b-N)+"px",g.scrollTop=N-T+g.offsetTop}a.style.margin="".concat(10,"px 0"),a.style.minHeight=E+"px",a.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame(()=>v.current=!0)}},[f,i.trigger,i.valueNode,a,c,g,w,x,i.dir,r]);B(()=>C(),[C]);let[R,T]=p.useState();B(()=>{c&&T(window.getComputedStyle(c).zIndex)},[c]);let A=p.useCallback(e=>{e&&!0===m.current&&(C(),null==E||E(),m.current=!1)},[C,E]);return(0,y.jsx)(nZ,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:A,children:(0,y.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,y.jsx)(S.WV.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});nU.displayName="SelectItemAlignedPosition";var nK=p.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...i}=e,l=nx(n);return(0,y.jsx)(ty,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});nK.displayName="SelectPopperPosition";var[nZ,nY]=nw(nI,{}),nX="SelectViewport",n$=p.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,i=nH(nX,n),l=nY(nX,n),a=(0,b.e)(t,i.onViewportChange),u=p.useRef(0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,y.jsx)(nh.Slot,{scope:n,children:(0,y.jsx)(S.WV.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:g(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if((null==r?void 0:r.current)&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o0?a:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop})})})]})});n$.displayName=nX;var nq="SelectGroup",[nG,nJ]=nw(nq),nQ=p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=K();return(0,y.jsx)(nG,{scope:n,id:o,children:(0,y.jsx)(S.WV.div,{role:"group","aria-labelledby":o,...r,ref:t})})});nQ.displayName=nq;var n0="SelectLabel";p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=nJ(n0,n);return(0,y.jsx)(S.WV.div,{id:o.id,...r,ref:t})}).displayName=n0;var n1="SelectItem",[n2,n4]=nw(n1),n5=p.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,a=nS(n1,n),u=nH(n1,n),c=a.value===r,[s,d]=p.useState(null!=i?i:""),[f,v]=p.useState(!1),m=(0,b.e)(t,e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)}),h=K(),w=p.useRef("touch"),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};return(0,y.jsx)(n2,{scope:n,value:r,disabled:o,textId:h,isSelected:c,onItemTextChange:p.useCallback(e=>{d(t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()})},[]),children:(0,y.jsx)(nh.ItemSlot,{scope:n,value:r,disabled:o,textValue:s,children:(0,y.jsx)(S.WV.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:m,onFocus:g(l.onFocus,()=>v(!0)),onBlur:g(l.onBlur,()=>v(!1)),onClick:g(l.onClick,()=>{"mouse"!==w.current&&x()}),onPointerUp:g(l.onPointerUp,()=>{"mouse"===w.current&&x()}),onPointerDown:g(l.onPointerDown,e=>{w.current=e.pointerType}),onPointerMove:g(l.onPointerMove,e=>{if(w.current=e.pointerType,o){var t;null===(t=u.onItemLeave)||void 0===t||t.call(u)}else"mouse"===w.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:g(l.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=u.onItemLeave)||void 0===t||t.call(u)}}),onKeyDown:g(l.onKeyDown,e=>{var t;(null===(t=u.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(nv.includes(e.key)&&x()," "===e.key&&e.preventDefault())})})})})});n5.displayName=n1;var n9="SelectItemText",n6=p.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...i}=e,l=nS(n9,n),a=nH(n9,n),u=n4(n9,n),c=nR(n9,n),[s,d]=p.useState(null),f=(0,b.e)(t,e=>d(e),u.onItemTextChange,e=>{var t;return null===(t=a.itemTextRefCallback)||void 0===t?void 0:t.call(a,e,u.value,u.disabled)}),v=null==s?void 0:s.textContent,h=p.useMemo(()=>(0,y.jsx)("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=c;return B(()=>(g(h),()=>w(h)),[g,w,h]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S.WV.span,{id:u.textId,...i,ref:f}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!ri(l.value)?m.createPortal(i.children,l.valueNode):null]})});n6.displayName=n9;var n3="SelectItemIndicator",n8=p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return n4(n3,n).isSelected?(0,y.jsx)(S.WV.span,{"aria-hidden":!0,...r,ref:t}):null});n8.displayName=n3;var n7="SelectScrollUpButton";p.forwardRef((e,t)=>{let n=nH(n7,e.__scopeSelect),r=nY(n7,e.__scopeSelect),[o,i]=p.useState(!1),l=(0,b.e)(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){i(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,y.jsx)(rt,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}).displayName=n7;var re="SelectScrollDownButton";p.forwardRef((e,t)=>{let n=nH(re,e.__scopeSelect),r=nY(re,e.__scopeSelect),[o,i]=p.useState(!1),l=(0,b.e)(t,r.onScrollButtonChange);return B(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,y.jsx)(rt,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}).displayName=re;var rt=p.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,i=nH("SelectScrollButton",n),l=p.useRef(null),a=ng(n),u=p.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return p.useEffect(()=>()=>u(),[u]),B(()=>{var e;let t=a().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[a]),(0,y.jsx)(S.WV.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:g(o.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(r,50))}),onPointerMove:g(o.onPointerMove,()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===l.current&&(l.current=window.setInterval(r,50))}),onPointerLeave:g(o.onPointerLeave,()=>{u()})})});p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,y.jsx)(S.WV.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var rn="SelectArrow";p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=nx(n);return"popper"===nH(rn,n).position?(0,y.jsx)(tx,{...o,...r,ref:t}):null}).displayName=rn;var rr="SelectBubbleInput",ro=p.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=nS(rr,n),{value:i,onValueChange:l,required:a,disabled:u,name:c,autoComplete:s,form:d}=o,{nativeOptions:f,nativeSelectKey:v}=o,m=p.useRef(null),h=(0,b.e)(t,m),g=null!=i?i:"",w=function(e){let t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(g),x=Array.from(f).some(e=>{var t;return(null!==(t=e.props.value)&&void 0!==t?t:"")===""});return p.useEffect(()=>{let e=m.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(w!==g&&t){let n=new Event("change",{bubbles:!0});t.call(e,g),e.dispatchEvent(n)}},[w,g]),(0,y.jsxs)(S.WV.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:c,autoComplete:s,disabled:u,form:d,onChange:e=>l(e.target.value),...r,style:{...tk,...r.style},ref:h,defaultValue:g,children:[ri(i)&&!x?(0,y.jsx)("option",{value:""}):null,Array.from(f)]},v)});function ri(e){return""===e||void 0===e}function rl(e){let t=C(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function ra(e,t,n){var r;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=(r=Math.max(n?e.indexOf(n):-1,0),e.map((t,n)=>e[(r+n)%e.length]));1===o.length&&(i=i.filter(e=>e!==n));let l=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}ro.displayName=rr},9143:function(e,t,n){n.d(t,{Z8:function(){return l},g7:function(){return a}});var r,o=n(4090),i=n(1266);function l(e){let t=o.forwardRef((t,n)=>{var r,l,a,s;let m,h;let{children:g,...y}=t,w=null,b=!1,x=[];d(g)&&"function"==typeof v&&(g=v(g._payload)),o.Children.forEach(g,e=>{var t;if(o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u){b=!0;let n="child"in e.props?e.props.child:e.props.children;d(n)&&"function"==typeof v&&(n=v(n._payload)),w=c(e,n),x.push(null==w?void 0:null===(t=w.props)||void 0===t?void 0:t.children)}else x.push(e)}),w?w=o.cloneElement(w,void 0,x):!b&&1===o.Children.count(g)&&o.isValidElement(g)&&(w=g);let E=w?(m=null===(a=Object.getOwnPropertyDescriptor((l=w).props,"ref"))||void 0===a?void 0:a.get)&&"isReactWarning"in m&&m.isReactWarning?l.ref:(m=null===(s=Object.getOwnPropertyDescriptor(l,"ref"))||void 0===s?void 0:s.get)&&"isReactWarning"in m&&m.isReactWarning?l.props.ref:l.props.ref||l.ref:void 0,S=(0,i.e)(n,E);if(!w){if(g||0===g)throw Error(b?p(e):f(e));return g}let C=function(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n{if("child"in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},s=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),p=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),v=(r||(r=n.t(o,2)))[" use ".trim().toString()]}}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/504-b386cf1902f7f6c4.js b/dashboard/out/_next/static/chunks/504-b386cf1902f7f6c4.js new file mode 100644 index 0000000..a335a67 --- /dev/null +++ b/dashboard/out/_next/static/chunks/504-b386cf1902f7f6c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[504],{9769:function(e,r,o){o.d(r,{j:function(){return s}});var t=o(3167);let n=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,l=t.W,s=(e,r)=>o=>{var t;if((null==r?void 0:r.variants)==null)return l(e,null==o?void 0:o.class,null==o?void 0:o.className);let{variants:s,defaultVariants:a}=r,i=Object.keys(s).map(e=>{let r=null==o?void 0:o[e],t=null==a?void 0:a[e];if(null===r)return null;let l=n(r)||n(t);return s[e][l]}),d=o&&Object.entries(o).reduce((e,r)=>{let[o,t]=r;return void 0===t||(e[o]=t),e},{});return l(e,i,null==r?void 0:null===(t=r.compoundVariants)||void 0===t?void 0:t.reduce((e,r)=>{let{class:o,className:t,...n}=r;return Object.entries(n).every(e=>{let[r,o]=e;return Array.isArray(o)?o.includes({...a,...d}[r]):({...a,...d})[r]===o})?[...e,o,t]:e},[]),null==o?void 0:o.class,null==o?void 0:o.className)}},3167:function(e,r,o){o.d(r,{W:function(){return t}});function t(){for(var e,r,o=0,t="",n=arguments.length;o{let r=a(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:e=>{let o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),n(o,r)||s(e)},getConflictingClassGroupIds:(e,r)=>{let n=o[e]||[];return r&&t[e]?[...n,...t[e]]:n}}},n=(e,r)=>{var o;if(0===e.length)return r.classGroupId;let t=e[0],l=r.nextPart.get(t),s=l?n(e.slice(1),l):void 0;if(s)return s;if(0===r.validators.length)return;let a=e.join("-");return null===(o=r.validators.find(e=>{let{validator:r}=e;return r(a)}))||void 0===o?void 0:o.classGroupId},l=/^\[(.+)\]$/,s=e=>{if(l.test(e)){let r=l.exec(e)[1],o=null==r?void 0:r.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},a=e=>{let{theme:r,prefix:o}=e,t={nextPart:new Map,validators:[]};return p(Object.entries(e.classGroups),o).forEach(e=>{let[o,n]=e;i(n,t,o,r)}),t},i=(e,r,o,t)=>{e.forEach(e=>{if("string"==typeof e){(""===e?r:d(r,e)).classGroupId=o;return}if("function"==typeof e){if(c(e)){i(e(t),r,o,t);return}r.validators.push({validator:e,classGroupId:o});return}Object.entries(e).forEach(e=>{let[n,l]=e;i(l,d(r,n),o,t)})})},d=(e,r)=>{let o=e;return r.split("-").forEach(e=>{o.nextPart.has(e)||o.nextPart.set(e,{nextPart:new Map,validators:[]}),o=o.nextPart.get(e)}),o},c=e=>e.isThemeGetter,p=(e,r)=>r?e.map(e=>{let[o,t]=e;return[o,t.map(e=>"string"==typeof e?r+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[o,t]=e;return[r+o,t]})):e)]}):e,u=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let r=0,o=new Map,t=new Map,n=(n,l)=>{o.set(n,l),++r>e&&(r=0,t=o,o=new Map)};return{get(e){let r=o.get(e);return void 0!==r?r:void 0!==(r=t.get(e))?(n(e,r),r):void 0},set(e,r){o.has(e)?o.set(e,r):n(e,r)}}},b=e=>{let{separator:r,experimentalParseClassName:o}=e,t=1===r.length,n=r[0],l=r.length,s=e=>{let o;let s=[],a=0,i=0;for(let d=0;di?o-i:void 0}};return o?e=>o({className:e,parseClassName:s}):s},f=e=>{if(e.length<=1)return e;let r=[],o=[];return e.forEach(e=>{"["===e[0]?(r.push(...o.sort(),e),o=[]):o.push(e)}),r.push(...o.sort()),r},m=e=>({cache:u(e.cacheSize),parseClassName:b(e),...t(e)}),g=/\s+/,h=(e,r)=>{let{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:n}=r,l=[],s=e.trim().split(g),a="";for(let e=s.length-1;e>=0;e-=1){let r=s[e],{modifiers:i,hasImportantModifier:d,baseClassName:c,maybePostfixModifierPosition:p}=o(r),u=!!p,b=t(u?c.substring(0,p):c);if(!b){if(!u||!(b=t(c))){a=r+(a.length>0?" "+a:a);continue}u=!1}let m=f(i).join(":"),g=d?m+"!":m,h=g+b;if(l.includes(h))continue;l.push(h);let v=n(b,u);for(let e=0;e0?" "+a:a)}return a};function v(){let e,r,o=0,t="";for(;o{let r;if("string"==typeof e)return e;let o="";for(let t=0;t{let r=r=>r[e]||[];return r.isThemeGetter=!0,r},w=/^\[(?:([a-z-]+):)?(.+)\]$/i,k=/^\d+\/\d+$/,z=new Set(["px","full","screen"]),j=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,G=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,P=e=>O(e)||z.has(e)||k.test(e),E=e=>F(e,"length",H),O=e=>!!e&&!Number.isNaN(Number(e)),M=e=>F(e,"number",O),$=e=>!!e&&Number.isInteger(Number(e)),I=e=>e.endsWith("%")&&O(e.slice(0,-1)),W=e=>w.test(e),_=e=>j.test(e),A=new Set(["length","size","percentage"]),R=e=>F(e,A,J),q=e=>F(e,"position",J),T=new Set(["image","url"]),V=e=>F(e,T,L),B=e=>F(e,"",K),D=()=>!0,F=(e,r,o)=>{let t=w.exec(e);return!!t&&(t[1]?"string"==typeof r?t[1]===r:r.has(t[1]):o(t[2]))},H=e=>C.test(e)&&!N.test(e),J=()=>!1,K=e=>G.test(e),L=e=>S.test(e),Q=function(e){let r,o,t;for(var n=arguments.length,l=Array(n>1?n-1:0),s=1;sr(e),e()))).cache.get,t=r.cache.set,a=i,i(n)};function i(e){let n=o(e);if(n)return n;let l=h(e,r);return t(e,l),l}return function(){return a(v.apply(null,arguments))}}(()=>{let e=x("colors"),r=x("spacing"),o=x("blur"),t=x("brightness"),n=x("borderColor"),l=x("borderRadius"),s=x("borderSpacing"),a=x("borderWidth"),i=x("contrast"),d=x("grayscale"),c=x("hueRotate"),p=x("invert"),u=x("gap"),b=x("gradientColorStops"),f=x("gradientColorStopPositions"),m=x("inset"),g=x("margin"),h=x("opacity"),v=x("padding"),y=x("saturate"),w=x("scale"),k=x("sepia"),z=x("skew"),j=x("space"),C=x("translate"),N=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto",W,r],A=()=>[W,r],T=()=>["",P,E],F=()=>["auto",O,W],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",W],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[O,W];return{cacheSize:500,separator:":",theme:{colors:[D],spacing:[P,E],blur:["none","",_,W],brightness:X(),borderColor:[e],borderRadius:["none","","full",_,W],borderSpacing:A(),borderWidth:T(),contrast:X(),grayscale:Q(),hueRotate:X(),invert:Q(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[I,E],inset:S(),margin:S(),opacity:X(),padding:A(),saturate:X(),scale:X(),sepia:Q(),skew:X(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",W]}],container:["container"],columns:[{columns:[_]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),W]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",$,W]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",W]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",$,W]}],"grid-cols":[{"grid-cols":[D]}],"col-start-end":[{col:["auto",{span:["full",$,W]},W]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[D]}],"row-start-end":[{row:["auto",{span:[$,W]},W]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",W]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",W]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",W,r]}],"min-w":[{"min-w":[W,r,"min","max","fit"]}],"max-w":[{"max-w":[W,r,"none","full","min","max","fit","prose",{screen:[_]},_]}],h:[{h:[W,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[W,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[W,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[W,r,"auto","min","max","fit"]}],"font-size":[{text:["base",_,E]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",M]}],"font-family":[{font:[D]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",W]}],"line-clamp":[{"line-clamp":["none",O,M]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",P,W]}],"list-image":[{"list-image":["none",W]}],"list-style-type":[{list:["none","disc","decimal",W]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",P,E]}],"underline-offset":[{"underline-offset":["auto",P,W]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),q]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",R]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},V]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...J(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:J()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...J()]}],"outline-offset":[{"outline-offset":[P,W]}],"outline-w":[{outline:[P,E]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[P,E]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_,B]}],"shadow-color":[{shadow:[D]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[t]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",_,W]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[p]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[t]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",W]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",W]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",W]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[$,W]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",W]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",W]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[P,E,M]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}})}}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/69-657be7a0f758990c.js b/dashboard/out/_next/static/chunks/69-657be7a0f758990c.js new file mode 100644 index 0000000..492417c --- /dev/null +++ b/dashboard/out/_next/static/chunks/69-657be7a0f758990c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69],{269:function(e,t){"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},9338:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]})},5786:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let n=r(1312),o=r(2139);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,"/sandbox/credit-card"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6159:function(e,t){"use strict";function r(e){var t,r;t=self.__next_s,r=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[r,n]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(n)for(let e in n)"children"!==e&&o.setAttribute(e,n[e]);r?(o.src=r,o.onload=()=>e(),o.onerror=t):n&&(o.innerHTML=n.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{r()}):r()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return r}}),window.next={version:"14.1.0",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return o}});let n=r(7690);async function o(e,t){let r=(0,n.getServerActionDispatcher)();if(!r)throw Error("Invariant: missing action dispatcher.");return new Promise((n,o)=>{r({actionId:e,actionArgs:t,resolve:n,reject:o})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},945:function(e,t,r){"use strict";let n,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return C}});let u=r(6921),l=r(1884),a=r(3827);r(9338);let i=u._(r(7600)),c=l._(r(4090)),s=r(7355),f=r(7484);r(8599);let d=u._(r(4101)),p=r(5355),h=r(4950),y=r(5367),_=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),r=0;r{if((0,h.isNextRouterError)(e.error)){e.preventDefault();return}});let v=document,b=()=>{let{pathname:e,search:t}=location;return e+t},g=new TextEncoder,m=!1,P=!1,j=null;function R(e){if(0===e[0])n=[];else if(1===e[0]){if(!n)throw Error("Unexpected server data: missing bootstrap script.");o?o.enqueue(g.encode(e[1])):n.push(e[1])}else 2===e[0]&&(j=e[1])}let O=function(){o&&!P&&(o.close(),P=!0,n=void 0),m=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",O,!1):O();let S=self.__next_f=self.__next_f||[];S.forEach(R),S.push=R;let E=new Map;function w(e){let{cacheKey:t}=e;c.default.useEffect(()=>{E.delete(t)});let r=function(e){let t=E.get(e);if(t)return t;let r=new ReadableStream({start(e){n&&(n.forEach(t=>{e.enqueue(g.encode(t))}),m&&!P&&(e.close(),P=!0,n=void 0)),o=e}}),u=(0,s.createFromReadableStream)(r,{callServer:p.callServer});return E.set(e,u),u}(t);return(0,c.use)(r)}let M=c.default.StrictMode;function T(e){let{children:t}=e;return t}function x(e){return(0,a.jsx)(w,{...e,cacheKey:b()})}function C(){let e=(0,y.createMutableActionQueue)(),t=(0,a.jsx)(M,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(y.ActionQueueContext.Provider,{value:e,children:(0,a.jsx)(T,{children:(0,a.jsx)(x,{})})})})}),r={onRecoverableError:d.default};"__next_error__"===document.documentElement.id?i.default.createRoot(v,r).render(t):c.default.startTransition(()=>i.default.hydrateRoot(v,t,{...r,formState:j}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5317:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9590),(0,r(6159).appBootstrap)(()=>{let{hydrate:e}=r(945);r(7690),r(5613),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9590:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(269);{let e=r.u;r.u=function(){for(var t=arguments.length,r=Array(t),n=0;n(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,n.useState)(""),c=(0,n.useRef)();return(0,n.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),r?(0,o.createPortal)(a,r):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2275:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RSC_HEADER:function(){return r},ACTION:function(){return n},NEXT_ROUTER_STATE_TREE:function(){return o},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return a},RSC_VARY_HEADER:function(){return i},FLIGHT_PARAMETERS:function(){return c},NEXT_RSC_UNION_QUERY:function(){return s},NEXT_DID_POSTPONE_HEADER:function(){return f}});let r="RSC",n="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Url",a="text/x-component",i=r+", "+o+", "+u+", "+l,c=[[r],[o],[u]],s="_rsc",f="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7690:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getServerActionDispatcher:function(){return O},urlToUrlWithoutFlightMarker:function(){return E},createEmptyCacheNode:function(){return T},default:function(){return A}});let n=r(1884),o=r(3827),u=n._(r(4090)),l=r(8599),a=r(1414),i=r(8419),c=r(4758),s=r(1276),f=r(8955),d=r(4492),p=r(6407),h=r(5786),y=r(2054),_=r(5737),v=r(671),b=r(4399),g=r(2275),m=r(8895),P=r(7379),j=new Map,R=null;function O(){return R}let S={};function E(e){let t=new URL(e,location.origin);if(t.searchParams.delete(g.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,r=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-r)}return t}function w(e){return e.origin!==window.location.origin}function M(e){let{appRouterState:t,sync:r}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:n,canonicalUrl:o}=t,u={...n.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};n.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==o?(n.pendingPush=!1,window.history.pushState(u,"",o)):window.history.replaceState(u,"",o),r(t)},[t,r]),null}function T(){return{lazyData:null,rsc:null,prefetchRsc:null,parallelRoutes:new Map}}function x(e){null==e&&(e={});let t=window.history.state,r=null==t?void 0:t.__NA;r&&(e.__NA=r);let n=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return n&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=n),e}function C(e){let{headCacheNode:t}=e,r=null!==t?t.head:null,n=null!==t?t.prefetchHead:null,o=null!==n?n:r;return(0,u.useDeferredValue)(r,o)}function N(e){let t,{buildId:r,initialHead:n,initialTree:i,initialCanonicalUrl:f,initialSeedData:g,assetPrefix:O,missingSlots:E}=e,T=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({buildId:r,initialSeedData:g,initialCanonicalUrl:f,initialTree:i,initialParallelRoutes:j,isServer:!1,location:window.location,initialHead:n}),[r,g,f,i,n]),[N,A,I]=(0,s.useReducerWithReduxDevtools)(T);(0,u.useEffect)(()=>{j=null},[]);let{canonicalUrl:k}=(0,s.useUnwrapState)(N),{searchParams:U,pathname:D}=(0,u.useMemo)(()=>{let e=new URL(k,window.location.href);return{searchParams:e.searchParams,pathname:(0,P.hasBasePath)(e.pathname)?(0,m.removeBasePath)(e.pathname):e.pathname}},[k]),F=(0,u.useCallback)((e,t,r)=>{(0,u.startTransition)(()=>{A({type:a.ACTION_SERVER_PATCH,flightData:t,previousTree:e,overrideCanonicalUrl:r})})},[A]),L=(0,u.useCallback)((e,t,r)=>{let n=new URL((0,h.addBasePath)(e),location.href);return A({type:a.ACTION_NAVIGATE,url:n,isExternalUrl:w(n),locationSearch:location.search,shouldScroll:null==r||r,navigateType:t})},[A]);R=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{A({...e,type:a.ACTION_SERVER_ACTION})})},[A]);let H=(0,u.useMemo)(()=>({back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{if((0,p.isBot)(window.navigator.userAgent))return;let r=new URL((0,h.addBasePath)(e),window.location.href);w(r)||(0,u.startTransition)(()=>{var e;A({type:a.ACTION_PREFETCH,url:r,kind:null!=(e=null==t?void 0:t.kind)?e:a.PrefetchKind.FULL})})},replace:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var r;L(e,"replace",null==(r=t.scroll)||r)})},push:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var r;L(e,"push",null==(r=t.scroll)||r)})},refresh:()=>{(0,u.startTransition)(()=>{A({type:a.ACTION_REFRESH,origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}}),[A,L]);(0,u.useEffect)(()=>{window.next&&(window.next.router=H)},[H]),(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&A({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE})}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[A]);let{pushRef:$}=(0,s.useUnwrapState)(N);if($.mpaNavigation){if(S.pendingMpaPath!==k){let e=window.location;$.pendingPush?e.assign(k):e.replace(k),S.pendingMpaPath=k}(0,u.use)((0,b.createInfinitePromise)())}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),r=e=>{let t=window.location.href;(0,u.startTransition)(()=>{A({type:a.ACTION_RESTORE,url:new URL(null!=e?e:t,t),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE})})};window.history.pushState=function(t,n,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=x(t),o&&r(o)),e(t,n,o)},window.history.replaceState=function(e,n,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=x(e),o&&r(o)),t(e,n,o)};let n=e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,u.startTransition)(()=>{A({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:t.__PRIVATE_NEXTJS_INTERNALS_TREE})})}};return window.addEventListener("popstate",n),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",n)}},[A]);let{cache:B,tree:W,nextUrl:G,focusAndScrollRef:z}=(0,s.useUnwrapState)(N),K=(0,u.useMemo)(()=>(0,v.findHeadInCache)(B,W[1]),[B,W]);if(null!==K){let[e,r]=K;t=(0,o.jsx)(C,{headCacheNode:e},r)}else t=null;let V=(0,o.jsxs)(_.RedirectBoundary,{children:[t,B.rsc,(0,o.jsx)(y.AppRouterAnnouncer,{tree:W})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(M,{appRouterState:(0,s.useUnwrapState)(N),sync:I}),(0,o.jsx)(c.PathnameContext.Provider,{value:D,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:U,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:{buildId:r,changeByServerResponse:F,tree:W,focusAndScrollRef:z,nextUrl:G},children:(0,o.jsx)(l.AppRouterContext.Provider,{value:H,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:{childNodes:B.parallelRoutes,tree:W,url:k},children:V})})})})})]})}function A(e){let{globalErrorComponent:t,...r}=e;return(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,children:(0,o.jsx)(N,{...r})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3706:function(e,t,r){"use strict";function n(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return n}}),r(6921),r(4090),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8955:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ErrorBoundaryHandler:function(){return s},GlobalError:function(){return f},default:function(){return d},ErrorBoundary:function(){return p}});let n=r(6921),o=r(3827),u=n._(r(4090)),l=r(5313),a=r(4950),i={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function c(e){let{error:t}=e;if("function"==typeof fetch.__nextGetStaticStore){var r;let e=null==(r=fetch.__nextGetStaticStore())?void 0:r.getStore();if((null==e?void 0:e.isRevalidate)||(null==e?void 0:e.isStaticGeneration))throw console.error(t),t}return null}class s extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function f(e){let{error:t}=e,r=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(c,{error:t}),(0,o.jsx)("div",{style:i.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:i.text,children:"Application error: a "+(r?"server":"client")+"-side exception has occurred (see the "+(r?"server logs":"browser console")+" for more information)."}),r?(0,o.jsx)("p",{style:i.text,children:"Digest: "+r}):null]})})]})]})}let d=f;function p(e){let{errorComponent:t,errorStyles:r,errorScripts:n,children:u}=e,a=(0,l.usePathname)();return t?(0,o.jsx)(s,{pathname:a,errorComponent:t,errorStyles:r,errorScripts:n,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DynamicServerError:function(){return n},isDynamicServerError:function(){return o}});let r="DYNAMIC_SERVER_USAGE";class n extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4399:function(e,t){"use strict";let r;function n(){return r||(r=new Promise(()=>{})),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInfinitePromise",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let n=r(2322),o=r(6155);function u(e){return e&&e.digest&&((0,o.isRedirectError)(e)||(0,n.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5613:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return O}});let n=r(6921),o=r(1884),u=r(3827),l=o._(r(4090)),a=n._(r(9542)),i=r(8599),c=r(3546),s=r(4399),f=r(8955),d=r(2295),p=r(3011),h=r(5737),y=r(1902),_=r(6793),v=r(555),b=["bottom","height","left","right","top","width","x","y"];function g(e,t){let r=e.getBoundingClientRect();return r.top>=0&&r.top<=t}class m extends l.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var r;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,r)=>(0,d.matchSegment)(t,e[r]))))return;let n=null,o=e.hashFragment;if(o&&(n="top"===o?document.body:null!=(r=document.getElementById(o))?r:document.getElementsByName(o)[0]),n||(n=a.default.findDOMNode(this)),!(n instanceof Element))return;for(;!(n instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return b.every(e=>0===t[e])}(n);){if(null===n.nextElementSibling)return;n=n.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,p.handleSmoothScroll)(()=>{if(o){n.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!g(n,t)&&(e.scrollTop=0,g(n,t)||n.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,n.focus()}}}}function P(e){let{segmentPath:t,children:r}=e,n=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!n)throw Error("invariant global layout router not mounted");return(0,u.jsx)(m,{segmentPath:t,focusAndScrollRef:n.focusAndScrollRef,children:r})}function j(e){let{parallelRouterKey:t,url:r,childNodes:n,segmentPath:o,tree:a,cacheKey:f}=e,p=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{buildId:h,changeByServerResponse:y,tree:_}=p,v=n.get(f);if(void 0===v){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,parallelRoutes:new Map};v=e,n.set(f,e)}let b=null!==v.prefetchRsc?v.prefetchRsc:v.rsc,g=(0,l.useDeferredValue)(v.rsc,b),m="object"==typeof g&&null!==g&&"function"==typeof g.then?(0,l.use)(g):g;if(!m){let e=v.lazyData;if(null===e){let t=function e(t,r){if(t){let[n,o]=t,u=2===t.length;if((0,d.matchSegment)(r[0],n)&&r[1].hasOwnProperty(o)){if(u){let t=e(void 0,r[1][o]);return[r[0],{...r[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[r[0],{...r[1],[o]:e(t.slice(2),r[1][o])}]}}return r}(["",...o],_);v.lazyData=e=(0,c.fetchServerResponse)(new URL(r,location.origin),t,p.nextUrl,h)}let[t,n]=(0,l.use)(e);v.lazyData=null,setTimeout(()=>{(0,l.startTransition)(()=>{y(_,t,n)})}),(0,l.use)((0,s.createInfinitePromise)())}return(0,u.jsx)(i.LayoutRouterContext.Provider,{value:{tree:a[1][t],childNodes:v.parallelRoutes,url:r},children:m})}function R(e){let{children:t,loading:r,loadingStyles:n,loadingScripts:o,hasLoading:a}=e;return a?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[n,o,r]}),children:t}):(0,u.jsx)(u.Fragment,{children:t})}function O(e){let{parallelRouterKey:t,segmentPath:r,error:n,errorStyles:o,errorScripts:a,templateStyles:c,templateScripts:s,loading:d,loadingStyles:p,loadingScripts:b,hasLoading:g,template:m,notFound:O,notFoundStyles:S,styles:E}=e,w=(0,l.useContext)(i.LayoutRouterContext);if(!w)throw Error("invariant expected layout router to be mounted");let{childNodes:M,tree:T,url:x}=w,C=M.get(t);C||(C=new Map,M.set(t,C));let N=T[1][t][0],A=(0,_.getSegmentValue)(N),I=[N];return(0,u.jsxs)(u.Fragment,{children:[E,I.map(e=>{let l=(0,_.getSegmentValue)(e),E=(0,v.createRouterCacheKey)(e);return(0,u.jsxs)(i.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:r,children:(0,u.jsx)(f.ErrorBoundary,{errorComponent:n,errorStyles:o,errorScripts:a,children:(0,u.jsx)(R,{hasLoading:g,loading:d,loadingStyles:p,loadingScripts:b,children:(0,u.jsx)(y.NotFoundBoundary,{notFound:O,notFoundStyles:S,children:(0,u.jsx)(h.RedirectBoundary,{children:(0,u.jsx)(j,{parallelRouterKey:t,url:x,tree:T,childNodes:C,segmentPath:r,cacheKey:E,isActive:A===l})})})})})}),children:[c,s,m]},(0,v.createRouterCacheKey)(e,!0))})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2295:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{matchSegment:function(){return o},canSegmentBeOverridden:function(){return u}});let n=r(2883),o=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],u=(e,t)=>{var r;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(r=(0,n.getSegmentParam)(e))?void 0:r.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5313:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return h},useSearchParams:function(){return y},usePathname:function(){return _},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return c.useServerInsertedHTML},useRouter:function(){return v},useParams:function(){return b},useSelectedLayoutSegments:function(){return g},useSelectedLayoutSegment:function(){return m},redirect:function(){return s.redirect},permanentRedirect:function(){return s.permanentRedirect},RedirectType:function(){return s.RedirectType},notFound:function(){return f.notFound}});let n=r(4090),o=r(8599),u=r(4758),l=r(3706),a=r(6793),i=r(3266),c=r(2472),s=r(6155),f=r(2322),d=Symbol("internal for urlsearchparams readonly");function p(){return Error("ReadonlyURLSearchParams cannot be modified")}class h{[Symbol.iterator](){return this[d][Symbol.iterator]()}append(){throw p()}delete(){throw p()}set(){throw p()}sort(){throw p()}constructor(e){this[d]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e),this.size=e.size}}function y(){(0,l.clientHookInServerComponentError)("useSearchParams");let e=(0,n.useContext)(u.SearchParamsContext);return(0,n.useMemo)(()=>e?new h(e):null,[e])}function _(){return(0,l.clientHookInServerComponentError)("usePathname"),(0,n.useContext)(u.PathnameContext)}function v(){(0,l.clientHookInServerComponentError)("useRouter");let e=(0,n.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function b(){(0,l.clientHookInServerComponentError)("useParams");let e=(0,n.useContext)(o.GlobalLayoutRouterContext),t=(0,n.useContext)(u.PathParamsContext);return(0,n.useMemo)(()=>(null==e?void 0:e.tree)?function e(t,r){for(let n of(void 0===r&&(r={}),Object.values(t[1]))){let t=n[0],o=Array.isArray(t),u=o?t[1]:t;!u||u.startsWith(i.PAGE_SEGMENT_KEY)||(o&&("c"===t[2]||"oc"===t[2])?r[t[0]]=t[1].split("/"):o&&(r[t[0]]=t[1]),r=e(n,r))}return r}(e.tree):t,[null==e?void 0:e.tree,t])}function g(e){void 0===e&&(e="children"),(0,l.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,n.useContext)(o.LayoutRouterContext);return function e(t,r,n,o){let u;if(void 0===n&&(n=!0),void 0===o&&(o=[]),n)u=t[1][r];else{var l;let e=t[1];u=null!=(l=e.children)?l:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,a.getSegmentValue)(c);return!s||s.startsWith(i.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,r,!1,o))}(t,e)}function m(e){void 0===e&&(e="children"),(0,l.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=g(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1902:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return s}});let n=r(1884),o=r(3827),u=n._(r(4090)),l=r(5313),a=r(2322);r(6184);let i=r(8599);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isNotFoundError)(e))return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound]}):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function s(e){let{notFound:t,notFoundStyles:r,asNotFound:n,children:a}=e,s=(0,l.usePathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t?(0,o.jsx)(c,{pathname:s,notFound:t,notFoundStyles:r,asNotFound:n,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2322:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{notFound:function(){return n},isNotFoundError:function(){return o}});let r="NEXT_NOT_FOUND";function n(){let e=Error(r);throw e.digest=r,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2418:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let n=r(2299),o=r(3603);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,r;let o=new Promise((e,n)=>{t=e,r=n}),u=async()=>{try{n._(this,l)[l]++;let r=await e();t(r)}catch(e){r(e)}finally{n._(this,l)[l]--,n._(this,i)[i]()}};return n._(this,a)[a].push({promiseFn:o,task:u}),n._(this,i)[i](),o}bump(e){let t=n._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=n._(this,a)[a].splice(t,1)[0];n._(this,a)[a].unshift(e),n._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),n._(this,u)[u]=e,n._(this,l)[l]=0,n._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(n._(this,l)[l]0){var t;null==(t=n._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5737:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectErrorBoundary:function(){return c},RedirectBoundary:function(){return s}});let n=r(1884),o=r(3827),u=n._(r(4090)),l=r(5313),a=r(6155);function i(e){let{redirect:t,reset:r,redirectType:n}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{n===a.RedirectType.push?o.push(t,{}):o.replace(t,{}),r()})},[t,n,r,o]),null}class c extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(i,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function s(e){let{children:t}=e,r=(0,l.useRouter)();return(0,o.jsx)(c,{router:r,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9510:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}}),(n=r||(r={}))[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6155:function(e,t,r){"use strict";var n,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return c},redirect:function(){return s},permanentRedirect:function(){return f},isRedirectError:function(){return d},getURLFromRedirectError:function(){return p},getRedirectTypeFromError:function(){return h},getRedirectStatusCodeFromError:function(){return y}});let u=r(6668),l=r(1264),a=r(9510),i="NEXT_REDIRECT";function c(e,t,r){void 0===r&&(r=a.RedirectStatusCode.TemporaryRedirect);let n=Error(i);n.digest=i+";"+t+";"+e+";"+r+";";let o=u.requestAsyncStorage.getStore();return o&&(n.mutableCookies=o.mutableCookies),n}function s(e,t){void 0===t&&(t="replace");let r=l.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let r=l.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,n,o]=e.digest.split(";",4),u=Number(o);return t===i&&("replace"===r||"push"===r)&&"string"==typeof n&&!isNaN(u)&&u in a.RedirectStatusCode}function p(e){return d(e)?e.digest.split(";",3)[2]:null}function h(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function y(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(o=n||(n={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(1884),o=r(3827),u=n._(r(4090)),l=r(8599);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6668:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(693).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9671:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let n=r(4765),o=r(0);function u(e,t,r,u){void 0===u&&(u=!1);let[l,a,i]=r.slice(-3);if(null===a)return!1;if(3===r.length){let r=a[2];t.rsc=r,t.prefetchRsc=null,(0,n.fillLazyItemsTillLeafWithHead)(t,e,l,a,i,u)}else t.rsc=e.rsc,t.prefetchRsc=e.prefetchRsc,t.parallelRoutes=new Map(e.parallelRoutes),(0,o.fillCacheWithNewSubTreeData)(t,e,r,u);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7098:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{applyRouterStatePatchToFullTree:function(){return a},applyRouterStatePatchToTreeSkipDefault:function(){return i}});let n=r(3266),o=r(2295);function u(e,t,r){void 0===r&&(r=!1);let[l,a]=e,[i,c]=t;if(!r&&i===n.DEFAULT_SEGMENT_KEY&&l!==n.DEFAULT_SEGMENT_KEY)return e;if((0,o.matchSegment)(l,i)){let t={};for(let e in a)void 0!==c[e]?t[e]=u(a[e],c[e],r):t[e]=a[e];for(let e in c)t[e]||(t[e]=c[e]);let n=[l,t];return e[2]&&(n[2]=e[2]),e[3]&&(n[3]=e[3]),e[4]&&(n[4]=e[4]),n}return t}function l(e,t,r,n){let a;void 0===n&&(n=!1);let[i,c,,,s]=t;if(1===e.length)return u(t,r,n);let[f,d]=e;if(!(0,o.matchSegment)(f,i))return null;if(2===e.length)a=u(c[d],r,n);else if(null===(a=l(e.slice(2),c[d],r,n)))return null;let p=[e[0],{...c,[d]:a}];return s&&(p[4]=!0),p}function a(e,t,r){return l(e,t,r,!0)}function i(e,t,r){return l(e,t,r,!1)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4038:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{extractPathFromFlightRouterState:function(){return c},computeChangedPath:function(){return s}});let n=r(4749),o=r(3266),u=r(2295),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let r=Array.isArray(e[0])?e[0][1]:e[0];if(r===o.DEFAULT_SEGMENT_KEY||n.INTERCEPTION_ROUTE_MARKERS.some(e=>r.startsWith(e)))return;if(r.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[r],l=null!=(t=e[1])?t:{},a=l.children?c(l.children):void 0;if(void 0!==a)u.push(a);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let r=c(t);void 0!==r&&u.push(r)}return i(u)}function s(e,t){let r=function e(t,r){let[o,l]=t,[i,s]=r,f=a(o),d=a(i);if(n.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(r))?p:""}for(let t in l)if(s[t]){let r=e(l[t],s[t]);if(null!==r)return a(i)+"/"+r}return null}(e,t);return null==r||"/"===r?r:i(r.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8419:function(e,t){"use strict";function r(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4492:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return l}});let n=r(8419),o=r(4765),u=r(4038);function l(e){var t;let{buildId:r,initialTree:l,initialSeedData:a,initialCanonicalUrl:i,initialParallelRoutes:c,isServer:s,location:f,initialHead:d}=e,p={lazyData:null,rsc:a[2],prefetchRsc:null,parallelRoutes:s?new Map:c};return(null===c||0===c.size)&&(0,o.fillLazyItemsTillLeafWithHead)(p,void 0,l,a,d),{buildId:r,tree:l,cache:p,prefetchCache:new Map,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:f?(0,n.createHrefFromUrl)(f):i,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(l)||(null==f?void 0:f.pathname))?t:null}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},555:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let n=r(3266);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?(e[0]+"|"+e[1]+"|"+e[2]).toLowerCase():t&&e.startsWith(n.PAGE_SEGMENT_KEY)?n.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3546:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return s}});let n=r(2275),o=r(7690),u=r(5355),l=r(1414),a=r(1),{createFromFetch:i}=r(7355);function c(e){return[(0,o.urlToUrlWithoutFlightMarker)(e).toString(),void 0]}async function s(e,t,r,s,f){let d={[n.RSC_HEADER]:"1",[n.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(t))};f===l.PrefetchKind.AUTO&&(d[n.NEXT_ROUTER_PREFETCH_HEADER]="1"),r&&(d[n.NEXT_URL]=r);let p=(0,a.hexHash)([d[n.NEXT_ROUTER_PREFETCH_HEADER]||"0",d[n.NEXT_ROUTER_STATE_TREE],d[n.NEXT_URL]].join(","));try{let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(n.NEXT_RSC_UNION_QUERY,p);let r=await fetch(t,{credentials:"same-origin",headers:d}),l=(0,o.urlToUrlWithoutFlightMarker)(r.url),a=r.redirected?l:void 0,f=r.headers.get("content-type")||"",h=!!r.headers.get(n.NEXT_DID_POSTPONE_HEADER),y=f===n.RSC_CONTENT_TYPE_HEADER;if(y||(y=f.startsWith("text/plain")),!y||!r.ok)return e.hash&&(l.hash=e.hash),c(l.toString());let[_,v]=await i(Promise.resolve(r),{callServer:u.callServer});if(s!==_)return c(r.url);return[v,a,h]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithDataProperty",{enumerable:!0,get:function(){return function e(t,r,o,u){let l=o.length<=2,[a,i]=o,c=(0,n.createRouterCacheKey)(i),s=r.parallelRoutes.get(a),f=t.parallelRoutes.get(a);f&&f!==s||(f=new Map(s),t.parallelRoutes.set(a,f));let d=null==s?void 0:s.get(c),p=f.get(c);if(l){p&&p.lazyData&&p!==d||f.set(c,{lazyData:u(),rsc:null,prefetchRsc:null,parallelRoutes:new Map});return}if(!p||!d){p||f.set(c,{lazyData:u(),rsc:null,prefetchRsc:null,parallelRoutes:new Map});return}return p===d&&(p={lazyData:p.lazyData,rsc:p.rsc,prefetchRsc:p.prefetchRsc,parallelRoutes:new Map(p.parallelRoutes)},f.set(c,p)),e(p,d,o.slice(2),u)}}});let n=r(555);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},0:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,r,l,a){let i=l.length<=5,[c,s]=l,f=(0,u.createRouterCacheKey)(s),d=r.parallelRoutes.get(c);if(!d)return;let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){if(!y||!y.lazyData||y===h){let e=l[3];y={lazyData:null,rsc:e[2],prefetchRsc:null,parallelRoutes:h?new Map(h.parallelRoutes):new Map},h&&(0,n.invalidateCacheByRouterState)(y,h,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(y,h,l[2],e,l[4],a),p.set(f,y)}return}y&&h&&(y===h&&(y={lazyData:y.lazyData,rsc:y.rsc,prefetchRsc:y.prefetchRsc,parallelRoutes:new Map(y.parallelRoutes)},p.set(f,y)),e(y,h,l.slice(2),a))}}});let n=r(6152),o=r(4765),u=r(555);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4765:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,r,o,u,l,a){if(0===Object.keys(o[1]).length){t.head=l;return}for(let i in o[1]){let c;let s=o[1][i],f=s[0],d=(0,n.createRouterCacheKey)(f),p=null!==u&&void 0!==u[1][i]?u[1][i]:null;if(r){let n=r.parallelRoutes.get(i);if(n){let r,o=new Map(n),u=o.get(d);r=null!==p?{lazyData:null,rsc:p[2],prefetchRsc:null,parallelRoutes:new Map(null==u?void 0:u.parallelRoutes)}:a&&u?{lazyData:u.lazyData,rsc:u.rsc,prefetchRsc:u.prefetchRsc,parallelRoutes:new Map(u.parallelRoutes)}:{lazyData:null,rsc:null,prefetchRsc:null,parallelRoutes:new Map(null==u?void 0:u.parallelRoutes)},o.set(d,r),e(r,u,s,p||null,l,a),t.parallelRoutes.set(i,o);continue}}c=null!==p?{lazyData:null,rsc:p[2],prefetchRsc:null,parallelRoutes:new Map}:{lazyData:null,rsc:null,prefetchRsc:null,parallelRoutes:new Map};let h=t.parallelRoutes.get(i);h?h.set(d,c):t.parallelRoutes.set(i,new Map([[d,c]])),e(c,void 0,s,p,l,a)}}}});let n=r(555);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1486:function(e,t){"use strict";var r,n;function o(e){let{kind:t,prefetchTime:r,lastUsedTime:n}=e;return Date.now()<(null!=n?n:r)+3e4?n?"reusable":"fresh":"auto"===t&&Date.now(){for(let r of t[0]){let t=r.slice(0,-3),n=r[r.length-3],l=r[r.length-2],a=r[r.length-1];"string"!=typeof t&&function(e,t,r,n,l){let a=e;for(let e=0;e{c(e,t)})}function i(e,t,r,n){let o=e[1],l=null!==t?t[1]:null,a=new Map;for(let e in o){let t=o[e],c=null!==l?l[e]:null,s=t[0],f=(0,u.createRouterCacheKey)(s),d=i(t,void 0===c?null:c,r,n),p=new Map;p.set(f,d),a.set(e,p)}let c=0===a.size,s=null!==t?t[2]:null;return{lazyData:null,parallelRoutes:a,prefetchRsc:n||void 0===s?null:s,prefetchHead:!n&&c?r:null,rsc:p(),head:c?p():null}}function c(e,t){let r=e.node;if(null===r)return;let n=e.children;if(null===n)s(e.route,r,t);else for(let e of n.values())c(e,t);e.node=null}function s(e,t,r){let n=e[1],o=t.parallelRoutes;for(let e in n){let t=n[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&s(t,c,r)}let l=t.rsc;d(l)&&(null===r?l.resolve(null):l.reject(r));let a=t.head;d(a)&&a.resolve(null)}let f=Symbol();function d(e){return e&&e.tag===f}function p(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});return r.status="pending",r.resolve=t=>{"pending"===r.status&&(r.status="fulfilled",r.value=t,e(t))},r.reject=e=>{"pending"===r.status&&(r.status="rejected",r.reason=e,t(e))},r.tag=f,r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5606:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPrefetchCacheKey",{enumerable:!0,get:function(){return l}});let n=r(1312),o=r(7027),u=r(8419);function l(e,t){let r=(0,u.createHrefFromUrl)(e,!1);return t&&!(0,o.pathHasPrefix)(r,t)?(0,n.addPathPrefix)(r,""+t+"%"):r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6503:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fastRefreshReducer",{enumerable:!0,get:function(){return n}}),r(3546),r(8419),r(7098),r(1956),r(5596),r(8875),r(9671),r(7690),r(2224);let n=function(e,t){return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},671:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findHeadInCache",{enumerable:!0,get:function(){return o}});let n=r(555);function o(e,t){return function e(t,r,o){if(0===Object.keys(r).length)return[t,o];for(let u in r){let[l,a]=r[u],i=t.parallelRoutes.get(u);if(!i)continue;let c=(0,n.createRouterCacheKey)(l),s=i.get(c);if(!s)continue;let f=e(s,a,o+"/"+c);if(f)return f}return null}(e,t,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6793:function(e,t){"use strict";function r(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5596:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{handleExternalUrl:function(){return g},navigateReducer:function(){return P}});let n=r(3546),o=r(8419),u=r(3074),l=r(2950),a=r(7098),i=r(3556),c=r(1956),s=r(1414),f=r(8875),d=r(9671),p=r(1486),h=r(7052),y=r(5678),_=r(7690),v=r(3266);r(6384);let b=r(5606);function g(e,t,r,n){return t.mpaNavigation=!0,t.canonicalUrl=r,t.pendingPush=n,t.scrollableSegments=void 0,(0,f.handleMutable)(e,t)}function m(e){let t=[],[r,n]=e;if(0===Object.keys(n).length)return[[r]];for(let[e,o]of Object.entries(n))for(let n of m(o))""===r?t.push([e,...n]):t.push([r,e,...n]);return t}let P=function(e,t){let{url:r,isExternalUrl:P,navigateType:j,shouldScroll:R}=t,O={},{hash:S}=r,E=(0,o.createHrefFromUrl)(r),w="push"===j;if((0,h.prunePrefetchCache)(e.prefetchCache),O.preserveCustomHistoryState=!1,P)return g(e,O,r.toString(),w);let M=(0,b.createPrefetchCacheKey)(r,e.nextUrl),T=e.prefetchCache.get(M);if(!T){let t={data:(0,n.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,void 0),kind:s.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:null};e.prefetchCache.set(M,t),T=t}let x=(0,p.getPrefetchEntryCacheStatus)(T),{treeAtTimeOfPrefetch:C,data:N}=T;return y.prefetchQueue.bump(N),N.then(t=>{let[s,h,y]=t;if(T&&!T.lastUsedTime&&(T.lastUsedTime=Date.now()),"string"==typeof s)return g(e,O,s,w);let b=e.tree,P=e.cache,j=[];for(let t of s){let o=t.slice(0,-4),s=t.slice(-3)[0],f=["",...o],h=(0,a.applyRouterStatePatchToTreeSkipDefault)(f,b,s);if(null===h&&(h=(0,a.applyRouterStatePatchToTreeSkipDefault)(f,C,s)),null!==h){if((0,c.isNavigatingToNewRootLayout)(b,h))return g(e,O,E,w);let a=(0,_.createEmptyCacheNode)(),R=(0,d.applyFlightData)(P,a,t,(null==T?void 0:T.kind)==="auto"&&x===p.PrefetchCacheEntryStatus.reusable);for(let t of((!R&&x===p.PrefetchCacheEntryStatus.stale||y)&&(R=function(e,t,r,n,o){let u=!1;for(let a of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.parallelRoutes=new Map(t.parallelRoutes),m(n).map(e=>[...r,...e])))(0,l.fillCacheWithDataProperty)(e,t,a,o),u=!0;return u}(a,P,o,s,()=>(0,n.fetchServerResponse)(r,b,e.nextUrl,e.buildId))),(0,i.shouldHardNavigate)(f,b)?(a.rsc=P.rsc,a.prefetchRsc=P.prefetchRsc,(0,u.invalidateCacheBelowFlightSegmentPath)(a,P,o),O.cache=a):R&&(O.cache=a),P=a,b=h,m(s))){let e=[...o,...t];e[e.length-1]!==v.DEFAULT_SEGMENT_KEY&&j.push(e)}}}return O.patchedTree=b,O.canonicalUrl=h?(0,o.createHrefFromUrl)(h):E,O.pendingPush=w,O.scrollableSegments=j,O.hashFragment=S,O.shouldScroll=R,(0,f.handleMutable)(e,O)},()=>e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5678:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{prefetchQueue:function(){return c},prefetchReducer:function(){return s}});let n=r(3546),o=r(1414),u=r(7052),l=r(2275),a=r(2418),i=r(5606),c=new a.PromiseQueue(5);function s(e,t){(0,u.prunePrefetchCache)(e.prefetchCache);let{url:r}=t;r.searchParams.delete(l.NEXT_RSC_UNION_QUERY);let a=(0,i.createPrefetchCacheKey)(r,e.nextUrl),s=e.prefetchCache.get(a);if(s&&(s.kind===o.PrefetchKind.TEMPORARY&&e.prefetchCache.set(a,{...s,kind:t.kind}),!(s.kind===o.PrefetchKind.AUTO&&t.kind===o.PrefetchKind.FULL)))return e;let f=c.enqueue(()=>(0,n.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,t.kind));return e.prefetchCache.set(a,{treeAtTimeOfPrefetch:e.tree,data:f,kind:t.kind,prefetchTime:Date.now(),lastUsedTime:null}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7052:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prunePrefetchCache",{enumerable:!0,get:function(){return o}});let n=r(1486);function o(e){for(let[t,r]of e)(0,n.getPrefetchEntryCacheStatus)(r)===n.PrefetchCacheEntryStatus.expired&&e.delete(t)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7491:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return d}});let n=r(3546),o=r(8419),u=r(7098),l=r(1956),a=r(5596),i=r(8875),c=r(4765),s=r(7690),f=r(2224);function d(e,t){let{origin:r}=t,d={},p=e.canonicalUrl,h=e.tree;d.preserveCustomHistoryState=!1;let y=(0,s.createEmptyCacheNode)();return y.lazyData=(0,n.fetchServerResponse)(new URL(p,r),[h[0],h[1],h[2],"refetch"],e.nextUrl,e.buildId),y.lazyData.then(r=>{let[n,s]=r;if("string"==typeof n)return(0,a.handleExternalUrl)(e,d,n,e.pushRef.pendingPush);for(let r of(y.lazyData=null,n)){if(3!==r.length)return console.log("REFRESH FAILED"),e;let[n]=r,i=(0,u.applyRouterStatePatchToFullTree)([""],h,n);if(null===i)return(0,f.handleSegmentMismatch)(e,t,n);if((0,l.isNavigatingToNewRootLayout)(h,i))return(0,a.handleExternalUrl)(e,d,p,e.pushRef.pendingPush);let _=s?(0,o.createHrefFromUrl)(s):void 0;s&&(d.canonicalUrl=_);let[v,b]=r.slice(-2);if(null!==v){let e=v[2];y.rsc=e,y.prefetchRsc=null,(0,c.fillLazyItemsTillLeafWithHead)(y,void 0,n,v,b),d.cache=y,d.prefetchCache=new Map}d.patchedTree=i,d.canonicalUrl=p,h=i}return(0,i.handleMutable)(e,d)},()=>e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7222:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let n=r(8419),o=r(4038);function u(e,t){var r;let{url:u,tree:l}=t,a=(0,n.createHrefFromUrl)(u),i=e.cache;return{buildId:e.buildId,canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:i,prefetchCache:e.prefetchCache,tree:l,nextUrl:null!=(r=(0,o.extractPathFromFlightRouterState)(l))?r:u.pathname}}r(6384),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},899:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return b}});let n=r(5355),o=r(2275),u=r(5786),l=r(8419),a=r(5596),i=r(7098),c=r(1956),s=r(8875),f=r(4765),d=r(7690),p=r(4038),h=r(2224),{createFromFetch:y,encodeReply:_}=r(7355);async function v(e,t){let r,{actionId:l,actionArgs:a}=t,i=await _(a),c=(0,p.extractPathFromFlightRouterState)(e.tree),s=e.nextUrl&&e.nextUrl!==c,f=await fetch("",{method:"POST",headers:{Accept:o.RSC_CONTENT_TYPE_HEADER,[o.ACTION]:l,[o.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(e.tree)),...s?{[o.NEXT_URL]:e.nextUrl}:{}},body:i}),d=f.headers.get("x-action-redirect");try{let e=JSON.parse(f.headers.get("x-action-revalidated")||"[[],0,0]");r={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){r={paths:[],tag:!1,cookie:!1}}let h=d?new URL((0,u.addBasePath)(d),new URL(e.canonicalUrl,window.location.href)):void 0;if(f.headers.get("content-type")===o.RSC_CONTENT_TYPE_HEADER){let e=await y(Promise.resolve(f),{callServer:n.callServer});if(d){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:h,revalidatedParts:r}}let[t,[,o]]=null!=e?e:[];return{actionResult:t,actionFlightData:o,redirectLocation:h,revalidatedParts:r}}return{redirectLocation:h,revalidatedParts:r}}function b(e,t){let{resolve:r,reject:n}=t,o={},u=e.canonicalUrl,p=e.tree;return o.preserveCustomHistoryState=!1,o.inFlightServerAction=v(e,t),o.inFlightServerAction.then(n=>{let{actionResult:y,actionFlightData:_,redirectLocation:v}=n;if(v&&(e.pushRef.pendingPush=!0,o.pendingPush=!0),!_)return(o.actionResultResolved||(r(y),o.actionResultResolved=!0),v)?(0,a.handleExternalUrl)(e,o,v.href,e.pushRef.pendingPush):e;if("string"==typeof _)return(0,a.handleExternalUrl)(e,o,_,e.pushRef.pendingPush);for(let r of(o.inFlightServerAction=null,_)){if(3!==r.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[n]=r,l=(0,i.applyRouterStatePatchToFullTree)([""],p,n);if(null===l)return(0,h.handleSegmentMismatch)(e,t,n);if((0,c.isNavigatingToNewRootLayout)(p,l))return(0,a.handleExternalUrl)(e,o,u,e.pushRef.pendingPush);let[s,y]=r.slice(-2),_=null!==s?s[2]:null;if(null!==_){let e=(0,d.createEmptyCacheNode)();e.rsc=_,e.prefetchRsc=null,(0,f.fillLazyItemsTillLeafWithHead)(e,void 0,n,s,y),o.cache=e,o.prefetchCache=new Map}o.patchedTree=l,o.canonicalUrl=u,p=l}if(v){let e=(0,l.createHrefFromUrl)(v,!1);o.canonicalUrl=e}return o.actionResultResolved||(r(y),o.actionResultResolved=!0),(0,s.handleMutable)(e,o)},t=>{if("rejected"===t.status)return o.actionResultResolved||(n(t.reason),o.actionResultResolved=!0),e;throw t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4173:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return f}});let n=r(8419),o=r(7098),u=r(1956),l=r(5596),a=r(9671),i=r(8875),c=r(7690),s=r(2224);function f(e,t){let{flightData:r,overrideCanonicalUrl:f}=t,d={};if(d.preserveCustomHistoryState=!1,"string"==typeof r)return(0,l.handleExternalUrl)(e,d,r,e.pushRef.pendingPush);let p=e.tree,h=e.cache;for(let i of r){let r=i.slice(0,-4),[y]=i.slice(-3,-2),_=(0,o.applyRouterStatePatchToTreeSkipDefault)(["",...r],p,y);if(null===_)return(0,s.handleSegmentMismatch)(e,t,y);if((0,u.isNavigatingToNewRootLayout)(p,_))return(0,l.handleExternalUrl)(e,d,e.canonicalUrl,e.pushRef.pendingPush);let v=f?(0,n.createHrefFromUrl)(f):void 0;v&&(d.canonicalUrl=v);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(h,b,i),d.patchedTree=_,d.cache=b,h=b,p=_}return(0,i.handleMutable)(e,d)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1414:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PrefetchKind:function(){return r},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return u},ACTION_RESTORE:function(){return l},ACTION_SERVER_PATCH:function(){return a},ACTION_PREFETCH:function(){return i},ACTION_FAST_REFRESH:function(){return c},ACTION_SERVER_ACTION:function(){return s},isThenable:function(){return f}});let o="refresh",u="navigate",l="restore",a="server-patch",i="prefetch",c="fast-refresh",s="server-action";function f(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(n=r||(r={})).AUTO="auto",n.FULL="full",n.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6878:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let n=r(1414),o=r(5596),u=r(4173),l=r(7222),a=r(7491),i=r(5678),c=r(6503),s=r(899),f=function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case n.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case n.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3556:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,r){let[o,u]=r,[l,a]=t;return(0,n.matchSegment)(l,o)?!(t.length<=2)&&e(t.slice(2),u[a]):!!Array.isArray(l)}}});let n=r(2295);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5797:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createSearchParamsBailoutProxy",{enumerable:!0,get:function(){return o}});let n=r(8181);function o(){return new Proxy({},{get(e,t){"string"==typeof t&&(0,n.staticGenerationBailout)("searchParams."+t)}})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(693).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8181:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isStaticGenBailoutError:function(){return a},staticGenerationBailout:function(){return c}});let n=r(7127),o=r(2),u="NEXT_STATIC_GEN_BAILOUT";class l extends Error{constructor(...e){super(...e),this.code=u}}function a(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===u}function i(e,t){let{dynamic:r,link:n}=t||{};return"Page"+(r?' with `dynamic = "'+r+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(n?" See more info here: "+n:"")}let c=(e,t)=>{let{dynamic:r,link:u}=void 0===t?{}:t,a=o.staticGenerationAsyncStorage.getStore();if(!a)return!1;if(a.forceStatic)return!0;if(a.dynamicShouldError)throw new l(i(e,{link:u,dynamic:null!=r?r:"error"}));let c=i(e,{dynamic:r,link:"https://nextjs.org/docs/messages/dynamic-server-error"});if(null==a.postpone||a.postpone.call(a,e),a.revalidate=0,a.isStaticGeneration){let t=new n.DynamicServerError(c);throw a.dynamicUsageDescription=e,a.dynamicUsageStack=t.stack,t}return!1};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7831:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}}),r(6921);let n=r(3827);r(4090);let o=r(5797);function u(e){let{Component:t,propsForComponent:r,isStaticGeneration:u}=e;if(u){let e=(0,o.createSearchParamsBailoutProxy)();return(0,n.jsx)(t,{searchParams:e,...r})}return(0,n.jsx)(t,{...r})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1276:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{useUnwrapState:function(){return a},useReducerWithReduxDevtools:function(){return i}});let n=r(1884)._(r(4090)),o=r(1414),u=r(5367);function l(e){if(e instanceof Map){let t={};for(let[r,n]of e.entries()){if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n._bundlerConfig){t[r]="FlightData";continue}}t[r]=l(n)}return t}if("object"==typeof e&&null!==e){let t={};for(let r in e){let n=e[r];if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n.hasOwnProperty("_bundlerConfig")){t[r]="FlightData";continue}}t[r]=l(n)}return t}return Array.isArray(e)?e.map(l):e}function a(e){return(0,o.isThenable)(e)?(0,n.use)(e):e}let i=function(e){let[t,r]=n.default.useState(e),o=(0,n.useContext)(u.ActionQueueContext);if(!o)throw Error("Invariant: Missing ActionQueueContext");let a=(0,n.useRef)(),i=(0,n.useRef)();return(0,n.useEffect)(()=>{if(!a.current&&!1!==i.current){if(void 0===i.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){i.current=!1;return}return a.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),a.current&&(a.current.init(l(e)),o&&(o.devToolsInstance=a.current)),()=>{a.current=void 0}}},[e,o]),[t,(0,n.useCallback)(t=>{o.state||(o.state=e),o.dispatch(t,r)},[o,e]),(0,n.useCallback)(e=>{a.current&&a.current.send({type:"RENDER_SYNC"},l(e))},[])]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7379:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let n=r(7027);function o(e){return(0,n.pathHasPrefix)(e,"/sandbox/credit-card")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2139:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let n=r(5868),o=r(6506),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:u}=(0,o.parsePath)(e);return""+(0,n.removeTrailingSlash)(t)+r+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4101:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(9775);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,n.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8895:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return o}}),r(7379);let n="/sandbox/credit-card";function o(e){return 0===n.length||(e=e.slice(n.length)).startsWith("/")||(e="/"+e),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7600:function(e,t,r){"use strict";var n=r(9542);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},9542:function(e,t,r){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=r(8790)},5450:function(e,t,r){"use strict";var n=r(9542),o=r(4090),u={stream:!0},l=new Map;function a(e){var t=r(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function i(){}var c=new Map,s=r.u;r.u=function(e){var t=c.get(e);return void 0!==t?t:s(e)};var f=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,d=Symbol.for("react.element"),p=Symbol.for("react.provider"),h=Symbol.for("react.server_context"),y=Symbol.for("react.lazy"),_=Symbol.for("react.default_value"),v=Symbol.iterator,b=Array.isArray,g=Object.getPrototypeOf,m=Object.prototype,P=new WeakMap,j=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function R(e,t,r,n){this.status=e,this.value=t,this.reason=r,this._response=n}function O(e){switch(e.status){case"resolved_model":C(e);break;case"resolved_module":N(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"cyclic":throw e;default:throw e.reason}}function S(e,t){for(var r=0;rh?(_=h,h=3,p++):(_=0,h=3);continue;case 2:44===(g=d[p++])?h=4:v=v<<4|(96d.length&&(g=-1)}var m=d.byteOffset+p;if(-1>>1,o=e[n];if(0>>1;nu(i,r))cu(s,i)?(e[n]=s,e[c]=r,n=c):(e[n]=i,e[a]=r,n=a);else if(cu(s,r))e[n]=s,e[c]=r,n=c;else break}}return t}function u(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function P(e){for(var t=n(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,r(s,t);else break;t=n(f)}}function j(e){if(v=!1,P(e),!_){if(null!==n(s))_=!0,C();else{var t=n(f);null!==t&&N(j,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var R=!1,O=-1,S=5,E=-1;function w(){return!(t.unstable_now()-Ee&&w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,P(e),r=!0;break t}p===n(s)&&o(s),P(e)}else o(s);p=n(s)}if(null!==p)r=!0;else{var c=n(f);null!==c&&N(j,c.startTime-e),r=!1}}break e}finally{p=null,h=u,y=!1}r=void 0}}finally{r?l():R=!1}}}if("function"==typeof m)l=function(){m(M)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,x=T.port2;T.port1.onmessage=M,l=function(){x.postMessage(null)}}else l=function(){b(M,0)};function C(){R||(R=!0,l())}function N(e,r){O=b(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||y||(_=!0,C())},t.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=u,r(f,e),null===n(s)&&e===n(f)&&(v?(g(O),O=-1):v=!0,N(j,u-l))):(e.sortIndex=a,r(s,e),_||y||(_=!0,C())),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},8172:function(e,t,r){"use strict";e.exports=r(2531)},2883:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return o}});let n=r(4749);function o(e){let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:"dynamic",param:e.slice(1,-1)}:null}},4749:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},isInterceptionRouteAppPath:function(){return u},extractInterceptionRouteInformation:function(){return l}});let n=r(7178),o=["(..)(..)","(.)","(..)","(...)"];function u(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function l(e){let t,r,u;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,u]=e.split(r,2);break}if(!t||!r||!u)throw Error("Invalid interception route: ".concat(e,". Must be in the format //(..|...|..)(..)/"));switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":u="/"===t?"/".concat(u):t+"/"+u;break;case"(..)":if("/"===t)throw Error("Invalid interception route: ".concat(e,". Cannot use (..) marker at the root level, use (.) instead."));u=t.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":let l=t.split("/");if(l.length<=2)throw Error("Invalid interception route: ".concat(e,". Cannot use (..)(..) marker at the root level or one level up."));u=l.slice(0,-2).concat(u).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:u}}},8599:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRouterContext:function(){return o},LayoutRouterContext:function(){return u},GlobalLayoutRouterContext:function(){return l},TemplateContext:function(){return a},MissingSlotContext:function(){return i}});let n=r(6921)._(r(4090)),o=n.default.createContext(null),u=n.default.createContext(null),l=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(new Set)},1:function(e,t){"use strict";function r(e){let t=5381;for(let r=0;r>>0}function n(e){return r(e).toString(36).slice(0,5)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{djb2Hash:function(){return r},hexHash:function(){return n}})},7484:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=r(6921)._(r(4090)).default.createContext({})},4758:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{SearchParamsContext:function(){return o},PathnameContext:function(){return u},PathParamsContext:function(){return l}});let n=r(4090),o=(0,n.createContext)(null),u=(0,n.createContext)(null),l=(0,n.createContext)(null)},9775:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});let r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}},9798:function(e,t){"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},5367:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ActionQueueContext:function(){return a},createMutableActionQueue:function(){return s}});let n=r(1884),o=r(1414),u=r(6878),l=n._(r(4090)),a=l.default.createContext(null);function i(e,t){null!==e.pending&&(e.pending=e.pending.next,null!==e.pending&&c({actionQueue:e,action:e.pending,setState:t}))}async function c(e){let{actionQueue:t,action:r,setState:n}=e,u=t.state;if(!u)throw Error("Invariant: Router state not initialized");t.pending=r;let l=r.payload,a=t.action(u,l);function c(e){if(r.discarded){t.needsRefresh&&null===t.pending&&(t.needsRefresh=!1,t.dispatch({type:o.ACTION_REFRESH,origin:window.location.origin},n));return}t.state=e,t.devToolsInstance&&t.devToolsInstance.send(l,e),i(t,n),r.resolve(e)}(0,o.isThenable)(a)?a.then(c,e=>{i(t,n),r.reject(e)}):c(a)}function s(){let e={state:null,dispatch:(t,r)=>(function(e,t,r){let n={resolve:r,reject:()=>{}};if(t.type!==o.ACTION_RESTORE){let e=new Promise((e,t)=>{n={resolve:e,reject:t}});(0,l.startTransition)(()=>{r(e)})}let u={payload:t,next:null,resolve:n.resolve,reject:n.reject};null===e.pending?(e.last=u,c({actionQueue:e,action:u,setState:r})):t.type===o.ACTION_NAVIGATE?(e.pending.discarded=!0,e.last=u,e.pending.payload.type===o.ACTION_SERVER_ACTION&&(e.needsRefresh=!0),c({actionQueue:e,action:u,setState:r})):(null!==e.last&&(e.last.next=u),e.last=u)})(e,t,r),action:async(e,t)=>{if(null===e)throw Error("Invariant: Router state not initialized");return(0,u.reducer)(e,t)},pending:null,last:null};return e}},1312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let n=r(6506);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:u}=(0,n.parsePath)(e);return""+t+r+o+u}},7178:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return u},normalizeRscURL:function(){return l}});let n=r(9798),o=r(3266);function u(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function l(e){return e.replace(/\.rsc($|\?)/,"$1")}},3011:function(e,t){"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},6407:function(e,t){"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},6506:function(e,t){"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},7027:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let n=r(6506);function o(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},5868:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},3266:function(e,t){"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isGroupSegment:function(){return r},PAGE_SEGMENT_KEY:function(){return n},DEFAULT_SEGMENT_KEY:function(){return o}});let n="__PAGE__",o="__DEFAULT__"},2472:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return u}});let n=r(1884)._(r(4090)),o=n.default.createContext(null);function u(e){let t=(0,n.useContext)(o);t&&t(e)}},6184:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},693:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return u}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}let o=globalThis.AsyncLocalStorage;function u(){return o?new o:new n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2299:function(e,t,r){"use strict";function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}r.r(t),r.d(t,{_:function(){return n},_class_private_field_loose_base:function(){return n}})},3603:function(e,t,r){"use strict";r.r(t),r.d(t,{_:function(){return o},_class_private_field_loose_key:function(){return o}});var n=0;function o(e){return"__private_"+n+++"_"+e}},6921:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return n},_interop_require_default:function(){return n}})},1884:function(e,t,r){"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=u?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(o,l,a):o[l]=e[l]}return o.default=e,r&&r.set(e,o),o}r.r(t),r.d(t,{_:function(){return o},_interop_require_wildcard:function(){return o}})}}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/792-ff5864056e955fdc.js b/dashboard/out/_next/static/chunks/792-ff5864056e955fdc.js new file mode 100644 index 0000000..108ce77 --- /dev/null +++ b/dashboard/out/_next/static/chunks/792-ff5864056e955fdc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[792],{8792:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(5250),o=n.n(r)},2956:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(2139);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{})}}function _(e){return"string"==typeof e?e:(0,u.formatUrl)(e)}let P=i.default.forwardRef(function(e,t){let n,r;let{href:u,as:y,children:P,prefetch:v=null,passHref:R,replace:O,shallow:j,scroll:E,locale:S,onClick:x,onMouseEnter:w,onTouchStart:M,legacyBehavior:N=!1,...C}=e;n=P,N&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let k=i.default.useContext(f.RouterContext),I=i.default.useContext(d.AppRouterContext),T=null!=k?k:I,L=!k,U=!1!==v,A=null===v?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:W,as:D}=i.default.useMemo(()=>{if(!k){let e=_(u);return{href:e,as:y?_(y):e}}let[e,t]=(0,a.resolveHref)(k,u,!0);return{href:e,as:y?(0,a.resolveHref)(k,y):t||e}},[k,u,y]),z=i.default.useRef(W),K=i.default.useRef(D);N&&(r=i.default.Children.only(n));let q=N?r&&"object"==typeof r&&r.ref:t,[F,$,B]=(0,p.useIntersection)({rootMargin:"200px"}),Y=i.default.useCallback(e=>{(K.current!==D||z.current!==W)&&(B(),K.current=D,z.current=W),F(e),q&&("function"==typeof q?q(e):"object"==typeof q&&(q.current=e))},[D,q,W,B,F]);i.default.useEffect(()=>{T&&$&&U&&b(T,W,D,{locale:S},{kind:A},L)},[D,W,$,S,U,null==k?void 0:k.locale,T,L,A]);let Q={ref:Y,onClick(e){N||"function"!=typeof x||x(e),N&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,o,a,u,s,c){let{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,l.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==u||u;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:a,locale:s,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?i.default.startTransition(d):d()}(e,T,W,D,O,j,E,S,L)},onMouseEnter(e){N||"function"!=typeof w||w(e),N&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(U||!L)&&b(T,W,D,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:A},L)},onTouchStart(e){N||"function"!=typeof M||M(e),N&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(U||!L)&&b(T,W,D,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:A},L)}};if((0,s.isAbsoluteUrl)(D))Q.href=D;else if(!N||R||"a"===r.type&&!("href"in r.props)){let e=void 0!==S?S:null==k?void 0:k.locale,t=(null==k?void 0:k.isLocaleDomain)&&(0,h.getDomainLocale)(D,e,null==k?void 0:k.locales,null==k?void 0:k.domainLocales);Q.href=t||(0,m.addBasePath)((0,c.addLocale)(D,e,null==k?void 0:k.defaultLocale))}return N?i.default.cloneElement(r,Q):(0,o.jsx)("a",{...C,...Q,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2185:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return r}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4542:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let r=n(5770),o=n(1030),i=n(4544),a=n(6874),l=n(2139),u=n(7434),s=n(2360),c=n(6735);function f(e,t,n){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,a.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,u.isLocalURL)(d))return n?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,l.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:a,params:l}=(0,c.interpolateAs)(e.pathname,e.pathname,n);a&&(t=(0,o.formatWithValidation)({pathname:a,hash:e.hash,query:(0,i.omit)(n,l)}))}let a=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return n?[a,t||a]:a}catch(e){return n?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5291:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});let r=n(4090),o=n(2185),i="function"==typeof IntersectionObserver,a=new Map,l=[];function u(e){let{rootRef:t,rootMargin:n,disabled:u}=e,s=u||!i,[c,f]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(i){if(s||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:i}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=l.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},l.push(n),a.set(n,t),t}(n);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&l.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[s,n,t,c,d.current]),[p,c,(0,r.useCallback)(()=>{f(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2202:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function o(e){return n.test(e)?e.replace(r,"\\$&"):e}},6993:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(6921)._(n(4090)).default.createContext(null)},1030:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{formatUrl:function(){return i},urlObjectKeys:function(){return a},formatWithValidation:function(){return l}});let r=n(1884)._(n(5770)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,i=e.protocol||"",a=e.pathname||"",l=e.hash||"",u=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:n&&(s=t+(~n.indexOf(":")?"["+n+"]":n),e.port&&(s+=":"+e.port)),u&&"object"==typeof u&&(u=String(r.urlQueryToSearchParams(u)));let c=e.search||u&&"?"+u||"";return i&&!i.endsWith(":")&&(i+=":"),e.slashes||(!i||o.test(i))&&!1!==s?(s="//"+(s||""),a&&"/"!==a[0]&&(a="/"+a)):s||(s=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),""+i+s+(a=a.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+l}let a=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return i(e)}},2360:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let r=n(7409),o=n(1305)},6735:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return i}});let r=n(2395),o=n(9935);function i(e,t,n){let i="",a=(0,o.getRouteRegex)(e),l=a.groups,u=(t!==e?(0,r.getRouteMatcher)(a)(t):"")||n;i=e;let s=Object.keys(l);return s.every(e=>{let t=u[e]||"",{repeat:n,optional:r}=l[e],o="["+(n?"...":"")+e+"]";return r&&(o=(t?"":"/")+"["+o+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in u)&&(i=i.replace(o,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(i=""),{params:s,result:i}}},1305:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let r=n(4749),o=/\/\[[^/]+?\](?=\/|$)/;function i(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},7434:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return i}});let r=n(6874),o=n(7379);function i(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,o.hasBasePath)(n.pathname)}catch(e){return!1}}},4544:function(e,t){function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},5770:function(e,t){function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,o]=e;Array.isArray(o)?o.forEach(e=>t.append(n,r(e))):t.set(n,r(o))}),t}function i(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o},assign:function(){return i}})},2395:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let r=n(6874);function o(e){let{re:t,groups:n}=e;return e=>{let o=t.exec(e);if(!o)return!1;let i=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},a={};return Object.keys(n).forEach(e=>{let t=n[e],r=o[t.pos];void 0!==r&&(a[e]=~r.indexOf("/")?r.split("/").map(e=>i(e)):t.repeat?[i(r)]:i(r))}),a}}},9935:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getRouteRegex:function(){return u},getNamedRouteRegex:function(){return f},getNamedMiddlewareRegex:function(){return d}});let r=n(4749),o=n(2202),i=n(5868);function a(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function l(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),n={},l=1;return{parameterizedRoute:t.map(e=>{let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:r,repeat:u}=a(i[1]);return n[e]={pos:l++,repeat:u,optional:r},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:r}=a(i[1]);return n[e]={pos:l++,repeat:t,optional:r},t?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function u(e){let{parameterizedRoute:t,groups:n}=l(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function s(e){let{interceptionMarker:t,getSafeRouteKey:n,segment:r,routeKeys:i,keyPrefix:l}=e,{key:u,optional:s,repeat:c}=a(r),f=u.replace(/\W/g,"");l&&(f=""+l+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=n()),l?i[f]=""+l+u:i[f]=u;let p=t?(0,o.escapeStringRegexp)(t):"";return c?s?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function c(e,t){let n;let a=(0,i.removeTrailingSlash)(e).slice(1).split("/"),l=(n=0,()=>{let e="",t=++n;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),u={};return{namedParameterizedRoute:a.map(e=>{let n=r.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(n&&i){let[n]=e.split(i[0]);return s({getSafeRouteKey:l,interceptionMarker:n,segment:i[1],routeKeys:u,keyPrefix:t?"nxtI":void 0})}return i?s({getSafeRouteKey:l,segment:i[1],routeKeys:u,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:u}}function f(e,t){let n=c(e,t);return{...u(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function d(e,t){let{parameterizedRoute:n}=l(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:o}=c(e,!1);return{namedRegex:"^"+o+(r?"(?:(/.*)?)":"")+"$"}}},7409:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let n=o.slice(1,-1),a=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),a=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function i(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(a){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');i(this.optionalRestSlugName,n),this.optionalRestSlugName=n,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');i(this.restSlugName,n),this.restSlugName=n,o="[...]"}}else{if(a)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');i(this.slugName,n),this.slugName=n,o="[]"}}this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},6874:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{WEB_VITALS:function(){return n},execOnce:function(){return r},isAbsoluteUrl:function(){return i},getLocationOrigin:function(){return a},getURL:function(){return l},getDisplayName:function(){return u},isResSent:function(){return s},normalizeRepeatedSlashes:function(){return c},loadGetInitialProps:function(){return f},SP:function(){return d},ST:function(){return p},DecodeError:function(){return h},NormalizeError:function(){return m},PageNotFoundError:function(){return g},MissingStaticPage:function(){return y},MiddlewareNotFoundError:function(){return b},stringifyError:function(){return _}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,o=Array(r),i=0;io.test(e);function a(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function l(){let{href:e}=window.location,t=a();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&s(n))return r;if(!r)throw Error('"'+u(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function _(e){return JSON.stringify({message:e.message,stack:e.stack})}}}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/app/_not-found-e85e74d50ed12c16.js b/dashboard/out/_next/static/chunks/app/_not-found-e85e74d50ed12c16.js new file mode 100644 index 0000000..7addf71 --- /dev/null +++ b/dashboard/out/_next/static/chunks/app/_not-found-e85e74d50ed12c16.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[165],{3155:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found",function(){return n(4032)}])},4032:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}}),n(6921);let o=n(3827);n(4090);let r={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};function i(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"404: This page could not be found."}),(0,o.jsx)("div",{style:r.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,o.jsx)("h1",{className:"next-error-h1",style:r.h1,children:"404"}),(0,o.jsx)("div",{style:r.desc,children:(0,o.jsx)("h2",{style:r.h2,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,69,744],function(){return e(e.s=3155)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/app/dashboard/environments/page-a627adbd0bb7fff2.js b/dashboard/out/_next/static/chunks/app/dashboard/environments/page-a627adbd0bb7fff2.js new file mode 100644 index 0000000..85b87bd --- /dev/null +++ b/dashboard/out/_next/static/chunks/app/dashboard/environments/page-a627adbd0bb7fff2.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17],{2670:function(e,t,n){Promise.resolve().then(n.bind(n,5405))},5405:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var r=n(3827),i=n(4090),o=n(575),a=n(5671),s=n(2782),c=n(2647),l=n(8222);function u(){let[e,t]=(0,i.useState)([]),[n,u]=(0,i.useState)(null),[d,f]=(0,i.useState)(""),[p,m]=(0,i.useState)("KEY=value"),[h,x]=(0,i.useState)(!1);async function v(){try{t(await (0,l.D7)())}catch(e){u(String(e))}}async function y(){if(!d)return;let e={};for(let t of p.split("\n")){let n=t.trim();if(!n||!n.includes("="))continue;let r=n.indexOf("=");e[n.slice(0,r).trim()]=n.slice(r+1).trim()}x(!0),u(null);try{await (0,l.Bi)(d,e),f(""),await v()}catch(e){u(String(e))}finally{x(!1)}}async function b(e){if(confirm("Delete this environment?")){x(!0);try{await (0,l.r1)(e),await v()}catch(e){u(String(e))}finally{x(!1)}}}return(0,i.useEffect)(()=>{v()},[]),(0,r.jsxs)("div",{className:"container py-8 space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Environments"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Named sets of env vars. Attach to a sandbox, a service, or the gateway."})]}),n&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:n}),(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)(a.Ol,{children:[(0,r.jsx)(a.ll,{children:"New environment"}),(0,r.jsx)(a.SZ,{children:"KEY=value per line."})]}),(0,r.jsxs)(a.aY,{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(c._,{children:"Name"}),(0,r.jsx)(s.I,{value:d,onChange:e=>f(e.target.value),placeholder:"dev-creds"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(c._,{children:"Values"}),(0,r.jsx)("textarea",{className:"flex min-h-[120px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm font-mono shadow-sm",value:p,onChange:e=>m(e.target.value)})]}),(0,r.jsx)(o.z,{onClick:y,disabled:!d||h,children:"Create"})]})]}),(0,r.jsx)("div",{className:"space-y-2",children:0===e.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No environments yet."}):e.map(e=>(0,r.jsx)(a.Zb,{children:(0,r.jsxs)(a.aY,{className:"flex items-start justify-between p-4 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-medium",children:e.name}),(0,r.jsx)("pre",{className:"text-xs text-muted-foreground font-mono mt-1 whitespace-pre-wrap",children:Object.entries(e.values).map(e=>{let[t,n]=e;return"".concat(t,"=").concat(n)}).join("\n")})]}),(0,r.jsx)(o.z,{variant:"outline",size:"sm",onClick:()=>b(e.id),disabled:h,children:"Delete"})]})},e.id))})]})}},575:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var r=n(3827),i=n(4090),o=n(9143),a=n(9769),s=n(2169);let c=(0,a.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),l=i.forwardRef((e,t)=>{let{className:n,variant:i,size:a,asChild:l=!1,...u}=e,d=l?o.g7:"button";return(0,r.jsx)(d,{className:(0,s.cn)(c({variant:i,size:a,className:n})),ref:t,...u})});l.displayName="Button"},5671:function(e,t,n){"use strict";n.d(t,{Ol:function(){return s},SZ:function(){return l},Zb:function(){return a},aY:function(){return u},ll:function(){return c}});var r=n(3827),i=n(4090),o=n(2169);let a=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("rounded-xl border bg-card text-card-foreground shadow",n),...i})});a.displayName="Card";let s=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",n),...i})});s.displayName="CardHeader";let c=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("font-semibold leading-none tracking-tight",n),...i})});c.displayName="CardTitle";let l=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",n),...i})});l.displayName="CardDescription";let u=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("p-6 pt-0",n),...i})});u.displayName="CardContent",i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,o.cn)("flex items-center p-6 pt-0",n),...i})}).displayName="CardFooter"},2782:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var r=n(3827),i=n(4090),o=n(2169);let a=i.forwardRef((e,t)=>{let{className:n,type:i,...a}=e;return(0,r.jsx)("input",{type:i,className:(0,o.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...a})});a.displayName="Input"},2647:function(e,t,n){"use strict";n.d(t,{_:function(){return s}});var r=n(3827),i=n(4090),o=n(4602),a=n(2169);let s=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)(o.f,{ref:t,className:(0,a.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...i})});s.displayName=o.f.displayName},8222:function(e,t,n){"use strict";n.d(t,{BS:function(){return b},Bi:function(){return f},CN:function(){return u},D7:function(){return d},FZ:function(){return s},Jz:function(){return S},KP:function(){return l},Mn:function(){return j},NV:function(){return x},Pz:function(){return c},VQ:function(){return y},Xc:function(){return N},Y7:function(){return v},f6:function(){return m},k3:function(){return E},r1:function(){return p},tx:function(){return w},xl:function(){return h},xp:function(){return g}});let r="/sandbox/credit-card".replace(/\/$/,"");function i(e){return!r||e.startsWith("http://")||e.startsWith("https://")?e:r+e}async function o(e){let t=await fetch(e,{credentials:"include"});if(!t.ok)throw Error(await t.text()||"".concat(e," failed (").concat(t.status,")"));return t.json()}async function a(e,t,n){let r=await fetch(e,{method:t,headers:{"content-type":"application/json"},credentials:"include",body:void 0!==n?JSON.stringify(n):void 0});if(!r.ok)throw Error(await r.text()||"".concat(e," failed (").concat(r.status,")"));if(204!==r.status)return r.json()}function s(){return o(i("/api/repos"))}function c(e){return o(i("/api/repos/branches?repo=".concat(encodeURIComponent(e))))}function l(e){return a(i("/api/deployments/new"),"POST",e)}function u(e){let t=e?"?sandbox=".concat(encodeURIComponent(e)):"";return o(i("/api/deployments".concat(t)))}function d(){return o(i("/api/environments"))}function f(e,t){return a(i("/api/environments"),"POST",{name:e,values:t})}function p(e){return a(i("/api/environments/".concat(e)),"DELETE")}function m(){return o(i("/api/sandboxes"))}function h(e){return o(i("/api/sandboxes/".concat(e)))}function x(e){return a(i("/api/sandboxes"),"POST",e)}function v(e,t){return a(i("/api/sandboxes/".concat(e)),"PUT",t)}function y(e){return a(i("/api/sandboxes/".concat(e)),"DELETE")}function b(e,t){return a(i("/api/sandboxes/clone"),"POST",{templateId:e,name:t})}function g(e,t,n){return a(i("/api/sandboxes/".concat(e,"/deploy/").concat(t)),"POST",n)}function w(){return o(i("/api/templates"))}function j(e){return a(i("/api/templates"),"POST",e)}function N(e){return a(i("/api/templates/".concat(e)),"DELETE")}function E(){return o(i("/api/routes"))}function S(e,t){return a(i("/api/routes/push"),"POST",{sandboxId:e,routes:t})}},2169:function(e,t,n){"use strict";n.d(t,{cn:function(){return o}});var r=n(3167),i=n(1367);function o(){for(var e=arguments.length,t=Array(e),n=0;n{let n=!1,r=t.map(t=>{let r=i(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e(0,o.jsx)(i.WV.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var s=a},9586:function(e,t,n){"use strict";n.d(t,{WV:function(){return s},jH:function(){return c}});var r=n(4090),i=n(9542),o=n(9143),a=n(3827),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,o.Z8)("Primitive.".concat(t)),i=r.forwardRef((e,r)=>{let{asChild:i,...o}=e,s=i?n:t;return window[Symbol.for("radix-ui")]=!0,(0,a.jsx)(s,{...o,ref:r})});return i.displayName="Primitive.".concat(t),{...e,[t]:i}},{});function c(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},9143:function(e,t,n){"use strict";n.d(t,{Z8:function(){return a},g7:function(){return s}});var r,i=n(4090),o=n(1266);function a(e){let t=i.forwardRef((t,n)=>{var r,a,s,u;let h,x;let{children:v,...y}=t,b=null,g=!1,w=[];d(v)&&"function"==typeof m&&(v=m(v._payload)),i.Children.forEach(v,e=>{var t;if(i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===c){g=!0;let n="child"in e.props?e.props.child:e.props.children;d(n)&&"function"==typeof m&&(n=m(n._payload)),b=l(e,n),w.push(null==b?void 0:null===(t=b.props)||void 0===t?void 0:t.children)}else w.push(e)}),b?b=i.cloneElement(b,void 0,w):!g&&1===i.Children.count(v)&&i.isValidElement(v)&&(b=v);let j=b?(h=null===(s=Object.getOwnPropertyDescriptor((a=b).props,"ref"))||void 0===s?void 0:s.get)&&"isReactWarning"in h&&h.isReactWarning?a.ref:(h=null===(u=Object.getOwnPropertyDescriptor(a,"ref"))||void 0===u?void 0:u.get)&&"isReactWarning"in h&&h.isReactWarning?a.props.ref:a.props.ref||a.ref:void 0,N=(0,o.e)(n,j);if(!b){if(v||0===v)throw Error(g?p(e):f(e));return v}let E=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n{if("child"in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},u=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===u&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),p=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),m=(r||(r=n.t(i,2)))[" use ".trim().toString()]}},function(e){e.O(0,[504,971,69,744],function(){return e(e.s=2670)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/app/dashboard/history/page-d2d7ef8172cb6bd1.js b/dashboard/out/_next/static/chunks/app/dashboard/history/page-d2d7ef8172cb6bd1.js new file mode 100644 index 0000000..3464864 --- /dev/null +++ b/dashboard/out/_next/static/chunks/app/dashboard/history/page-d2d7ef8172cb6bd1.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[834],{2570:function(t,e,n){Promise.resolve().then(n.bind(n,3331))},3331:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return c}});var r=n(3827),a=n(4090),s=n(5671),i=n(3277),o=n(8222);function c(){let[t,e]=(0,a.useState)([]),[n,c]=(0,a.useState)([]),[u,d]=(0,a.useState)(""),[l,f]=(0,a.useState)(null);function x(t){(0,o.CN)(t||void 0).then(e).catch(t=>f(String(t)))}return(0,a.useEffect)(()=>{(0,o.f6)().then(c).catch(t=>f(String(t))),x("")},[]),(0,r.jsxs)("div",{className:"container py-8 space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"History"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,r.jsx)("label",{children:"Sandbox"}),(0,r.jsxs)("select",{className:"h-9 rounded-md border border-input bg-background px-3 text-sm",value:u,onChange:t=>{d(t.target.value),x(t.target.value)},children:[(0,r.jsx)("option",{value:"",children:"All"}),n.map(t=>(0,r.jsx)("option",{value:t.id,children:t.name},t.id))]})]})]}),l&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:l}),(0,r.jsx)("div",{className:"space-y-2",children:0===t.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No deployments yet."}):t.map(t=>{var e,a;return(0,r.jsx)(s.Zb,{children:(0,r.jsxs)(s.aY,{className:"flex items-center justify-between p-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-mono text-xs text-muted-foreground",children:t.id}),(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsx)("span",{className:"font-medium",children:t.repository})," \xb7 ",(0,r.jsx)("span",{className:"font-mono",children:t.branch}),t.sandboxId&&(0,r.jsxs)("span",{className:"text-muted-foreground",children:[" \xb7 ",null!==(a=null===(e=n.find(e=>e.id===t.sandboxId))||void 0===e?void 0:e.name)&&void 0!==a?a:t.sandboxId]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.hostPort?(0,r.jsxs)(i.C,{variant:"outline",children:[":",t.hostPort]}):null,(0,r.jsx)(i.C,{variant:function(t){switch(t){case"RUNNING":return"success";case"FAILED":return"destructive";case"STOPPED":return"warning";default:return"secondary"}}(t.state),children:t.state}),(0,r.jsx)("span",{children:new Date(t.startedAt).toLocaleString()})]})]})},t.id)})})]})}},3277:function(t,e,n){"use strict";n.d(e,{C:function(){return o}});var r=n(3827);n(4090);var a=n(9769),s=n(2169);let i=(0,a.j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow",outline:"text-foreground",success:"border-transparent bg-emerald-500 text-white shadow",warning:"border-transparent bg-amber-500 text-white shadow"}},defaultVariants:{variant:"default"}});function o(t){let{className:e,variant:n,...a}=t;return(0,r.jsx)("div",{className:(0,s.cn)(i({variant:n}),e),...a})}},5671:function(t,e,n){"use strict";n.d(e,{Ol:function(){return o},SZ:function(){return u},Zb:function(){return i},aY:function(){return d},ll:function(){return c}});var r=n(3827),a=n(4090),s=n(2169);let i=a.forwardRef((t,e)=>{let{className:n,...a}=t;return(0,r.jsx)("div",{ref:e,className:(0,s.cn)("rounded-xl border bg-card text-card-foreground shadow",n),...a})});i.displayName="Card";let o=a.forwardRef((t,e)=>{let{className:n,...a}=t;return(0,r.jsx)("div",{ref:e,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",n),...a})});o.displayName="CardHeader";let c=a.forwardRef((t,e)=>{let{className:n,...a}=t;return(0,r.jsx)("div",{ref:e,className:(0,s.cn)("font-semibold leading-none tracking-tight",n),...a})});c.displayName="CardTitle";let u=a.forwardRef((t,e)=>{let{className:n,...a}=t;return(0,r.jsx)("div",{ref:e,className:(0,s.cn)("text-sm text-muted-foreground",n),...a})});u.displayName="CardDescription";let d=a.forwardRef((t,e)=>{let{className:n,...a}=t;return(0,r.jsx)("div",{ref:e,className:(0,s.cn)("p-6 pt-0",n),...a})});d.displayName="CardContent",a.forwardRef((t,e)=>{let{className:n,...a}=t;return(0,r.jsx)("div",{ref:e,className:(0,s.cn)("flex items-center p-6 pt-0",n),...a})}).displayName="CardFooter"},8222:function(t,e,n){"use strict";n.d(e,{BS:function(){return N},Bi:function(){return f},CN:function(){return d},D7:function(){return l},FZ:function(){return o},Jz:function(){return C},KP:function(){return u},Mn:function(){return y},NV:function(){return h},Pz:function(){return c},VQ:function(){return b},Xc:function(){return w},Y7:function(){return v},f6:function(){return p},k3:function(){return S},r1:function(){return x},tx:function(){return j},xl:function(){return m},xp:function(){return g}});let r="/sandbox/credit-card".replace(/\/$/,"");function a(t){return!r||t.startsWith("http://")||t.startsWith("https://")?t:r+t}async function s(t){let e=await fetch(t,{credentials:"include"});if(!e.ok)throw Error(await e.text()||"".concat(t," failed (").concat(e.status,")"));return e.json()}async function i(t,e,n){let r=await fetch(t,{method:e,headers:{"content-type":"application/json"},credentials:"include",body:void 0!==n?JSON.stringify(n):void 0});if(!r.ok)throw Error(await r.text()||"".concat(t," failed (").concat(r.status,")"));if(204!==r.status)return r.json()}function o(){return s(a("/api/repos"))}function c(t){return s(a("/api/repos/branches?repo=".concat(encodeURIComponent(t))))}function u(t){return i(a("/api/deployments/new"),"POST",t)}function d(t){let e=t?"?sandbox=".concat(encodeURIComponent(t)):"";return s(a("/api/deployments".concat(e)))}function l(){return s(a("/api/environments"))}function f(t,e){return i(a("/api/environments"),"POST",{name:t,values:e})}function x(t){return i(a("/api/environments/".concat(t)),"DELETE")}function p(){return s(a("/api/sandboxes"))}function m(t){return s(a("/api/sandboxes/".concat(t)))}function h(t){return i(a("/api/sandboxes"),"POST",t)}function v(t,e){return i(a("/api/sandboxes/".concat(t)),"PUT",e)}function b(t){return i(a("/api/sandboxes/".concat(t)),"DELETE")}function N(t,e){return i(a("/api/sandboxes/clone"),"POST",{templateId:t,name:e})}function g(t,e,n){return i(a("/api/sandboxes/".concat(t,"/deploy/").concat(e)),"POST",n)}function j(){return s(a("/api/templates"))}function y(t){return i(a("/api/templates"),"POST",t)}function w(t){return i(a("/api/templates/".concat(t)),"DELETE")}function S(){return s(a("/api/routes"))}function C(t,e){return i(a("/api/routes/push"),"POST",{sandboxId:t,routes:e})}},2169:function(t,e,n){"use strict";n.d(e,{cn:function(){return s}});var r=n(3167),a=n(1367);function s(){for(var t=arguments.length,e=Array(t),n=0;n{let r="/dashboard"===t.href?"/dashboard"===e:null==e?void 0:e.startsWith(t.href);return(0,n.jsx)(o.default,{href:t.href,className:"rounded-md px-3 py-1.5 transition-colors "+(r?"bg-zinc-900 text-zinc-50":"text-zinc-700 hover:bg-zinc-100"),children:t.label},t.href)})})]}),(0,n.jsx)(l.z,{variant:"outline",size:"sm",onClick:c,disabled:r,children:r?"Logging out…":"Logout"})]})})}},575:function(e,t,r){"use strict";r.d(t,{z:function(){return u}});var n=r(3827),o=r(4090),i=r(9143),a=r(9769),l=r(2169);let s=(0,a.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),u=o.forwardRef((e,t)=>{let{className:r,variant:o,size:a,asChild:u=!1,...c}=e,d=u?i.g7:"button";return(0,n.jsx)(d,{className:(0,l.cn)(s({variant:o,size:a,className:r})),ref:t,...c})});u.displayName="Button"},2169:function(e,t,r){"use strict";r.d(t,{cn:function(){return i}});var n=r(3167),o=r(1367);function i(){for(var e=arguments.length,t=Array(e),r=0;r{let r=!1,n=t.map(t=>{let n=o(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e{var n,a,l,c;let m,v;let{children:b,...g}=t,y=null,x=!1,j=[];d(b)&&"function"==typeof p&&(b=p(b._payload)),o.Children.forEach(b,e=>{var t;if(o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s){x=!0;let r="child"in e.props?e.props.child:e.props.children;d(r)&&"function"==typeof p&&(r=p(r._payload)),y=u(e,r),j.push(null==y?void 0:null===(t=y.props)||void 0===t?void 0:t.children)}else j.push(e)}),y?y=o.cloneElement(y,void 0,j):!x&&1===o.Children.count(b)&&o.isValidElement(b)&&(y=b);let w=y?(m=null===(l=Object.getOwnPropertyDescriptor((a=y).props,"ref"))||void 0===l?void 0:l.get)&&"isReactWarning"in m&&m.isReactWarning?a.ref:(m=null===(c=Object.getOwnPropertyDescriptor(a,"ref"))||void 0===c?void 0:c.get)&&"isReactWarning"in m&&m.isReactWarning?a.props.ref:a.props.ref||a.ref:void 0,E=(0,i.e)(r,w);if(!y){if(b||0===b)throw Error(x?h(e):f(e));return b}let N=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=function(){for(var e=arguments.length,t=Array(e),r=0;r{if("child"in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},c=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===c&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),h=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),p=(n||(n=r.t(o,2)))[" use ".trim().toString()]}},function(e){e.O(0,[504,792,971,69,744],function(){return e(e.s=5104)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/app/dashboard/page-fe092df0d98d16a1.js b/dashboard/out/_next/static/chunks/app/dashboard/page-fe092df0d98d16a1.js new file mode 100644 index 0000000..3270579 --- /dev/null +++ b/dashboard/out/_next/static/chunks/app/dashboard/page-fe092df0d98d16a1.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[702],{1440:function(e,t,n){Promise.resolve().then(n.bind(n,3498))},3498:function(e,t,n){"use strict";n.r(t),n.d(t,{Dashboard:function(){return h}});var r=n(3827),s=n(4090),a=n(575),i=n(5671),o=n(3277),c=n(8641),l=n(2647),d=n(2782),u=n(8222);let f=["git fetch","git checkout","git pull","go build","start container"],p=["git fetch","git checkout","git pull","composer install","start container"];function h(){let[e,t]=(0,s.useState)([]),[n,h]=(0,s.useState)(""),[m,g]=(0,s.useState)([]),[b,v]=(0,s.useState)(""),[j,y]=(0,s.useState)(""),[w,N]=(0,s.useState)(""),[k,S]=(0,s.useState)(""),[C,E]=(0,s.useState)("KEY=value"),[P,_]=(0,s.useState)(null),[O,R]=(0,s.useState)(null),[z,D]=(0,s.useState)(!1),{events:T,state:I}=function(e){let[t,n]=(0,s.useState)([]),[r,a]=(0,s.useState)("QUEUED"),i=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(!e)return;n([]),a("QUEUED");let t="https:"===window.location.protocol?"wss":"ws",r="/sandbox/credit-card".replace(/\/$/,""),s="".concat(t,"://").concat(window.location.host).concat(r,"/ws/deployments/").concat(e),o=new WebSocket(s);return i.current=o,o.onmessage=e=>{try{let t=JSON.parse(e.data);"status"===t.kind&&t.state&&a(t.state),("log"===t.kind||"progress"===t.kind||"status"===t.kind)&&n(e=>[...e,t].slice(-2e3))}catch(e){}},()=>o.close()},[e]),{events:t,state:r}}(P);(0,s.useEffect)(()=>{(0,u.FZ)().then(e=>{t(e),e.length&&h(e[0].name)}).catch(e=>R(String(e)))},[]),(0,s.useEffect)(()=>{n&&(0,u.Pz)(n).then(e=>{g(e),e.length&&v(e[0])}).catch(()=>g([]))},[n]);let Z=(0,s.useMemo)(()=>{let t=e.find(e=>e.name===n);return(null==t?void 0:t.name)==="api-gateway"?p:f},[n,e]);async function F(){R(null),D(!0);try{let e={};for(let t of C.split("\n")){let n=t.trim();if(!n||!n.includes("="))continue;let r=n.indexOf("=");e[n.slice(0,r).trim()]=n.slice(r+1).trim()}let{id:t}=await (0,u.KP)({repository:n,branch:b,username:j,password:w,env:Object.keys(e).length?e:void 0,hostPort:k?Number(k):void 0});_(t)}catch(e){R(String(e))}finally{D(!1)}}let B={};for(let e of Z)B[e]="pending";let U=null;for(let e of T)"progress"===e.kind&&e.stage&&Z.includes(e.stage)&&("FAILED"===e.state?B[e.stage]="failed":B[e.stage]="ok",U=e.stage);if(U){let e=Z.indexOf(U);e>=0&&e+1(0,r.jsxs)(c.Ql,{value:e.name,children:[e.name," ",(0,r.jsxs)("span",{className:"text-muted-foreground",children:["\xb7 ",e.node]})]},e.name))})]})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{children:"Branch"}),(0,r.jsxs)(c.Ph,{value:b,onValueChange:v,children:[(0,r.jsx)(c.i4,{children:(0,r.jsx)(c.ki,{placeholder:"Pick a branch"})}),(0,r.jsx)(c.Bw,{children:m.map(e=>(0,r.jsx)(c.Ql,{value:e,children:e},e))})]})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{htmlFor:"hp",children:"Host port (optional)"}),(0,r.jsx)(d.I,{id:"hp",value:k,onChange:e=>S(e.target.value),placeholder:"9001"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Maps the container's exposed port to this host port. Leave blank to skip port publishing."})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{htmlFor:"env",children:"Env vars (KEY=value per line)"}),(0,r.jsx)("textarea",{id:"env",className:"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm font-mono shadow-sm",value:C,onChange:e=>E(e.target.value)})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{htmlFor:"u",children:"Bitbucket username"}),(0,r.jsx)(d.I,{id:"u",value:j,onChange:e=>y(e.target.value),autoComplete:"username"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{htmlFor:"p",children:"Bitbucket password"}),(0,r.jsx)(d.I,{id:"p",type:"password",value:w,onChange:e=>N(e.target.value),autoComplete:"current-password"})]}),O&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:O}),(0,r.jsx)(a.z,{onClick:F,disabled:!n||!b||!j||!w||z,className:"w-full",children:z?"Starting…":"Deploy"})]})]}),(0,r.jsx)("div",{className:"space-y-6",children:P?(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(i.ll,{className:"font-mono text-base",children:P}),(0,r.jsxs)(i.SZ,{children:[n," \xb7 ",b]})]}),(0,r.jsx)(o.C,{variant:"RUNNING"===I?"success":"FAILED"===I?"destructive":"secondary",children:I})]})}),(0,r.jsxs)(i.aY,{className:"space-y-4",children:[(0,r.jsx)("ol",{className:"space-y-1.5 text-sm",children:Z.map(e=>{let t=B[e];return(0,r.jsxs)("li",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"ok"===t?"text-emerald-600":"failed"===t?"text-red-600":"in_progress"===t?"text-amber-600":"text-muted-foreground",children:"ok"===t?"✓":"failed"===t?"✗":"in_progress"===t?"…":"\xb7"}),(0,r.jsx)("span",{className:"in_progress"===t?"font-medium":"",children:e})]},e)})}),(0,r.jsx)(x,{events:T})]})]}):(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{children:(0,r.jsx)(i.ll,{children:"How this works"})}),(0,r.jsxs)(i.aY,{className:"text-sm text-muted-foreground space-y-2",children:[(0,r.jsxs)("p",{children:["The agent on the chosen VM does ",(0,r.jsx)("code",{className:"rounded bg-zinc-100 px-1",children:"git fetch → checkout → pull"}),", builds the service, and starts the container."]}),(0,r.jsx)("p",{children:"For PHP gateways we skip the build — the apache container serves the bind-mounted repo on the host port you specify."}),(0,r.jsx)("p",{children:"Credentials are used once for the git operation, then discarded."})]})]})})]})]})}function x(e){let{events:t}=e;return(0,r.jsx)("pre",{className:"h-72 overflow-auto rounded-md border bg-zinc-950 p-3 text-xs text-zinc-100 font-mono",children:t.filter(e=>"log"===e.kind&&e.line).slice(-500).map((e,t)=>(0,r.jsx)("div",{className:"whitespace-pre-wrap",children:e.line},t))})}},3277:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var r=n(3827);n(4090);var s=n(9769),a=n(2169);let i=(0,s.j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow",outline:"text-foreground",success:"border-transparent bg-emerald-500 text-white shadow",warning:"border-transparent bg-amber-500 text-white shadow"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:n,...s}=e;return(0,r.jsx)("div",{className:(0,a.cn)(i({variant:n}),t),...s})}},575:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var r=n(3827),s=n(4090),a=n(9143),i=n(9769),o=n(2169);let c=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),l=s.forwardRef((e,t)=>{let{className:n,variant:s,size:i,asChild:l=!1,...d}=e,u=l?a.g7:"button";return(0,r.jsx)(u,{className:(0,o.cn)(c({variant:s,size:i,className:n})),ref:t,...d})});l.displayName="Button"},5671:function(e,t,n){"use strict";n.d(t,{Ol:function(){return o},SZ:function(){return l},Zb:function(){return i},aY:function(){return d},ll:function(){return c}});var r=n(3827),s=n(4090),a=n(2169);let i=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("rounded-xl border bg-card text-card-foreground shadow",n),...s})});i.displayName="Card";let o=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",n),...s})});o.displayName="CardHeader";let c=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("font-semibold leading-none tracking-tight",n),...s})});c.displayName="CardTitle";let l=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("text-sm text-muted-foreground",n),...s})});l.displayName="CardDescription";let d=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("p-6 pt-0",n),...s})});d.displayName="CardContent",s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex items-center p-6 pt-0",n),...s})}).displayName="CardFooter"},2782:function(e,t,n){"use strict";n.d(t,{I:function(){return i}});var r=n(3827),s=n(4090),a=n(2169);let i=s.forwardRef((e,t)=>{let{className:n,type:s,...i}=e;return(0,r.jsx)("input",{type:s,className:(0,a.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...i})});i.displayName="Input"},2647:function(e,t,n){"use strict";n.d(t,{_:function(){return o}});var r=n(3827),s=n(4090),a=n(4602),i=n(2169);let o=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,r.jsx)(a.f,{ref:t,className:(0,i.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...s})});o.displayName=a.f.displayName},8641:function(e,t,n){"use strict";n.d(t,{Bw:function(){return f},Ph:function(){return l},Ql:function(){return p},i4:function(){return u},ki:function(){return d}});var r=n(3827),s=n(4090),a=n(8961),i=n(3441),o=n(9259),c=n(2169);let l=a.fC,d=a.B4;a.ZA;let u=s.forwardRef((e,t)=>{let{className:n,children:s,...o}=e;return(0,r.jsxs)(a.xz,{ref:t,className:(0,c.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...o,children:[s,(0,r.jsx)(a.JO,{asChild:!0,children:(0,r.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=a.xz.displayName;let f=s.forwardRef((e,t)=>{let{className:n,children:s,position:i="popper",...o}=e;return(0,r.jsx)(a.h_,{children:(0,r.jsx)(a.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","popper"===i&&"translate-y-1",n),position:i,...o,children:(0,r.jsx)(a.l_,{className:(0,c.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s})})})});f.displayName=a.VY.displayName;let p=s.forwardRef((e,t)=>{let{className:n,children:s,...i}=e;return(0,r.jsxs)(a.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...i,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(a.wU,{children:(0,r.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,r.jsx)(a.eT,{children:s})]})});p.displayName=a.ck.displayName},8222:function(e,t,n){"use strict";n.d(t,{BS:function(){return v},Bi:function(){return f},CN:function(){return d},D7:function(){return u},FZ:function(){return o},Jz:function(){return S},KP:function(){return l},Mn:function(){return w},NV:function(){return m},Pz:function(){return c},VQ:function(){return b},Xc:function(){return N},Y7:function(){return g},f6:function(){return h},k3:function(){return k},r1:function(){return p},tx:function(){return y},xl:function(){return x},xp:function(){return j}});let r="/sandbox/credit-card".replace(/\/$/,"");function s(e){return!r||e.startsWith("http://")||e.startsWith("https://")?e:r+e}async function a(e){let t=await fetch(e,{credentials:"include"});if(!t.ok)throw Error(await t.text()||"".concat(e," failed (").concat(t.status,")"));return t.json()}async function i(e,t,n){let r=await fetch(e,{method:t,headers:{"content-type":"application/json"},credentials:"include",body:void 0!==n?JSON.stringify(n):void 0});if(!r.ok)throw Error(await r.text()||"".concat(e," failed (").concat(r.status,")"));if(204!==r.status)return r.json()}function o(){return a(s("/api/repos"))}function c(e){return a(s("/api/repos/branches?repo=".concat(encodeURIComponent(e))))}function l(e){return i(s("/api/deployments/new"),"POST",e)}function d(e){let t=e?"?sandbox=".concat(encodeURIComponent(e)):"";return a(s("/api/deployments".concat(t)))}function u(){return a(s("/api/environments"))}function f(e,t){return i(s("/api/environments"),"POST",{name:e,values:t})}function p(e){return i(s("/api/environments/".concat(e)),"DELETE")}function h(){return a(s("/api/sandboxes"))}function x(e){return a(s("/api/sandboxes/".concat(e)))}function m(e){return i(s("/api/sandboxes"),"POST",e)}function g(e,t){return i(s("/api/sandboxes/".concat(e)),"PUT",t)}function b(e){return i(s("/api/sandboxes/".concat(e)),"DELETE")}function v(e,t){return i(s("/api/sandboxes/clone"),"POST",{templateId:e,name:t})}function j(e,t,n){return i(s("/api/sandboxes/".concat(e,"/deploy/").concat(t)),"POST",n)}function y(){return a(s("/api/templates"))}function w(e){return i(s("/api/templates"),"POST",e)}function N(e){return i(s("/api/templates/".concat(e)),"DELETE")}function k(){return a(s("/api/routes"))}function S(e,t){return i(s("/api/routes/push"),"POST",{sandboxId:e,routes:t})}},2169:function(e,t,n){"use strict";n.d(t,{cn:function(){return a}});var r=n(3167),s=n(1367);function a(){for(var e=arguments.length,t=Array(e),n=0;ne.key.localeCompare(n.key)),j(r),w(t.branch)}catch(e){k(String(e))}}if((0,a.useEffect)(()=>{D(),T(),(0,u.D7)().then(g).catch(()=>{});let e="/sandbox/credit-card".replace(/\/$/,"");fetch("".concat(e,"/api/repos"),{credentials:"include"}).then(e=>e.json()).then(e=>z(e)).catch(()=>{})},[p]),!m)return(0,r.jsx)("div",{className:"container py-8",children:C?(0,r.jsx)("p",{className:"text-sm text-destructive",children:C}):(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading…"})});function B(e,n){v(t=>{if(!t)return t;let r=t.services.slice();return r[e]={...r[e],...n},{...t,services:r}})}async function Z(){if(m){P(!0),k(null);try{await (0,u.Y7)(p,m),await D()}catch(e){k(String(e))}finally{P(!1)}}}async function V(){if(confirm("Delete this sandbox? Route overrides will be dropped.")){P(!0);try{await (0,u.VQ)(p),x.push("/dashboard/sandboxes")}catch(e){k(String(e))}finally{P(!1)}}}async function A(e){if(!O.username||!O.password){k("enter Bitbucket credentials first");return}if(!e.branch){k("set the branch first");return}P(!0),k(null);try{await (0,u.xp)(p,e.repo,{branch:e.branch,username:O.username,password:O.password,envId:e.envId}),setTimeout(T,1500)}catch(e){k(String(e))}finally{P(!1)}}return(0,r.jsxs)("div",{className:"container py-8 space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:m.name}),(0,r.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Gateway: branch ",(0,r.jsx)("span",{className:"font-mono",children:m.gatewayBranch||"—"})," on port ",(0,r.jsx)("span",{className:"font-mono",children:m.gatewayHostPort||"—"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.z,{variant:"outline",onClick:Z,disabled:S,children:"Save"}),(0,r.jsx)(i.z,{variant:"outline",onClick:V,disabled:S,children:"Delete"})]})]}),C&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:C}),(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)(o.Ol,{children:[(0,r.jsx)(o.ll,{children:"Gateway"}),(0,r.jsx)(o.SZ,{children:"The API gateway branch this sandbox runs. Switching it triggers a re-deploy + route re-apply."})]}),(0,r.jsxs)(o.aY,{className:"grid gap-3 md:grid-cols-3",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Branch"}),(0,r.jsx)(c.I,{value:null!==(e=m.gatewayBranch)&&void 0!==e?e:"",onChange:e=>v({...m,gatewayBranch:e.target.value}),placeholder:"develop"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Host port"}),(0,r.jsx)(c.I,{value:null!==(n=m.gatewayHostPort)&&void 0!==n?n:0,onChange:e=>v({...m,gatewayHostPort:Number(e.target.value)||0}),placeholder:"8080"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Env"}),(0,r.jsxs)("select",{className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",value:null!==(t=m.gatewayEnvId)&&void 0!==t?t:"",onChange:e=>v({...m,gatewayEnvId:e.target.value||void 0}),children:[(0,r.jsx)("option",{value:"",children:"— none —"}),y.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]})]}),(0,r.jsxs)(o.Zb,{children:[(0,r.jsx)(o.Ol,{children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(o.ll,{children:"Routes (live from gateway config.php)"}),(0,r.jsxs)(o.SZ,{children:[N?(0,r.jsxs)(r.Fragment,{children:["Branch: ",(0,r.jsx)("span",{className:"font-mono",children:N})]}):"No deploy yet."," \xb7 ",(0,r.jsx)("button",{className:"underline",onClick:T,children:"Refresh"})]})]}),(0,r.jsxs)(l.C,{variant:"secondary",children:[b.length," services"]})]})}),(0,r.jsx)(o.aY,{children:0===b.length?(0,r.jsxs)("p",{className:"text-sm text-muted-foreground",children:["No ",(0,r.jsx)("code",{children:"_url"})," lines in the current config.php. Deploy the gateway first."]}):(0,r.jsx)(h,{routes:b,onChange:async(e,n,t)=>{P(!0),k(null);try{let r=b.filter(n=>n.overridden&&n.sandboxId===p&&n.key!==e).map(e=>({key:e.key,value:e.url,targetOcp:!1}));await (0,u.Jz)(p,[...r,{key:e,value:n,targetOcp:t}]),await T()}catch(e){k(String(e))}finally{P(!1)}},busy:S})})]}),(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)(o.Ol,{children:[(0,r.jsx)(o.ll,{children:"Microservices"}),(0,r.jsx)(o.SZ,{children:'Pick a branch, choose a host port, deploy. Use "use OCP" to leave the gateway\'s default URL in place.'})]}),(0,r.jsxs)(o.aY,{className:"space-y-4",children:[0===m.services.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No services yet. Add one below."}):m.services.map((e,n)=>{var t,a,s,o;return(0,r.jsxs)("div",{className:"rounded-md border p-3 space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("div",{className:"font-mono text-sm",children:e.repo}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("label",{className:"text-xs flex items-center gap-1",children:[(0,r.jsx)("input",{type:"checkbox",checked:e.useOcp,onChange:e=>B(n,{useOcp:e.target.checked})}),"use OCP"]}),(0,r.jsx)(i.z,{size:"sm",variant:"outline",onClick:()=>{v(e=>{if(!e)return e;let t=e.services.slice();return t.splice(n,1),{...e,services:t}})},children:"Remove"}),(0,r.jsx)(i.z,{size:"sm",onClick:()=>A(e),disabled:S||e.useOcp,children:"Deploy"})]})]}),(0,r.jsxs)("div",{className:"grid gap-2 md:grid-cols-4",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Branch"}),(0,r.jsx)(c.I,{value:null!==(t=e.branch)&&void 0!==t?t:"",onChange:e=>B(n,{branch:e.target.value}),placeholder:"feature/login-error"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Host port"}),(0,r.jsx)(c.I,{type:"number",value:null!==(a=e.hostPort)&&void 0!==a?a:0,onChange:e=>B(n,{hostPort:Number(e.target.value)||0}),placeholder:"9001"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Env"}),(0,r.jsxs)("select",{className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",value:null!==(s=e.envId)&&void 0!==s?s:"",onChange:e=>B(n,{envId:e.target.value||void 0}),children:[(0,r.jsx)("option",{value:"",children:"— none —"}),y.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Branches (cached)"}),(0,r.jsx)(f,{repo:e.repo,value:null!==(o=e.branch)&&void 0!==o?o:"",onChange:e=>B(n,{branch:e})})]})]})]},e.id)}),(0,r.jsxs)("div",{className:"rounded-md border border-dashed p-3 space-y-2",children:[(0,r.jsx)("div",{className:"text-sm font-medium",children:"Add a service"}),(0,r.jsxs)("div",{className:"grid gap-2 md:grid-cols-5",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Repo"}),(0,r.jsxs)("select",{className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",value:E.repo,onChange:e=>R({...E,repo:e.target.value}),children:[(0,r.jsx)("option",{value:"",children:"— pick —"}),_.map(e=>(0,r.jsxs)("option",{value:e.name,children:[e.name," (",e.node,")"]},e.name))]})]}),(0,r.jsxs)("div",{className:"space-y-1.5 md:col-span-2",children:[(0,r.jsx)(d._,{children:"Branch"}),(0,r.jsx)(c.I,{value:E.branch,onChange:e=>R({...E,branch:e.target.value}),placeholder:"main"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Host port"}),(0,r.jsx)(c.I,{type:"number",value:E.hostPort,onChange:e=>R({...E,hostPort:e.target.value}),placeholder:"9001"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Env"}),(0,r.jsxs)("select",{className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",value:E.envId,onChange:e=>R({...E,envId:e.target.value}),children:[(0,r.jsx)("option",{value:"",children:"— none —"}),y.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]}),(0,r.jsx)(i.z,{size:"sm",onClick:function(){E.repo&&(v(e=>e?{...e,services:[...e.services,{id:"".concat(e.id,"-").concat(E.repo),sandboxId:e.id,repo:E.repo,branch:E.branch,hostPort:E.hostPort?Number(E.hostPort):0,useOcp:E.useOcp,envId:E.envId||void 0}]}:e),R({repo:"",branch:"",hostPort:"",useOcp:!1,envId:""}))},disabled:!E.repo||S,children:"Add"})]})]})]}),(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)(o.Ol,{children:[(0,r.jsx)(o.ll,{children:"Bitbucket credentials"}),(0,r.jsx)(o.SZ,{children:"Used by every deploy from this page. Held in component state only."})]}),(0,r.jsxs)(o.aY,{className:"grid gap-2 md:grid-cols-2",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Username"}),(0,r.jsx)(c.I,{value:O.username,onChange:e=>I({...O,username:e.target.value}),autoComplete:"username"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(d._,{children:"Password"}),(0,r.jsx)(c.I,{type:"password",value:O.password,onChange:e=>I({...O,password:e.target.value}),autoComplete:"current-password"})]})]})]})]})}function f(e){let{repo:n,value:t,onChange:s}=e,[i,o]=(0,a.useState)([]);return((0,a.useEffect)(()=>{if(!n){o([]);return}(0,u.Pz)(n).then(o).catch(()=>o([]))},[n]),0===i.length)?(0,r.jsx)(c.I,{value:t,onChange:e=>s(e.target.value),placeholder:"(type a branch)"}):(0,r.jsxs)("select",{className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm",value:t,onChange:e=>s(e.target.value),children:[(0,r.jsx)("option",{value:"",children:"— pick —"}),i.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})}function h(e){let{routes:n,onChange:t,busy:s}=e,[o,d]=(0,a.useState)({});return(0,r.jsxs)("table",{className:"w-full text-sm",children:[(0,r.jsx)("thead",{className:"text-left text-xs text-muted-foreground",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"py-2 pr-3",children:"Service"}),(0,r.jsx)("th",{className:"py-2 pr-3",children:"Current URL"}),(0,r.jsx)("th",{className:"py-2 pr-3",children:"OCP default"}),(0,r.jsx)("th",{className:"py-2 pr-3",children:"Status"}),(0,r.jsx)("th",{className:"py-2 pr-3",children:"Action"})]})}),(0,r.jsx)("tbody",{children:n.map(e=>{var n,a;return(0,r.jsxs)("tr",{className:"border-t",children:[(0,r.jsx)("td",{className:"py-2 pr-3 font-mono",children:e.key}),(0,r.jsx)("td",{className:"py-2 pr-3 font-mono text-xs",children:e.url}),(0,r.jsx)("td",{className:"py-2 pr-3 font-mono text-xs text-muted-foreground",children:null!==(n=e.ocpDefault)&&void 0!==n?n:"—"}),(0,r.jsx)("td",{className:"py-2 pr-3",children:e.overridden?(0,r.jsx)(l.C,{variant:"warning",children:"sandbox"}):(0,r.jsx)(l.C,{variant:"secondary",children:"OCP"})}),(0,r.jsx)("td",{className:"py-2 pr-3",children:e.overridden?(0,r.jsx)(i.z,{size:"sm",variant:"outline",disabled:s,onClick:()=>{var n;return t(e.key,null!==(n=e.ocpDefault)&&void 0!==n?n:"",!0)},children:"Restore OCP"}):(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(c.I,{className:"h-8 w-56 font-mono text-xs",placeholder:"http://172.18.136.92:9001",value:null!==(a=o[e.key])&&void 0!==a?a:"",onChange:n=>d(t=>({...t,[e.key]:n.target.value}))}),(0,r.jsx)(i.z,{size:"sm",disabled:s||!o[e.key],onClick:()=>{t(e.key,o[e.key],!1),d(n=>({...n,[e.key]:""}))},children:"Take over"})]})})]},e.key)})})]})}},3277:function(e,n,t){"use strict";t.d(n,{C:function(){return o}});var r=t(3827);t(4090);var a=t(9769),s=t(2169);let i=(0,a.j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow",outline:"text-foreground",success:"border-transparent bg-emerald-500 text-white shadow",warning:"border-transparent bg-amber-500 text-white shadow"}},defaultVariants:{variant:"default"}});function o(e){let{className:n,variant:t,...a}=e;return(0,r.jsx)("div",{className:(0,s.cn)(i({variant:t}),n),...a})}},575:function(e,n,t){"use strict";t.d(n,{z:function(){return c}});var r=t(3827),a=t(4090),s=t(9143),i=t(9769),o=t(2169);let l=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=a.forwardRef((e,n)=>{let{className:t,variant:a,size:i,asChild:c=!1,...d}=e,u=c?s.g7:"button";return(0,r.jsx)(u,{className:(0,o.cn)(l({variant:a,size:i,className:t})),ref:n,...d})});c.displayName="Button"},5671:function(e,n,t){"use strict";t.d(n,{Ol:function(){return o},SZ:function(){return c},Zb:function(){return i},aY:function(){return d},ll:function(){return l}});var r=t(3827),a=t(4090),s=t(2169);let i=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("rounded-xl border bg-card text-card-foreground shadow",t),...a})});i.displayName="Card";let o=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",t),...a})});o.displayName="CardHeader";let l=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("font-semibold leading-none tracking-tight",t),...a})});l.displayName="CardTitle";let c=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("text-sm text-muted-foreground",t),...a})});c.displayName="CardDescription";let d=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("p-6 pt-0",t),...a})});d.displayName="CardContent",a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("flex items-center p-6 pt-0",t),...a})}).displayName="CardFooter"},2782:function(e,n,t){"use strict";t.d(n,{I:function(){return i}});var r=t(3827),a=t(4090),s=t(2169);let i=a.forwardRef((e,n)=>{let{className:t,type:a,...i}=e;return(0,r.jsx)("input",{type:a,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...i})});i.displayName="Input"},2647:function(e,n,t){"use strict";t.d(n,{_:function(){return o}});var r=t(3827),a=t(4090),s=t(4602),i=t(2169);let o=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,r.jsx)(s.f,{ref:n,className:(0,i.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...a})});o.displayName=s.f.displayName},8222:function(e,n,t){"use strict";t.d(n,{BS:function(){return g},Bi:function(){return p},CN:function(){return d},D7:function(){return u},FZ:function(){return o},Jz:function(){return k},KP:function(){return c},Mn:function(){return N},NV:function(){return m},Pz:function(){return l},VQ:function(){return y},Xc:function(){return w},Y7:function(){return v},f6:function(){return h},k3:function(){return C},r1:function(){return f},tx:function(){return j},xl:function(){return x},xp:function(){return b}});let r="/sandbox/credit-card".replace(/\/$/,"");function a(e){return!r||e.startsWith("http://")||e.startsWith("https://")?e:r+e}async function s(e){let n=await fetch(e,{credentials:"include"});if(!n.ok)throw Error(await n.text()||"".concat(e," failed (").concat(n.status,")"));return n.json()}async function i(e,n,t){let r=await fetch(e,{method:n,headers:{"content-type":"application/json"},credentials:"include",body:void 0!==t?JSON.stringify(t):void 0});if(!r.ok)throw Error(await r.text()||"".concat(e," failed (").concat(r.status,")"));if(204!==r.status)return r.json()}function o(){return s(a("/api/repos"))}function l(e){return s(a("/api/repos/branches?repo=".concat(encodeURIComponent(e))))}function c(e){return i(a("/api/deployments/new"),"POST",e)}function d(e){let n=e?"?sandbox=".concat(encodeURIComponent(e)):"";return s(a("/api/deployments".concat(n)))}function u(){return s(a("/api/environments"))}function p(e,n){return i(a("/api/environments"),"POST",{name:e,values:n})}function f(e){return i(a("/api/environments/".concat(e)),"DELETE")}function h(){return s(a("/api/sandboxes"))}function x(e){return s(a("/api/sandboxes/".concat(e)))}function m(e){return i(a("/api/sandboxes"),"POST",e)}function v(e,n){return i(a("/api/sandboxes/".concat(e)),"PUT",n)}function y(e){return i(a("/api/sandboxes/".concat(e)),"DELETE")}function g(e,n){return i(a("/api/sandboxes/clone"),"POST",{templateId:e,name:n})}function b(e,n,t){return i(a("/api/sandboxes/".concat(e,"/deploy/").concat(n)),"POST",t)}function j(){return s(a("/api/templates"))}function N(e){return i(a("/api/templates"),"POST",e)}function w(e){return i(a("/api/templates/".concat(e)),"DELETE")}function C(){return s(a("/api/routes"))}function k(e,n){return i(a("/api/routes/push"),"POST",{sandboxId:e,routes:n})}},2169:function(e,n,t){"use strict";t.d(n,{cn:function(){return s}});var r=t(3167),a=t(1367);function s(){for(var e=arguments.length,n=Array(e),t=0;t{let t=!1,r=n.map(n=>{let r=a(n,e);return t||"function"!=typeof r||(t=!0),r});if(t)return()=>{for(let e=0;e(0,s.jsx)(a.WV.label,{...e,ref:n,onMouseDown:n=>{var t;n.target.closest("button, input, select, textarea")||(null===(t=e.onMouseDown)||void 0===t||t.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));i.displayName="Label";var o=i},9586:function(e,n,t){"use strict";t.d(n,{WV:function(){return o},jH:function(){return l}});var r=t(4090),a=t(9542),s=t(9143),i=t(3827),o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{let t=(0,s.Z8)("Primitive.".concat(n)),a=r.forwardRef((e,r)=>{let{asChild:a,...s}=e,o=a?t:n;return window[Symbol.for("radix-ui")]=!0,(0,i.jsx)(o,{...s,ref:r})});return a.displayName="Primitive.".concat(n),{...e,[n]:a}},{});function l(e,n){e&&a.flushSync(()=>e.dispatchEvent(n))}},9143:function(e,n,t){"use strict";t.d(n,{Z8:function(){return i},g7:function(){return o}});var r,a=t(4090),s=t(1266);function i(e){let n=a.forwardRef((n,t)=>{var r,i,o,d;let x,m;let{children:v,...y}=n,g=null,b=!1,j=[];u(v)&&"function"==typeof h&&(v=h(v._payload)),a.Children.forEach(v,e=>{var n;if(a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l){b=!0;let t="child"in e.props?e.props.child:e.props.children;u(t)&&"function"==typeof h&&(t=h(t._payload)),g=c(e,t),j.push(null==g?void 0:null===(n=g.props)||void 0===n?void 0:n.children)}else j.push(e)}),g?g=a.cloneElement(g,void 0,j):!b&&1===a.Children.count(v)&&a.isValidElement(v)&&(g=v);let N=g?(x=null===(o=Object.getOwnPropertyDescriptor((i=g).props,"ref"))||void 0===o?void 0:o.get)&&"isReactWarning"in x&&x.isReactWarning?i.ref:(x=null===(d=Object.getOwnPropertyDescriptor(i,"ref"))||void 0===d?void 0:d.get)&&"isReactWarning"in x&&x.isReactWarning?i.props.ref:i.props.ref||i.ref:void 0,w=(0,s.e)(t,N);if(!g){if(v||0===v)throw Error(b?f(e):p(e));return v}let C=function(e,n){let t={...n};for(let r in n){let a=e[r],s=n[r];/^on[A-Z]/.test(r)?a&&s?t[r]=function(){for(var e=arguments.length,n=Array(e),t=0;t{if("child"in e.props){let n=e.props.child;return a.isValidElement(n)?a.cloneElement(n,void 0,e.props.children(n.props.children)):null}return a.isValidElement(n)?n:null},d=Symbol.for("react.lazy");function u(e){var n;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===d&&"_payload"in e&&"object"==typeof(n=e._payload)&&null!==n&&"then"in n}var p=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),f=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),h=(r||(r=t.t(a,2)))[" use ".trim().toString()]}},function(e){e.O(0,[504,971,69,744],function(){return e(e.s=2392)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/app/dashboard/sandboxes/page-fa8d8c9854e58bd7.js b/dashboard/out/_next/static/chunks/app/dashboard/sandboxes/page-fa8d8c9854e58bd7.js new file mode 100644 index 0000000..9b0b1be --- /dev/null +++ b/dashboard/out/_next/static/chunks/app/dashboard/sandboxes/page-fa8d8c9854e58bd7.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[509],{2034:function(e,t,n){Promise.resolve().then(n.bind(n,7334))},7334:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return f}});var r=n(3827),a=n(8792),s=n(4090),i=n(575),o=n(5671),c=n(2782),l=n(2647),d=n(8641),u=n(8222);function f(){let[e,t]=(0,s.useState)([]),[n,f]=(0,s.useState)([]),[p,m]=(0,s.useState)([]),[x,h]=(0,s.useState)(null),[b,g]=(0,s.useState)(""),[v,y]=(0,s.useState)(""),[j,w]=(0,s.useState)(""),[N,S]=(0,s.useState)(""),[C,k]=(0,s.useState)(""),[P,z]=(0,s.useState)(!1);async function O(){try{let[e,n,r]=await Promise.all([(0,u.f6)(),(0,u.tx)(),(0,u.D7)()]);t(e),f(n.map(e=>({id:e.id,name:e.name}))),m(r)}catch(e){h(String(e))}}async function E(){if(b){z(!0),h(null);try{await (0,u.NV)({name:b,gatewayBranch:v||void 0,gatewayHostPort:j?Number(j):0}),g(""),y(""),w(""),await O()}catch(e){h(String(e))}finally{z(!1)}}}async function R(){if(N&&C){z(!0),h(null);try{await (0,u.BS)(N,C),k(""),await O()}catch(e){h(String(e))}finally{z(!1)}}}async function T(e){if(confirm("Delete this sandbox? Route overrides are dropped but no containers are stopped.")){z(!0);try{await (0,u.VQ)(e),await O()}catch(e){h(String(e))}finally{z(!1)}}}return(0,s.useEffect)(()=>{O()},[]),(0,r.jsxs)("div",{className:"container py-8 space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Sandboxes"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"A sandbox groups one gateway branch with a set of microservice overrides. Each route can be pointed at the local stand-in or back at OCP."})]}),x&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:x}),(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)(o.Ol,{children:[(0,r.jsx)(o.ll,{children:"New sandbox"}),(0,r.jsx)(o.SZ,{children:"Pick a gateway branch. Add services after creating."})]}),(0,r.jsxs)(o.aY,{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{children:"Name"}),(0,r.jsx)(c.I,{value:b,onChange:e=>g(e.target.value),placeholder:"QA-login-error"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{children:"Gateway branch"}),(0,r.jsx)(c.I,{value:v,onChange:e=>y(e.target.value),placeholder:"develop"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{children:"Gateway host port"}),(0,r.jsx)(c.I,{value:j,onChange:e=>w(e.target.value),placeholder:"8080"}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Port on the gateway VM that the mobile app points at. One live at a time."})]}),(0,r.jsx)(i.z,{onClick:E,disabled:!b||P,className:"w-full",children:"Create"})]})]}),(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)(o.Ol,{children:[(0,r.jsx)(o.ll,{children:"Clone from template"}),(0,r.jsx)(o.SZ,{children:"Materialize a sandbox from a saved template."})]}),(0,r.jsxs)(o.aY,{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{children:"Template"}),(0,r.jsxs)(d.Ph,{value:N,onValueChange:S,children:[(0,r.jsx)(d.i4,{children:(0,r.jsx)(d.ki,{placeholder:"Pick a template"})}),(0,r.jsx)(d.Bw,{children:n.map(e=>(0,r.jsx)(d.Ql,{value:e.id,children:e.name},e.id))})]})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(l._,{children:"New sandbox name"}),(0,r.jsx)(c.I,{value:C,onChange:e=>k(e.target.value),placeholder:"QA-login-error"})]}),(0,r.jsx)(i.z,{onClick:R,disabled:!N||!C||P,className:"w-full",children:"Clone"})]})]})]}),(0,r.jsx)("div",{className:"space-y-2",children:0===e.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No sandboxes yet."}):e.map(e=>(0,r.jsx)(o.Zb,{children:(0,r.jsxs)(o.aY,{className:"flex items-center justify-between p-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(a.default,{href:"/dashboard/sandboxes/".concat(e.id),className:"font-medium hover:underline",children:e.name}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Gateway branch: ",(0,r.jsx)("span",{className:"font-mono",children:e.gatewayBranch||"—"})," \xb7 ","Gateway port: ",(0,r.jsx)("span",{className:"font-mono",children:e.gatewayHostPort||"—"})," \xb7 ","Services: ",(0,r.jsx)("span",{className:"font-mono",children:e.services.length})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(i.z,{asChild:!0,variant:"outline",size:"sm",children:(0,r.jsx)(a.default,{href:"/dashboard/sandboxes/".concat(e.id),children:"Open"})}),(0,r.jsx)(i.z,{onClick:()=>T(e.id),variant:"outline",size:"sm",disabled:P,children:"Delete"})]})]})},e.id))})]})}},575:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var r=n(3827),a=n(4090),s=n(9143),i=n(9769),o=n(2169);let c=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),l=a.forwardRef((e,t)=>{let{className:n,variant:a,size:i,asChild:l=!1,...d}=e,u=l?s.g7:"button";return(0,r.jsx)(u,{className:(0,o.cn)(c({variant:a,size:i,className:n})),ref:t,...d})});l.displayName="Button"},5671:function(e,t,n){"use strict";n.d(t,{Ol:function(){return o},SZ:function(){return l},Zb:function(){return i},aY:function(){return d},ll:function(){return c}});var r=n(3827),a=n(4090),s=n(2169);let i=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("rounded-xl border bg-card text-card-foreground shadow",n),...a})});i.displayName="Card";let o=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",n),...a})});o.displayName="CardHeader";let c=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("font-semibold leading-none tracking-tight",n),...a})});c.displayName="CardTitle";let l=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("text-sm text-muted-foreground",n),...a})});l.displayName="CardDescription";let d=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("p-6 pt-0",n),...a})});d.displayName="CardContent",a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("flex items-center p-6 pt-0",n),...a})}).displayName="CardFooter"},2782:function(e,t,n){"use strict";n.d(t,{I:function(){return i}});var r=n(3827),a=n(4090),s=n(2169);let i=a.forwardRef((e,t)=>{let{className:n,type:a,...i}=e;return(0,r.jsx)("input",{type:a,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...i})});i.displayName="Input"},2647:function(e,t,n){"use strict";n.d(t,{_:function(){return o}});var r=n(3827),a=n(4090),s=n(4602),i=n(2169);let o=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(s.f,{ref:t,className:(0,i.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...a})});o.displayName=s.f.displayName},8641:function(e,t,n){"use strict";n.d(t,{Bw:function(){return f},Ph:function(){return l},Ql:function(){return p},i4:function(){return u},ki:function(){return d}});var r=n(3827),a=n(4090),s=n(8961),i=n(3441),o=n(9259),c=n(2169);let l=s.fC,d=s.B4;s.ZA;let u=a.forwardRef((e,t)=>{let{className:n,children:a,...o}=e;return(0,r.jsxs)(s.xz,{ref:t,className:(0,c.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...o,children:[a,(0,r.jsx)(s.JO,{asChild:!0,children:(0,r.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=s.xz.displayName;let f=a.forwardRef((e,t)=>{let{className:n,children:a,position:i="popper",...o}=e;return(0,r.jsx)(s.h_,{children:(0,r.jsx)(s.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","popper"===i&&"translate-y-1",n),position:i,...o,children:(0,r.jsx)(s.l_,{className:(0,c.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a})})})});f.displayName=s.VY.displayName;let p=a.forwardRef((e,t)=>{let{className:n,children:a,...i}=e;return(0,r.jsxs)(s.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...i,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(s.wU,{children:(0,r.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,r.jsx)(s.eT,{children:a})]})});p.displayName=s.ck.displayName},8222:function(e,t,n){"use strict";n.d(t,{BS:function(){return v},Bi:function(){return f},CN:function(){return d},D7:function(){return u},FZ:function(){return o},Jz:function(){return C},KP:function(){return l},Mn:function(){return w},NV:function(){return h},Pz:function(){return c},VQ:function(){return g},Xc:function(){return N},Y7:function(){return b},f6:function(){return m},k3:function(){return S},r1:function(){return p},tx:function(){return j},xl:function(){return x},xp:function(){return y}});let r="/sandbox/credit-card".replace(/\/$/,"");function a(e){return!r||e.startsWith("http://")||e.startsWith("https://")?e:r+e}async function s(e){let t=await fetch(e,{credentials:"include"});if(!t.ok)throw Error(await t.text()||"".concat(e," failed (").concat(t.status,")"));return t.json()}async function i(e,t,n){let r=await fetch(e,{method:t,headers:{"content-type":"application/json"},credentials:"include",body:void 0!==n?JSON.stringify(n):void 0});if(!r.ok)throw Error(await r.text()||"".concat(e," failed (").concat(r.status,")"));if(204!==r.status)return r.json()}function o(){return s(a("/api/repos"))}function c(e){return s(a("/api/repos/branches?repo=".concat(encodeURIComponent(e))))}function l(e){return i(a("/api/deployments/new"),"POST",e)}function d(e){let t=e?"?sandbox=".concat(encodeURIComponent(e)):"";return s(a("/api/deployments".concat(t)))}function u(){return s(a("/api/environments"))}function f(e,t){return i(a("/api/environments"),"POST",{name:e,values:t})}function p(e){return i(a("/api/environments/".concat(e)),"DELETE")}function m(){return s(a("/api/sandboxes"))}function x(e){return s(a("/api/sandboxes/".concat(e)))}function h(e){return i(a("/api/sandboxes"),"POST",e)}function b(e,t){return i(a("/api/sandboxes/".concat(e)),"PUT",t)}function g(e){return i(a("/api/sandboxes/".concat(e)),"DELETE")}function v(e,t){return i(a("/api/sandboxes/clone"),"POST",{templateId:e,name:t})}function y(e,t,n){return i(a("/api/sandboxes/".concat(e,"/deploy/").concat(t)),"POST",n)}function j(){return s(a("/api/templates"))}function w(e){return i(a("/api/templates"),"POST",e)}function N(e){return i(a("/api/templates/".concat(e)),"DELETE")}function S(){return s(a("/api/routes"))}function C(e,t){return i(a("/api/routes/push"),"POST",{sandboxId:e,routes:t})}},2169:function(e,t,n){"use strict";n.d(t,{cn:function(){return s}});var r=n(3167),a=n(1367);function s(){for(var e=arguments.length,t=Array(e),n=0;n{v()},[]),(0,r.jsxs)("div",{className:"container py-8 space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Templates"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"A template is a saved set of (gateway branch, services). Clone it into a sandbox from the Sandboxes page."})]}),n&&(0,r.jsx)("p",{className:"text-sm text-destructive",children:n}),(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)(o.Ol,{children:[(0,r.jsx)(o.ll,{children:"New template"}),(0,r.jsx)(o.SZ,{children:"Add services after creating."})]}),(0,r.jsxs)(o.aY,{className:"grid gap-3 md:grid-cols-3",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(c._,{children:"Name"}),(0,r.jsx)(s.I,{value:d,onChange:e=>f(e.target.value),placeholder:"ACCOUNT-TESTING"})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(c._,{children:"Gateway branch"}),(0,r.jsx)(s.I,{value:p,onChange:e=>m(e.target.value),placeholder:"develop"})]}),(0,r.jsx)("div",{className:"flex items-end",children:(0,r.jsx)(a.z,{onClick:y,disabled:!d||h,className:"w-full",children:"Create"})})]})]}),(0,r.jsx)("div",{className:"space-y-2",children:0===e.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No templates yet."}):e.map(e=>(0,r.jsx)(o.Zb,{children:(0,r.jsxs)(o.aY,{className:"flex items-center justify-between p-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-medium",children:e.name}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Gateway: ",(0,r.jsx)("span",{className:"font-mono",children:e.gatewayBranch||"—"})," \xb7 Services: ",(0,r.jsx)("span",{className:"font-mono",children:e.services.length})]})]}),(0,r.jsx)(a.z,{variant:"outline",size:"sm",onClick:()=>g(e.id),disabled:h,children:"Delete"})]})},e.id))})]})}},575:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var r=n(3827),i=n(4090),a=n(9143),o=n(9769),s=n(2169);let c=(0,o.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),l=i.forwardRef((e,t)=>{let{className:n,variant:i,size:o,asChild:l=!1,...u}=e,d=l?a.g7:"button";return(0,r.jsx)(d,{className:(0,s.cn)(c({variant:i,size:o,className:n})),ref:t,...u})});l.displayName="Button"},5671:function(e,t,n){"use strict";n.d(t,{Ol:function(){return s},SZ:function(){return l},Zb:function(){return o},aY:function(){return u},ll:function(){return c}});var r=n(3827),i=n(4090),a=n(2169);let o=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("rounded-xl border bg-card text-card-foreground shadow",n),...i})});o.displayName="Card";let s=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",n),...i})});s.displayName="CardHeader";let c=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("font-semibold leading-none tracking-tight",n),...i})});c.displayName="CardTitle";let l=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("text-sm text-muted-foreground",n),...i})});l.displayName="CardDescription";let u=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("p-6 pt-0",n),...i})});u.displayName="CardContent",i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex items-center p-6 pt-0",n),...i})}).displayName="CardFooter"},2782:function(e,t,n){"use strict";n.d(t,{I:function(){return o}});var r=n(3827),i=n(4090),a=n(2169);let o=i.forwardRef((e,t)=>{let{className:n,type:i,...o}=e;return(0,r.jsx)("input",{type:i,className:(0,a.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...o})});o.displayName="Input"},2647:function(e,t,n){"use strict";n.d(t,{_:function(){return s}});var r=n(3827),i=n(4090),a=n(4602),o=n(2169);let s=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,r.jsx)(a.f,{ref:t,className:(0,o.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...i})});s.displayName=a.f.displayName},8222:function(e,t,n){"use strict";n.d(t,{BS:function(){return g},Bi:function(){return f},CN:function(){return u},D7:function(){return d},FZ:function(){return s},Jz:function(){return E},KP:function(){return l},Mn:function(){return j},NV:function(){return x},Pz:function(){return c},VQ:function(){return y},Xc:function(){return N},Y7:function(){return v},f6:function(){return m},k3:function(){return S},r1:function(){return p},tx:function(){return w},xl:function(){return h},xp:function(){return b}});let r="/sandbox/credit-card".replace(/\/$/,"");function i(e){return!r||e.startsWith("http://")||e.startsWith("https://")?e:r+e}async function a(e){let t=await fetch(e,{credentials:"include"});if(!t.ok)throw Error(await t.text()||"".concat(e," failed (").concat(t.status,")"));return t.json()}async function o(e,t,n){let r=await fetch(e,{method:t,headers:{"content-type":"application/json"},credentials:"include",body:void 0!==n?JSON.stringify(n):void 0});if(!r.ok)throw Error(await r.text()||"".concat(e," failed (").concat(r.status,")"));if(204!==r.status)return r.json()}function s(){return a(i("/api/repos"))}function c(e){return a(i("/api/repos/branches?repo=".concat(encodeURIComponent(e))))}function l(e){return o(i("/api/deployments/new"),"POST",e)}function u(e){let t=e?"?sandbox=".concat(encodeURIComponent(e)):"";return a(i("/api/deployments".concat(t)))}function d(){return a(i("/api/environments"))}function f(e,t){return o(i("/api/environments"),"POST",{name:e,values:t})}function p(e){return o(i("/api/environments/".concat(e)),"DELETE")}function m(){return a(i("/api/sandboxes"))}function h(e){return a(i("/api/sandboxes/".concat(e)))}function x(e){return o(i("/api/sandboxes"),"POST",e)}function v(e,t){return o(i("/api/sandboxes/".concat(e)),"PUT",t)}function y(e){return o(i("/api/sandboxes/".concat(e)),"DELETE")}function g(e,t){return o(i("/api/sandboxes/clone"),"POST",{templateId:e,name:t})}function b(e,t,n){return o(i("/api/sandboxes/".concat(e,"/deploy/").concat(t)),"POST",n)}function w(){return a(i("/api/templates"))}function j(e){return o(i("/api/templates"),"POST",e)}function N(e){return o(i("/api/templates/".concat(e)),"DELETE")}function S(){return a(i("/api/routes"))}function E(e,t){return o(i("/api/routes/push"),"POST",{sandboxId:e,routes:t})}},2169:function(e,t,n){"use strict";n.d(t,{cn:function(){return a}});var r=n(3167),i=n(1367);function a(){for(var e=arguments.length,t=Array(e),n=0;n{let n=!1,r=t.map(t=>{let r=i(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e(0,a.jsx)(i.WV.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));o.displayName="Label";var s=o},9586:function(e,t,n){"use strict";n.d(t,{WV:function(){return s},jH:function(){return c}});var r=n(4090),i=n(9542),a=n(9143),o=n(3827),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,a.Z8)("Primitive.".concat(t)),i=r.forwardRef((e,r)=>{let{asChild:i,...a}=e,s=i?n:t;return window[Symbol.for("radix-ui")]=!0,(0,o.jsx)(s,{...a,ref:r})});return i.displayName="Primitive.".concat(t),{...e,[t]:i}},{});function c(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},9143:function(e,t,n){"use strict";n.d(t,{Z8:function(){return o},g7:function(){return s}});var r,i=n(4090),a=n(1266);function o(e){let t=i.forwardRef((t,n)=>{var r,o,s,u;let h,x;let{children:v,...y}=t,g=null,b=!1,w=[];d(v)&&"function"==typeof m&&(v=m(v._payload)),i.Children.forEach(v,e=>{var t;if(i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===c){b=!0;let n="child"in e.props?e.props.child:e.props.children;d(n)&&"function"==typeof m&&(n=m(n._payload)),g=l(e,n),w.push(null==g?void 0:null===(t=g.props)||void 0===t?void 0:t.children)}else w.push(e)}),g?g=i.cloneElement(g,void 0,w):!b&&1===i.Children.count(v)&&i.isValidElement(v)&&(g=v);let j=g?(h=null===(s=Object.getOwnPropertyDescriptor((o=g).props,"ref"))||void 0===s?void 0:s.get)&&"isReactWarning"in h&&h.isReactWarning?o.ref:(h=null===(u=Object.getOwnPropertyDescriptor(o,"ref"))||void 0===u?void 0:u.get)&&"isReactWarning"in h&&h.isReactWarning?o.props.ref:o.props.ref||o.ref:void 0,N=(0,a.e)(n,j);if(!g){if(v||0===v)throw Error(b?p(e):f(e));return v}let S=function(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n{if("child"in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},u=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===u&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),p=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),m=(r||(r=n.t(i,2)))[" use ".trim().toString()]}},function(e){e.O(0,[504,971,69,744],function(){return e(e.s=7121)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/app/layout-afea70080b0ae490.js b/dashboard/out/_next/static/chunks/app/layout-afea70080b0ae490.js new file mode 100644 index 0000000..31697c7 --- /dev/null +++ b/dashboard/out/_next/static/chunks/app/layout-afea70080b0ae490.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{8216:function(n,e,u){Promise.resolve().then(u.t.bind(u,3385,23))},3385:function(){}},function(n){n.O(0,[971,69,744],function(){return n(n.s=8216)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/app/page-0f77936ff7b5e685.js b/dashboard/out/_next/static/chunks/app/page-0f77936ff7b5e685.js new file mode 100644 index 0000000..f8d551a --- /dev/null +++ b/dashboard/out/_next/static/chunks/app/page-0f77936ff7b5e685.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{8619:function(e,t,r){Promise.resolve().then(r.bind(r,5733))},7907:function(e,t,r){"use strict";var n=r(5313);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},5733:function(e,t,r){"use strict";r.r(t),r.d(t,{LoginForm:function(){return c}});var n=r(3827),o=r(4090),i=r(7907),a=r(575),l=r(2782),s=r(2647),u=r(5671);function c(){let[e,t]=(0,o.useState)(""),[r,c]=(0,o.useState)(""),[d,f]=(0,o.useState)(null),[p,m]=(0,o.useState)(!1),v=(0,i.useRouter)();async function h(t){t.preventDefault(),m(!0),f(null);try{var n;let t=((n="/sandbox/credit-card",void 0!==n)?n:"").replace(/\/$/,"");if(!(await fetch("".concat(t,"/api/login"),{method:"POST",headers:{"content-type":"application/json"},credentials:"include",body:JSON.stringify({username:e,password:r})})).ok){f("Login failed — check your Bitbucket credentials.");return}v.push("/dashboard")}catch(e){f("Network error")}finally{m(!1)}}return(0,n.jsxs)(u.Zb,{className:"w-full max-w-sm",children:[(0,n.jsxs)(u.Ol,{children:[(0,n.jsx)(u.ll,{children:"Sign in"}),(0,n.jsx)(u.SZ,{children:"Use your Bitbucket account."})]}),(0,n.jsx)(u.aY,{children:(0,n.jsxs)("form",{onSubmit:h,className:"space-y-4",children:[(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)(s._,{htmlFor:"u",children:"Username"}),(0,n.jsx)(l.I,{id:"u",value:e,onChange:e=>t(e.target.value),required:!0,autoComplete:"username"})]}),(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)(s._,{htmlFor:"p",children:"Password"}),(0,n.jsx)(l.I,{id:"p",type:"password",value:r,onChange:e=>c(e.target.value),required:!0,autoComplete:"current-password"})]}),d&&(0,n.jsx)("p",{className:"text-sm text-destructive",children:d}),(0,n.jsx)(a.z,{type:"submit",disabled:p,className:"w-full",children:p?"Signing in…":"Sign in"})]})})]})}},575:function(e,t,r){"use strict";r.d(t,{z:function(){return u}});var n=r(3827),o=r(4090),i=r(9143),a=r(9769),l=r(2169);let s=(0,a.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),u=o.forwardRef((e,t)=>{let{className:r,variant:o,size:a,asChild:u=!1,...c}=e,d=u?i.g7:"button";return(0,n.jsx)(d,{className:(0,l.cn)(s({variant:o,size:a,className:r})),ref:t,...c})});u.displayName="Button"},5671:function(e,t,r){"use strict";r.d(t,{Ol:function(){return l},SZ:function(){return u},Zb:function(){return a},aY:function(){return c},ll:function(){return s}});var n=r(3827),o=r(4090),i=r(2169);let a=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("rounded-xl border bg-card text-card-foreground shadow",r),...o})});a.displayName="Card";let l=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",r),...o})});l.displayName="CardHeader";let s=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("font-semibold leading-none tracking-tight",r),...o})});s.displayName="CardTitle";let u=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",r),...o})});u.displayName="CardDescription";let c=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("p-6 pt-0",r),...o})});c.displayName="CardContent",o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("div",{ref:t,className:(0,i.cn)("flex items-center p-6 pt-0",r),...o})}).displayName="CardFooter"},2782:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(3827),o=r(4090),i=r(2169);let a=o.forwardRef((e,t)=>{let{className:r,type:o,...a}=e;return(0,n.jsx)("input",{type:o,className:(0,i.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...a})});a.displayName="Input"},2647:function(e,t,r){"use strict";r.d(t,{_:function(){return l}});var n=r(3827),o=r(4090),i=r(4602),a=r(2169);let l=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(i.f,{ref:t,className:(0,a.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r),...o})});l.displayName=i.f.displayName},2169:function(e,t,r){"use strict";r.d(t,{cn:function(){return i}});var n=r(3167),o=r(1367);function i(){for(var e=arguments.length,t=Array(e),r=0;r{let r=!1,n=t.map(t=>{let n=o(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e(0,i.jsx)(o.WV.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null===(r=e.onMouseDown)||void 0===r||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var l=a},9586:function(e,t,r){"use strict";r.d(t,{WV:function(){return l},jH:function(){return s}});var n=r(4090),o=r(9542),i=r(9143),a=r(3827),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,i.Z8)("Primitive.".concat(t)),o=n.forwardRef((e,n)=>{let{asChild:o,...i}=e,l=o?r:t;return window[Symbol.for("radix-ui")]=!0,(0,a.jsx)(l,{...i,ref:n})});return o.displayName="Primitive.".concat(t),{...e,[t]:o}},{});function s(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},9143:function(e,t,r){"use strict";r.d(t,{Z8:function(){return a},g7:function(){return l}});var n,o=r(4090),i=r(1266);function a(e){let t=o.forwardRef((t,r)=>{var n,a,l,c;let v,h;let{children:y,...g}=t,b=null,x=!1,w=[];d(y)&&"function"==typeof m&&(y=m(y._payload)),o.Children.forEach(y,e=>{var t;if(o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s){x=!0;let r="child"in e.props?e.props.child:e.props.children;d(r)&&"function"==typeof m&&(r=m(r._payload)),b=u(e,r),w.push(null==b?void 0:null===(t=b.props)||void 0===t?void 0:t.children)}else w.push(e)}),b?b=o.cloneElement(b,void 0,w):!x&&1===o.Children.count(y)&&o.isValidElement(y)&&(b=y);let j=b?(v=null===(l=Object.getOwnPropertyDescriptor((a=b).props,"ref"))||void 0===l?void 0:l.get)&&"isReactWarning"in v&&v.isReactWarning?a.ref:(v=null===(c=Object.getOwnPropertyDescriptor(a,"ref"))||void 0===c?void 0:c.get)&&"isReactWarning"in v&&v.isReactWarning?a.props.ref:a.props.ref||a.ref:void 0,N=(0,i.e)(r,j);if(!b){if(y||0===y)throw Error(x?p(e):f(e));return y}let R=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=function(){for(var e=arguments.length,t=Array(e),r=0;r{if("child"in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},c=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===c&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>"".concat(e," failed to slot onto its children. Expected a single React element child or `Slottable`."),p=e=>"".concat(e," failed to slot onto its `Slottable`. Expected `Slottable` to receive a single React element child."),m=(n||(n=r.t(o,2)))[" use ".trim().toString()]}},function(e){e.O(0,[504,971,69,744],function(){return e(e.s=8619)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dashboard/out/_next/static/chunks/fd9d1056-1672853390c1185d.js b/dashboard/out/_next/static/chunks/fd9d1056-1672853390c1185d.js new file mode 100644 index 0000000..2a1c91c --- /dev/null +++ b/dashboard/out/_next/static/chunks/fd9d1056-1672853390c1185d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[971],{8790:function(e,t,n){var r,l=n(4090),a=n(8172),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;np||(e.current=d[p],d[p]=null,p--)}function g(e,t){d[++p]=e.current,e.current=t}var y=Symbol.for("react.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.context"),E=Symbol.for("react.server_context"),x=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen"),F=Symbol.for("react.legacy_hidden"),M=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var O=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D=m(null),A=m(null),I=m(null),U=m(null),$={$$typeof:C,_currentValue:null,_currentValue2:null,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};function B(e,t){switch(g(I,t),g(A,e),g(D,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?sW(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=sH(e=sW(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}h(D),g(D,t)}function V(){h(D),h(A),h(I)}function j(e){null!==e.memoizedState&&g(U,e);var t=D.current,n=sH(t,e.type);t!==n&&(g(A,e),g(D,n))}function Q(e){A.current===e&&(h(D),h(A)),U.current===e&&(h(U),$._currentValue=null)}var W=a.unstable_scheduleCallback,H=a.unstable_cancelCallback,q=a.unstable_shouldYield,K=a.unstable_requestPaint,Y=a.unstable_now,X=a.unstable_getCurrentPriorityLevel,G=a.unstable_ImmediatePriority,Z=a.unstable_UserBlockingPriority,J=a.unstable_NormalPriority,ee=a.unstable_LowPriority,et=a.unstable_IdlePriority,en=null,er=null,el=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(ea(e)/eo|0)|0},ea=Math.log,eo=Math.LN2,ei=128,eu=4194304;function es(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ec(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes;e=e.pingedLanes;var a=134217727&n;return 0!==a?0!=(n=a&~l)?r=es(n):0!=(e&=a)&&(r=es(e)):0!=(n&=~l)?r=es(n):0!==e&&(r=es(e)),0===r?0:0!==t&&t!==r&&0==(t&l)&&((l=r&-r)>=(e=t&-t)||32===l&&0!=(4194176&e))?t:r}function ef(e,t){return e.errorRecoveryDisabledLanes&t?0:0!=(e=-536870913&e.pendingLanes)?e:536870912&e?536870912:0}function ed(){var e=eu;return 0==(62914560&(eu<<=1))&&(eu=4194304),e}function ep(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function em(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0)}function eh(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-el(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function eg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-el(n),l=1<l||u[r]!==s[l]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{eK=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?eq(n):""}var eX=Symbol.for("react.client.reference");function eG(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function eZ(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function eJ(e){e._valueTracker||(e._valueTracker=function(e){var t=eZ(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function e0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=eZ(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e1(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var e2=/[\n"\\]/g;function e3(e){return e.replace(e2,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e4(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+eG(t)):e.value!==""+eG(t)&&(e.value=""+eG(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?e8(e,o,eG(t)):null!=n?e8(e,o,eG(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+eG(i):e.removeAttribute("name")}function e6(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||null!=t))return;n=null!=n?""+eG(n):"",t=null!=t?""+eG(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function e8(e,t,n){"number"===t&&e1(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var e5=Array.isArray;function e7(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=iU.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var tn=tt;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(tn=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return tt(e,t)})});var tr=tn;function tl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var ta=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function to(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||ta.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ti(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(i(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var l in t)r=t[l],t.hasOwnProperty(l)&&n[l]!==r&&to(e,l,r)}else for(var a in t)t.hasOwnProperty(a)&&to(e,a,t[a])}function tu(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ts=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tc=null;function tf(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var td=null,tp=null;function tm(e){var t=eT(e);if(t&&(e=t.stateNode)){var n=eM(e);switch(e=t.stateNode,t.type){case"input":if(e4(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+e3(""+t)+'"][type="radio"]'),t=0;t>=o,l-=o,t$=1<<32-el(t)+l|n<h?(g=f,f=null):g=f.sibling;var y=p(l,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(l,f),tK&&tV(l,h),s;if(null===f){for(;hg?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(l,h),tK&&tV(l,g),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return tK&&tV(l,g),c}for(h=r(l,h);!v.done;g++,v=u.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return t(l,e)}),tK&&tV(l,g),c}(c,f,h,g);if("function"==typeof h.then)return s(c,f,n_(h),g);if(h.$$typeof===C||h.$$typeof===E)return s(c,f,an(c,h,g),g);nT(c,h)}return"string"==typeof h&&""!==h||"number"==typeof h?(h=""+h,null!==f&&6===f.tag?(n(c,f.sibling),(f=l(f,h)).return=c):(n(c,f),(f=iv(h,c.mode,g)).return=c),o(c=f)):n(c,f)}(s,c,f,h),nP=null,s}}var nO=nM(!0),nR=nM(!1),nD=m(null),nA=m(0);function nI(e,t){g(nA,e=ob),g(nD,t),ob=e|t.baseLanes}function nU(){g(nA,ob),g(nD,nD.current)}function n$(){ob=nA.current,h(nD),h(nA)}var nB=m(null),nV=null;function nj(e){var t=e.alternate;g(nq,1&nq.current),g(nB,e),null===nV&&(null===t||null!==nD.current?nV=e:null!==t.memoizedState&&(nV=e))}function nQ(e){if(22===e.tag){if(g(nq,nq.current),g(nB,e),null===nV){var t=e.alternate;null!==t&&null!==t.memoizedState&&(nV=e)}}else nW(e)}function nW(){g(nq,nq.current),g(nB,nB.current)}function nH(e){h(nB),nV===e&&(nV=null),h(nq)}var nq=m(0);function nK(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nY=null,nX=null,nG=!1,nZ=!1,nJ=!1,n0=0;function n1(e){e!==nX&&null===e.next&&(null===nX?nY=nX=e:nX=nX.next=e),nZ=!0,nG||(nG=!0,n8(n4))}function n2(e){if(!nJ&&nZ){var t=null;nJ=!0;do for(var n=!1,r=nY;null!==r;){if(!e||0===r.tag){var l=oh,a=ec(r,r===op?l:0);if(0!=(3&a))try{if(n=!0,l=r,0!=(6&od))throw Error(i(327));if(!ie()){var o=o3(l,a);if(0!==l.tag&&2===o){var u=a,s=ef(l,u);0!==s&&(a=s,o=oQ(l,u,s))}if(1===o)throw u=ow,oG(l,0),oq(l,a,0),n1(l),u;6===o?oq(l,a,ox):(l.finishedWork=l.current.alternate,l.finishedLanes=a,o7(l,oP,oL,ox))}n1(l)}catch(e){null===t?t=[e]:t.push(e)}}r=r.next}while(n);if(nJ=!1,null!==t){if(1a?a:8;var o=ro.transition;ro.transition={},li(e,!1,t,n);try{var i=l();if(null!==i&&"object"==typeof i&&"function"==typeof i.then){var u=rt(i,r);lo(e,t,u)}else{var s=rn(i,r);lo(e,t,s)}}catch(n){lo(e,t,{then:function(){},status:"rejected",reason:n})}finally{ey=a,ro.transition=o}}function le(e,t,n,r){if(5!==e.tag)throw Error(i(476));if(null===e.memoizedState){var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rT,lastRenderedState:f},a=l;l={memoizedState:f,baseState:f,baseQueue:null,queue:l,next:null},e.memoizedState=l;var o=e.alternate;null!==o&&(o.memoizedState=l)}else a=e.memoizedState.queue;r9(e,a,t,f,function(){return n(r)})}function lt(){var e=at($);return null!==e?e:f}function ln(){return rN().memoizedState}function lr(){return rN().memoizedState}function ll(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=oB(t),r=nd(t,e=nf(n),n);null!==r&&(oV(r,t,n),np(r,t,n)),t={cache:au()},e.payload=t;return}t=t.return}}function la(e,t,n){var r=oB(e);n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},lu(e)?ls(t,n):null!==(n=nl(e,t,n,r))&&(oV(n,e,r),lc(n,t,r))}function lo(e,t,n){var r=oB(e),l={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(lu(e))ls(t,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,i=a(o,n);if(l.hasEagerState=!0,l.eagerState=i,tF(i,o)){nr(e,t,l,0),null===op&&nn();return}}catch(e){}finally{}null!==(n=nl(e,t,l,r))&&(oV(n,e,r),lc(n,t,r))}}function li(e,t,n,r){if(r={lane:2,revertLane:n5(),action:r,hasEagerState:!1,eagerState:null,next:null},lu(e)){if(t)throw Error(i(479))}else null!==(t=nl(e,n,r,2))&&oV(t,e,2)}function lu(e){var t=e.alternate;return e===ru||null!==t&&t===ru}function ls(e,t){rd=rf=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lc(e,t,n){if(0!=(4194176&n)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eg(e,n)}}i$=function(){return{lastEffect:null,events:null,stores:null}};var lf={readContext:at,use:rL,useCallback:rv,useContext:rv,useEffect:rv,useImperativeHandle:rv,useInsertionEffect:rv,useLayoutEffect:rv,useMemo:rv,useReducer:rv,useRef:rv,useState:rv,useDebugValue:rv,useDeferredValue:rv,useTransition:rv,useSyncExternalStore:rv,useId:rv};lf.useCacheRefresh=rv,lf.useHostTransitionStatus=rv,lf.useFormState=rv,lf.useOptimistic=rv;var ld={readContext:at,use:rL,useCallback:function(e,t){return rP().memoizedState=[e,void 0===t?null:t],e},useContext:at,useEffect:rJ,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,rG(4194308,4,r3.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rG(4194308,4,e,t)},useInsertionEffect:function(e,t){rG(4,2,e,t)},useMemo:function(e,t){var n=rP();return t=void 0===t?null:t,rp&&e(),e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rP();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=la.bind(null,ru,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},rP().memoizedState=e},useState:function(e){var t=(e=rB(e)).queue,n=lo.bind(null,ru,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:r6,useDeferredValue:function(e){return rP().memoizedState=e,e},useTransition:function(){var e=rB(!1);return e=r9.bind(null,ru,e.queue,!0,!1),rP().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ru,l=rP();if(tK){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===op)throw Error(i(349));0!=(60&oh)||rD(r,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,rJ(rI.bind(null,r,a,e),[e]),r.flags|=2048,rY(9,rA.bind(null,r,a,n,t),{destroy:void 0},null),n},useId:function(){var e=rP(),t=op.identifierPrefix;if(tK){var n=tB,r=t$;t=":"+t+"R"+(n=(r&~(1<<32-el(r)-1)).toString(32)+n),0<(n=rm++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ry++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return rP().memoizedState=ll.bind(null,ru)}};ld.useHostTransitionStatus=lt,ld.useFormState=function(e,t){if(tK){var n=op.formState;if(null!==n){e:{if(tK){if(tq){t:{for(var r=tq,l=tX;8!==r.nodeType;)if(!l||null===(r=s4(r))){r=null;break t}r="F!"===(l=r.data)||"F"===l?r:null}if(r){tq=s4(r),r="F!"===r.data;break e}}t3()}r=!1}r&&(t=n[0])}}return(n=rP()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rH,lastRenderedState:t},n.queue=r,n=lo.bind(null,ru,r),r.dispatch=n,r=rP(),l={state:t,dispatch:null,action:e,pending:null},r.queue=l,n=rj.bind(null,ru,l,n),l.dispatch=n,r.memoizedState=e,[t,n]},ld.useOptimistic=function(e){var t=rP();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=li.bind(null,ru,!0,n),n.dispatch=t,[e,t]};var lp={readContext:at,use:rL,useCallback:r8,useContext:at,useEffect:r0,useImperativeHandle:r4,useInsertionEffect:r1,useLayoutEffect:r2,useMemo:r5,useReducer:rF,useRef:rX,useState:function(){return rF(rT)},useDebugValue:r6,useDeferredValue:function(e){return r7(rN(),rs.memoizedState,e)},useTransition:function(){var e=rF(rT)[0],t=rN().memoizedState;return["boolean"==typeof e?e:r_(e),t]},useSyncExternalStore:rR,useId:ln};lp.useCacheRefresh=lr,lp.useHostTransitionStatus=lt,lp.useFormState=function(e){return rq(rN(),rs,e)},lp.useOptimistic=function(e,t){return rV(rN(),rs,e,t)};var lm={readContext:at,use:rL,useCallback:r8,useContext:at,useEffect:r0,useImperativeHandle:r4,useInsertionEffect:r1,useLayoutEffect:r2,useMemo:r5,useReducer:rO,useRef:rX,useState:function(){return rO(rT)},useDebugValue:r6,useDeferredValue:function(e){var t=rN();return null===rs?(t.memoizedState=e,e):r7(t,rs.memoizedState,e)},useTransition:function(){var e=rO(rT)[0],t=rN().memoizedState;return["boolean"==typeof e?e:r_(e),t]},useSyncExternalStore:rR,useId:ln};function lh(e,t){if(e&&e.defaultProps)for(var n in t=u({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}function lg(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}lm.useCacheRefresh=lr,lm.useHostTransitionStatus=lt,lm.useFormState=function(e){var t=rN(),n=rs;if(null!==n)return rq(t,n,e);t=t.memoizedState;var r=(n=rN()).queue.dispatch;return n.memoizedState=e,[t,r]},lm.useOptimistic=function(e,t){var n=rN();return null!==rs?rV(n,rs,e,t):(n.baseState=e,[e,n.queue.dispatch])};var ly={isMounted:function(e){return!!(e=e._reactInternals)&&ty(e)===e},enqueueSetState:function(e,t,n){var r=oB(e=e._reactInternals),l=nf(r);l.payload=t,null!=n&&(l.callback=n),null!==(t=nd(e,l,r))&&(oV(t,e,r),np(t,e,r))},enqueueReplaceState:function(e,t,n){var r=oB(e=e._reactInternals),l=nf(r);l.tag=1,l.payload=t,null!=n&&(l.callback=n),null!==(t=nd(e,l,r))&&(oV(t,e,r),np(t,e,r))},enqueueForceUpdate:function(e,t){var n=oB(e=e._reactInternals),r=nf(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=nd(e,r,n))&&(oV(t,e,n),np(t,e,n))}};function lv(e,t,n,r,l,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||!nv(n,r)||!nv(l,a)}function lb(e,t,n){var r=!1,l=tw,a=t.contextType;return"object"==typeof a&&null!==a?a=at(a):(l=tz(t)?tE:tS.current,a=(r=null!=(r=t.contextTypes))?tx(e,l):tw),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ly,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function lk(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ly.enqueueReplaceState(t,t.state,null)}function lw(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},ns(e);var a=t.contextType;"object"==typeof a&&null!==a?l.context=at(a):(a=tz(t)?tE:tS.current,l.context=tx(e,a)),l.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(lg(e,t,a,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&ly.enqueueReplaceState(l,l.state,null),nh(e,n,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function lS(e,t){try{var n="",r=t;do n+=function(e){switch(e.tag){case 26:case 27:case 5:return eq(e.type);case 16:return eq("Lazy");case 13:return eq("Suspense");case 19:return eq("SuspenseList");case 0:case 2:case 15:return e=eY(e.type,!1);case 11:return e=eY(e.type.render,!1);case 1:return e=eY(e.type,!0);default:return""}}(r),r=r.return;while(r);var l=n}catch(e){l="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:l,digest:null}}function lC(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function lE(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}function lx(e,t,n){(n=nf(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oT||(oT=!0,oF=r),lE(e,t)},n}function lz(e,t,n){(n=nf(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){lE(e,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){lE(e,t),"function"!=typeof r&&(null===oM?oM=new Set([this]):oM.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}function lP(e,t,n,r,l){return 0==(1&e.mode)?e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=nf(2)).tag=2,nd(n,t,2))),n.lanes|=2):(e.flags|=65536,e.lanes=l),e}var lN=s.ReactCurrentOwner,l_=Error(i(461)),lL=!1;function lT(e,t,n,r){t.child=null===e?nR(t,null,n,r):nO(t,e.child,n,r)}function lF(e,t,n,r,l){n=n.render;var a=t.ref;return(ae(t,l),r=rk(e,t,n,r,a,l),n=rE(),null===e||lL)?(tK&&n&&tQ(t),t.flags|=1,lT(e,t,r,l),t.child):(rx(e,t,l),l0(e,t,l))}function lM(e,t,n,r,l){if(null===e){var a=n.type;return"function"!=typeof a||id(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ih(n.type,null,r,null,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,lO(e,t,a,r,l))}if(a=e.child,0==(e.lanes&l)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:nv)(o,r)&&e.ref===t.ref)return l0(e,t,l)}return t.flags|=1,(e=ip(a,r)).ref=t.ref,e.return=t,t.child=e}function lO(e,t,n,r,l){if(null!==e){var a=e.memoizedProps;if(nv(a,r)&&e.ref===t.ref){if(lL=!1,t.pendingProps=r=a,0==(e.lanes&l))return t.lanes=e.lanes,l0(e,t,l);0!=(131072&e.flags)&&(lL=!0)}}return lI(e,t,n,r,l)}function lR(e,t,n){var r=t.pendingProps,l=r.children,a=0!=(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(lA(e,t),"hidden"===r.mode||a){if(0!=(128&t.flags)){if(n=null!==o?o.baseLanes|n:n,null!==e){for(l=0,r=t.child=e.child;null!==r;)l=l|r.lanes|r.childLanes,r=r.sibling;t.childLanes=l&~n}else t.childLanes=0,t.child=null;return lD(e,t,n)}if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},null!==e&&ap(t,null),nU(),nQ(t);else{if(0==(536870912&n))return t.lanes=t.childLanes=536870912,lD(e,t,null!==o?o.baseLanes|n:n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&ap(t,null!==o?o.cachePool:null),null!==o?nI(t,o):nU(),nQ(t)}}else null!==o?(ap(t,o.cachePool),nI(t,o),nW(t),t.memoizedState=null):(null!==e&&ap(t,null),nU(),nW(t));return lT(e,t,l,n),t.child}function lD(e,t,n){var r=ad();return r=null===r?null:{parent:ai._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},null!==e&&ap(t,null),nU(),nQ(t),null}function lA(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lI(e,t,n,r,l){var a=tz(n)?tE:tS.current;return(a=tx(t,a),ae(t,l),n=rk(e,t,n,r,a,l),r=rE(),null===e||lL)?(tK&&r&&tQ(t),t.flags|=1,lT(e,t,n,l),t.child):(rx(e,t,l),l0(e,t,l))}function lU(e,t,n,r,l,a){return(ae(t,a),n=rS(t,r,n,l),rw(),r=rE(),null===e||lL)?(tK&&r&&tQ(t),t.flags|=1,lT(e,t,n,a),t.child):(rx(e,t,a),l0(e,t,a))}function l$(e,t,n,r,l){if(tz(n)){var a=!0;tL(t)}else a=!1;if(ae(t,l),null===t.stateNode)lJ(e,t),lb(t,n,r),lw(t,n,r,l),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;s="object"==typeof s&&null!==s?at(s):tx(t,s=tz(n)?tE:tS.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&lk(t,o,r,s),nu=!1;var d=t.memoizedState;o.state=d,nh(t,r,o,l),u=t.memoizedState,i!==r||d!==u||tC.current||nu?("function"==typeof c&&(lg(t,n,c,r),u=t.memoizedState),(i=nu||lv(t,n,i,r,d,u,s))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,nc(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:lh(t.type,i),o.props=s,f=t.pendingProps,d=o.context,u="object"==typeof(u=n.contextType)&&null!==u?at(u):tx(t,u=tz(n)?tE:tS.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&lk(t,o,r,u),nu=!1,d=t.memoizedState,o.state=d,nh(t,r,o,l);var m=t.memoizedState;i!==f||d!==m||tC.current||nu?("function"==typeof p&&(lg(t,n,p,r),m=t.memoizedState),(s=nu||lv(t,n,s,r,d,m,u)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return lB(e,t,n,r,a,l)}function lB(e,t,n,r,l,a){lA(e,t);var o=0!=(128&t.flags);if(!r&&!o)return l&&tT(t,n,!1),l0(e,t,a);r=t.stateNode,lN.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=nO(t,e.child,null,a),t.child=nO(t,null,i,a)):lT(e,t,i,a),t.memoizedState=r.state,l&&tT(t,n,!0),t.child}function lV(e){var t=e.stateNode;t.pendingContext?tN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tN(e,t.context,!1),B(e,t.containerInfo)}function lj(e,t,n,r,l){return t5(),t7(l),t.flags|=256,lT(e,t,n,r),t.child}var lQ={dehydrated:null,treeContext:null,retryLane:0};function lW(e){return{baseLanes:e,cachePool:am()}}function lH(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=ox),e}function lq(e,t,n){var r,l=t.pendingProps,a=!1,o=0!=(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!=(2&nq.current)),r&&(a=!0,t.flags&=-129),r=0!=(32&t.flags),t.flags&=-33,null===e){if(tK){if(a?nj(t):nW(t),tK){var u=o=tq;if(u){if(!t1(t,u)){t2(t)&&t3(),tq=s4(u);var s=tH;tq&&t1(t,tq)?tG(s,u):(tZ(tH,t),tK=!1,tH=t,tq=o)}}else t2(t)&&t3(),tZ(tH,t),tK=!1,tH=t,tq=o}if(null!==(o=t.memoizedState)&&null!==(o=o.dehydrated))return 0==(1&t.mode)?t.lanes=2:"$!"===o.data?t.lanes=16:t.lanes=536870912,null;nH(t)}return(o=l.children,l=l.fallback,a)?(nW(t),a=t.mode,u=t.child,o={mode:"hidden",children:o},0==(1&a)&&null!==u?(u.childLanes=0,u.pendingProps=o):u=iy(o,a,0,null),l=ig(l,a,n,null),u.return=t,l.return=t,u.sibling=l,t.child=u,(a=t.child).memoizedState=lW(n),a.childLanes=lH(e,r,n),t.memoizedState=lQ,l):(nj(t),lK(t,o))}if(null!==(u=e.memoizedState)&&null!==(s=u.dehydrated))return function(e,t,n,r,l,a,o,u){if(n)return 256&t.flags?(nj(t),t.flags&=-257,lY(e,t,u,a=lC(Error(i(422))))):null!==t.memoizedState?(nW(t),t.child=e.child,t.flags|=128,null):(nW(t),a=l.fallback,o=t.mode,l=iy({mode:"visible",children:l.children},o,0,null),a=ig(a,o,u,null),a.flags|=2,l.return=t,a.return=t,l.sibling=a,t.child=l,0!=(1&t.mode)&&nO(t,e.child,null,u),(o=t.child).memoizedState=lW(u),o.childLanes=lH(e,r,u),t.memoizedState=lQ,a);if(nj(t),0==(1&t.mode))return lY(e,t,u,null);if("$!"===a.data){if(a=a.nextSibling&&a.nextSibling.dataset)var s=a.dgst;return a=s,(r=Error(i(419))).digest=a,lY(e,t,u,a=lC(r,a,void 0))}if(r=0!=(u&e.childLanes),lL||r){if(null!==(r=op)){if(0!=(42&(l=u&-u)))l=1;else switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=64;break;case 268435456:l=134217728;break;default:l=0}if(0!==(l=0!=(l&(r.suspendedLanes|u))?0:l)&&l!==o.retryLane)throw o.retryLane=l,na(e,l),oV(r,e,l),l_}return"$?"!==a.data&&o2(),lY(e,t,u,null)}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=ii.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,tq=s3(a.nextSibling),tH=t,tK=!0,tY=null,tX=!1,null!==e&&(tA[tI++]=t$,tA[tI++]=tB,tA[tI++]=tU,t$=e.id,tB=e.overflow,tU=t),t=lK(t,l.children),t.flags|=4096,t)}(e,t,o,r,l,s,u,n);if(a){nW(t),a=l.fallback,o=t.mode,s=(u=e.child).sibling;var c={mode:"hidden",children:l.children};return 0==(1&o)&&t.child!==u?((l=t.child).childLanes=0,l.pendingProps=c,t.deletions=null):(l=ip(u,c)).subtreeFlags=31457280&u.subtreeFlags,null!==s?a=ip(s,a):(a=ig(a,o,n,null),a.flags|=2),a.return=t,l.return=t,l.sibling=a,t.child=l,l=a,a=t.child,null===(o=e.child.memoizedState)?o=lW(n):(null!==(u=o.cachePool)?(s=ai._currentValue,u=u.parent!==s?{parent:s,pool:s}:u):u=am(),o={baseLanes:o.baseLanes|n,cachePool:u}),a.memoizedState=o,a.childLanes=lH(e,r,n),t.memoizedState=lQ,l}return nj(t),e=(r=e.child).sibling,r=ip(r,{mode:"visible",children:l.children}),0==(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lK(e,t){return(t=iy({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function lY(e,t,n,r){return null!==r&&t7(r),nO(t,e.child,null,n),e=lK(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lX(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),l7(e.return,t,n)}function lG(e,t,n,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=l)}function lZ(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(lT(e,t,r.children,n),0!=(2&(r=nq.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&lX(e,n,t);else if(19===e.tag)lX(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(g(nq,r),0==(1&t.mode))t.memoizedState=null;else switch(l){case"forwards":for(l=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===nK(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lG(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===nK(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lG(t,!0,n,null,a);break;case"together":lG(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lJ(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function l0(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),oS|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=ip(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ip(e,e.pendingProps)).return=t;n.sibling=null}return t.child}var l1=m(null),l2=null,l3=null,l4=null;function l6(){l4=l3=l2=null}function l8(e,t,n){g(l1,t._currentValue),t._currentValue=n}function l5(e){e._currentValue=l1.current,h(l1)}function l7(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function l9(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var l=r.dependencies;if(null!==l)for(var a=r.child,o=l.firstContext;null!==o;){if(o.context===t){if(1===r.tag){(o=nf(n&-n)).tag=2;var u=r.updateQueue;if(null!==u){var s=(u=u.shared).pending;null===s?o.next=o:(o.next=s.next,s.next=o),u.pending=o}}r.lanes|=n,null!==(o=r.alternate)&&(o.lanes|=n),l7(r.return,n,e),l.lanes|=n;break}o=o.next}else if(10===r.tag)a=r.type===e.type?null:r.child;else if(18===r.tag){if(null===(a=r.return))throw Error(i(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),l7(a,n,e),a=r.sibling}else a=r.child;if(null!==a)a.return=r;else for(a=r;null!==a;){if(a===e){a=null;break}if(null!==(r=a.sibling)){r.return=a.return,a=r;break}a=a.return}r=a}}function ae(e,t){l2=e,l4=l3=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(lL=!0),e.firstContext=null)}function at(e){return ar(l2,e)}function an(e,t,n){return null===l2&&ae(e,n),ar(e,t)}function ar(e,t){var n=t._currentValue;if(l4!==t){if(t={context:t,memoizedValue:n,next:null},null===l3){if(null===e)throw Error(i(308));l3=t,e.dependencies={lanes:0,firstContext:t}}else l3=l3.next=t}return n}var al="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},aa=a.unstable_scheduleCallback,ao=a.unstable_NormalPriority,ai={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function au(){return{controller:new al,data:new Map,refCount:0}}function as(e){e.refCount--,0===e.refCount&&aa(ao,function(){e.controller.abort()})}var ac=s.ReactCurrentBatchConfig,af=m(null);function ad(){var e=af.current;return null!==e?e:op.pooledCache}function ap(e,t){null===t?g(af,af.current):g(af,t.pool)}function am(){var e=ad();return null===e?null:{parent:ai._currentValue,pool:e}}function ah(e){e.flags|=4}function ag(e){e.flags|=2097664}function ay(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,0==(42&oh)&&!(t="stylesheet"!==t.type||0!=(3&t.state.loading))){if(oJ())e.flags|=8192;else throw nx=nw,nk}}function av(e,t){null!==t?e.flags|=4:16384&e.flags&&(t=22!==e.tag?ed():536870912,e.lanes|=t)}function ab(e,t){if(!tK)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ak(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=31457280&l.subtreeFlags,r|=31457280&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function aw(e,t){switch(tW(t),t.tag){case 1:null!=(e=t.type.childContextTypes)&&tP();break;case 3:l5(ai),V(),h(tC),h(tS);break;case 26:case 27:case 5:Q(t);break;case 4:V();break;case 13:nH(t);break;case 19:h(nq);break;case 10:l5(t.type._context);break;case 22:case 23:nH(t),n$(),null!==e&&h(af);break;case 24:l5(ai)}}function aS(e,t,n){var r=Array.prototype.slice.call(arguments,3);try{t.apply(n,r)}catch(e){this.onError(e)}}var aC=!1,aE=null,ax=!1,az=null,aP={onError:function(e){aC=!0,aE=e}};function aN(e,t,n,r,l,a,o,i,u){aC=!1,aE=null,aS.apply(aP,arguments)}var a_=!1,aL=!1,aT="function"==typeof WeakSet?WeakSet:Set,aF=null;function aM(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var l=r;break;default:l=r}"function"==typeof n?e.refCleanup=n(l):n.current=l}}catch(n){ir(e,t,n)}}function aO(e,t){var n=e.ref,r=e.refCleanup;if(null!==n){if("function"==typeof r)try{r()}catch(n){ir(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){ir(e,t,n)}else n.current=null}}function aR(e,t,n){try{n()}catch(n){ir(e,t,n)}}var aD=!1;function aA(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var a=l.inst,o=a.destroy;void 0!==o&&(a.destroy=void 0,aR(t,n,o))}l=l.next}while(l!==r)}}function aI(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create,l=n.inst;r=r(),l.destroy=r}n=n.next}while(n!==t)}}function aU(e,t){try{aI(t,e)}catch(t){ir(e,e.return,t)}}function a$(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{ny(t,n)}catch(t){ir(e,e.return,t)}}}function aB(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break;case"img":n.src&&(r.src=n.src)}}catch(t){ir(e,e.return,t)}}function aV(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:a2(e,n),4&r&&aU(n,5);break;case 1:if(a2(e,n),4&r){if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){ir(n,n.return,e)}else{var l=n.elementType===n.type?t.memoizedProps:lh(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ir(n,n.return,e)}}}64&r&&a$(n),512&r&&aM(n,n.return);break;case 3:if(a2(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{ny(r,e)}catch(e){ir(n,n.return,e)}}break;case 26:a2(e,n),512&r&&aM(n,n.return);break;case 27:case 5:a2(e,n),null===t&&4&r&&aB(n),512&r&&aM(n,n.return);break;case 12:default:a2(e,n);break;case 13:a2(e,n),4&r&&aX(e,n);break;case 22:if(0!=(1&n.mode)){if(!(l=null!==n.memoizedState||a_)){t=null!==t&&null!==t.memoizedState||aL;var a=a_,o=aL;a_=l,(aL=t)&&!o?function e(t,n,r){for(r=r&&0!=(8772&n.subtreeFlags),n=n.child;null!==n;){var l=n.alternate,a=t,o=n,i=o.flags;switch(o.tag){case 0:case 11:case 15:e(a,o,r),aU(o,4);break;case 1:if(e(a,o,r),"function"==typeof(a=o.stateNode).componentDidMount)try{a.componentDidMount()}catch(e){ir(o,o.return,e)}if(null!==(l=o.updateQueue)){var u=l.shared.hiddenCallbacks;if(null!==u)for(l.shared.hiddenCallbacks=null,l=0;l title"))),s$(l,n,r),l[ew]=e,eR(l),n=l;break e;case"link":var a=cp("link","href",t).get(n+(r.href||""));if(a){for(var o=0;o",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[ew]=t,e[eS]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=e,s$(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&ah(t)}null!==t.ref&&ag(t)}return ak(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ah(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=I.current,t6(t)){e:{if(e=t.stateNode,n=t.memoizedProps,e[ew]=t,(r=e.nodeValue!==n)&&null!==(l=tH))switch(l.tag){case 3:if(l=0!=(1&l.mode),sD(e.nodeValue,n,l),l){e=!1;break e}break;case 27:case 5:var a=0!=(1&l.mode);if(!0!==l.memoizedProps.suppressHydrationWarning&&sD(e.nodeValue,n,a),a){e=!1;break e}}e=r}e&&ah(t)}else(e=sQ(e).createTextNode(r))[ew]=t,t.stateNode=e}return ak(t),null;case 13:if(nH(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(tK&&null!==tq&&0!=(1&t.mode)&&0==(128&t.flags))t8(),t5(),t.flags|=384,l=!1;else if(l=t6(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(i(317));l[ew]=t}else t5(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ak(t),l=!1}else null!==tY&&(oW(tY),tY=null),l=!0;if(!l)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),av(t,t.updateQueue),ak(t),null;case 4:return V(),null===e&&sz(t.stateNode.containerInfo),ak(t),null;case 10:return l5(t.type._context),ak(t),null;case 19:if(h(nq),null===(l=t.memoizedState))return ak(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering)){if(r)ab(l,!1);else{if(0!==ok||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=nK(e))){for(t.flags|=128,ab(l,!1),e=a.updateQueue,t.updateQueue=e,av(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)im(n,e),n=n.sibling;return g(nq,1&nq.current|2),t.child}e=e.sibling}null!==l.tail&&Y()>o_&&(t.flags|=128,r=!0,ab(l,!1),t.lanes=4194304)}}else{if(!r){if(null!==(e=nK(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,av(t,e),ab(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!tK)return ak(t),null}else 2*Y()-l.renderingStartTime>o_&&536870912!==n&&(t.flags|=128,r=!0,ab(l,!1),t.lanes=4194304)}l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Y(),t.sibling=null,e=nq.current,g(nq,r?1&e|2:1&e),t;return ak(t),null;case 22:case 23:return nH(t),n$(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(536870912&n)&&0==(128&t.flags)&&(ak(t),6&t.subtreeFlags&&(t.flags|=8192)):ak(t),null!==(n=t.updateQueue)&&av(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&h(af),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),l5(ai),ak(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,ob);if(null!==n){om=n;return}if(null!==(t=t.sibling)){om=t;return}om=t=e}while(null!==t);0===ok&&(ok=5)}function o7(e,t,n,r){var l=ey,a=of.transition;try{of.transition=null,ey=2,function(e,t,n,r,l){do ie();while(null!==oR);if(0!=(6&od))throw Error(i(327));var a=e.finishedWork,o=e.finishedLanes;if(null!==a){if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var u=a.lanes|a.childLanes;if(function(e,t,n){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,a=e.hiddenUpdates;0r&&(l=r,r=a,a=l),l=u8(n,a);var o=u8(n,r);l&&o&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;nn?32:n;n=of.transition;var l=ey;try{if(of.transition=null,ey=r,null===oR)var a=!1;else{r=oI,oI=null;var o=oR,u=oD;if(oR=null,oD=0,0!=(6&od))throw Error(i(331));var s=od;if(od|=4,ol(o.current),a5(o,o.current,u,r),od=s,n2(!1),er&&"function"==typeof er.onPostCommitFiberRoot)try{er.onPostCommitFiberRoot(en,o)}catch(e){}a=!0}return a}finally{ey=l,of.transition=n,o9(e,t)}}return!1}function it(e,t,n){t=lx(e,t=lS(n,t),2),null!==(e=nd(e,t,2))&&(em(e,2),n1(e))}function ir(e,t,n){if(3===e.tag)it(e,e,n);else for(;null!==t;){if(3===t.tag){it(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oM||!oM.has(r))){e=lz(t,e=lS(n,e),2),null!==(t=nd(t,e,2))&&(em(t,2),n1(t));break}}t=t.return}}function il(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new oi;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(ov=!0,l.add(n),e=ia.bind(null,e,t,n),t.then(e,e))}function ia(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,op===e&&(oh&n)===n&&(4===ok||3===ok&&(62914560&oh)===oh&&300>Y()-oN?0==(2&od)&&oG(e,0):oE|=n),n1(e)}function io(e,t){0===t&&(t=0==(1&e.mode)?2:ed()),null!==(e=na(e,t))&&(em(e,t),n1(e))}function ii(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),io(e,n)}function iu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),io(e,n)}function is(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ic(e,t,n,r){return new is(e,t,n,r)}function id(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ip(e,t){var n=e.alternate;return null===n?((n=ic(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function im(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ih(e,t,n,r,l,a,o){if(l=2,r=e,"function"==typeof e)id(e)&&(l=1);else if("string"==typeof e)l=!function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;if("stylesheet"===t.rel)return e=t.disabled,"string"==typeof t.precedence&&null==e;return!0;case"script":if(!0===t.async&&!t.onLoad&&!t.onError&&"string"==typeof t.src&&t.src)return!0}return!1}(e,n,D.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case b:return ig(n.children,a,o,t);case k:l=8,0!=(1&(a|=8))&&(a|=16);break;case w:return(e=ic(12,n,t,2|a)).elementType=w,e.lanes=o,e;case z:return(e=ic(13,n,t,a)).elementType=z,e.lanes=o,e;case P:return(e=ic(19,n,t,a)).elementType=P,e.lanes=o,e;case T:return iy(n,a,o,t);case F:case L:case M:return(e=ic(24,n,t,a)).elementType=M,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:l=10;break e;case C:l=9;break e;case x:l=11;break e;case N:l=14;break e;case _:l=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=ic(l,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function ig(e,t,n,r){return(e=ic(7,e,r,t)).lanes=n,e}function iy(e,t,n,r){(e=ic(22,e,r,t)).elementType=T,e.lanes=n;var l={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0==(2&l._pendingVisibility)){var t=na(e,2);null!==t&&(l._pendingVisibility|=2,oV(t,e,2))}},attach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0!=(2&l._pendingVisibility)){var t=na(e,2);null!==t&&(l._pendingVisibility&=-3,oV(t,e,2))}}};return e.stateNode=l,e}function iv(e,t,n){return(e=ic(6,e,null,t)).lanes=n,e}function ib(e,t,n){return(t=ic(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ik(e,t,n,r,l,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ep(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.hiddenUpdates=ep(null),this.identifierPrefix=r,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=a,this.incompleteTransitions=new Map}function iw(e,t,n,r,l,a,o,i,u,s,c){return e=new ik(e,t,n,i,u,c),1===t?(t=1,!0===a&&(t|=24)):t=0,a=ic(3,null,null,t),e.current=a,a.stateNode=e,t=au(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ns(a),e}function iS(e){if(!e)return tw;e=e._reactInternals;e:{if(ty(e)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tz(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(tz(n))return t_(e,n,t)}return t}function iC(e,t,n,r,l,a,o,i,u,s,c){return(e=iw(n,r,!0,e,l,a,o,i,u,s,c)).context=iS(null),(l=nf(r=oB(n=e.current))).callback=null!=t?t:null,nd(n,l,r),e.current.lanes=r,em(e,r),n1(e),e}function iE(e,t,n,r){var l=t.current,a=oB(l);return n=iS(n),null===t.context?t.context=n:t.pendingContext=n,(t=nf(a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=nd(l,t,a))&&(oV(e,l,a),np(e,l,a)),a}function ix(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function iz(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n=uR),uI=!1;function uU(e,t){switch(e){case"keyup":return -1!==uM.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u$(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var uB=!1,uV={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function uj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uV[e.type]:"textarea"===t}function uQ(e,t,n,r){th(r),0<(t=sL(t,"onChange")).length&&(n=new iH("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var uW=null,uH=null;function uq(e){sS(e,0)}function uK(e){if(e0(eF(e)))return e}function uY(e,t){if("change"===e)return t}var uX=!1;if(e$){if(e$){var uG="oninput"in document;if(!uG){var uZ=document.createElement("div");uZ.setAttribute("oninput","return;"),uG="function"==typeof uZ.oninput}r=uG}else r=!1;uX=r&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=u6(r)}}function u5(){for(var e=window,t=e1();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e1(e.document)}return t}function u7(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var u9=e$&&"documentMode"in document&&11>=document.documentMode,se=null,st=null,sn=null,sr=!1;function sl(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sr||null==se||se!==e1(r)||(r="selectionStart"in(r=se)&&u7(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sn&&nv(sn,r)||(sn=r,0<(r=sL(st,"onSelect")).length&&(t=new iH("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=se)))}function sa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var so={animationend:sa("Animation","AnimationEnd"),animationiteration:sa("Animation","AnimationIteration"),animationstart:sa("Animation","AnimationStart"),transitionend:sa("Transition","TransitionEnd")},si={},su={};function ss(e){if(si[e])return si[e];if(!so[e])return e;var t,n=so[e];for(t in n)if(n.hasOwnProperty(t)&&t in su)return si[e]=n[t];return e}e$&&(su=document.createElement("div").style,"AnimationEvent"in window||(delete so.animationend.animation,delete so.animationiteration.animation,delete so.animationstart.animation),"TransitionEvent"in window||delete so.transitionend.transition);var sc=ss("animationend"),sf=ss("animationiteration"),sd=ss("animationstart"),sp=ss("transitionend"),sm=new Map,sh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function sg(e,t){sm.set(e,t),eI(t,[e])}for(var sy=0;sy title"):null)}var ch=null;function cg(){}function cy(){if(this.count--,0===this.count){if(this.stylesheets)cb(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cv=null;function cb(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,cv=new Map,t.forEach(ck,e),cv=null,cy.call(e))}function ck(e,t){if(!(4&t.state.loading)){var n=cv.get(e);if(n)var r=n.get("last");else{n=new Map,cv.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a