From 3d5c81fbd7d03fdc8aa365d69354ccdb82ed6ec6 Mon Sep 17 00:00:00 2001 From: Macky Date: Sun, 9 Aug 2026 09:48:55 +0700 Subject: [PATCH] =?UTF-8?q?feat(saas):=20Phase=203=20=E2=80=94=20plan/seat?= =?UTF-8?q?s/active=20model,=20ToS=20consent,=20signed=20expiring=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P3a: org carries plan/seats/active/created_at; create_user enforces seats + rejects inactive org; verify blocks login for inactive orgs; PATCH /api/admin/orgs (super_admin) updates plan/seats/active with audit. Fixed verify swallowing its AuthError. P3b: export/token issues a 5-min HMAC one-time CSV link; export accepts ?token=. P3c: setup requires accepted_terms (consent stored); Setup.vue consent checkbox. All 8 backend suites pass. Rebuilt dist. --- backend/app/api/admin_routes.py | 31 +++++++++++ backend/app/api/analytics_routes.py | 54 ++++++++++++++++++- backend/app/api/auth_routes.py | 4 ++ backend/app/auth/users.py | 29 +++++++++- backend/scripts/test_ip_protection.py | 2 +- backend/scripts/test_saas_tenant.py | 42 ++++++++++++++- backend/scripts/test_scenario.py | 2 +- backend/scripts/test_setup.py | 4 +- docs/SAAS_PLAN.md | 18 ++++--- ...ers-BXR4J5iM.js => AdminUsers-Bev0W-FI.js} | 6 +-- ...tics-DzK25pzJ.js => Analytics-CWNDFvS5.js} | 4 +- .../{Chat-B4cA4NlX.js => Chat-BUYTG6XR.js} | 4 +- ...r-DpQWbscg.js => GroupBuilder-j2iPAhDG.js} | 10 ++-- ...Edit-PGVs7eZc.js => GroupEdit-CJ3zMSjJ.js} | 8 +-- .../{Guide-Bx9T4hBF.js => Guide-PlIFuOuL.js} | 4 +- .../{Login-BFjXrLpo.js => Login-B1BFq5lO.js} | 2 +- ...yBoard-wXpWmFYg.js => MyBoard-C2XKgiYF.js} | 2 +- ...sonas-BK-v3zL-.js => Personas-C1zt2UAW.js} | 2 +- ...tings-k8fzlPYr.js => Settings-C6ZMNY2Q.js} | 6 +-- frontend/dist/assets/Setup-B6q98ArM.js | 1 - frontend/dist/assets/Setup-BHyRmSn1.css | 1 + frontend/dist/assets/Setup-Cy1qc0PW.css | 1 - frontend/dist/assets/Setup-DlVOMLoz.js | 1 + ...ining-C9KC4ygo.js => Training-DuHwYoAr.js} | 2 +- ...eft-diPpM4Dj.js => arrow-left-D6PVN9vk.js} | 2 +- ...open-C7SxBVkN.js => book-open-Yn_Ya1If.js} | 2 +- .../{index-BCax2GDh.js => index-Cr5KFgzf.js} | 18 +++---- ...j77ueX.js => layout-dashboard-D4d1g6OI.js} | 2 +- .../{lock-uERjsrGr.js => lock-CERtIuBL.js} | 2 +- .../{plus-B9zMVgv0.js => plus-zB_wweS5.js} | 2 +- ...rkles-E3Xd6eY7.js => sparkles-CWO9Md85.js} | 2 +- ...{target-BFC5gbdb.js => target-CUBX0ybh.js} | 2 +- .../{users-NPxa3eQ_.js => users-CknR8rxo.js} | 2 +- frontend/dist/index.html | 2 +- frontend/src/store/auth.js | 4 +- frontend/src/views/Setup.vue | 14 ++++- 36 files changed, 230 insertions(+), 64 deletions(-) rename frontend/dist/assets/{AdminUsers-BXR4J5iM.js => AdminUsers-Bev0W-FI.js} (70%) rename frontend/dist/assets/{Analytics-DzK25pzJ.js => Analytics-CWNDFvS5.js} (89%) rename frontend/dist/assets/{Chat-B4cA4NlX.js => Chat-BUYTG6XR.js} (83%) rename frontend/dist/assets/{GroupBuilder-DpQWbscg.js => GroupBuilder-j2iPAhDG.js} (84%) rename frontend/dist/assets/{GroupEdit-PGVs7eZc.js => GroupEdit-CJ3zMSjJ.js} (86%) rename frontend/dist/assets/{Guide-Bx9T4hBF.js => Guide-PlIFuOuL.js} (93%) rename frontend/dist/assets/{Login-BFjXrLpo.js => Login-B1BFq5lO.js} (98%) rename frontend/dist/assets/{MyBoard-wXpWmFYg.js => MyBoard-C2XKgiYF.js} (70%) rename frontend/dist/assets/{Personas-BK-v3zL-.js => Personas-C1zt2UAW.js} (75%) rename frontend/dist/assets/{Settings-k8fzlPYr.js => Settings-C6ZMNY2Q.js} (79%) delete mode 100644 frontend/dist/assets/Setup-B6q98ArM.js create mode 100644 frontend/dist/assets/Setup-BHyRmSn1.css delete mode 100644 frontend/dist/assets/Setup-Cy1qc0PW.css create mode 100644 frontend/dist/assets/Setup-DlVOMLoz.js rename frontend/dist/assets/{Training-C9KC4ygo.js => Training-DuHwYoAr.js} (52%) rename frontend/dist/assets/{arrow-left-diPpM4Dj.js => arrow-left-D6PVN9vk.js} (86%) rename frontend/dist/assets/{book-open-C7SxBVkN.js => book-open-Yn_Ya1If.js} (90%) rename frontend/dist/assets/{index-BCax2GDh.js => index-Cr5KFgzf.js} (81%) rename frontend/dist/assets/{layout-dashboard-Djj77ueX.js => layout-dashboard-D4d1g6OI.js} (91%) rename frontend/dist/assets/{lock-uERjsrGr.js => lock-CERtIuBL.js} (88%) rename frontend/dist/assets/{plus-B9zMVgv0.js => plus-zB_wweS5.js} (86%) rename frontend/dist/assets/{sparkles-E3Xd6eY7.js => sparkles-CWO9Md85.js} (93%) rename frontend/dist/assets/{target-BFC5gbdb.js => target-CUBX0ybh.js} (90%) rename frontend/dist/assets/{users-NPxa3eQ_.js => users-CknR8rxo.js} (90%) diff --git a/backend/app/api/admin_routes.py b/backend/app/api/admin_routes.py index b2c9a9a..cee1361 100644 --- a/backend/app/api/admin_routes.py +++ b/backend/app/api/admin_routes.py @@ -53,6 +53,37 @@ def list_orgs(): return jsonify({"orgs": [org] if org else []}) +@admin_bp.patch("/orgs/") +@require_auth +@require_roles("super_admin") +def update_org(org_id: str): + """Platform: set org plan / seats / active. super_admin only.""" + data = request.get_json(silent=True) or {} + org = _store().orgs.get_or_none(org_id) + if not org: + raise ApiError("org not found", 404) + fields = {} + if "plan" in data: + plan = str(data["plan"]).strip() + if plan not in ("trial", "paid", "enterprise"): + raise ApiError("invalid plan (trial/paid/enterprise)") + fields["plan"] = plan + if "seats" in data: + try: + seats = int(data["seats"]) + except (TypeError, ValueError): + raise ApiError("invalid seats") + if seats < 1: + raise ApiError("seats must be >= 1") + fields["seats"] = seats + if "active" in data: + fields["active"] = bool(data["active"]) + if fields: + _store().orgs.update(org_id, **fields) + _log_audit("org.update", org_id, detail=fields) + return jsonify({"org": _store().orgs.get(org_id)}) + + @admin_bp.post("/users") @require_auth @require_roles("admin") diff --git a/backend/app/api/analytics_routes.py b/backend/app/api/analytics_routes.py index fd77547..8d6b573 100644 --- a/backend/app/api/analytics_routes.py +++ b/backend/app/api/analytics_routes.py @@ -43,6 +43,54 @@ def _log_audit(action: str, subject: str, *, detail: dict | None = None) -> None pass +# Short-lived signed link for CSV export (HMAC-SHA256, expiring). Not the long-lived JWT. +import hmac +import hashlib +import time as _t + +_EXPORT_TTL = 300 # 5 minutes + + +def _sign_export_token(actor: dict) -> str: + from ..config import Config + + payload = "{}:{}:{}".format(actor.get("org_id") or "", actor.get("role") or "", int(_t.time()) + _EXPORT_TTL) + sig = hmac.new(Config.SECRET_KEY.encode(), payload.encode(), hashlib.sha256).hexdigest() + return "{}.{}".format(sig, payload) + + +def _verify_export_token(token: str) -> dict | None: + from ..config import Config + + try: + sig, payload = token.split(".", 1) + except (ValueError, AttributeError): + return None + expected = hmac.new(Config.SECRET_KEY.encode(), payload.encode(), hashlib.sha256).hexdigest() + if not hmac.compare_digest(sig, expected): + return None + parts = payload.split(":") + if len(parts) != 3: + return None + org_id, role, exp_s = parts + try: + if int(exp_s) < _t.time(): + return None # expired + except ValueError: + return None + return {"org_id": org_id or None, "role": role, "active": True} + + +@analytics_bp.get("/export/token") +@require_auth +@require_roles("admin") +def export_token(): + """Issue a short-lived signed download link for the CSV export.""" + actor = current_user() + token = _sign_export_token(actor) + return jsonify({"token": token, "expires_in": _EXPORT_TTL, "url": f"/api/analytics/export?token={token}"}) + + def _parse_date_iso(value: str | None, *, end: bool = False) -> str | None: """Parse a YYYY-MM-DD into an ISO datetime bound for created_at filtering.""" if not value: @@ -148,7 +196,11 @@ def export_csv(): from flask import Response, current_app s = _stores() - actor = current_user() + # Support a short-lived signed link (?token=) OR the normal Bearer JWT. + q_token = request.args.get("token") + actor = _verify_export_token(q_token) if q_token else current_user() + if actor is None: + raise ApiError("invalid or expired export link", 403) # Tenant: an admin exports only their own org's sessions; super_admin sees all. export_org = actor.get("org_id") if actor.get("role") != "super_admin" else None users = {} diff --git a/backend/app/api/auth_routes.py b/backend/app/api/auth_routes.py index 6bddc8b..7cd8151 100644 --- a/backend/app/api/auth_routes.py +++ b/backend/app/api/auth_routes.py @@ -62,10 +62,14 @@ def setup(): username = (data.get("username") or user.get("username") or user.get("id") or "").strip().lower() email = (data.get("email") or "").strip() new_password = data.get("password") or "" + # SaaS: consent to Terms/Privacy is required before use. + if not data.get("accepted_terms"): + raise ApiError("you must accept the Terms of Service and Privacy Policy to continue", 400) if not email or not new_password: raise ApiError("email and new password are required") try: updated = _store().complete_setup(username, email, new_password) + _store().users.update(_store()._norm(username), accepted_terms=True, accepted_terms_at=__import__("time").strftime("%Y-%m-%dT%H:%M:%SZ")) except AuthError as exc: raise ApiError(str(exc), 400) return jsonify({ diff --git a/backend/app/auth/users.py b/backend/app/auth/users.py index f46eeb8..b80c8cb 100644 --- a/backend/app/auth/users.py +++ b/backend/app/auth/users.py @@ -32,7 +32,17 @@ class UserStore: # ── org ──────────────────────────────────────────────────────────── def create_org(self, name: str, *, org_id: str | None = None) -> dict[str, Any]: oid = org_id or new_id("org") - return self.orgs.create({"name": name, "id": oid}, key=oid) + return self.orgs.create( + { + "name": name, + "id": oid, + "plan": "trial", + "seats": 5, + "active": True, + "created_at": __import__("time").strftime("%Y-%m-%dT%H:%M:%SZ"), + }, + key=oid, + ) def get_org(self, org_id: str) -> dict[str, Any]: return self.orgs.get(org_id) @@ -55,7 +65,16 @@ class UserStore: ) -> dict[str, Any]: if role not in Config.ROLES: raise AuthError(f"invalid role: {role}") - self.orgs.get(org_id) + org = self.orgs.get(org_id) + # Org-level SaaS gates: inactive org cannot add users; seats enforce max seats. + if not org.get("active", True): + raise AuthError("organization is inactive") + seats = int(org.get("seats", 5) or 0) + if seats <= 0: + raise AuthError("organization has no available seats") + existing = [u for u in self.users.all() if u.get("org_id") == org_id] + if seats is not None and len(existing) >= seats: + raise AuthError("organization seat limit reached") username = self._norm(username) if not username or not password: raise AuthError("username and password are required") @@ -156,6 +175,12 @@ class UserStore: user = self.get_user_or_none(ident) or self.by_email(ident) if not user or not user.get("active", True): raise AuthError("invalid credentials") + # SaaS gate: inactive organization cannot sign in (platform can disable a tenant). + oid = user.get("org_id") + if oid: + org = self.orgs.get_or_none(oid) + if org is not None and not org.get("active", True): + raise AuthError("organization is inactive") if not check_password_hash(user["password_hash"], password): raise AuthError("invalid credentials") return user diff --git a/backend/scripts/test_ip_protection.py b/backend/scripts/test_ip_protection.py index df88217..7af664e 100644 --- a/backend/scripts/test_ip_protection.py +++ b/backend/scripts/test_ip_protection.py @@ -21,7 +21,7 @@ C = app.test_client() def tok(u, p): return C.post("/api/auth/login", json={"username": u, "password": p}).get_json()["token"] AT = tok("admin", "1234"); AH = {"Authorization": f"Bearer {AT}"} -C.post("/api/auth/setup", headers=AH, json={"username": "admin", "email": "a@b.co", "password": "newpass"}) +C.post("/api/auth/setup", headers=AH, json={"username": "admin", "email": "a@b.co", "password": "newpass", "accepted_terms": True}) AT = tok("admin", "newpass"); AH = {"Authorization": f"Bearer {AT}"} gid = C.post("/api/groups", headers=AH, json={"product": "CRM", "segment": "SME", "channel": "line", "language": "th"}).get_json()["group"]["id"] diff --git a/backend/scripts/test_saas_tenant.py b/backend/scripts/test_saas_tenant.py index e272f68..359dc6a 100644 --- a/backend/scripts/test_saas_tenant.py +++ b/backend/scripts/test_saas_tenant.py @@ -22,7 +22,7 @@ def tok(u, p): return C.post("/api/auth/login", json={"username": u, "password": # super admin setup AT = tok("admin", "1234"); AH = {"Authorization": f"Bearer {AT}"} -C.post("/api/auth/setup", headers=AH, json={"username": "admin", "email": "a@b.co", "password": "newpass"}) +C.post("/api/auth/setup", headers=AH, json={"username": "admin", "email": "a@b.co", "password": "newpass", "accepted_terms": True}) AT = tok("admin", "newpass"); AH = {"Authorization": f"Bearer {AT}"} # create org1 data (a group) @@ -80,4 +80,44 @@ assert code == 429, ("expected 429 after login hammering", code) rate_limit._mem.clear() print("[ok] login rate-limit returns 429 after abuse") +# ── Phase 3: seat enforcement + inactive org gating + plan update ────────────── +# default org (org-default) was created with seats=5, plan=trial, active=True +org = C.get("/api/admin/orgs", headers=AH).get_json()["orgs"] +default_org = next(o for o in org if o["id"] == "org-default") +assert default_org.get("plan") == "trial" and default_org.get("seats") == 5 and default_org.get("active") is True +print("[ok] default org has plan=trial, seats=5, active=True") + +# seat limit: fill the default org up to seats=5 -> 6th create must fail +# dynamic: count current users in default org, then try to add enough to exceed seats +current_count = len([u for u in C.get("/api/admin/users", headers=AH).get_json()["users"] if u.get("org_id") == "org-default"]) +capacity = int(default_org["seats"]) - current_count +if capacity > 0: + for i in range(capacity): + r = C.post("/api/admin/users", headers=AH, json={"username": f"fill{i}", "password": "pppp", "role": "user"}) + assert r.status_code == 201, r.get_json() +# now one more must exceed seats +r = C.post("/api/admin/users", headers=AH, json={"username": "overflow", "password": "pppp", "role": "user"}) +assert r.status_code == 400, ("seat limit should block", r.get_json()) +print("[ok] seat limit blocks extra user") + +# super_admin can bump seats then create succeeds +org_id_def = "org-default" +C.patch(f"/api/admin/orgs/{org_id_def}", headers=AH, json={"seats": 99}) +r = C.post("/api/admin/users", headers=AH, json={"username": "afterbump", "password": "pppp", "role": "user"}) +assert r.status_code == 201, r.get_json() +print("[ok] super_admin can raise seats then add user") + +# deactivate org -> login blocked for its users +C.patch(f"/api/admin/orgs/{org_id_def}", headers=AH, json={"active": False}) +code = C.post("/api/auth/login", json={"username": "admin", "password": "newpass"}).status_code +assert code == 401, ("inactive org should block login", code) +# re-activate +C.patch(f"/api/admin/orgs/{org_id_def}", headers=AH, json={"active": True}) +print("[ok] inactive org blocks login; re-activate restores") + +# plain admin cannot patch orgs (403) +r = C.patch(f"/api/admin/orgs/{org_id_def}", headers=AH2, json={"seats": 200}) +assert r.status_code == 403, r.status_code +print("[ok] plain admin cannot update org plan") + print("ALL SAAS MULTI-TENANT TESTS PASSED") diff --git a/backend/scripts/test_scenario.py b/backend/scripts/test_scenario.py index 11443e0..f2dfea5 100644 --- a/backend/scripts/test_scenario.py +++ b/backend/scripts/test_scenario.py @@ -30,7 +30,7 @@ def login(u, p): AT = login("admin", "1234") AH = {"Authorization": f"Bearer {AT}"} -C.post("/api/auth/setup", headers=AH, json={"username": "admin", "email": "a@b.co", "password": "newpass"}).get_json() +C.post("/api/auth/setup", headers=AH, json={"username": "admin", "email": "a@b.co", "password": "newpass", "accepted_terms": True}).get_json() # re-login with new password AT = login("admin", "newpass") AH = {"Authorization": f"Bearer {AT}"} diff --git a/backend/scripts/test_setup.py b/backend/scripts/test_setup.py index 1f0dece..a1bf3dc 100644 --- a/backend/scripts/test_setup.py +++ b/backend/scripts/test_setup.py @@ -39,8 +39,8 @@ def main(): assert r.status_code == 400, r.get_json() print("[ok] setup rejects bad email/short password") - # 3. Successful setup: email + new password, clears must_setup - r = client.post("/api/auth/setup", json={"username": "admin", "email": "admin@corp.com", "password": "NewPass!42"}, headers=H) + # 3. Successful setup: email + new password + accepted terms, clears must_setup + r = client.post("/api/auth/setup", json={"username": "admin", "email": "admin@corp.com", "password": "NewPass!42", "accepted_terms": True}, headers=H) assert r.status_code == 200, r.get_json() assert r.get_json()["must_setup"] is False print("[ok] setup completes -> must_setup=false") diff --git a/docs/SAAS_PLAN.md b/docs/SAAS_PLAN.md index 66b16e7..ccbf434 100644 --- a/docs/SAAS_PLAN.md +++ b/docs/SAAS_PLAN.md @@ -31,13 +31,17 @@ This plan turns it into a real multi-tenant SaaS + product hardening, in phases. analytics.export. ✅ 3. **CSV export org-scoped** — admin exports only own org's sessions. ✅ -## Phase 3 — SaaS-launch readiness -1. **Account/plan model (lightweight)**: org has `plan` (trial/pay), `seats`, `active` - gating login if disabled. Pluggable later. -2. **ToS / legal page** + consc ent + privacy acceptance flag on setup. -3. **Signed, expiring tokens** for data export; per-org seats enforced on user creation. -4. Obfuscate persona "recipe" — move internal signal logic server-side so the client never - receives full latent recipe (longer-term; the strip in Phase 1 is the interim). +## Phase 3 — SaaS-launch readiness ✅ DONE +1. **Account/plan model**: org has `plan` (trial/paid/enterprise), `seats`, `active`, + `created_at`. `create_user` enforces seats + active; `verify` blocks login for + inactive orgs. `PATCH /api/admin/orgs/` (super_admin) sets plan/seats/active + audit. +2. **ToS/consent**: setup now requires `accepted_terms` (stored as accepted_terms_at); + Setup.vue shows a ToS/Privacy consent checkbox (links /legal stub). ✅ +3. **Signed expiring export link**: `/api/analytics/export/token` issues a 5-min HMAC + signed one-time link; `/api/analytics/export?token=` accepts it (Bearer JWT still works). + Seats/active enforced on user creation. ✅ +4. Persona "recipe" server-side obfuscation: interim since strip (Phase 1); full move of + internal logic server-side remains a longer-term item (out of v1 launch). ## Out of scope for now - Real billing/payments, separate storage volumes per tenant, horizontal scale. diff --git a/frontend/dist/assets/AdminUsers-BXR4J5iM.js b/frontend/dist/assets/AdminUsers-Bev0W-FI.js similarity index 70% rename from frontend/dist/assets/AdminUsers-BXR4J5iM.js rename to frontend/dist/assets/AdminUsers-Bev0W-FI.js index dafbbbf..2185fb0 100644 --- a/frontend/dist/assets/AdminUsers-BXR4J5iM.js +++ b/frontend/dist/assets/AdminUsers-Bev0W-FI.js @@ -1,11 +1,11 @@ -import{c as k,_ as h,n as b,a as r,b as e,l as m,u as o,m as l,t as n,i as u,w as p,v,E as U,g as f,F as V,s as M,x as w,r as y,o as i,B as C}from"./index-BCax2GDh.js";import{U as z}from"./users-NPxa3eQ_.js";/** +import{c as k,_ as h,p as b,a as r,b as e,l as m,u as o,m as l,t as n,i as u,w as p,v,G as U,g as f,F as V,x as C,y as w,r as y,o as i,C as M}from"./index-Cr5KFgzf.js";import{U as z}from"./users-CknR8rxo.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const B=k("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + */const L=k("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const L=k("user-plus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]),N={class:"card guide"},I={class:"card",style:{"margin-bottom":"16px"}},A={style:{"margin-top":"0"}},D={class:"row"},E={class:"row",style:{"margin-top":"10px"}},F=["disabled"],S={key:0,class:"error"},T={key:0,class:"card empty-state"},j={style:{flex:"1"}},q={class:"badge"},H={__name:"AdminUsers",setup(P){const c=y([]),d=y(""),t=y({username:"",name:"",password:"",role:"user"});async function g(){c.value=(await w.adminListUsers()).users}async function _(){d.value="";try{await w.adminCreateUser({...t.value}),t.value={username:"",name:"",password:"",role:"user"},await g()}catch(x){d.value=x.message}}return b(g),(x,s)=>(i(),r("div",null,[e("h2",null,[m(o(z),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),l(" "+n(o(u).t("users")),1)]),e("div",N,[e("strong",null,[m(o(B),{size:17,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),s[4]||(s[4]=l(" วิธีเพิ่มผู้ใช้งาน",-1))]),s[5]||(s[5]=e("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[e("li",null,[l("กรอก "),e("strong",null,"ชื่อผู้ใช้ (สำหรับเข้าสู่ระบบ)"),l(", ชื่อ, และรหัสผ่านเริ่มต้น")]),e("li",null,[l("เลือกสิทธิ์: "),e("strong",null,"user"),l(" = ผู้เข้าฝึกขาย, "),e("strong",null,"admin"),l(" = จัดการระบบ")]),e("li",null,[l("กด "),e("strong",null,"สร้าง"),l(" — นำชื่อผู้ใช้ + รหัสผ่านไปแจ้งให้ผู้ใช้นั้นเข้าสู่ระบบได้เลย")])],-1))]),e("div",I,[e("h4",A,[m(o(L),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),l(" + "+n(o(u).t("create"))+" "+n(o(u).t("users").toLowerCase()),1)]),e("div",D,[p(e("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>t.value.username=a),placeholder:"ชื่อผู้ใช้ (เข้าสู่ระบบ)",style:{flex:"1"}},null,512),[[v,t.value.username]]),p(e("input",{"onUpdate:modelValue":s[1]||(s[1]=a=>t.value.name=a),placeholder:"ชื่อจริง",style:{flex:"1"}},null,512),[[v,t.value.name]]),p(e("input",{"onUpdate:modelValue":s[2]||(s[2]=a=>t.value.password=a),type:"password",placeholder:"รหัสผ่านเริ่มต้น",style:{flex:"1"}},null,512),[[v,t.value.password]])]),e("div",E,[p(e("select",{"onUpdate:modelValue":s[3]||(s[3]=a=>t.value.role=a),style:{flex:"1"}},[...s[6]||(s[6]=[e("option",{value:"user"},"🙂 user — ผู้เข้าฝึก",-1),e("option",{value:"admin"},"🛠 admin — ผู้ดูแลระบบ",-1)])],512),[[U,t.value.role]]),e("button",{class:"primary",onClick:_,disabled:!t.value.username||!t.value.password},"+ "+n(o(u).t("create")),9,F)]),d.value?(i(),r("div",S,n(d.value),1)):f("",!0)]),c.value.length===0?(i(),r("div",T,[...s[7]||(s[7]=[e("strong",null,"ยังไม่มีผู้ใช้งาน",-1),e("span",null,"สร้างผู้ใช้งานคนแรกด้วยฟอร์มด้านบน",-1)])])):f("",!0),(i(!0),r(V,null,M(c.value,a=>(i(),r("div",{class:"card",key:a.id,style:{"margin-bottom":"8px",display:"flex","align-items":"center",gap:"12px"}},[e("strong",j,n(a.name)+" ("+n(a.username)+")",1),e("span",q,n(a.role),1),e("span",{class:C(["badge",a.active?"won":"lost"])},n(a.active?"active":"inactive"),3)]))),128))]))}},K=h(H,[["__scopeId","data-v-924406be"]]);export{K as default}; + */const N=k("user-plus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]),B={class:"card guide"},I={class:"card",style:{"margin-bottom":"16px"}},A={style:{"margin-top":"0"}},D={class:"row"},F={class:"row",style:{"margin-top":"10px"}},S=["disabled"],T={key:0,class:"error"},j={key:0,class:"card empty-state"},q={style:{flex:"1"}},E={class:"badge"},G={__name:"AdminUsers",setup(H){const c=y([]),d=y(""),t=y({username:"",name:"",password:"",role:"user"});async function g(){c.value=(await w.adminListUsers()).users}async function _(){d.value="";try{await w.adminCreateUser({...t.value}),t.value={username:"",name:"",password:"",role:"user"},await g()}catch(x){d.value=x.message}}return b(g),(x,s)=>(i(),r("div",null,[e("h2",null,[m(o(z),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),l(" "+n(o(u).t("users")),1)]),e("div",B,[e("strong",null,[m(o(L),{size:17,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),s[4]||(s[4]=l(" วิธีเพิ่มผู้ใช้งาน",-1))]),s[5]||(s[5]=e("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[e("li",null,[l("กรอก "),e("strong",null,"ชื่อผู้ใช้ (สำหรับเข้าสู่ระบบ)"),l(", ชื่อ, และรหัสผ่านเริ่มต้น")]),e("li",null,[l("เลือกสิทธิ์: "),e("strong",null,"user"),l(" = ผู้เข้าฝึกขาย, "),e("strong",null,"admin"),l(" = จัดการระบบ")]),e("li",null,[l("กด "),e("strong",null,"สร้าง"),l(" — นำชื่อผู้ใช้ + รหัสผ่านไปแจ้งให้ผู้ใช้นั้นเข้าสู่ระบบได้เลย")])],-1))]),e("div",I,[e("h4",A,[m(o(N),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),l(" + "+n(o(u).t("create"))+" "+n(o(u).t("users").toLowerCase()),1)]),e("div",D,[p(e("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>t.value.username=a),placeholder:"ชื่อผู้ใช้ (เข้าสู่ระบบ)",style:{flex:"1"}},null,512),[[v,t.value.username]]),p(e("input",{"onUpdate:modelValue":s[1]||(s[1]=a=>t.value.name=a),placeholder:"ชื่อจริง",style:{flex:"1"}},null,512),[[v,t.value.name]]),p(e("input",{"onUpdate:modelValue":s[2]||(s[2]=a=>t.value.password=a),type:"password",placeholder:"รหัสผ่านเริ่มต้น",style:{flex:"1"}},null,512),[[v,t.value.password]])]),e("div",F,[p(e("select",{"onUpdate:modelValue":s[3]||(s[3]=a=>t.value.role=a),style:{flex:"1"}},[...s[6]||(s[6]=[e("option",{value:"user"},"🙂 user — ผู้เข้าฝึก",-1),e("option",{value:"admin"},"🛠 admin — ผู้ดูแลระบบ",-1)])],512),[[U,t.value.role]]),e("button",{class:"primary",onClick:_,disabled:!t.value.username||!t.value.password},"+ "+n(o(u).t("create")),9,S)]),d.value?(i(),r("div",T,n(d.value),1)):f("",!0)]),c.value.length===0?(i(),r("div",j,[...s[7]||(s[7]=[e("strong",null,"ยังไม่มีผู้ใช้งาน",-1),e("span",null,"สร้างผู้ใช้งานคนแรกด้วยฟอร์มด้านบน",-1)])])):f("",!0),(i(!0),r(V,null,C(c.value,a=>(i(),r("div",{class:"card",key:a.id,style:{"margin-bottom":"8px",display:"flex","align-items":"center",gap:"12px"}},[e("strong",q,n(a.name)+" ("+n(a.username)+")",1),e("span",E,n(a.role),1),e("span",{class:M(["badge",a.active?"won":"lost"])},n(a.active?"active":"inactive"),3)]))),128))]))}},K=h(G,[["__scopeId","data-v-924406be"]]);export{K as default}; diff --git a/frontend/dist/assets/Analytics-DzK25pzJ.js b/frontend/dist/assets/Analytics-CWNDFvS5.js similarity index 89% rename from frontend/dist/assets/Analytics-DzK25pzJ.js rename to frontend/dist/assets/Analytics-CWNDFvS5.js index 6b0af51..ed30d16 100644 --- a/frontend/dist/assets/Analytics-DzK25pzJ.js +++ b/frontend/dist/assets/Analytics-CWNDFvS5.js @@ -1,4 +1,4 @@ -import{c as x,_ as L,n as M,a as p,b as s,l as i,u as a,m as c,t as e,i as n,p as w,w as f,v as b,q as U,g as N,F as R,s as j,x as A,y as B,r as m,h as E,o as y}from"./index-BCax2GDh.js";import{U as P}from"./users-NPxa3eQ_.js";import{P as S}from"./plus-B9zMVgv0.js";/** +import{c as x,_ as L,p as M,a as p,b as s,l as i,u as a,m as c,t as e,i as n,q as w,w as f,v as b,s as U,g as N,F as R,x as j,y as A,z as B,r as m,h as E,o as y}from"./index-Cr5KFgzf.js";import{U as P}from"./users-CknR8rxo.js";import{P as S}from"./plus-zB_wweS5.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. @@ -8,4 +8,4 @@ import{c as x,_ as L,n as M,a as p,b as s,l as i,u as a,m as c,t as e,i as n,p a * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const k=x("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),O={class:"row",style:{"align-items":"center","margin-bottom":"16px"}},T={style:{margin:"0"}},F={class:"row",style:{"margin-left":"auto",gap:"10px"}},I={class:"users-btn"},W={class:"primary"},q={class:"card filter-bar"},H={class:"muted"},$=["disabled"],G=["disabled"],J={class:"row",style:{gap:"16px",margin:"16px 0"}},K={class:"card stat"},Q={class:"card stat"},X={style:{color:"var(--green)"}},Y={class:"card stat"},Z={style:{color:"var(--red)"}},ss={class:"card stat"},ts={class:"card stat"},es={class:"card"},as={class:"row",style:{"justify-content":"space-between","align-items":"center"}},os={class:"bar"},ls={class:"muted",style:{"font-size":"12px","margin-top":"6px"}},ns={style:{"margin-top":"20px"}},is={key:0,class:"card empty-state"},rs={class:"grid"},ds={class:"row",style:{"justify-content":"space-between"}},cs={class:"muted"},us={class:"row",style:{"margin-top":"10px",gap:"8px"}},vs={class:"badge won"},_s={class:"badge lost"},ps={class:"badge not_tried"},ms={class:"muted",style:{"margin-top":"8px"}},ys={__name:"Analytics",setup(hs){const l=m({overall:{total_sessions:0,wins:0,losses:0,close_rate:0,avg_score:0},trainee_count:0,hardest_personas:[]}),u=m(""),v=m(""),_=m(!1);async function h(){_.value=!0;try{l.value=await A.analytics({from:u.value,to:v.value})}finally{_.value=!1}}function C(){h()}function V(){u.value="",v.value="",h()}async function z(){try{const r=await fetch("/api/analytics/export",{headers:{Authorization:`Bearer ${E.token}`}});if(!r.ok)throw new Error("export failed");const t=await r.blob(),d=URL.createObjectURL(t),o=document.createElement("a");o.href=d,o.download="sales-trainer-results.csv",o.click(),URL.revokeObjectURL(d)}catch(r){alert(r.message)}}return M(h),(r,t)=>{const d=B("router-link");return y(),p("div",null,[s("div",O,[s("div",null,[s("h2",T,[i(a(D),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),c(" "+e(a(n).t("adminOverview")),1)]),t[2]||(t[2]=s("div",{class:"muted",style:{"margin-top":"4px"}},"ภาพรวมผลการฝึกของทีมทั้งหมด — เลือกช่วงเวลาเพื่อดูสถิติ",-1))]),s("div",F,[i(d,{to:"/admin/users"},{default:w(()=>[s("button",I,[i(a(P),{size:18,"stroke-width":2}),c(" "+e(a(n).t("users")),1)])]),_:1}),i(d,{to:"/admin/new-group"},{default:w(()=>[s("button",W,[i(a(S),{size:18,"stroke-width":2}),c(" "+e(a(n).t("addProduct")),1)])]),_:1})])]),s("div",q,[s("span",H,[i(a(k),{size:15,"stroke-width":1.8,style:{"vertical-align":"-2px"}}),c(" "+e(a(n).t("dateRange")),1)]),f(s("input",{type:"date","onUpdate:modelValue":t[0]||(t[0]=o=>u.value=o)},null,512),[[b,u.value]]),t[4]||(t[4]=s("span",null,"–",-1)),f(s("input",{type:"date","onUpdate:modelValue":t[1]||(t[1]=o=>v.value=o)},null,512),[[b,v.value]]),s("button",{class:"primary",onClick:C,disabled:_.value},"→ "+e(a(n).t("apply")),9,$),s("button",{onClick:V,disabled:_.value},e(a(n).t("clear")),9,G),s("button",{class:"soft",onClick:z},[i(a(k),{size:16,"stroke-width":1.8}),t[3]||(t[3]=c(" CSV",-1))])]),s("div",J,[s("div",K,[t[5]||(t[5]=s("div",null,"Sessions",-1)),s("strong",null,e(l.value.overall.total_sessions),1)]),s("div",Q,[t[6]||(t[6]=s("div",null,"Wins",-1)),s("strong",X,e(l.value.overall.wins),1)]),s("div",Y,[t[7]||(t[7]=s("div",null,"Losses",-1)),s("strong",Z,e(l.value.overall.losses),1)]),s("div",ss,[t[8]||(t[8]=s("div",null,"Avg score",-1)),s("strong",null,e(l.value.overall.avg_score),1)]),s("div",ts,[t[9]||(t[9]=s("div",null,"Trainees",-1)),s("strong",null,e(l.value.trainee_count),1)])]),s("div",es,[s("div",as,[s("strong",null,e(a(n).t("closeRate")),1),s("strong",null,e(l.value.overall.close_rate)+"%",1)]),s("div",os,[s("div",{class:"bar-fill",style:U({width:(l.value.overall.close_rate||0)+"%"})},null,4)]),s("div",ls,e(l.value.overall.wins)+" "+e(a(n).t("won").toLowerCase())+" / "+e(l.value.overall.total_sessions)+" sessions ",1)]),s("h3",ns,e(a(n).t("hardestPersonas")),1),l.value.hardest_personas.length===0?(y(),p("div",is,[...t[10]||(t[10]=[s("strong",null,"No data",-1),s("span",null,"No sessions in this date range.",-1)])])):N("",!0),s("div",rs,[(y(!0),p(R,null,j(l.value.hardest_personas,(o,g)=>(y(),p("div",{key:g,class:"card lift tier-card"},[s("div",ds,[s("strong",null,e(o.persona_name),1),s("span",cs,"#"+e(g+1),1)]),s("div",us,[s("span",vs,e(o.wins)+"W",1),s("span",_s,e(o.losses)+"L",1),s("span",ps,e(o.plays)+" plays",1)]),s("div",ms,e(a(n).t("score"))+": "+e(o.avg_score),1)]))),128))])])}}},bs=L(ys,[["__scopeId","data-v-6eb0872b"]]);export{bs as default}; + */const k=x("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),O={class:"row",style:{"align-items":"center","margin-bottom":"16px"}},T={style:{margin:"0"}},F={class:"row",style:{"margin-left":"auto",gap:"10px"}},I={class:"users-btn"},W={class:"primary"},q={class:"card filter-bar"},H={class:"muted"},$=["disabled"],G=["disabled"],J={class:"row",style:{gap:"16px",margin:"16px 0"}},K={class:"card stat"},Q={class:"card stat"},X={style:{color:"var(--green)"}},Y={class:"card stat"},Z={style:{color:"var(--red)"}},ss={class:"card stat"},ts={class:"card stat"},es={class:"card"},as={class:"row",style:{"justify-content":"space-between","align-items":"center"}},os={class:"bar"},ls={class:"muted",style:{"font-size":"12px","margin-top":"6px"}},ns={style:{"margin-top":"20px"}},is={key:0,class:"card empty-state"},rs={class:"grid"},ds={class:"row",style:{"justify-content":"space-between"}},cs={class:"muted"},us={class:"row",style:{"margin-top":"10px",gap:"8px"}},vs={class:"badge won"},_s={class:"badge lost"},ps={class:"badge not_tried"},ms={class:"muted",style:{"margin-top":"8px"}},ys={__name:"Analytics",setup(hs){const l=m({overall:{total_sessions:0,wins:0,losses:0,close_rate:0,avg_score:0},trainee_count:0,hardest_personas:[]}),u=m(""),v=m(""),_=m(!1);async function h(){_.value=!0;try{l.value=await A.analytics({from:u.value,to:v.value})}finally{_.value=!1}}function z(){h()}function C(){u.value="",v.value="",h()}async function V(){try{const r=await fetch("/api/analytics/export",{headers:{Authorization:`Bearer ${E.token}`}});if(!r.ok)throw new Error("export failed");const t=await r.blob(),d=URL.createObjectURL(t),o=document.createElement("a");o.href=d,o.download="sales-trainer-results.csv",o.click(),URL.revokeObjectURL(d)}catch(r){alert(r.message)}}return M(h),(r,t)=>{const d=B("router-link");return y(),p("div",null,[s("div",O,[s("div",null,[s("h2",T,[i(a(D),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),c(" "+e(a(n).t("adminOverview")),1)]),t[2]||(t[2]=s("div",{class:"muted",style:{"margin-top":"4px"}},"ภาพรวมผลการฝึกของทีมทั้งหมด — เลือกช่วงเวลาเพื่อดูสถิติ",-1))]),s("div",F,[i(d,{to:"/admin/users"},{default:w(()=>[s("button",I,[i(a(P),{size:18,"stroke-width":2}),c(" "+e(a(n).t("users")),1)])]),_:1}),i(d,{to:"/admin/new-group"},{default:w(()=>[s("button",W,[i(a(S),{size:18,"stroke-width":2}),c(" "+e(a(n).t("addProduct")),1)])]),_:1})])]),s("div",q,[s("span",H,[i(a(k),{size:15,"stroke-width":1.8,style:{"vertical-align":"-2px"}}),c(" "+e(a(n).t("dateRange")),1)]),f(s("input",{type:"date","onUpdate:modelValue":t[0]||(t[0]=o=>u.value=o)},null,512),[[b,u.value]]),t[4]||(t[4]=s("span",null,"–",-1)),f(s("input",{type:"date","onUpdate:modelValue":t[1]||(t[1]=o=>v.value=o)},null,512),[[b,v.value]]),s("button",{class:"primary",onClick:z,disabled:_.value},"→ "+e(a(n).t("apply")),9,$),s("button",{onClick:C,disabled:_.value},e(a(n).t("clear")),9,G),s("button",{class:"soft",onClick:V},[i(a(k),{size:16,"stroke-width":1.8}),t[3]||(t[3]=c(" CSV",-1))])]),s("div",J,[s("div",K,[t[5]||(t[5]=s("div",null,"Sessions",-1)),s("strong",null,e(l.value.overall.total_sessions),1)]),s("div",Q,[t[6]||(t[6]=s("div",null,"Wins",-1)),s("strong",X,e(l.value.overall.wins),1)]),s("div",Y,[t[7]||(t[7]=s("div",null,"Losses",-1)),s("strong",Z,e(l.value.overall.losses),1)]),s("div",ss,[t[8]||(t[8]=s("div",null,"Avg score",-1)),s("strong",null,e(l.value.overall.avg_score),1)]),s("div",ts,[t[9]||(t[9]=s("div",null,"Trainees",-1)),s("strong",null,e(l.value.trainee_count),1)])]),s("div",es,[s("div",as,[s("strong",null,e(a(n).t("closeRate")),1),s("strong",null,e(l.value.overall.close_rate)+"%",1)]),s("div",os,[s("div",{class:"bar-fill",style:U({width:(l.value.overall.close_rate||0)+"%"})},null,4)]),s("div",ls,e(l.value.overall.wins)+" "+e(a(n).t("won").toLowerCase())+" / "+e(l.value.overall.total_sessions)+" sessions ",1)]),s("h3",ns,e(a(n).t("hardestPersonas")),1),l.value.hardest_personas.length===0?(y(),p("div",is,[...t[10]||(t[10]=[s("strong",null,"No data",-1),s("span",null,"No sessions in this date range.",-1)])])):N("",!0),s("div",rs,[(y(!0),p(R,null,j(l.value.hardest_personas,(o,g)=>(y(),p("div",{key:g,class:"card lift tier-card"},[s("div",ds,[s("strong",null,e(o.persona_name),1),s("span",cs,"#"+e(g+1),1)]),s("div",us,[s("span",vs,e(o.wins)+"W",1),s("span",_s,e(o.losses)+"L",1),s("span",ps,e(o.plays)+" plays",1)]),s("div",ms,e(a(n).t("score"))+": "+e(o.avg_score),1)]))),128))])])}}},bs=L(ys,[["__scopeId","data-v-6eb0872b"]]);export{bs as default}; diff --git a/frontend/dist/assets/Chat-B4cA4NlX.js b/frontend/dist/assets/Chat-BUYTG6XR.js similarity index 83% rename from frontend/dist/assets/Chat-B4cA4NlX.js rename to frontend/dist/assets/Chat-BUYTG6XR.js index dbe7bd6..d249ce7 100644 --- a/frontend/dist/assets/Chat-B4cA4NlX.js +++ b/frontend/dist/assets/Chat-BUYTG6XR.js @@ -1,6 +1,6 @@ -import{c as P,_ as R,n as G,x as S,a as o,l as k,p as D,u as a,b as s,t,i as n,F as T,s as L,m as g,B as w,g as h,w as K,v as $,d as H,k as J,r as d,A as O,C as U,y as Y,o as l}from"./index-BCax2GDh.js";import{T as q}from"./target-BFC5gbdb.js";import{A as Q}from"./arrow-left-diPpM4Dj.js";/** +import{c as P,_ as R,p as G,y as S,a as o,l as k,q as V,u as a,b as s,t,i as n,F as T,x as L,m as g,C as w,g as h,w as K,v as $,d as q,k as H,r as d,B as J,D as O,z as U,o as l}from"./index-Cr5KFgzf.js";import{T as Y}from"./target-CUBX0ybh.js";import{A as Q}from"./arrow-left-D6PVN9vk.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const W=P("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),X={key:0,class:"card"},Z={style:{"margin-top":"0"}},ee=["onClick"],se={class:"row",style:{"align-items":"center"}},te={key:0,class:"badge line"},ae={key:1,class:"badge facebook"},oe={class:"muted",style:{"margin-top":"6px"}},le=["disabled"],ne={key:1},ie={class:"card guide"},re={style:{margin:"6px 0 0","line-height":"1.7"}},ce={class:"row",style:{"align-items":"center","margin-bottom":"12px"}},ue={style:{margin:"0"}},de={key:0,class:"muted"},ve={key:0,class:"bubble msg-customer muted"},me={key:0,class:"composer"},pe=["disabled","placeholder"],he=["disabled"],_e={key:1,class:"card debrief"},ge={key:0},ye={key:0,class:"reveal-grid"},fe={class:"rk"},be={class:"rv"},ke={class:"primary",style:{"margin-top":"12px"}},we={__name:"Chat",setup(xe){const B=J(),y=B.params.gid,x=B.params.pid,c=d(null),u=d("pick"),v=d([]),_=d(""),f=d(!1),i=d(null),N=d(null),b=d("social"),V=O(()=>{const e=n.locale==="en";return[{id:"social",emoji:"💬",init:"customer",label:e?"Social Media (chat)":"Social Media (แชท)",desc:e?"The customer messages you first — short, chat-style replies":"ลูกค้าทักมาหาคุณก่อน — โทนสั้น ทักๆ ตามสไตล์แชท"},{id:"f2f_call",emoji:"📞",init:"seller",label:e?"Face-to-face / Phone":"พบหน้า / โทรศัพท์",desc:e?"You must proactively open the conversation (seller starts)":"คุณต้องเป็นฝ่ายเปิดการสนทนาเชิงรุกกับลีด (ผู้ฝึกทักก่อน)"},{id:"recontact",emoji:"⏳",init:"customer",label:e?"Re-contact (1-3 months)":"ลูกค้ากลับมาติดต่อ (1-3 เดือน)",desc:e?"Customer contacted you before, now returns more ready to decide":"เคยได้รับข้อมูลไปแล้ว ตอนนี้กลับมาติดต่อ พร้อมตัดสินใจมากขึ้น"}]});function A(){U(()=>{C.value&&(C.value.scrollTop=C.value.scrollHeight)})}const C=d(null);async function F(){u.value="chat";const e=await S.chatStart(y,x,b.value,n.locale);N.value=e.session.id,v.value=e.session.messages||[],v.value.length&&A()}G(async()=>{c.value=(await S.getPersona(y,x)).persona;try{const e=await S.chatResume(y,x);N.value=e.session.id,v.value=e.session.messages||[],v.value.length&&!e.session.debrief?(u.value="chat",V.find(j=>j.id===e.scenario)&&(b.value=e.scenario)):e.session.debrief&&(i.value=e.session.debrief,v.value=e.session.messages||[],u.value="done"),v.value.length&&A()}catch{u.value="pick"}});async function z(){if(_.value.trim()){f.value=!0;try{const e=await S.chatSend(y,x,_.value.trim());v.value=e.messages,_.value="",e.finished&&(i.value=e.debrief||null,u.value="done"),A()}catch(e){alert(e.message)}finally{f.value=!1}}}const I={name:"ชื่อ",tier:"ระดับ",difficulty:"ความยาก",profession:"อาชีพ",age_group:"ช่วงอายุ",location:"พื้นที่",income:"รายได้",budget:"งบประมาณ",lifestyle:"ไลฟ์สไตล์",background:"ภูมิหลัง",personality:"บุคลิก",communication_style:"สไตล์การสื่อสาร",goal:"เป้าหมาย",decision_timeline:"กรอบตัดสินใจ",pains:"ปัญหา (Pain)",objections:"ข้อโต้แย้ง",negotiation_levers:"สิ่งที่ใช้ต่อรอง",opener:"บทเปิดบทสนทนา",channel:"ช่องทาง",initiation_mode:"ใครเริ่มก่อน",product_context:"บริบทสินค้า"};function M(e){return I[e]||e}function E(e){return Array.isArray(e)?e.join(", "):e&&typeof e=="object"?JSON.stringify(e):String(e??"—")}return(e,m)=>{const j=Y("router-link");return l(),o("div",null,[k(j,{to:`/groups/${a(y)}/personas`,class:"btn-back"},{default:D(()=>[k(a(Q),{size:16,"stroke-width":2}),g(" "+t(a(n).t("personas")),1)]),_:1},8,["to"]),u.value==="pick"?(l(),o("div",X,[s("h3",Z,"🎬 "+t(a(n).t("chooseScenario")),1),m[1]||(m[1]=s("p",{class:"muted",style:{"margin-top":"0"}},"เลือกสถานการณ์ที่อยากฝึกการขาย — แต่ละแบบกำหนดว่าใครทักก่อน และโทนการสนทนา",-1)),(l(!0),o(T,null,L(V.value,r=>(l(),o("div",{key:r.id,class:w(["scenario",{sel:b.value===r.id}]),onClick:p=>b.value=r.id},[s("div",se,[s("strong",null,t(r.emoji)+" "+t(r.label),1),r.init==="customer"?(l(),o("span",te,"ลูกค้าทักก่อน")):(l(),o("span",ae,"คุณต้องทักก่อน (เชิงรุก)"))]),s("div",oe,t(r.desc),1)],10,ee))),128)),s("button",{class:"primary",style:{"margin-top":"16px",width:"100%"},disabled:!b.value,onClick:F}," ▶ "+t(a(n).t("start")),9,le)])):(l(),o("div",ne,[s("div",ie,[s("strong",null,[k(a(q),{size:17,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),g(" "+t(a(n).t("chatGuideTitle")),1)]),s("p",re,t(a(n).t("chatGuideText")),1)]),s("div",ce,[s("h2",ue,t(c.value?c.value.name:"..."),1),s("span",{class:w(["badge",c.value&&c.value.channel])},t(c.value?c.value.channel:""),3),c.value?(l(),o("span",de,t(c.value.profession)+" · "+t(c.value.age_group),1)):h("",!0),u.value==="done"?(l(),o("span",{key:1,class:w(["badge",i.value&&i.value.outcome])},t(i.value&&i.value.outcome==="won"?a(n).t("won"):a(n).t("lost")),3)):h("",!0)]),s("div",{class:"thread",ref_key:"thread",ref:C},[(l(!0),o(T,null,L(v.value,(r,p)=>(l(),o("div",{key:p,class:w(["bubble",r.role==="seller"?"msg-seller":r.role==="system"?"msg-system":"msg-customer"])},t(r.text),3))),128)),f.value?(l(),o("div",ve,"...")):h("",!0)],512),u.value==="chat"?(l(),o("div",me,[K(s("input",{"onUpdate:modelValue":m[0]||(m[0]=r=>_.value=r),onKeyup:H(z,["enter"]),disabled:f.value,placeholder:a(n).t("send")},null,40,pe),[[$,_.value]]),s("button",{class:"primary",onClick:z,disabled:f.value||!_.value.trim()},t(a(n).t("send")),9,he)])):h("",!0),u.value==="done"&&i.value?(l(),o("div",_e,[s("h3",null,t(a(n).t("debrief")),1),s("p",null,[s("span",{class:w(["badge",i.value.outcome])},t(i.value.outcome==="won"?a(n).t("won"):a(n).t("lost")),3),g(" — "+t(a(n).t("score"))+": ",1),s("strong",null,t(i.value.score),1)]),s("p",null,[s("strong",null,t(a(n).t("pain"))+":",1),g(" "+t(i.value.pain||"—"),1)]),s("p",null,[s("strong",null,t(a(n).t("why"))+":",1),g(" "+t(i.value.why),1)]),i.value.coaching&&i.value.coaching.length?(l(),o("div",ge,[m[2]||(m[2]=s("strong",null,"Coaching:",-1)),s("ul",null,[(l(!0),o(T,null,L(i.value.coaching,(r,p)=>(l(),o("li",{key:p},t(r),1))),128))])])):h("",!0),s("details",null,[s("summary",null,[k(a(W),{size:15,"stroke-width":1.8,style:{"vertical-align":"-2px"}}),g(" "+t(a(n).t("reveal")),1)]),i.value.revealed_persona?(l(),o("div",ye,[(l(!0),o(T,null,L(i.value.revealed_persona,(r,p)=>(l(),o("div",{key:p,class:"rev"},[s("span",fe,t(M(p)),1),s("span",be,t(E(r)),1)]))),128))])):h("",!0)]),k(j,{to:"/"},{default:D(()=>[s("button",ke,t(a(n).t("dashboard")),1)]),_:1})])):h("",!0)]))])}}},Te=R(we,[["__scopeId","data-v-19840301"]]);export{Te as default}; + */const W=P("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),X={key:0,class:"card"},Z={style:{"margin-top":"0"}},ee=["onClick"],se={class:"row",style:{"align-items":"center"}},te={key:0,class:"badge line"},ae={key:1,class:"badge facebook"},oe={class:"muted",style:{"margin-top":"6px"}},le=["disabled"],ne={key:1},ie={class:"card guide"},re={style:{margin:"6px 0 0","line-height":"1.7"}},ce={class:"row",style:{"align-items":"center","margin-bottom":"12px"}},ue={style:{margin:"0"}},de={key:0,class:"muted"},ve={key:0,class:"bubble msg-customer muted"},me={key:0,class:"composer"},pe=["disabled","placeholder"],he=["disabled"],_e={key:1,class:"card debrief"},ge={key:0},ye={key:0,class:"reveal-grid"},fe={class:"rk"},be={class:"rv"},ke={class:"primary",style:{"margin-top":"12px"}},we={__name:"Chat",setup(xe){const A=H(),y=A.params.gid,x=A.params.pid,c=d(null),u=d("pick"),v=d([]),_=d(""),f=d(!1),i=d(null),B=d(null),b=d("social"),D=J(()=>{const e=n.locale==="en";return[{id:"social",emoji:"💬",init:"customer",label:e?"Social Media (chat)":"Social Media (แชท)",desc:e?"The customer messages you first — short, chat-style replies":"ลูกค้าทักมาหาคุณก่อน — โทนสั้น ทักๆ ตามสไตล์แชท"},{id:"f2f_call",emoji:"📞",init:"seller",label:e?"Face-to-face / Phone":"พบหน้า / โทรศัพท์",desc:e?"You must proactively open the conversation (seller starts)":"คุณต้องเป็นฝ่ายเปิดการสนทนาเชิงรุกกับลีด (ผู้ฝึกทักก่อน)"},{id:"recontact",emoji:"⏳",init:"customer",label:e?"Re-contact (1-3 months)":"ลูกค้ากลับมาติดต่อ (1-3 เดือน)",desc:e?"Customer contacted you before, now returns more ready to decide":"เคยได้รับข้อมูลไปแล้ว ตอนนี้กลับมาติดต่อ พร้อมตัดสินใจมากขึ้น"}]});function z(){O(()=>{C.value&&(C.value.scrollTop=C.value.scrollHeight)})}const C=d(null);async function F(){u.value="chat";const e=await S.chatStart(y,x,b.value,n.locale);B.value=e.session.id,v.value=e.session.messages||[],v.value.length&&z()}G(async()=>{c.value=(await S.getPersona(y,x)).persona;try{const e=await S.chatResume(y,x);B.value=e.session.id,v.value=e.session.messages||[],v.value.length&&!e.session.debrief?(u.value="chat",D.find(j=>j.id===e.scenario)&&(b.value=e.scenario)):e.session.debrief&&(i.value=e.session.debrief,v.value=e.session.messages||[],u.value="done"),v.value.length&&z()}catch{u.value="pick"}});async function N(){if(_.value.trim()){f.value=!0;try{const e=await S.chatSend(y,x,_.value.trim());v.value=e.messages,_.value="",e.finished&&(i.value=e.debrief||null,u.value="done"),z()}catch(e){alert(e.message)}finally{f.value=!1}}}const I={name:"ชื่อ",tier:"ระดับ",difficulty:"ความยาก",profession:"อาชีพ",age_group:"ช่วงอายุ",location:"พื้นที่",income:"รายได้",budget:"งบประมาณ",lifestyle:"ไลฟ์สไตล์",background:"ภูมิหลัง",personality:"บุคลิก",communication_style:"สไตล์การสื่อสาร",goal:"เป้าหมาย",decision_timeline:"กรอบตัดสินใจ",pains:"ปัญหา (Pain)",objections:"ข้อโต้แย้ง",negotiation_levers:"สิ่งที่ใช้ต่อรอง",opener:"บทเปิดบทสนทนา",channel:"ช่องทาง",initiation_mode:"ใครเริ่มก่อน",product_context:"บริบทสินค้า"};function M(e){return I[e]||e}function E(e){return Array.isArray(e)?e.join(", "):e&&typeof e=="object"?JSON.stringify(e):String(e??"—")}return(e,m)=>{const j=U("router-link");return l(),o("div",null,[k(j,{to:`/groups/${a(y)}/personas`,class:"btn-back"},{default:V(()=>[k(a(Q),{size:16,"stroke-width":2}),g(" "+t(a(n).t("personas")),1)]),_:1},8,["to"]),u.value==="pick"?(l(),o("div",X,[s("h3",Z,"🎬 "+t(a(n).t("chooseScenario")),1),m[1]||(m[1]=s("p",{class:"muted",style:{"margin-top":"0"}},"เลือกสถานการณ์ที่อยากฝึกการขาย — แต่ละแบบกำหนดว่าใครทักก่อน และโทนการสนทนา",-1)),(l(!0),o(T,null,L(D.value,r=>(l(),o("div",{key:r.id,class:w(["scenario",{sel:b.value===r.id}]),onClick:p=>b.value=r.id},[s("div",se,[s("strong",null,t(r.emoji)+" "+t(r.label),1),r.init==="customer"?(l(),o("span",te,"ลูกค้าทักก่อน")):(l(),o("span",ae,"คุณต้องทักก่อน (เชิงรุก)"))]),s("div",oe,t(r.desc),1)],10,ee))),128)),s("button",{class:"primary",style:{"margin-top":"16px",width:"100%"},disabled:!b.value,onClick:F}," ▶ "+t(a(n).t("start")),9,le)])):(l(),o("div",ne,[s("div",ie,[s("strong",null,[k(a(Y),{size:17,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),g(" "+t(a(n).t("chatGuideTitle")),1)]),s("p",re,t(a(n).t("chatGuideText")),1)]),s("div",ce,[s("h2",ue,t(c.value?c.value.name:"..."),1),s("span",{class:w(["badge",c.value&&c.value.channel])},t(c.value?c.value.channel:""),3),c.value?(l(),o("span",de,t(c.value.profession)+" · "+t(c.value.age_group),1)):h("",!0),u.value==="done"?(l(),o("span",{key:1,class:w(["badge",i.value&&i.value.outcome])},t(i.value&&i.value.outcome==="won"?a(n).t("won"):a(n).t("lost")),3)):h("",!0)]),s("div",{class:"thread",ref_key:"thread",ref:C},[(l(!0),o(T,null,L(v.value,(r,p)=>(l(),o("div",{key:p,class:w(["bubble",r.role==="seller"?"msg-seller":r.role==="system"?"msg-system":"msg-customer"])},t(r.text),3))),128)),f.value?(l(),o("div",ve,"...")):h("",!0)],512),u.value==="chat"?(l(),o("div",me,[K(s("input",{"onUpdate:modelValue":m[0]||(m[0]=r=>_.value=r),onKeyup:q(N,["enter"]),disabled:f.value,placeholder:a(n).t("send")},null,40,pe),[[$,_.value]]),s("button",{class:"primary",onClick:N,disabled:f.value||!_.value.trim()},t(a(n).t("send")),9,he)])):h("",!0),u.value==="done"&&i.value?(l(),o("div",_e,[s("h3",null,t(a(n).t("debrief")),1),s("p",null,[s("span",{class:w(["badge",i.value.outcome])},t(i.value.outcome==="won"?a(n).t("won"):a(n).t("lost")),3),g(" — "+t(a(n).t("score"))+": ",1),s("strong",null,t(i.value.score),1)]),s("p",null,[s("strong",null,t(a(n).t("pain"))+":",1),g(" "+t(i.value.pain||"—"),1)]),s("p",null,[s("strong",null,t(a(n).t("why"))+":",1),g(" "+t(i.value.why),1)]),i.value.coaching&&i.value.coaching.length?(l(),o("div",ge,[m[2]||(m[2]=s("strong",null,"Coaching:",-1)),s("ul",null,[(l(!0),o(T,null,L(i.value.coaching,(r,p)=>(l(),o("li",{key:p},t(r),1))),128))])])):h("",!0),s("details",null,[s("summary",null,[k(a(W),{size:15,"stroke-width":1.8,style:{"vertical-align":"-2px"}}),g(" "+t(a(n).t("reveal")),1)]),i.value.revealed_persona?(l(),o("div",ye,[(l(!0),o(T,null,L(i.value.revealed_persona,(r,p)=>(l(),o("div",{key:p,class:"rev"},[s("span",fe,t(M(p)),1),s("span",be,t(E(r)),1)]))),128))])):h("",!0)]),k(j,{to:"/"},{default:V(()=>[s("button",ke,t(a(n).t("dashboard")),1)]),_:1})])):h("",!0)]))])}}},Te=R(we,[["__scopeId","data-v-19840301"]]);export{Te as default}; diff --git a/frontend/dist/assets/GroupBuilder-DpQWbscg.js b/frontend/dist/assets/GroupBuilder-j2iPAhDG.js similarity index 84% rename from frontend/dist/assets/GroupBuilder-DpQWbscg.js rename to frontend/dist/assets/GroupBuilder-j2iPAhDG.js index b7d6714..80c1d7f 100644 --- a/frontend/dist/assets/GroupBuilder-DpQWbscg.js +++ b/frontend/dist/assets/GroupBuilder-j2iPAhDG.js @@ -1,21 +1,21 @@ -import{c as g,_ as M,a as f,l as d,p as V,b as e,u as l,m as r,t as s,i as o,w as u,v as y,E as k,g as C,y as z,r as v,x as B,j as A,o as x}from"./index-BCax2GDh.js";import{A as P}from"./arrow-left-diPpM4Dj.js";/** +import{c as g,_ as M,a as f,l as d,q as V,b as e,u as l,m as r,t as s,i as o,w as u,v as y,G as k,g as C,z,r as v,y as B,j as q,o as x}from"./index-Cr5KFgzf.js";import{A}from"./arrow-left-D6PVN9vk.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const S=g("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + */const P=g("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const U=g("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + */const S=g("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const q=g("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);/** + */const U=g("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E=g("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),N={class:"card guide"},D={class:"card"},G={style:{"margin-top":"0"}},L={class:"row"},j={style:{flex:"1"}},F={value:"facebook"},I={value:"line"},O={style:{flex:"1"}},T={value:"th"},R={value:"en"},Z={key:0,class:"error"},$=["disabled"],H={__name:"GroupBuilder",setup(J){const _=A(),a=v({product:"",segment:"",description:"",channel:"facebook",language:"th"}),h=v([]),p=v(""),c=v(!1);function b(n){h.value=Array.from(n.target.files||[])}async function w(){c.value=!0,p.value="";try{const n=new FormData;n.append("product",a.value.product),n.append("segment",a.value.segment),n.append("description",a.value.description),n.append("channel",a.value.channel),n.append("language",a.value.language),h.value.forEach(i=>n.append("files",i));const m=(await B.createGroup(n)).group.id;_.push(`/admin/groups/${m}/edit`)}catch(n){p.value=n.message}finally{c.value=!1}}return(n,t)=>{const m=z("router-link");return x(),f("div",null,[d(m,{to:"/training",class:"btn-back"},{default:V(()=>[d(l(P),{size:16,"stroke-width":2}),r(" "+s(l(o).t("training")),1)]),_:1}),e("div",N,[e("strong",null,[d(l(q),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[5]||(t[5]=r(" วิธีสร้างกลุ่มบุคคลต้นแบบ",-1))]),t[6]||(t[6]=e("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[e("li",null,[r("กรอก "),e("strong",null,"ชื่อ/รายละเอียดสินค้าหรือบริการ"),r(" ที่อยากให้ทีมฝึกขาย (ช่องด้านล่าง)")]),e("li",null,"(ไม่บังคับ) ระบุกลุ่มลูกค้าเป้าหมาย หรืออัปโหลดไฟล์เอกสารสินค้า .pdf/.md/.txt"),e("li",null,[r("กด "),e("strong",null,"สร้าง"),r(" — ระบบจะพาไปหน้าสร้างบุคคลต้นแบบ (ลูกค้าจำลอง)")])],-1))]),e("div",D,[e("h2",G,[d(l(S),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),r(" "+s(l(o).t("addProduct")),1)]),e("label",null,[r(s(l(o).t("product"))+" ",1),t[7]||(t[7]=e("span",{class:"req"},"*",-1))]),u(e("textarea",{"onUpdate:modelValue":t[0]||(t[0]=i=>a.value.product=i),rows:"3",placeholder:"เช่น ระบบ POS สำหรับร้านอาหาร Cloud POS for small restaurants"},null,512),[[y,a.value.product]]),e("label",null,s(l(o).t("segment")),1),u(e("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.value.segment=i),placeholder:"เช่น SMEs ร้านอาหารในกรุงเทพ"},null,512),[[y,a.value.segment]]),e("label",null,s(l(o).t("description")),1),u(e("textarea",{"onUpdate:modelValue":t[2]||(t[2]=i=>a.value.description=i),rows:"3",placeholder:"รายละเอียดเพิ่มเติม เช่น จุดเด่นสินค้า ราคา ฯลฯ (ไม่บังคับ)"},null,512),[[y,a.value.description]]),e("div",L,[e("div",j,[e("label",null,s(l(o).t("channel")),1),u(e("select",{"onUpdate:modelValue":t[3]||(t[3]=i=>a.value.channel=i)},[e("option",F,s(l(o).t("facebook")),1),e("option",I,s(l(o).t("line")),1)],512),[[k,a.value.channel]])]),e("div",O,[e("label",null,s(l(o).t("language")),1),u(e("select",{"onUpdate:modelValue":t[4]||(t[4]=i=>a.value.language=i)},[e("option",T,s(l(o).t("thai")),1),e("option",R,s(l(o).t("english")),1)],512),[[k,a.value.language]])])]),e("label",null,[d(l(E),{size:15,"stroke-width":1.8,style:{"vertical-align":"-2px"}}),t[8]||(t[8]=r(" ไฟล์เอกสารสินค้า (.pdf/.md/.txt) — ใช้เป็นข้อมูลให้ระบบได้",-1))]),e("input",{type:"file",multiple:"",accept:".pdf,.md,.txt",onChange:b},null,32),p.value?(x(),f("div",Z,s(p.value),1)):C("",!0),e("button",{class:"primary",style:{"margin-top":"16px",display:"inline-flex","align-items":"center",gap:"6px"},disabled:c.value||!a.value.product&&!h.value.length,onClick:w},[d(l(U),{size:18,"stroke-width":2}),r(" "+s(c.value?"กำลังสร้าง…":l(o).t("create")),1)],8,$)])])}}},W=M(H,[["__scopeId","data-v-d513596d"]]);export{W as default}; + */const G=g("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),N={class:"card guide"},D={class:"card"},E={style:{"margin-top":"0"}},L={class:"row"},j={style:{flex:"1"}},F={value:"facebook"},I={value:"line"},O={style:{flex:"1"}},T={value:"th"},R={value:"en"},Z={key:0,class:"error"},$=["disabled"],H={__name:"GroupBuilder",setup(J){const _=q(),a=v({product:"",segment:"",description:"",channel:"facebook",language:"th"}),h=v([]),p=v(""),c=v(!1);function b(n){h.value=Array.from(n.target.files||[])}async function w(){c.value=!0,p.value="";try{const n=new FormData;n.append("product",a.value.product),n.append("segment",a.value.segment),n.append("description",a.value.description),n.append("channel",a.value.channel),n.append("language",a.value.language),h.value.forEach(i=>n.append("files",i));const m=(await B.createGroup(n)).group.id;_.push(`/admin/groups/${m}/edit`)}catch(n){p.value=n.message}finally{c.value=!1}}return(n,t)=>{const m=z("router-link");return x(),f("div",null,[d(m,{to:"/training",class:"btn-back"},{default:V(()=>[d(l(A),{size:16,"stroke-width":2}),r(" "+s(l(o).t("training")),1)]),_:1}),e("div",N,[e("strong",null,[d(l(U),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[5]||(t[5]=r(" วิธีสร้างกลุ่มบุคคลต้นแบบ",-1))]),t[6]||(t[6]=e("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[e("li",null,[r("กรอก "),e("strong",null,"ชื่อ/รายละเอียดสินค้าหรือบริการ"),r(" ที่อยากให้ทีมฝึกขาย (ช่องด้านล่าง)")]),e("li",null,"(ไม่บังคับ) ระบุกลุ่มลูกค้าเป้าหมาย หรืออัปโหลดไฟล์เอกสารสินค้า .pdf/.md/.txt"),e("li",null,[r("กด "),e("strong",null,"สร้าง"),r(" — ระบบจะพาไปหน้าสร้างบุคคลต้นแบบ (ลูกค้าจำลอง)")])],-1))]),e("div",D,[e("h2",E,[d(l(P),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),r(" "+s(l(o).t("addProduct")),1)]),e("label",null,[r(s(l(o).t("product"))+" ",1),t[7]||(t[7]=e("span",{class:"req"},"*",-1))]),u(e("textarea",{"onUpdate:modelValue":t[0]||(t[0]=i=>a.value.product=i),rows:"3",placeholder:"เช่น ระบบ POS สำหรับร้านอาหาร Cloud POS for small restaurants"},null,512),[[y,a.value.product]]),e("label",null,s(l(o).t("segment")),1),u(e("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.value.segment=i),placeholder:"เช่น SMEs ร้านอาหารในกรุงเทพ"},null,512),[[y,a.value.segment]]),e("label",null,s(l(o).t("description")),1),u(e("textarea",{"onUpdate:modelValue":t[2]||(t[2]=i=>a.value.description=i),rows:"3",placeholder:"รายละเอียดเพิ่มเติม เช่น จุดเด่นสินค้า ราคา ฯลฯ (ไม่บังคับ)"},null,512),[[y,a.value.description]]),e("div",L,[e("div",j,[e("label",null,s(l(o).t("channel")),1),u(e("select",{"onUpdate:modelValue":t[3]||(t[3]=i=>a.value.channel=i)},[e("option",F,s(l(o).t("facebook")),1),e("option",I,s(l(o).t("line")),1)],512),[[k,a.value.channel]])]),e("div",O,[e("label",null,s(l(o).t("language")),1),u(e("select",{"onUpdate:modelValue":t[4]||(t[4]=i=>a.value.language=i)},[e("option",T,s(l(o).t("thai")),1),e("option",R,s(l(o).t("english")),1)],512),[[k,a.value.language]])])]),e("label",null,[d(l(G),{size:15,"stroke-width":1.8,style:{"vertical-align":"-2px"}}),t[8]||(t[8]=r(" ไฟล์เอกสารสินค้า (.pdf/.md/.txt) — ใช้เป็นข้อมูลให้ระบบได้",-1))]),e("input",{type:"file",multiple:"",accept:".pdf,.md,.txt",onChange:b},null,32),p.value?(x(),f("div",Z,s(p.value),1)):C("",!0),e("button",{class:"primary",style:{"margin-top":"16px",display:"inline-flex","align-items":"center",gap:"6px"},disabled:c.value||!a.value.product&&!h.value.length,onClick:w},[d(l(S),{size:18,"stroke-width":2}),r(" "+s(c.value?"กำลังสร้าง…":l(o).t("create")),1)],8,$)])])}}},W=M(H,[["__scopeId","data-v-d513596d"]]);export{W as default}; diff --git a/frontend/dist/assets/GroupEdit-PGVs7eZc.js b/frontend/dist/assets/GroupEdit-CJ3zMSjJ.js similarity index 86% rename from frontend/dist/assets/GroupEdit-PGVs7eZc.js rename to frontend/dist/assets/GroupEdit-CJ3zMSjJ.js index e1154a6..e64122f 100644 --- a/frontend/dist/assets/GroupEdit-PGVs7eZc.js +++ b/frontend/dist/assets/GroupEdit-CJ3zMSjJ.js @@ -1,9 +1,9 @@ -import{c as M,_ as G,G as O,o as r,a as m,b as e,t as a,w as o,v as i,E as N,u as k,h as _,g as A,H as D,r as p,n as J,l as S,p as q,m as y,i as B,f as H,F as P,s as E,I as R,k as K,x as z,y as Q,B as F}from"./index-BCax2GDh.js";import{U as W}from"./users-NPxa3eQ_.js";import{S as X}from"./sparkles-E3Xd6eY7.js";/** +import{c as M,_ as G,H as O,o as r,a as m,b as e,t as a,w as o,v as i,G as N,u as k,h as E,g as A,I as J,r as p,p as q,l as z,q as D,m as y,i as B,f as H,F as P,x as T,J as R,k as K,y as S,z as Q,C as F}from"./index-Cr5KFgzf.js";import{U as W}from"./users-CknR8rxo.js";import{S as X}from"./sparkles-CWO9Md85.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Y=M("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Z={class:"persona-form"},h={class:"muted"},ll={class:"sec"},el={class:"row"},tl={class:"f"},nl={class:"f"},sl={class:"f"},ol={class:"row"},il={class:"f"},al={class:"f"},ul={class:"f"},rl={class:"sec"},dl={class:"row"},ml={class:"f"},vl={class:"f"},fl={class:"f"},gl={key:0,class:"sec"},yl={key:1,class:"sec locked"},bl={class:"sec"},kl={class:"row"},pl={class:"f"},xl={class:"f"},Vl={key:0,class:"muted"},wl={class:"row actions"},Ul=["disabled"],$l={__name:"PersonaForm",props:{persona:{type:Object,required:!0}},emits:["save","cancel"],setup(w,{emit:T}){const x=w,U=T,n=D({name:"",difficulty:1,tier:"B",profession:"",age_group:"",location:"",income:"",budget:"",lifestyle:"",background:"",personality:"",communication_style:"",goal:"",decision_timeline:"",opener:"",channel:"line",initiation_mode:"customer",special:""}),v=p(""),b=p(""),f=p(""),V=p(!1);function $(t){return Array.isArray(t)?t.join(` + */const Y=M("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Z={class:"persona-form"},h={class:"muted"},ll={class:"sec"},el={class:"row"},tl={class:"f"},nl={class:"f"},sl={class:"f"},ol={class:"row"},il={class:"f"},al={class:"f"},ul={class:"f"},rl={class:"sec"},dl={class:"row"},ml={class:"f"},vl={class:"f"},fl={class:"f"},gl={key:0,class:"sec"},yl={key:1,class:"sec locked"},bl={class:"sec"},kl={class:"row"},pl={class:"f"},xl={class:"f"},Vl={key:0,class:"muted"},wl={class:"row actions"},Ul=["disabled"],$l={__name:"PersonaForm",props:{persona:{type:Object,required:!0}},emits:["save","cancel"],setup(w,{emit:_}){const x=w,U=_,n=J({name:"",difficulty:1,tier:"B",profession:"",age_group:"",location:"",income:"",budget:"",lifestyle:"",background:"",personality:"",communication_style:"",goal:"",decision_timeline:"",opener:"",channel:"line",initiation_mode:"customer",special:""}),v=p(""),b=p(""),f=p(""),V=p(!1);function $(t){return Array.isArray(t)?t.join(` `):String(t||"")}function C(t){return t.split(` -`).map(l=>l.trim()).filter(Boolean)}O(()=>x.persona,t=>{Object.assign(n,{name:(t==null?void 0:t.name)||"",difficulty:(t==null?void 0:t.difficulty)??1,tier:(t==null?void 0:t.tier)||"B",profession:(t==null?void 0:t.profession)||"",age_group:(t==null?void 0:t.age_group)||"",location:(t==null?void 0:t.location)||"",income:(t==null?void 0:t.income)||"",budget:(t==null?void 0:t.budget)||"",lifestyle:(t==null?void 0:t.lifestyle)||"",background:(t==null?void 0:t.background)||"",personality:(t==null?void 0:t.personality)||"",communication_style:(t==null?void 0:t.communication_style)||"",goal:(t==null?void 0:t.goal)||"",decision_timeline:(t==null?void 0:t.decision_timeline)||"",opener:(t==null?void 0:t.opener)||"",channel:(t==null?void 0:t.channel)||"line",initiation_mode:(t==null?void 0:t.initiation_mode)||"customer",special:(t==null?void 0:t.special)||""}),v.value=$(t==null?void 0:t.pains),b.value=$(t==null?void 0:t.objections),f.value=$(t==null?void 0:t.negotiation_levers)},{immediate:!0});function j(){U("save",{...n,pains:C(v.value),objections:C(b.value),negotiation_levers:C(f.value)})}return(t,l)=>(r(),m("div",Z,[e("h3",null,a(w.persona.name||"New persona"),1),e("p",h,a(w.persona.profession)+" · "+a(w.persona.personality),1),e("div",ll,[l[30]||(l[30]=e("h4",null,"👤 ข้อมูลพื้นฐาน",-1)),e("div",el,[e("div",tl,[l[23]||(l[23]=e("label",null,"ชื่อ",-1)),o(e("input",{"onUpdate:modelValue":l[0]||(l[0]=s=>n.name=s)},null,512),[[i,n.name]])]),e("div",nl,[l[24]||(l[24]=e("label",null,"ระดับความยาก (1-5)",-1)),o(e("input",{"onUpdate:modelValue":l[1]||(l[1]=s=>n.difficulty=s),type:"number",min:"1",max:"5"},null,512),[[i,n.difficulty,void 0,{number:!0}]])]),e("div",sl,[l[26]||(l[26]=e("label",null,"ระดับลูกค้า",-1)),o(e("select",{"onUpdate:modelValue":l[2]||(l[2]=s=>n.tier=s)},[...l[25]||(l[25]=[e("option",{value:"A"},"A — พร้อมตัดสินใจซื้อ",-1),e("option",{value:"B"},"B — ยังไม่แน่ใจ",-1),e("option",{value:"C"},"C — ไม่สนใจแต่มีปัญหา",-1)])],512),[[N,n.tier]])])]),e("div",ol,[e("div",il,[l[27]||(l[27]=e("label",null,"อาชีพ",-1)),o(e("input",{"onUpdate:modelValue":l[3]||(l[3]=s=>n.profession=s)},null,512),[[i,n.profession]])]),e("div",al,[l[28]||(l[28]=e("label",null,"ช่วงอายุ",-1)),o(e("input",{"onUpdate:modelValue":l[4]||(l[4]=s=>n.age_group=s)},null,512),[[i,n.age_group]])]),e("div",ul,[l[29]||(l[29]=e("label",null,"พื้นที่",-1)),o(e("input",{"onUpdate:modelValue":l[5]||(l[5]=s=>n.location=s)},null,512),[[i,n.location]])])])]),e("div",rl,[l[34]||(l[34]=e("h4",null,"💼 ข้อมูลลูกค้า",-1)),e("div",dl,[e("div",ml,[l[31]||(l[31]=e("label",null,"รายได้/สถานะการเงิน",-1)),o(e("input",{"onUpdate:modelValue":l[6]||(l[6]=s=>n.income=s)},null,512),[[i,n.income]])]),e("div",vl,[l[32]||(l[32]=e("label",null,"งบประมาณ",-1)),o(e("input",{"onUpdate:modelValue":l[7]||(l[7]=s=>n.budget=s)},null,512),[[i,n.budget]])]),e("div",fl,[l[33]||(l[33]=e("label",null,"ไลฟ์สไตล์",-1)),o(e("input",{"onUpdate:modelValue":l[8]||(l[8]=s=>n.lifestyle=s)},null,512),[[i,n.lifestyle]])])]),l[35]||(l[35]=e("label",null,"ภูมิหลัง",-1)),o(e("textarea",{"onUpdate:modelValue":l[9]||(l[9]=s=>n.background=s)},null,512),[[i,n.background]]),l[36]||(l[36]=e("label",null,"บุคลิก / วิธีพูดคุย",-1)),o(e("textarea",{"onUpdate:modelValue":l[10]||(l[10]=s=>n.personality=s)},null,512),[[i,n.personality]]),l[37]||(l[37]=e("label",null,"สไตล์การสื่อสาร",-1)),o(e("textarea",{"onUpdate:modelValue":l[11]||(l[11]=s=>n.communication_style=s)},null,512),[[i,n.communication_style]])]),k(_).isSuperAdmin?(r(),m("div",gl,[l[38]||(l[38]=e("h4",null,"🎯 การขาย",-1)),l[39]||(l[39]=e("label",null,"เป้าหมาย",-1)),o(e("textarea",{"onUpdate:modelValue":l[12]||(l[12]=s=>n.goal=s)},null,512),[[i,n.goal]]),l[40]||(l[40]=e("label",null,"กรอบเวลาในการตัดสินใจ",-1)),o(e("input",{"onUpdate:modelValue":l[13]||(l[13]=s=>n.decision_timeline=s)},null,512),[[i,n.decision_timeline]]),l[41]||(l[41]=e("label",null,"Pain (ปัญหา) แบบ 1 ต่อบรรทัด",-1)),o(e("textarea",{"onUpdate:modelValue":l[14]||(l[14]=s=>v.value=s),placeholder:`เช่น ต้นทุนสูงเกินไป -ระบบล้าสมัย`},null,512),[[i,v.value]]),l[42]||(l[42]=e("label",null,"ข้อโต้แย้ง (Objections) 1 ต่อบรรทัด",-1)),o(e("textarea",{"onUpdate:modelValue":l[15]||(l[15]=s=>b.value=s)},null,512),[[i,b.value]]),l[43]||(l[43]=e("label",null,"สิ่งที่ใช้ต่อรอง (เช่น ส่วนลด, ฟรีติดตั้ง)",-1)),o(e("textarea",{"onUpdate:modelValue":l[16]||(l[16]=s=>f.value=s)},null,512),[[i,f.value]]),l[44]||(l[44]=e("label",null,"ช่องทางสำหรับลูกค้าเปิดบทสนทนา (opener)",-1)),o(e("textarea",{"onUpdate:modelValue":l[17]||(l[17]=s=>n.opener=s)},null,512),[[i,n.opener]])])):(r(),m("div",yl,[l[45]||(l[45]=e("h4",null,"🔒 ส่วนสูตรการขาย",-1)),l[46]||(l[46]=e("p",{class:"muted"},"ปิดการแก้ไข — เฉพาะผู้ดูแลระดับสูงเท่านั้นที่ดู/แก้ได้ (เพื่อรักษาความได้เปรียบ)",-1)),l[47]||(l[47]=e("label",null,"เป้าหมาย",-1)),o(e("textarea",{"onUpdate:modelValue":l[18]||(l[18]=s=>n.goal=s)},null,512),[[i,n.goal]]),l[48]||(l[48]=e("label",null,"กรอบเวลาในการตัดสินใจ",-1)),o(e("input",{"onUpdate:modelValue":l[19]||(l[19]=s=>n.decision_timeline=s)},null,512),[[i,n.decision_timeline]])])),e("div",bl,[l[53]||(l[53]=e("h4",null,"📡 ช่องทาง & โหมด",-1)),e("div",kl,[e("div",pl,[l[50]||(l[50]=e("label",null,"ช่องทาง",-1)),o(e("select",{"onUpdate:modelValue":l[20]||(l[20]=s=>n.channel=s)},[...l[49]||(l[49]=[e("option",{value:"line"},"LINE",-1),e("option",{value:"facebook"},"Facebook",-1)])],512),[[N,n.channel]])]),e("div",xl,[l[52]||(l[52]=e("label",null,"ใครเริ่มคุยก่อน",-1)),o(e("select",{"onUpdate:modelValue":l[21]||(l[21]=s=>n.initiation_mode=s)},[...l[51]||(l[51]=[e("option",{value:"customer"},"ลูกค้าทักก่อน",-1),e("option",{value:"seller"},"เราต้องเริ่มขาย (เชิงรุก)",-1)])],512),[[N,n.initiation_mode]])])]),k(_).isSuperAdmin&&n.special?(r(),m("label",Vl,"พิเศษ: "+a(n.special),1)):A("",!0)]),e("div",wl,[e("button",{class:"primary",onClick:j,disabled:V.value},a(V.value?"กำลังบันทึก…":"💾 บันทึกบุคคลต้นแบบ"),9,Ul),e("button",{onClick:l[22]||(l[22]=s=>t.$emit("cancel"))},"ปิด")])]))}},Cl=G($l,[["__scopeId","data-v-cef61bd8"]]),cl={class:"row",style:{"align-items":"center","margin-bottom":"8px"}},Bl={style:{margin:"0"}},Al={class:"row",style:{"margin-left":"auto",gap:"10px"}},Sl=["disabled"],zl={key:0,class:"spinner"},jl={key:0,class:"muted"},Ll={key:1,class:"error",style:{margin:"12px 0"}},Nl={key:2,class:"card empty-state"},Pl={class:"grid"},El={class:"row",style:{"justify-content":"space-between","align-items":"center"}},Tl={class:"diff"},_l={class:"muted"},Fl={class:"muted"},Gl=["onClick"],Il={class:"modal"},Ml={__name:"GroupEdit",setup(w){const x=K().params.gid,U=p(null),n=p([]),v=p(!1),b=p(""),f=p(null);async function V(){const u=await z.getGroup(x);U.value=u.group,n.value=(await z.listPersonas(x)).personas}function $(u){return n.value.filter(d=>d.tier===u)}function C(u){return B.t(u==="A"?"tierA":u==="B"?"tierB":"tierC")}function j(u){return{A:"tier-a",B:"tier-b",C:"tier-c"}[u]||""}async function t(){v.value=!0,b.value="";try{const u=await z.analyzeGroup(x);n.value=u.personas,await V()}catch(u){b.value=u.message}finally{v.value=!1}}function l(u){f.value=JSON.parse(JSON.stringify(u))}async function s(u){v.value=!0;try{await z.updatePersona(x,f.value.id,u),f.value=null,await V()}catch(d){b.value=d.message}finally{v.value=!1}}return J(V),(u,d)=>{const I=Q("router-link");return r(),m("div",null,[S(I,{to:"/training",class:"btn-back"},{default:q(()=>[y("← "+a(k(B).t("training")),1)]),_:1}),e("div",cl,[e("h2",Bl,[S(k(W),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),y(" "+a(k(B).t("managePersonas")),1)]),e("div",Al,[e("button",{onClick:t,disabled:v.value,class:"primary"},[v.value?(r(),m("span",zl)):(r(),H(k(X),{key:1,size:18,"stroke-width":1.8})),y(" "+a(v.value?"กำลังสร้าง…":k(B).t("analyze")),1)],8,Sl)])]),U.value?(r(),m("p",jl,[d[2]||(d[2]=y("สินค้า: ",-1)),e("strong",null,a(U.value.title),1)])):A("",!0),b.value?(r(),m("div",Ll,a(b.value),1)):A("",!0),d[4]||(d[4]=e("div",{class:"card guide"},[e("strong",null,"วิธีใช้หน้านี้"),e("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[e("li",null,[y("กดปุ่ม "),e("strong",null,"✨ สร้าง/วิเคราะห์บุคคลต้นแบบ"),y(" เพื่อให้ระบบสร้างลูกค้าจำลอง 15 คน (ระดับ A/B/C)")]),e("li",null,[y("แต่ละการ์ดคือลูกค้าจำลอง 1 คน — กด "),e("strong",null,"✏️ แก้ไข"),y(" เพื่อปรับรายละเอียดให้ตรงใจ")]),e("li",null,[y("เมื่อพร้อมให้ผู้ใช้ฝึก กด "),e("strong",null,"เปิดใช้งาน"),y(" (ยังทำในขั้นถัดไป)")])])],-1)),n.value.length===0&&!v.value?(r(),m("div",Nl,[...d[3]||(d[3]=[e("strong",null,"ยังไม่มีบุคคลต้นแบบ",-1),e("span",null,'กด "✨ สร้าง/วิเคราะห์บุคคลต้นแบบ" เพื่อให้ระบบสร้างลูกค้าจำลองให้',-1)])])):A("",!0),(r(),m(P,null,E(["A","B","C"],c=>e("div",{key:c,style:{"margin-bottom":"20px"}},[e("h4",null,a(C(c)),1),e("div",Pl,[(r(!0),m(P,null,E($(c),g=>(r(),m("div",{key:g.id,class:"card pcard"},[e("div",El,[e("strong",null,a(g.name),1),e("span",{class:F(["badge",j(g.tier)])},a(g.tier),3)]),e("div",Tl,[(r(),m(P,null,E(5,L=>e("span",{key:L,class:F(["star",{on:L<=(g.difficulty||1)}])},"★",2)),64))]),e("div",_l,a(g.profession)+" · "+a(g.age_group)+" · "+a(g.location),1),e("div",Fl,a(g.channel)+" · "+a(g.initiation_mode==="seller"?"เริ่มขายเอง":"ลูกค้าทักก่อน"),1),e("button",{class:"edit-btn",onClick:L=>l(g)},[S(k(Y),{size:15,"stroke-width":1.8}),y(" "+a(k(B).t("edit")),1)],8,Gl)]))),128))])])),64)),f.value?(r(),m("div",{key:3,class:"modal-backdrop",onClick:d[1]||(d[1]=R(c=>f.value=null,["self"]))},[e("div",Il,[S(Cl,{persona:f.value,onSave:s,onCancel:d[0]||(d[0]=c=>f.value=null)},null,8,["persona"])])])):A("",!0)])}}},ql=G(Ml,[["__scopeId","data-v-c682ddb6"]]);export{ql as default}; +`).map(l=>l.trim()).filter(Boolean)}O(()=>x.persona,t=>{Object.assign(n,{name:(t==null?void 0:t.name)||"",difficulty:(t==null?void 0:t.difficulty)??1,tier:(t==null?void 0:t.tier)||"B",profession:(t==null?void 0:t.profession)||"",age_group:(t==null?void 0:t.age_group)||"",location:(t==null?void 0:t.location)||"",income:(t==null?void 0:t.income)||"",budget:(t==null?void 0:t.budget)||"",lifestyle:(t==null?void 0:t.lifestyle)||"",background:(t==null?void 0:t.background)||"",personality:(t==null?void 0:t.personality)||"",communication_style:(t==null?void 0:t.communication_style)||"",goal:(t==null?void 0:t.goal)||"",decision_timeline:(t==null?void 0:t.decision_timeline)||"",opener:(t==null?void 0:t.opener)||"",channel:(t==null?void 0:t.channel)||"line",initiation_mode:(t==null?void 0:t.initiation_mode)||"customer",special:(t==null?void 0:t.special)||""}),v.value=$(t==null?void 0:t.pains),b.value=$(t==null?void 0:t.objections),f.value=$(t==null?void 0:t.negotiation_levers)},{immediate:!0});function j(){U("save",{...n,pains:C(v.value),objections:C(b.value),negotiation_levers:C(f.value)})}return(t,l)=>(r(),m("div",Z,[e("h3",null,a(w.persona.name||"New persona"),1),e("p",h,a(w.persona.profession)+" · "+a(w.persona.personality),1),e("div",ll,[l[30]||(l[30]=e("h4",null,"👤 ข้อมูลพื้นฐาน",-1)),e("div",el,[e("div",tl,[l[23]||(l[23]=e("label",null,"ชื่อ",-1)),o(e("input",{"onUpdate:modelValue":l[0]||(l[0]=s=>n.name=s)},null,512),[[i,n.name]])]),e("div",nl,[l[24]||(l[24]=e("label",null,"ระดับความยาก (1-5)",-1)),o(e("input",{"onUpdate:modelValue":l[1]||(l[1]=s=>n.difficulty=s),type:"number",min:"1",max:"5"},null,512),[[i,n.difficulty,void 0,{number:!0}]])]),e("div",sl,[l[26]||(l[26]=e("label",null,"ระดับลูกค้า",-1)),o(e("select",{"onUpdate:modelValue":l[2]||(l[2]=s=>n.tier=s)},[...l[25]||(l[25]=[e("option",{value:"A"},"A — พร้อมตัดสินใจซื้อ",-1),e("option",{value:"B"},"B — ยังไม่แน่ใจ",-1),e("option",{value:"C"},"C — ไม่สนใจแต่มีปัญหา",-1)])],512),[[N,n.tier]])])]),e("div",ol,[e("div",il,[l[27]||(l[27]=e("label",null,"อาชีพ",-1)),o(e("input",{"onUpdate:modelValue":l[3]||(l[3]=s=>n.profession=s)},null,512),[[i,n.profession]])]),e("div",al,[l[28]||(l[28]=e("label",null,"ช่วงอายุ",-1)),o(e("input",{"onUpdate:modelValue":l[4]||(l[4]=s=>n.age_group=s)},null,512),[[i,n.age_group]])]),e("div",ul,[l[29]||(l[29]=e("label",null,"พื้นที่",-1)),o(e("input",{"onUpdate:modelValue":l[5]||(l[5]=s=>n.location=s)},null,512),[[i,n.location]])])])]),e("div",rl,[l[34]||(l[34]=e("h4",null,"💼 ข้อมูลลูกค้า",-1)),e("div",dl,[e("div",ml,[l[31]||(l[31]=e("label",null,"รายได้/สถานะการเงิน",-1)),o(e("input",{"onUpdate:modelValue":l[6]||(l[6]=s=>n.income=s)},null,512),[[i,n.income]])]),e("div",vl,[l[32]||(l[32]=e("label",null,"งบประมาณ",-1)),o(e("input",{"onUpdate:modelValue":l[7]||(l[7]=s=>n.budget=s)},null,512),[[i,n.budget]])]),e("div",fl,[l[33]||(l[33]=e("label",null,"ไลฟ์สไตล์",-1)),o(e("input",{"onUpdate:modelValue":l[8]||(l[8]=s=>n.lifestyle=s)},null,512),[[i,n.lifestyle]])])]),l[35]||(l[35]=e("label",null,"ภูมิหลัง",-1)),o(e("textarea",{"onUpdate:modelValue":l[9]||(l[9]=s=>n.background=s)},null,512),[[i,n.background]]),l[36]||(l[36]=e("label",null,"บุคลิก / วิธีพูดคุย",-1)),o(e("textarea",{"onUpdate:modelValue":l[10]||(l[10]=s=>n.personality=s)},null,512),[[i,n.personality]]),l[37]||(l[37]=e("label",null,"สไตล์การสื่อสาร",-1)),o(e("textarea",{"onUpdate:modelValue":l[11]||(l[11]=s=>n.communication_style=s)},null,512),[[i,n.communication_style]])]),k(E).isSuperAdmin?(r(),m("div",gl,[l[38]||(l[38]=e("h4",null,"🎯 การขาย",-1)),l[39]||(l[39]=e("label",null,"เป้าหมาย",-1)),o(e("textarea",{"onUpdate:modelValue":l[12]||(l[12]=s=>n.goal=s)},null,512),[[i,n.goal]]),l[40]||(l[40]=e("label",null,"กรอบเวลาในการตัดสินใจ",-1)),o(e("input",{"onUpdate:modelValue":l[13]||(l[13]=s=>n.decision_timeline=s)},null,512),[[i,n.decision_timeline]]),l[41]||(l[41]=e("label",null,"Pain (ปัญหา) แบบ 1 ต่อบรรทัด",-1)),o(e("textarea",{"onUpdate:modelValue":l[14]||(l[14]=s=>v.value=s),placeholder:`เช่น ต้นทุนสูงเกินไป +ระบบล้าสมัย`},null,512),[[i,v.value]]),l[42]||(l[42]=e("label",null,"ข้อโต้แย้ง (Objections) 1 ต่อบรรทัด",-1)),o(e("textarea",{"onUpdate:modelValue":l[15]||(l[15]=s=>b.value=s)},null,512),[[i,b.value]]),l[43]||(l[43]=e("label",null,"สิ่งที่ใช้ต่อรอง (เช่น ส่วนลด, ฟรีติดตั้ง)",-1)),o(e("textarea",{"onUpdate:modelValue":l[16]||(l[16]=s=>f.value=s)},null,512),[[i,f.value]]),l[44]||(l[44]=e("label",null,"ช่องทางสำหรับลูกค้าเปิดบทสนทนา (opener)",-1)),o(e("textarea",{"onUpdate:modelValue":l[17]||(l[17]=s=>n.opener=s)},null,512),[[i,n.opener]])])):(r(),m("div",yl,[l[45]||(l[45]=e("h4",null,"🔒 ส่วนสูตรการขาย",-1)),l[46]||(l[46]=e("p",{class:"muted"},"ปิดการแก้ไข — เฉพาะผู้ดูแลระดับสูงเท่านั้นที่ดู/แก้ได้ (เพื่อรักษาความได้เปรียบ)",-1)),l[47]||(l[47]=e("label",null,"เป้าหมาย",-1)),o(e("textarea",{"onUpdate:modelValue":l[18]||(l[18]=s=>n.goal=s)},null,512),[[i,n.goal]]),l[48]||(l[48]=e("label",null,"กรอบเวลาในการตัดสินใจ",-1)),o(e("input",{"onUpdate:modelValue":l[19]||(l[19]=s=>n.decision_timeline=s)},null,512),[[i,n.decision_timeline]])])),e("div",bl,[l[53]||(l[53]=e("h4",null,"📡 ช่องทาง & โหมด",-1)),e("div",kl,[e("div",pl,[l[50]||(l[50]=e("label",null,"ช่องทาง",-1)),o(e("select",{"onUpdate:modelValue":l[20]||(l[20]=s=>n.channel=s)},[...l[49]||(l[49]=[e("option",{value:"line"},"LINE",-1),e("option",{value:"facebook"},"Facebook",-1)])],512),[[N,n.channel]])]),e("div",xl,[l[52]||(l[52]=e("label",null,"ใครเริ่มคุยก่อน",-1)),o(e("select",{"onUpdate:modelValue":l[21]||(l[21]=s=>n.initiation_mode=s)},[...l[51]||(l[51]=[e("option",{value:"customer"},"ลูกค้าทักก่อน",-1),e("option",{value:"seller"},"เราต้องเริ่มขาย (เชิงรุก)",-1)])],512),[[N,n.initiation_mode]])])]),k(E).isSuperAdmin&&n.special?(r(),m("label",Vl,"พิเศษ: "+a(n.special),1)):A("",!0)]),e("div",wl,[e("button",{class:"primary",onClick:j,disabled:V.value},a(V.value?"กำลังบันทึก…":"💾 บันทึกบุคคลต้นแบบ"),9,Ul),e("button",{onClick:l[22]||(l[22]=s=>t.$emit("cancel"))},"ปิด")])]))}},Cl=G($l,[["__scopeId","data-v-cef61bd8"]]),cl={class:"row",style:{"align-items":"center","margin-bottom":"8px"}},Bl={style:{margin:"0"}},Al={class:"row",style:{"margin-left":"auto",gap:"10px"}},zl=["disabled"],Sl={key:0,class:"spinner"},jl={key:0,class:"muted"},Ll={key:1,class:"error",style:{margin:"12px 0"}},Nl={key:2,class:"card empty-state"},Pl={class:"grid"},Tl={class:"row",style:{"justify-content":"space-between","align-items":"center"}},_l={class:"diff"},El={class:"muted"},Fl={class:"muted"},Gl=["onClick"],Il={class:"modal"},Ml={__name:"GroupEdit",setup(w){const x=K().params.gid,U=p(null),n=p([]),v=p(!1),b=p(""),f=p(null);async function V(){const u=await S.getGroup(x);U.value=u.group,n.value=(await S.listPersonas(x)).personas}function $(u){return n.value.filter(d=>d.tier===u)}function C(u){return B.t(u==="A"?"tierA":u==="B"?"tierB":"tierC")}function j(u){return{A:"tier-a",B:"tier-b",C:"tier-c"}[u]||""}async function t(){v.value=!0,b.value="";try{const u=await S.analyzeGroup(x);n.value=u.personas,await V()}catch(u){b.value=u.message}finally{v.value=!1}}function l(u){f.value=JSON.parse(JSON.stringify(u))}async function s(u){v.value=!0;try{await S.updatePersona(x,f.value.id,u),f.value=null,await V()}catch(d){b.value=d.message}finally{v.value=!1}}return q(V),(u,d)=>{const I=Q("router-link");return r(),m("div",null,[z(I,{to:"/training",class:"btn-back"},{default:D(()=>[y("← "+a(k(B).t("training")),1)]),_:1}),e("div",cl,[e("h2",Bl,[z(k(W),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),y(" "+a(k(B).t("managePersonas")),1)]),e("div",Al,[e("button",{onClick:t,disabled:v.value,class:"primary"},[v.value?(r(),m("span",Sl)):(r(),H(k(X),{key:1,size:18,"stroke-width":1.8})),y(" "+a(v.value?"กำลังสร้าง…":k(B).t("analyze")),1)],8,zl)])]),U.value?(r(),m("p",jl,[d[2]||(d[2]=y("สินค้า: ",-1)),e("strong",null,a(U.value.title),1)])):A("",!0),b.value?(r(),m("div",Ll,a(b.value),1)):A("",!0),d[4]||(d[4]=e("div",{class:"card guide"},[e("strong",null,"วิธีใช้หน้านี้"),e("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[e("li",null,[y("กดปุ่ม "),e("strong",null,"✨ สร้าง/วิเคราะห์บุคคลต้นแบบ"),y(" เพื่อให้ระบบสร้างลูกค้าจำลอง 15 คน (ระดับ A/B/C)")]),e("li",null,[y("แต่ละการ์ดคือลูกค้าจำลอง 1 คน — กด "),e("strong",null,"✏️ แก้ไข"),y(" เพื่อปรับรายละเอียดให้ตรงใจ")]),e("li",null,[y("เมื่อพร้อมให้ผู้ใช้ฝึก กด "),e("strong",null,"เปิดใช้งาน"),y(" (ยังทำในขั้นถัดไป)")])])],-1)),n.value.length===0&&!v.value?(r(),m("div",Nl,[...d[3]||(d[3]=[e("strong",null,"ยังไม่มีบุคคลต้นแบบ",-1),e("span",null,'กด "✨ สร้าง/วิเคราะห์บุคคลต้นแบบ" เพื่อให้ระบบสร้างลูกค้าจำลองให้',-1)])])):A("",!0),(r(),m(P,null,T(["A","B","C"],c=>e("div",{key:c,style:{"margin-bottom":"20px"}},[e("h4",null,a(C(c)),1),e("div",Pl,[(r(!0),m(P,null,T($(c),g=>(r(),m("div",{key:g.id,class:"card pcard"},[e("div",Tl,[e("strong",null,a(g.name),1),e("span",{class:F(["badge",j(g.tier)])},a(g.tier),3)]),e("div",_l,[(r(),m(P,null,T(5,L=>e("span",{key:L,class:F(["star",{on:L<=(g.difficulty||1)}])},"★",2)),64))]),e("div",El,a(g.profession)+" · "+a(g.age_group)+" · "+a(g.location),1),e("div",Fl,a(g.channel)+" · "+a(g.initiation_mode==="seller"?"เริ่มขายเอง":"ลูกค้าทักก่อน"),1),e("button",{class:"edit-btn",onClick:L=>l(g)},[z(k(Y),{size:15,"stroke-width":1.8}),y(" "+a(k(B).t("edit")),1)],8,Gl)]))),128))])])),64)),f.value?(r(),m("div",{key:3,class:"modal-backdrop",onClick:d[1]||(d[1]=R(c=>f.value=null,["self"]))},[e("div",Il,[z(Cl,{persona:f.value,onSave:s,onCancel:d[0]||(d[0]=c=>f.value=null)},null,8,["persona"])])])):A("",!0)])}}},Dl=G(Ml,[["__scopeId","data-v-c682ddb6"]]);export{Dl as default}; diff --git a/frontend/dist/assets/Guide-Bx9T4hBF.js b/frontend/dist/assets/Guide-PlIFuOuL.js similarity index 93% rename from frontend/dist/assets/Guide-Bx9T4hBF.js rename to frontend/dist/assets/Guide-PlIFuOuL.js index 2a3258f..01f01fe 100644 --- a/frontend/dist/assets/Guide-Bx9T4hBF.js +++ b/frontend/dist/assets/Guide-PlIFuOuL.js @@ -1,6 +1,6 @@ -import{c as e,a as o,b as l,l as n,u as i,m as s,t as r,i as a,D as u,o as d}from"./index-BCax2GDh.js";import{B as g}from"./book-open-C7SxBVkN.js";import{L as p}from"./layout-dashboard-Djj77ueX.js";import{T as m}from"./target-BFC5gbdb.js";import{S as y}from"./sparkles-E3Xd6eY7.js";/** +import{c as e,a as o,b as l,l as n,u as i,m as s,t as r,i as a,E as u,o as d}from"./index-Cr5KFgzf.js";import{B as g}from"./book-open-Yn_Ya1If.js";import{L as p}from"./layout-dashboard-D4d1g6OI.js";import{T as m}from"./target-CUBX0ybh.js";import{S as y}from"./sparkles-CWO9Md85.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const h=e("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]),k={class:"card"},v={style:{"margin-top":"0"}},x={class:"card"},f={style:{"margin-top":"0"}},c={class:"card"},w={style:{"margin-top":"0"}},z={class:"card"},_={style:{"margin-top":"0"}},L={__name:"Guide",setup(B){return(S,t)=>(d(),o("div",null,[l("h2",null,[n(i(g),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),s(" "+r(i(a).t("guideTitle")),1)]),t[8]||(t[8]=l("p",{class:"muted"},"คู่มือสั้นๆ สำหรับพนักงานใหม่ — เข้าใจระบบได้ใน 5 นาที",-1)),l("div",k,[l("h3",v,[n(i(p),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[0]||(t[0]=s(" 1. หน้า 3 แท็บ (menu ด้านบน)",-1))]),t[1]||(t[1]=l("ul",{style:{"line-height":"1.9"}},[l("li",null,[l("strong",null,"ภาพรวมผู้ดูแล"),s(" — เฉพาะ admin ดูสถิติผลการฝึกของทีม + กรองตามช่วงเวลา")]),l("li",null,[l("strong",null,"ภาพรวมผลการฝึก"),s(" — ของตัวคุณเอง: ชนะ/แพ้/ยังไม่ได้ฝึก")]),l("li",null,[l("strong",null,"การฝึก"),s(" — เลือกสินค้า → เลือกลูกค้า (บุคคลต้นแบบ) → เริ่มแชท")]),l("li",null,[l("strong",null,"การตั้งค่า (⚙︎)"),s(" — แก้ชื่อ/อีเมล, เปลี่ยนรหัสผ่าน, เปลี่ยนภาษา")])],-1))]),l("div",x,[l("h3",f,[n(i(m),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[2]||(t[2]=s(" 2. วิธีฝึก (start a session)",-1))]),t[3]||(t[3]=l("ol",{style:{"line-height":"1.9","padding-left":"20px"}},[l("li",null,[s("เข้าแท็บ "),l("strong",null,"การฝึก"),s(" → เลือกสินค้าที่อยากฝึก")]),l("li",null,"เลือกลูกค้า (บุคคลต้นแบบ) — ระดับ A ง่ายสุด / C ยากสุด (ดูดาวความยาก)"),l("li",null,[s("เลือก "),l("strong",null,"สถานการณ์"),s(": โซเชียล (ลูกค้าทักก่อน) / พบหน้า-โทร (คุณทักก่อน) / กลับมาติดต่อ")]),l("li",null,"แชทกับลูกค้า — ฝึกปิดการขาย ลูกค้าจะตัดสินใจเองว่าซื้อหรือไม่ซื้อ"),l("li",null,"หลังจบ ดูผล + ข้อเสนอแนะ + ข้อมูลลูกค้าที่ถูกซ่อนไว้")],-1))]),l("div",c,[l("h3",w,[n(i(y),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[4]||(t[4]=s(" 3. เคล็ดลับ",-1))]),t[5]||(t[5]=l("ul",{style:{"line-height":"1.9"}},[l("li",null,[s('ลูกค้าแต่ละคน หรือ "บุคคลต้นแบบ" ฝึกได้ '),l("strong",null,"คนละครั้ง"),s(" (one-shot) — ฝึกจนจบแล้วลองคนอื่น")]),l("li",null,"ถ้าออกกลางคัน กลับมาได้ คุยต่อจากเดิม (ยังไม่นับว่าจบ)"),l("li",null,"ปิดการขาย = แก้ปัญหาจริงของลูกค้า + รับมือข้อโต้แย้ง + ปิดราคา")],-1))]),l("div",z,[l("h3",_,[n(i(h),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[6]||(t[6]=s(" 4. สำหรับ Admin",-1))]),t[7]||(t[7]=u('
  • ปุ่ม เพิ่มสินค้า (หน้า การฝึก) → สร้างกลุ่มบุคคลต้นแบบใหม่
  • หน้า จัดการบุคคลต้นแบบ → แก้ไขรายละเอียดลูกค้าแต่ละคน แล้วเปิดใช้งาน
  • หน้า ผู้ใช้งาน → สร้างบัญชีให้ทีม (username + รหัสผ่านเริ่มต้น)
  • ปุ่ม CSV (หน้า ภาพรวม) → ดาวน์โหลดผลการฝึกทั้งหมด
',1))])]))}};export{L as default}; + */const h=e("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]),k={class:"card"},v={style:{"margin-top":"0"}},x={class:"card"},f={style:{"margin-top":"0"}},c={class:"card"},w={style:{"margin-top":"0"}},z={class:"card"},_={style:{"margin-top":"0"}},A={__name:"Guide",setup(B){return(S,t)=>(d(),o("div",null,[l("h2",null,[n(i(g),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),s(" "+r(i(a).t("guideTitle")),1)]),t[8]||(t[8]=l("p",{class:"muted"},"คู่มือสั้นๆ สำหรับพนักงานใหม่ — เข้าใจระบบได้ใน 5 นาที",-1)),l("div",k,[l("h3",v,[n(i(p),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[0]||(t[0]=s(" 1. หน้า 3 แท็บ (menu ด้านบน)",-1))]),t[1]||(t[1]=l("ul",{style:{"line-height":"1.9"}},[l("li",null,[l("strong",null,"ภาพรวมผู้ดูแล"),s(" — เฉพาะ admin ดูสถิติผลการฝึกของทีม + กรองตามช่วงเวลา")]),l("li",null,[l("strong",null,"ภาพรวมผลการฝึก"),s(" — ของตัวคุณเอง: ชนะ/แพ้/ยังไม่ได้ฝึก")]),l("li",null,[l("strong",null,"การฝึก"),s(" — เลือกสินค้า → เลือกลูกค้า (บุคคลต้นแบบ) → เริ่มแชท")]),l("li",null,[l("strong",null,"การตั้งค่า (⚙︎)"),s(" — แก้ชื่อ/อีเมล, เปลี่ยนรหัสผ่าน, เปลี่ยนภาษา")])],-1))]),l("div",x,[l("h3",f,[n(i(m),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[2]||(t[2]=s(" 2. วิธีฝึก (start a session)",-1))]),t[3]||(t[3]=l("ol",{style:{"line-height":"1.9","padding-left":"20px"}},[l("li",null,[s("เข้าแท็บ "),l("strong",null,"การฝึก"),s(" → เลือกสินค้าที่อยากฝึก")]),l("li",null,"เลือกลูกค้า (บุคคลต้นแบบ) — ระดับ A ง่ายสุด / C ยากสุด (ดูดาวความยาก)"),l("li",null,[s("เลือก "),l("strong",null,"สถานการณ์"),s(": โซเชียล (ลูกค้าทักก่อน) / พบหน้า-โทร (คุณทักก่อน) / กลับมาติดต่อ")]),l("li",null,"แชทกับลูกค้า — ฝึกปิดการขาย ลูกค้าจะตัดสินใจเองว่าซื้อหรือไม่ซื้อ"),l("li",null,"หลังจบ ดูผล + ข้อเสนอแนะ + ข้อมูลลูกค้าที่ถูกซ่อนไว้")],-1))]),l("div",c,[l("h3",w,[n(i(y),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[4]||(t[4]=s(" 3. เคล็ดลับ",-1))]),t[5]||(t[5]=l("ul",{style:{"line-height":"1.9"}},[l("li",null,[s('ลูกค้าแต่ละคน หรือ "บุคคลต้นแบบ" ฝึกได้ '),l("strong",null,"คนละครั้ง"),s(" (one-shot) — ฝึกจนจบแล้วลองคนอื่น")]),l("li",null,"ถ้าออกกลางคัน กลับมาได้ คุยต่อจากเดิม (ยังไม่นับว่าจบ)"),l("li",null,"ปิดการขาย = แก้ปัญหาจริงของลูกค้า + รับมือข้อโต้แย้ง + ปิดราคา")],-1))]),l("div",z,[l("h3",_,[n(i(h),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),t[6]||(t[6]=s(" 4. สำหรับ Admin",-1))]),t[7]||(t[7]=u('
  • ปุ่ม เพิ่มสินค้า (หน้า การฝึก) → สร้างกลุ่มบุคคลต้นแบบใหม่
  • หน้า จัดการบุคคลต้นแบบ → แก้ไขรายละเอียดลูกค้าแต่ละคน แล้วเปิดใช้งาน
  • หน้า ผู้ใช้งาน → สร้างบัญชีให้ทีม (username + รหัสผ่านเริ่มต้น)
  • ปุ่ม CSV (หน้า ภาพรวม) → ดาวน์โหลดผลการฝึกทั้งหมด
',1))])]))}};export{A as default}; diff --git a/frontend/dist/assets/Login-BFjXrLpo.js b/frontend/dist/assets/Login-B1BFq5lO.js similarity index 98% rename from frontend/dist/assets/Login-BFjXrLpo.js rename to frontend/dist/assets/Login-B1BFq5lO.js index ed4fa42..420d681 100644 --- a/frontend/dist/assets/Login-BFjXrLpo.js +++ b/frontend/dist/assets/Login-B1BFq5lO.js @@ -1,4 +1,4 @@ -import{c as k,_ as x,a as y,b as e,t as l,u as a,i as n,w as h,v as M,d as w,e as B,f as _,g as E,r,h as f,j as S,k as V,o as s}from"./index-BCax2GDh.js";/** +import{c as k,_ as x,a as y,b as e,t as l,u as a,i as n,w as h,v as M,d as w,e as B,f as _,g as E,r,h as f,j as S,k as V,o as s}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/MyBoard-wXpWmFYg.js b/frontend/dist/assets/MyBoard-C2XKgiYF.js similarity index 70% rename from frontend/dist/assets/MyBoard-wXpWmFYg.js rename to frontend/dist/assets/MyBoard-C2XKgiYF.js index 500c87f..9c1c2b6 100644 --- a/frontend/dist/assets/MyBoard-wXpWmFYg.js +++ b/frontend/dist/assets/MyBoard-C2XKgiYF.js @@ -1 +1 @@ -import{_ as f,n as x,x as v,a as r,b as t,l as b,u as e,m as k,t as s,i as a,g as _,w as B,z as N,F as D,s as S,r as p,A as c,o as i,B as T}from"./index-BCax2GDh.js";import{L as V}from"./layout-dashboard-Djj77ueX.js";const z={style:{margin:"0"}},L={key:0,class:"row stat-row"},M={class:"card stat"},C={class:"card stat won"},F={class:"card stat lost"},j={class:"card stat"},A={key:1,class:"card"},E={key:2,class:"card empty-state"},G={class:"card",style:{"margin-top":"20px"}},I={style:{"margin-top":"0"}},q={__name:"MyBoard",setup(H){const o=p([]),u=p([]),m=p(!0),y=c(()=>o.value.length),g=c(()=>o.value.filter(n=>n.my_outcome==="won").length),h=c(()=>o.value.filter(n=>n.my_outcome==="lost").length),w=c(()=>o.value.filter(n=>n.my_outcome==="not_tried").length);return x(async()=>{try{o.value=(await v.myBoard()).board||[],u.value=(await v.mySessions()).sessions||[]}finally{m.value=!1}}),(n,l)=>(i(),r("div",null,[t("div",null,[t("h2",z,[b(e(V),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),k(" "+s(e(a).t("myDashboard")),1)]),l[0]||(l[0]=t("div",{class:"muted",style:{"margin-top":"4px","margin-bottom":"16px"}},"สรุปผลการฝึกของตัวคุณเอง — ดูว่าปิดการขายได้กี่ครั้ง ยังฝึกกับใครบ้าง",-1))]),m.value?_("",!0):(i(),r("div",L,[t("div",M,[t("span",null,s(e(a).t("total")),1),t("strong",null,s(y.value),1)]),t("div",C,[t("span",null,s(e(a).t("won")),1),t("strong",null,s(g.value),1)]),t("div",F,[t("span",null,s(e(a).t("lost")),1),t("strong",null,s(h.value),1)]),t("div",j,[t("span",null,s(e(a).t("notTried")),1),t("strong",null,s(w.value),1)])])),m.value?(i(),r("div",A,[...l[1]||(l[1]=[t("div",{class:"skeleton",style:{height:"50px"}},null,-1)])])):o.value.length===0?(i(),r("div",E,[...l[2]||(l[2]=[t("strong",null,"No practice yet",-1),t("span",null,"Go to Training and try closing a sale with a persona.",-1)])])):_("",!0),B(t("div",G,[t("h3",I,s(e(a).t("mySessions")),1),(i(!0),r(D,null,S(u.value,d=>(i(),r("div",{key:d.id,style:{display:"flex","justify-content":"space-between",padding:"8px 0","border-bottom":"1px solid var(--border)"}},[t("span",null,s(d.persona_name),1),t("span",{class:T(["badge",d.outcome])},s(d.outcome==="won"?e(a).t("won"):e(a).t("lost")),3)]))),128))],512),[[N,u.value.length]])]))}},O=f(q,[["__scopeId","data-v-6767b6b8"]]);export{O as default}; +import{_ as f,p as x,y as v,a as r,b as t,l as b,u as e,m as k,t as s,i as a,g as _,w as B,A as N,F as D,x as S,r as m,B as c,o as i,C as T}from"./index-Cr5KFgzf.js";import{L as V}from"./layout-dashboard-D4d1g6OI.js";const C={style:{margin:"0"}},L={key:0,class:"row stat-row"},M={class:"card stat"},z={class:"card stat won"},F={class:"card stat lost"},j={class:"card stat"},A={key:1,class:"card"},E={key:2,class:"card empty-state"},G={class:"card",style:{"margin-top":"20px"}},I={style:{"margin-top":"0"}},q={__name:"MyBoard",setup(H){const o=m([]),u=m([]),p=m(!0),y=c(()=>o.value.length),g=c(()=>o.value.filter(n=>n.my_outcome==="won").length),h=c(()=>o.value.filter(n=>n.my_outcome==="lost").length),w=c(()=>o.value.filter(n=>n.my_outcome==="not_tried").length);return x(async()=>{try{o.value=(await v.myBoard()).board||[],u.value=(await v.mySessions()).sessions||[]}finally{p.value=!1}}),(n,l)=>(i(),r("div",null,[t("div",null,[t("h2",C,[b(e(V),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),k(" "+s(e(a).t("myDashboard")),1)]),l[0]||(l[0]=t("div",{class:"muted",style:{"margin-top":"4px","margin-bottom":"16px"}},"สรุปผลการฝึกของตัวคุณเอง — ดูว่าปิดการขายได้กี่ครั้ง ยังฝึกกับใครบ้าง",-1))]),p.value?_("",!0):(i(),r("div",L,[t("div",M,[t("span",null,s(e(a).t("total")),1),t("strong",null,s(y.value),1)]),t("div",z,[t("span",null,s(e(a).t("won")),1),t("strong",null,s(g.value),1)]),t("div",F,[t("span",null,s(e(a).t("lost")),1),t("strong",null,s(h.value),1)]),t("div",j,[t("span",null,s(e(a).t("notTried")),1),t("strong",null,s(w.value),1)])])),p.value?(i(),r("div",A,[...l[1]||(l[1]=[t("div",{class:"skeleton",style:{height:"50px"}},null,-1)])])):o.value.length===0?(i(),r("div",E,[...l[2]||(l[2]=[t("strong",null,"No practice yet",-1),t("span",null,"Go to Training and try closing a sale with a persona.",-1)])])):_("",!0),B(t("div",G,[t("h3",I,s(e(a).t("mySessions")),1),(i(!0),r(D,null,S(u.value,d=>(i(),r("div",{key:d.id,style:{display:"flex","justify-content":"space-between",padding:"8px 0","border-bottom":"1px solid var(--border)"}},[t("span",null,s(d.persona_name),1),t("span",{class:T(["badge",d.outcome])},s(d.outcome==="won"?e(a).t("won"):e(a).t("lost")),3)]))),128))],512),[[N,u.value.length]])]))}},O=f(q,[["__scopeId","data-v-6767b6b8"]]);export{O as default}; diff --git a/frontend/dist/assets/Personas-BK-v3zL-.js b/frontend/dist/assets/Personas-C1zt2UAW.js similarity index 75% rename from frontend/dist/assets/Personas-BK-v3zL-.js rename to frontend/dist/assets/Personas-C1zt2UAW.js index 9cfcbca..014f068 100644 --- a/frontend/dist/assets/Personas-BK-v3zL-.js +++ b/frontend/dist/assets/Personas-C1zt2UAW.js @@ -1 +1 @@ -import{_ as T,n as $,a as r,l as d,p as m,b as t,t as s,u as e,i as n,h as f,m as _,g as w,F as y,s as p,k as L,x as N,y as V,r as b,o as a,S as I,B as h,f as A}from"./index-BCax2GDh.js";import{T as S}from"./target-BFC5gbdb.js";import{A as F}from"./arrow-left-diPpM4Dj.js";const j={class:"row",style:{"align-items":"center"}},D={style:{margin:"0"}},E={class:"muted",style:{"margin-left":"auto"}},M={key:0,class:"card guide"},R={key:1,class:"row",style:{margin:"12px 0",gap:"10px"}},q={class:"primary"},G={class:"grid"},H={class:"row",style:{"justify-content":"space-between"}},J={class:"diff"},K={class:"muted"},O={class:"muted"},Q={class:"muted"},U={class:"muted",style:{"margin-top":"6px"}},W={class:"primary",style:{width:"100%"}},X={class:"primary",style:{width:"100%"}},Y={key:1,class:"muted",style:{"margin-top":"auto","font-size":"12px"}},Z={__name:"Personas",setup(tt){const c=L().params.gid,k=b([]),B=b(!0);async function C(){try{k.value=(await N.listPersonas(c)).personas}finally{B.value=!1}}function z(l){return k.value.filter(i=>i.tier===l)}function P(l){return n.t(l==="A"?"tierA":l==="B"?"tierB":"tierC")}function v(l){return l==="won"?n.t("won"):l==="lost"?n.t("lost"):n.t("notTried")}return $(C),(l,i)=>{const u=V("router-link");return a(),r("div",null,[d(u,{to:"/training",class:"btn-back"},{default:m(()=>[d(e(F),{size:16,"stroke-width":2}),_(" "+s(e(n).t("training")),1)]),_:1}),t("div",j,[t("h2",D,s(e(n).t("personas")),1),t("span",E,s(e(n).t("selectPersona")),1)]),e(f).isAdmin?w("",!0):(a(),r("div",M,[t("strong",null,[d(e(S),{size:17,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),i[0]||(i[0]=_(" วิธีฝึก",-1))]),i[1]||(i[1]=t("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[t("li",null,"เลือกลูกค้าจำลอง (บุคคลต้นแบบ) คนหนึ่งที่อยากฝึกด้วย"),t("li",null,"ระดับ A ง่ายสุด → ระดับ C ยากสุด (ดูจากดาว ★ ความยาก)"),t("li",null,"กดปุ่มสำหรับฝึกแชทกับลูกค้าคนนั้น (ฝึกได้คนละครั้งเท่านั้น)")],-1))])),e(f).isAdmin?(a(),r("div",R,[d(u,{to:`/admin/groups/${e(c)}/edit`},{default:m(()=>[t("button",q,[d(e(I),{size:18,"stroke-width":1.8}),_(" "+s(e(n).t("managePersonas")),1)])]),_:1},8,["to"]),i[2]||(i[2]=t("span",{class:"muted"},"Admin: จัดการรายละเอียดบุคคลต้นแบบได้ที่นี่",-1))])):w("",!0),(a(),r(y,null,p(["A","B","C"],g=>t("div",{key:g,style:{margin:"20px 0"}},[t("h4",null,s(P(g)),1),t("div",G,[(a(!0),r(y,null,p(z(g),o=>(a(),r("div",{key:o.id,class:"card pcard lift"},[t("div",H,[t("strong",null,s(o.name),1),t("span",{class:h(["badge",o.my_outcome])},s(v(o.my_outcome)),3)]),t("div",J,[(a(),r(y,null,p(5,x=>t("span",{key:x,class:h(["star",{on:x<=(o.difficulty||1)}])},"★",2)),64)),t("span",K,s(e(n).t("difficulty"))+" "+s(o.difficulty||1)+"/5",1)]),t("div",O,[_(s(o.profession)+" · "+s(o.age_group)+" · "+s(o.location),1),i[3]||(i[3]=t("br",null,null,-1)),t("span",{class:h(["badge",o.channel])},s(o.channel),3),t("span",Q," · "+s(o.initiation_mode==="seller"?e(n).t("sellerInitiated"):e(n).t("customerInitiated")),1)]),t("div",U,s(o.product_context),1),e(f).isAdmin?(a(),A(u,{key:0,to:`/groups/${e(c)}/chat/${o.id}`,style:{"margin-top":"auto"}},{default:m(()=>[t("button",W,s(e(n).t("chat")),1)]),_:1},8,["to"])):(a(),r(y,{key:1},[o.my_outcome==="not_tried"?(a(),A(u,{key:0,to:`/groups/${e(c)}/chat/${o.id}`,style:{"margin-top":"auto"}},{default:m(()=>[t("button",X,s(e(n).t("chat")),1)]),_:1},8,["to"])):(a(),r("div",Y,"✓ "+s(e(n).t("trained"))+" ("+s(v(o.my_outcome))+")",1))],64))]))),128))])])),64))])}}},at=T(Z,[["__scopeId","data-v-46d50c99"]]);export{at as default}; +import{_ as T,p as $,a as r,l as d,q as m,b as t,t as s,u as e,i as n,h as f,m as _,g as w,F as y,x as p,k as L,y as N,z as V,r as b,o as a,S as I,C as h,f as A}from"./index-Cr5KFgzf.js";import{T as S}from"./target-CUBX0ybh.js";import{A as F}from"./arrow-left-D6PVN9vk.js";const j={class:"row",style:{"align-items":"center"}},q={style:{margin:"0"}},D={class:"muted",style:{"margin-left":"auto"}},E={key:0,class:"card guide"},M={key:1,class:"row",style:{margin:"12px 0",gap:"10px"}},R={class:"primary"},G={class:"grid"},H={class:"row",style:{"justify-content":"space-between"}},J={class:"diff"},K={class:"muted"},O={class:"muted"},Q={class:"muted"},U={class:"muted",style:{"margin-top":"6px"}},W={class:"primary",style:{width:"100%"}},X={class:"primary",style:{width:"100%"}},Y={key:1,class:"muted",style:{"margin-top":"auto","font-size":"12px"}},Z={__name:"Personas",setup(tt){const c=L().params.gid,k=b([]),C=b(!0);async function B(){try{k.value=(await N.listPersonas(c)).personas}finally{C.value=!1}}function z(l){return k.value.filter(i=>i.tier===l)}function P(l){return n.t(l==="A"?"tierA":l==="B"?"tierB":"tierC")}function v(l){return l==="won"?n.t("won"):l==="lost"?n.t("lost"):n.t("notTried")}return $(B),(l,i)=>{const u=V("router-link");return a(),r("div",null,[d(u,{to:"/training",class:"btn-back"},{default:m(()=>[d(e(F),{size:16,"stroke-width":2}),_(" "+s(e(n).t("training")),1)]),_:1}),t("div",j,[t("h2",q,s(e(n).t("personas")),1),t("span",D,s(e(n).t("selectPersona")),1)]),e(f).isAdmin?w("",!0):(a(),r("div",E,[t("strong",null,[d(e(S),{size:17,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),i[0]||(i[0]=_(" วิธีฝึก",-1))]),i[1]||(i[1]=t("ol",{style:{margin:"8px 0 0","padding-left":"20px","line-height":"1.8"}},[t("li",null,"เลือกลูกค้าจำลอง (บุคคลต้นแบบ) คนหนึ่งที่อยากฝึกด้วย"),t("li",null,"ระดับ A ง่ายสุด → ระดับ C ยากสุด (ดูจากดาว ★ ความยาก)"),t("li",null,"กดปุ่มสำหรับฝึกแชทกับลูกค้าคนนั้น (ฝึกได้คนละครั้งเท่านั้น)")],-1))])),e(f).isAdmin?(a(),r("div",M,[d(u,{to:`/admin/groups/${e(c)}/edit`},{default:m(()=>[t("button",R,[d(e(I),{size:18,"stroke-width":1.8}),_(" "+s(e(n).t("managePersonas")),1)])]),_:1},8,["to"]),i[2]||(i[2]=t("span",{class:"muted"},"Admin: จัดการรายละเอียดบุคคลต้นแบบได้ที่นี่",-1))])):w("",!0),(a(),r(y,null,p(["A","B","C"],g=>t("div",{key:g,style:{margin:"20px 0"}},[t("h4",null,s(P(g)),1),t("div",G,[(a(!0),r(y,null,p(z(g),o=>(a(),r("div",{key:o.id,class:"card pcard lift"},[t("div",H,[t("strong",null,s(o.name),1),t("span",{class:h(["badge",o.my_outcome])},s(v(o.my_outcome)),3)]),t("div",J,[(a(),r(y,null,p(5,x=>t("span",{key:x,class:h(["star",{on:x<=(o.difficulty||1)}])},"★",2)),64)),t("span",K,s(e(n).t("difficulty"))+" "+s(o.difficulty||1)+"/5",1)]),t("div",O,[_(s(o.profession)+" · "+s(o.age_group)+" · "+s(o.location),1),i[3]||(i[3]=t("br",null,null,-1)),t("span",{class:h(["badge",o.channel])},s(o.channel),3),t("span",Q," · "+s(o.initiation_mode==="seller"?e(n).t("sellerInitiated"):e(n).t("customerInitiated")),1)]),t("div",U,s(o.product_context),1),e(f).isAdmin?(a(),A(u,{key:0,to:`/groups/${e(c)}/chat/${o.id}`,style:{"margin-top":"auto"}},{default:m(()=>[t("button",W,s(e(n).t("chat")),1)]),_:1},8,["to"])):(a(),r(y,{key:1},[o.my_outcome==="not_tried"?(a(),A(u,{key:0,to:`/groups/${e(c)}/chat/${o.id}`,style:{"margin-top":"auto"}},{default:m(()=>[t("button",X,s(e(n).t("chat")),1)]),_:1},8,["to"])):(a(),r("div",Y,"✓ "+s(e(n).t("trained"))+" ("+s(v(o.my_outcome))+")",1))],64))]))),128))])])),64))])}}},at=T(Z,[["__scopeId","data-v-46d50c99"]]);export{at as default}; diff --git a/frontend/dist/assets/Settings-k8fzlPYr.js b/frontend/dist/assets/Settings-C6ZMNY2Q.js similarity index 79% rename from frontend/dist/assets/Settings-k8fzlPYr.js rename to frontend/dist/assets/Settings-C6ZMNY2Q.js index 41415b2..8b74546 100644 --- a/frontend/dist/assets/Settings-k8fzlPYr.js +++ b/frontend/dist/assets/Settings-C6ZMNY2Q.js @@ -1,11 +1,11 @@ -import{c as M,_ as T,r as c,h as u,a as h,b as e,l as k,u as a,S as $,m as v,t as o,i as s,w as b,v as x,g as V,B as S,x as B,o as g}from"./index-BCax2GDh.js";import{L as D}from"./lock-uERjsrGr.js";/** +import{c as U,_ as T,r as c,h as u,a as h,b as e,l as k,u as a,S as $,m as v,t as o,i as s,w as b,v as x,g as V,C as S,y as M,o as g}from"./index-Cr5KFgzf.js";import{L as D}from"./lock-CERtIuBL.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E=M("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + */const E=U("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const I=M("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),j={class:"card"},G={style:{"margin-top":"0"}},H={class:"muted"},O=["value"],q={class:"row",style:{gap:"10px","margin-top":"16px"}},A=["disabled"],F={key:0,class:"spinner"},J={class:"card",style:{"margin-top":"16px"}},K={style:{"margin-top":"0"}},Q={class:"row",style:{gap:"10px","margin-top":"16px"}},R=["disabled"],W={key:0,class:"spinner"},X={class:"card",style:{"margin-top":"16px"}},Y={style:{"margin-top":"0"}},Z={class:"row"},ee={key:0,class:"error",role:"alert"},ae={key:1,class:"ok",role:"status"},se={__name:"Settings",setup(te){var z,C;const y=c(((z=u.user)==null?void 0:z.name)||""),p=c(((C=u.user)==null?void 0:C.email)||""),i=c(""),_=c(""),r=c(""),m=c(""),f=c(!1),w=c(!1);async function U(){var d,t;r.value="",m.value="",f.value=!0;try{const n={};if(y.value&&y.value!==((d=u.user)==null?void 0:d.name)&&(n.name=y.value),p.value&&p.value!==((t=u.user)==null?void 0:t.email)&&(n.email=p.value),Object.keys(n).length){const l=await B.updateProfile(n);u.user=l.user,m.value=s.t("saved")}}catch(n){r.value=n.message}finally{f.value=!1}}async function L(){var d,t,n;if(r.value="",m.value="",i.value.length<4){r.value=s.t("passwordTooShort");return}if(i.value!==_.value){r.value=s.t("passwordMismatch");return}w.value=!0;try{const l=((d=u.user)==null?void 0:d.username)||((t=u.user)==null?void 0:t.id)||"",N=await B.setup({username:l,email:p.value||((n=u.user)==null?void 0:n.email),password:i.value});u.user=N.user,i.value="",_.value="",m.value=s.t("saved")}catch(l){r.value=l.message}finally{w.value=!1}}function P(d){s.set(d)}return(d,t)=>{var n;return g(),h("div",null,[e("h2",null,[k(a($),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),v(" "+o(a(s).t("settings")),1)]),e("div",j,[e("h3",G,[k(a(I),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),v(" "+o(a(s).t("profile")),1)]),e("label",null,[v(o(a(s).t("username"))+" ",1),e("span",H,"("+o(a(s).t("readonly"))+")",1)]),e("input",{value:((n=a(u).user)==null?void 0:n.username)||"",disabled:""},null,8,O),e("label",null,o(a(s).t("name")),1),b(e("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>y.value=l),type:"text"},null,512),[[x,y.value]]),e("label",null,o(a(s).t("email")),1),b(e("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>p.value=l),type:"email"},null,512),[[x,p.value]]),e("div",q,[e("button",{class:"primary",disabled:f.value,onClick:U},[f.value?(g(),h("span",F)):V("",!0),v(o(a(s).t("saveProfile")),1)],8,A)])]),e("div",J,[e("h3",K,[k(a(D),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),v(" "+o(a(s).t("changePassword")),1)]),e("label",null,o(a(s).t("newPassword")),1),b(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i.value=l),type:"password",autocomplete:"new-password"},null,512),[[x,i.value]]),e("label",null,o(a(s).t("confirmPassword")),1),b(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>_.value=l),type:"password",autocomplete:"new-password"},null,512),[[x,_.value]]),e("div",Q,[e("button",{class:"primary",disabled:w.value||!i.value||i.value!==_.value,onClick:L},[w.value?(g(),h("span",W)):V("",!0),v(o(a(s).t("save")),1)],8,R)])]),e("div",X,[e("h3",Y,[k(a(E),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),v(" "+o(a(s).t("language")),1)]),e("div",Z,[e("button",{class:S({active:a(s).locale==="th"}),onClick:t[4]||(t[4]=l=>P("th"))},"ไทย",2),e("button",{class:S({active:a(s).locale==="en"}),onClick:t[5]||(t[5]=l=>P("en"))},"English",2)])]),r.value?(g(),h("div",ee,o(r.value),1)):V("",!0),m.value?(g(),h("div",ae,"✅ "+o(m.value),1)):V("",!0)])}}},ne=T(se,[["__scopeId","data-v-4a5a3af4"]]);export{ne as default}; + */const I=U("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),j={class:"card"},G={style:{"margin-top":"0"}},H={class:"muted"},O=["value"],q={class:"row",style:{gap:"10px","margin-top":"16px"}},A=["disabled"],F={key:0,class:"spinner"},J={class:"card",style:{"margin-top":"16px"}},K={style:{"margin-top":"0"}},Q={class:"row",style:{gap:"10px","margin-top":"16px"}},R=["disabled"],W={key:0,class:"spinner"},X={class:"card",style:{"margin-top":"16px"}},Y={style:{"margin-top":"0"}},Z={class:"row"},ee={key:0,class:"error",role:"alert"},ae={key:1,class:"ok",role:"status"},se={__name:"Settings",setup(te){var P,z;const y=c(((P=u.user)==null?void 0:P.name)||""),p=c(((z=u.user)==null?void 0:z.email)||""),i=c(""),_=c(""),r=c(""),m=c(""),f=c(!1),w=c(!1);async function B(){var d,t;r.value="",m.value="",f.value=!0;try{const n={};if(y.value&&y.value!==((d=u.user)==null?void 0:d.name)&&(n.name=y.value),p.value&&p.value!==((t=u.user)==null?void 0:t.email)&&(n.email=p.value),Object.keys(n).length){const l=await M.updateProfile(n);u.user=l.user,m.value=s.t("saved")}}catch(n){r.value=n.message}finally{f.value=!1}}async function L(){var d,t,n;if(r.value="",m.value="",i.value.length<4){r.value=s.t("passwordTooShort");return}if(i.value!==_.value){r.value=s.t("passwordMismatch");return}w.value=!0;try{const l=((d=u.user)==null?void 0:d.username)||((t=u.user)==null?void 0:t.id)||"",N=await M.setup({username:l,email:p.value||((n=u.user)==null?void 0:n.email),password:i.value});u.user=N.user,i.value="",_.value="",m.value=s.t("saved")}catch(l){r.value=l.message}finally{w.value=!1}}function C(d){s.set(d)}return(d,t)=>{var n;return g(),h("div",null,[e("h2",null,[k(a($),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),v(" "+o(a(s).t("settings")),1)]),e("div",j,[e("h3",G,[k(a(I),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),v(" "+o(a(s).t("profile")),1)]),e("label",null,[v(o(a(s).t("username"))+" ",1),e("span",H,"("+o(a(s).t("readonly"))+")",1)]),e("input",{value:((n=a(u).user)==null?void 0:n.username)||"",disabled:""},null,8,O),e("label",null,o(a(s).t("name")),1),b(e("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>y.value=l),type:"text"},null,512),[[x,y.value]]),e("label",null,o(a(s).t("email")),1),b(e("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>p.value=l),type:"email"},null,512),[[x,p.value]]),e("div",q,[e("button",{class:"primary",disabled:f.value,onClick:B},[f.value?(g(),h("span",F)):V("",!0),v(o(a(s).t("saveProfile")),1)],8,A)])]),e("div",J,[e("h3",K,[k(a(D),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),v(" "+o(a(s).t("changePassword")),1)]),e("label",null,o(a(s).t("newPassword")),1),b(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i.value=l),type:"password",autocomplete:"new-password"},null,512),[[x,i.value]]),e("label",null,o(a(s).t("confirmPassword")),1),b(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>_.value=l),type:"password",autocomplete:"new-password"},null,512),[[x,_.value]]),e("div",Q,[e("button",{class:"primary",disabled:w.value||!i.value||i.value!==_.value,onClick:L},[w.value?(g(),h("span",W)):V("",!0),v(o(a(s).t("save")),1)],8,R)])]),e("div",X,[e("h3",Y,[k(a(E),{size:18,"stroke-width":1.8,style:{"vertical-align":"-3px"}}),v(" "+o(a(s).t("language")),1)]),e("div",Z,[e("button",{class:S({active:a(s).locale==="th"}),onClick:t[4]||(t[4]=l=>C("th"))},"ไทย",2),e("button",{class:S({active:a(s).locale==="en"}),onClick:t[5]||(t[5]=l=>C("en"))},"English",2)])]),r.value?(g(),h("div",ee,o(r.value),1)):V("",!0),m.value?(g(),h("div",ae,"✅ "+o(m.value),1)):V("",!0)])}}},ne=T(se,[["__scopeId","data-v-4a5a3af4"]]);export{ne as default}; diff --git a/frontend/dist/assets/Setup-B6q98ArM.js b/frontend/dist/assets/Setup-B6q98ArM.js deleted file mode 100644 index 5e6668b..0000000 --- a/frontend/dist/assets/Setup-B6q98ArM.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as V,a as v,b as e,l as S,u as s,m as g,t,i as a,h as w,w as _,v as y,d as f,g as K,r,j as N,o as m}from"./index-BCax2GDh.js";import{L as T}from"./lock-uERjsrGr.js";const B={class:"setup-wrap"},U={class:"card setup-card"},C={class:"muted"},D={key:0,class:"error",role:"alert"},L=["disabled"],M={key:0,class:"spinner"},P={key:1},j={__name:"Setup",setup(z){const x=N(),i=r(""),l=r(""),p=r(""),o=r(""),d=r(!1);async function c(){if(o.value="",l.value.length<4){o.value=a.t("passwordTooShort");return}if(l.value!==p.value){o.value=a.t("passwordMismatch");return}d.value=!0;try{await w.finishSetup(i.value.trim(),l.value),x.push("/")}catch(h){o.value=h.message}finally{d.value=!1}}return(h,u)=>{var b,k;return m(),v("div",B,[e("div",U,[e("h1",null,[S(s(T),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),g(" "+t(s(a).t("setupTitle")),1)]),e("p",C,[g(t(s(a).t("setupSubtitle"))+" ",1),e("strong",null,t(((b=s(w).user)==null?void 0:b.name)||((k=s(w).user)==null?void 0:k.username)),1)]),e("label",null,t(s(a).t("email")),1),_(e("input",{"onUpdate:modelValue":u[0]||(u[0]=n=>i.value=n),type:"email",autocomplete:"email",class:"wide",onKeyup:f(c,["enter"])},null,544),[[y,i.value]]),e("label",null,t(s(a).t("newPassword")),1),_(e("input",{"onUpdate:modelValue":u[1]||(u[1]=n=>l.value=n),type:"password",autocomplete:"new-password",class:"wide",onKeyup:f(c,["enter"])},null,544),[[y,l.value]]),e("label",null,t(s(a).t("confirmPassword")),1),_(e("input",{"onUpdate:modelValue":u[2]||(u[2]=n=>p.value=n),type:"password",autocomplete:"new-password",class:"wide",onKeyup:f(c,["enter"])},null,544),[[y,p.value]]),o.value?(m(),v("div",D,t(o.value),1)):K("",!0),e("button",{class:"primary",style:{width:"100%","margin-top":"16px"},disabled:d.value||!i.value||!l.value||l.value!==p.value,onClick:c},[d.value?(m(),v("span",M)):(m(),v("span",P,t(s(a).t("save")),1))],8,L)])])}}},R=V(j,[["__scopeId","data-v-477fc775"]]);export{R as default}; diff --git a/frontend/dist/assets/Setup-BHyRmSn1.css b/frontend/dist/assets/Setup-BHyRmSn1.css new file mode 100644 index 0000000..af33824 --- /dev/null +++ b/frontend/dist/assets/Setup-BHyRmSn1.css @@ -0,0 +1 @@ +.setup-wrap[data-v-a3748c0a]{display:flex;justify-content:center;padding-top:8vh;padding-left:16px;padding-right:16px}.setup-card[data-v-a3748c0a]{width:460px;max-width:100%;padding:28px 30px}h1[data-v-a3748c0a]{margin-top:0;font-size:24px}.wide[data-v-a3748c0a]{width:100%;min-height:46px;font-size:15px;padding:12px 14px}.terms[data-v-a3748c0a]{display:flex;align-items:center;gap:8px;margin-top:14px;font-size:13px}.terms input[data-v-a3748c0a]{width:auto;min-height:auto;margin:0}.terms a[data-v-a3748c0a]{color:var(--accent)} diff --git a/frontend/dist/assets/Setup-Cy1qc0PW.css b/frontend/dist/assets/Setup-Cy1qc0PW.css deleted file mode 100644 index b02c6cd..0000000 --- a/frontend/dist/assets/Setup-Cy1qc0PW.css +++ /dev/null @@ -1 +0,0 @@ -.setup-wrap[data-v-477fc775]{display:flex;justify-content:center;padding-top:8vh;padding-left:16px;padding-right:16px}.setup-card[data-v-477fc775]{width:460px;max-width:100%;padding:28px 30px}h1[data-v-477fc775]{margin-top:0;font-size:24px}.wide[data-v-477fc775]{width:100%;min-height:46px;font-size:15px;padding:12px 14px} diff --git a/frontend/dist/assets/Setup-DlVOMLoz.js b/frontend/dist/assets/Setup-DlVOMLoz.js new file mode 100644 index 0000000..0704388 --- /dev/null +++ b/frontend/dist/assets/Setup-DlVOMLoz.js @@ -0,0 +1 @@ +import{_ as U,a as v,b as e,l as K,u as s,m,t as a,i as l,h as _,w,v as b,d as h,n as N,g as T,r,j as B,o as f}from"./index-Cr5KFgzf.js";import{L as C}from"./lock-CERtIuBL.js";const M={class:"setup-wrap"},D={class:"card setup-card"},L={class:"muted"},P={class:"terms"},j={key:0,class:"error",role:"alert"},z=["disabled"],E={key:0,class:"spinner"},I={key:1},V="/legal",R={__name:"Setup",setup(q){const S=B(),i=r(""),o=r(""),p=r(""),y=r(!1),u=r(""),d=r(!1);async function c(){if(u.value="",o.value.length<4){u.value=l.t("passwordTooShort");return}if(o.value!==p.value){u.value=l.t("passwordMismatch");return}d.value=!0;try{await _.finishSetup(i.value.trim(),o.value,!0),S.push("/")}catch(k){u.value=k.message}finally{d.value=!1}}return(k,t)=>{var g,x;return f(),v("div",M,[e("div",D,[e("h1",null,[K(s(C),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),m(" "+a(s(l).t("setupTitle")),1)]),e("p",L,[m(a(s(l).t("setupSubtitle"))+" ",1),e("strong",null,a(((g=s(_).user)==null?void 0:g.name)||((x=s(_).user)==null?void 0:x.username)),1)]),e("label",null,a(s(l).t("email")),1),w(e("input",{"onUpdate:modelValue":t[0]||(t[0]=n=>i.value=n),type:"email",autocomplete:"email",class:"wide",onKeyup:h(c,["enter"])},null,544),[[b,i.value]]),e("label",null,a(s(l).t("newPassword")),1),w(e("input",{"onUpdate:modelValue":t[1]||(t[1]=n=>o.value=n),type:"password",autocomplete:"new-password",class:"wide",onKeyup:h(c,["enter"])},null,544),[[b,o.value]]),e("label",null,a(s(l).t("confirmPassword")),1),w(e("input",{"onUpdate:modelValue":t[2]||(t[2]=n=>p.value=n),type:"password",autocomplete:"new-password",class:"wide",onKeyup:h(c,["enter"])},null,544),[[b,p.value]]),e("label",P,[w(e("input",{"onUpdate:modelValue":t[3]||(t[3]=n=>y.value=n),type:"checkbox"},null,512),[[N,y.value]]),e("span",null,[t[4]||(t[4]=m("ฉันยอมรับ ",-1)),e("a",{href:V,target:"_blank",rel:"noopener"},"ข้อกำหนดการใช้งาน"),t[5]||(t[5]=m(" และ ",-1)),e("a",{href:V,target:"_blank",rel:"noopener"},"นโยบายความเป็นส่วนตัว")])]),u.value?(f(),v("div",j,a(u.value),1)):T("",!0),e("button",{class:"primary",style:{width:"100%","margin-top":"16px"},disabled:d.value||!i.value||!o.value||o.value!==p.value||!y.value,onClick:c},[d.value?(f(),v("span",E)):(f(),v("span",I,a(s(l).t("save")),1))],8,z)])])}}},G=U(R,[["__scopeId","data-v-a3748c0a"]]);export{G as default}; diff --git a/frontend/dist/assets/Training-C9KC4ygo.js b/frontend/dist/assets/Training-DuHwYoAr.js similarity index 52% rename from frontend/dist/assets/Training-C9KC4ygo.js rename to frontend/dist/assets/Training-DuHwYoAr.js index 0f3a473..eb307f1 100644 --- a/frontend/dist/assets/Training-C9KC4ygo.js +++ b/frontend/dist/assets/Training-DuHwYoAr.js @@ -1 +1 @@ -import{_ as w,n as b,x as B,h as d,a as l,b as t,l as c,u as s,m as _,t as e,i as n,p as m,f as h,g as f,F as C,s as A,r as g,y as N,o as i,B as k}from"./index-BCax2GDh.js";import{T as P}from"./target-BFC5gbdb.js";import{B as T}from"./book-open-C7SxBVkN.js";import{P as z}from"./plus-B9zMVgv0.js";const V={class:"row",style:{"align-items":"center","margin-bottom":"16px"}},F={style:{margin:"0"}},L={class:"row",style:{"margin-left":"auto",gap:"10px"}},S={class:"soft"},$={class:"primary"},j={class:"muted"},D={key:0,class:"card",style:{"min-height":"80px"}},E={key:1,class:"card empty-state"},G={key:0},I={key:1},M={class:"grid"},O={class:"card lift train-card"},q={class:"row",style:{"justify-content":"space-between"}},H={class:"muted",style:{margin:"6px 0 12px"}},J={class:"row",style:{gap:"8px"}},K={class:"muted"},Q={class:"primary",style:{width:"100%","margin-top":"12px"}},R={__name:"Training",setup(U){const u=g([]),y=g(!0);function v(a){return a.sales_kit&&a.sales_kit.productName||a.input&&a.input.product||""}function x(a){return a.personas||a.persona_count||0}return b(async()=>{try{const a=(await B.listGroups()).groups||[];u.value=d.isAdmin?a:a.filter(r=>r.status==="ready")}finally{y.value=!1}}),(a,r)=>{const p=N("router-link");return i(),l("div",null,[t("div",V,[t("h2",F,[c(s(P),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),_(" "+e(s(n).t("training")),1)]),t("div",L,[c(p,{to:"/guide"},{default:m(()=>[t("button",S,[c(s(T),{size:18,"stroke-width":1.8}),r[0]||(r[0]=_(" คู่มือ",-1))])]),_:1}),s(d).isAdmin?(i(),h(p,{key:0,to:"/admin/new-group"},{default:m(()=>[t("button",$,[c(s(z),{size:18,"stroke-width":2}),_(" "+e(s(n).t("addProduct")),1)])]),_:1})):f("",!0)])]),t("p",j,e(s(n).t("trainingSubtitle")),1),y.value?(i(),l("div",D,[...r[1]||(r[1]=[t("div",{class:"skeleton",style:{height:"50px"}},null,-1)])])):u.value.length===0?(i(),l("div",E,[t("strong",null,e(s(n).t("noTraining")),1),s(d).isAdmin?(i(),l("span",G,'Click "'+e(s(n).t("addProduct"))+'" to create a persona group.',1)):(i(),l("span",I,"Ask an admin to create a persona group first."))])):f("",!0),t("div",M,[(i(!0),l(C,null,A(u.value,o=>(i(),h(p,{key:o.id,to:s(d).isAdmin?`/admin/groups/${o.id}/edit`:`/groups/${o.id}/personas`,style:{"text-decoration":"none"}},{default:m(()=>[t("div",O,[t("div",q,[t("strong",null,e(o.title),1),t("span",{class:k(["badge",o.status==="ready"?"ready":"draft"])},e(o.status),3)]),t("div",H,e(v(o)),1),t("div",J,[t("span",{class:k(["badge",o.channel||"line"])},e(o.channel||"line"),3),t("span",K,e(x(o))+" "+e(s(n).t("personas").toLowerCase()),1)]),t("button",Q,e(s(d).isAdmin?o.status==="ready"?s(n).t("managePersonas"):s(n).t("analyze"):s(n).t("selectPersona")),1)])]),_:2},1032,["to"]))),128))])])}}},tt=w(R,[["__scopeId","data-v-e39df241"]]);export{tt as default}; +import{_ as w,p as b,y as C,h as d,a as l,b as t,l as c,u as s,m as _,t as e,i as n,q as m,f as h,g as f,F as z,x as A,r as g,z as B,o as i,C as k}from"./index-Cr5KFgzf.js";import{T as N}from"./target-CUBX0ybh.js";import{B as P}from"./book-open-Yn_Ya1If.js";import{P as T}from"./plus-zB_wweS5.js";const V={class:"row",style:{"align-items":"center","margin-bottom":"16px"}},F={style:{margin:"0"}},L={class:"row",style:{"margin-left":"auto",gap:"10px"}},S={class:"soft"},$={class:"primary"},j={class:"muted"},q={key:0,class:"card",style:{"min-height":"80px"}},D={key:1,class:"card empty-state"},E={key:0},G={key:1},I={class:"grid"},M={class:"card lift train-card"},O={class:"row",style:{"justify-content":"space-between"}},H={class:"muted",style:{margin:"6px 0 12px"}},J={class:"row",style:{gap:"8px"}},K={class:"muted"},Q={class:"primary",style:{width:"100%","margin-top":"12px"}},R={__name:"Training",setup(U){const u=g([]),y=g(!0);function v(a){return a.sales_kit&&a.sales_kit.productName||a.input&&a.input.product||""}function x(a){return a.personas||a.persona_count||0}return b(async()=>{try{const a=(await C.listGroups()).groups||[];u.value=d.isAdmin?a:a.filter(r=>r.status==="ready")}finally{y.value=!1}}),(a,r)=>{const p=B("router-link");return i(),l("div",null,[t("div",V,[t("h2",F,[c(s(N),{size:22,"stroke-width":1.8,style:{"vertical-align":"-4px"}}),_(" "+e(s(n).t("training")),1)]),t("div",L,[c(p,{to:"/guide"},{default:m(()=>[t("button",S,[c(s(P),{size:18,"stroke-width":1.8}),r[0]||(r[0]=_(" คู่มือ",-1))])]),_:1}),s(d).isAdmin?(i(),h(p,{key:0,to:"/admin/new-group"},{default:m(()=>[t("button",$,[c(s(T),{size:18,"stroke-width":2}),_(" "+e(s(n).t("addProduct")),1)])]),_:1})):f("",!0)])]),t("p",j,e(s(n).t("trainingSubtitle")),1),y.value?(i(),l("div",q,[...r[1]||(r[1]=[t("div",{class:"skeleton",style:{height:"50px"}},null,-1)])])):u.value.length===0?(i(),l("div",D,[t("strong",null,e(s(n).t("noTraining")),1),s(d).isAdmin?(i(),l("span",E,'Click "'+e(s(n).t("addProduct"))+'" to create a persona group.',1)):(i(),l("span",G,"Ask an admin to create a persona group first."))])):f("",!0),t("div",I,[(i(!0),l(z,null,A(u.value,o=>(i(),h(p,{key:o.id,to:s(d).isAdmin?`/admin/groups/${o.id}/edit`:`/groups/${o.id}/personas`,style:{"text-decoration":"none"}},{default:m(()=>[t("div",M,[t("div",O,[t("strong",null,e(o.title),1),t("span",{class:k(["badge",o.status==="ready"?"ready":"draft"])},e(o.status),3)]),t("div",H,e(v(o)),1),t("div",J,[t("span",{class:k(["badge",o.channel||"line"])},e(o.channel||"line"),3),t("span",K,e(x(o))+" "+e(s(n).t("personas").toLowerCase()),1)]),t("button",Q,e(s(d).isAdmin?o.status==="ready"?s(n).t("managePersonas"):s(n).t("analyze"):s(n).t("selectPersona")),1)])]),_:2},1032,["to"]))),128))])])}}},tt=w(R,[["__scopeId","data-v-e39df241"]]);export{tt as default}; diff --git a/frontend/dist/assets/arrow-left-diPpM4Dj.js b/frontend/dist/assets/arrow-left-D6PVN9vk.js similarity index 86% rename from frontend/dist/assets/arrow-left-diPpM4Dj.js rename to frontend/dist/assets/arrow-left-D6PVN9vk.js index b8a42ac..c169750 100644 --- a/frontend/dist/assets/arrow-left-diPpM4Dj.js +++ b/frontend/dist/assets/arrow-left-D6PVN9vk.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCax2GDh.js";/** +import{c as e}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/book-open-C7SxBVkN.js b/frontend/dist/assets/book-open-Yn_Ya1If.js similarity index 90% rename from frontend/dist/assets/book-open-C7SxBVkN.js rename to frontend/dist/assets/book-open-Yn_Ya1If.js index 735b650..9df19c9 100644 --- a/frontend/dist/assets/book-open-C7SxBVkN.js +++ b/frontend/dist/assets/book-open-Yn_Ya1If.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCax2GDh.js";/** +import{c as a}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/index-BCax2GDh.js b/frontend/dist/assets/index-Cr5KFgzf.js similarity index 81% rename from frontend/dist/assets/index-BCax2GDh.js rename to frontend/dist/assets/index-Cr5KFgzf.js index 5360221..8a402d3 100644 --- a/frontend/dist/assets/index-BCax2GDh.js +++ b/frontend/dist/assets/index-Cr5KFgzf.js @@ -1,30 +1,30 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-BFjXrLpo.js","assets/Login-j4sHK_z1.css","assets/Setup-B6q98ArM.js","assets/lock-uERjsrGr.js","assets/Setup-Cy1qc0PW.css","assets/Analytics-DzK25pzJ.js","assets/users-NPxa3eQ_.js","assets/plus-B9zMVgv0.js","assets/Analytics-CQgwlaXy.css","assets/MyBoard-wXpWmFYg.js","assets/layout-dashboard-Djj77ueX.js","assets/MyBoard-B7ypQ1JT.css","assets/Training-C9KC4ygo.js","assets/target-BFC5gbdb.js","assets/book-open-C7SxBVkN.js","assets/Training-BYBkfggr.css","assets/Personas-BK-v3zL-.js","assets/arrow-left-diPpM4Dj.js","assets/Personas-CskAUbZv.css","assets/Chat-B4cA4NlX.js","assets/Chat-Dhsij-Zk.css","assets/Settings-k8fzlPYr.js","assets/Settings-BCN2EZQ5.css","assets/Guide-Bx9T4hBF.js","assets/sparkles-E3Xd6eY7.js","assets/GroupBuilder-DpQWbscg.js","assets/GroupBuilder-CpbMByEC.css","assets/GroupEdit-PGVs7eZc.js","assets/GroupEdit-CFwXUOV9.css","assets/AdminUsers-BXR4J5iM.js","assets/AdminUsers-B0sl0uHS.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-B1BFq5lO.js","assets/Login-j4sHK_z1.css","assets/Setup-DlVOMLoz.js","assets/lock-CERtIuBL.js","assets/Setup-BHyRmSn1.css","assets/Analytics-CWNDFvS5.js","assets/users-CknR8rxo.js","assets/plus-zB_wweS5.js","assets/Analytics-CQgwlaXy.css","assets/MyBoard-C2XKgiYF.js","assets/layout-dashboard-D4d1g6OI.js","assets/MyBoard-B7ypQ1JT.css","assets/Training-DuHwYoAr.js","assets/target-CUBX0ybh.js","assets/book-open-Yn_Ya1If.js","assets/Training-BYBkfggr.css","assets/Personas-C1zt2UAW.js","assets/arrow-left-D6PVN9vk.js","assets/Personas-CskAUbZv.css","assets/Chat-BUYTG6XR.js","assets/Chat-Dhsij-Zk.css","assets/Settings-C6ZMNY2Q.js","assets/Settings-BCN2EZQ5.css","assets/Guide-PlIFuOuL.js","assets/sparkles-CWO9Md85.js","assets/GroupBuilder-j2iPAhDG.js","assets/GroupBuilder-CpbMByEC.css","assets/GroupEdit-CJ3zMSjJ.js","assets/GroupEdit-CFwXUOV9.css","assets/AdminUsers-Bev0W-FI.js","assets/AdminUsers-B0sl0uHS.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/** * @vue/shared v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function js(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const X={},Ut=[],Ye=()=>{},ui=()=>!1,Wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),qn=e=>e.startsWith("onUpdate:"),de=Object.assign,ks=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Lo=Object.prototype.hasOwnProperty,W=(e,t)=>Lo.call(e,t),V=Array.isArray,Bt=e=>Sn(e)==="[object Map]",Yt=e=>Sn(e)==="[object Set]",ur=e=>Sn(e)==="[object Date]",B=e=>typeof e=="function",se=e=>typeof e=="string",Je=e=>typeof e=="symbol",q=e=>e!==null&&typeof e=="object",fi=e=>(q(e)||B(e))&&B(e.then)&&B(e.catch),di=Object.prototype.toString,Sn=e=>di.call(e),Vo=e=>Sn(e).slice(8,-1),hi=e=>Sn(e)==="[object Object]",Gs=e=>se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,cn=js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Fo=/-\w/g,ve=zn(e=>e.replace(Fo,t=>t.slice(1).toUpperCase())),Ho=/\B([A-Z])/g,bt=zn(e=>e.replace(Ho,"-$1").toLowerCase()),Yn=zn(e=>e.charAt(0).toUpperCase()+e.slice(1)),ls=zn(e=>e?`on${Yn(e)}`:""),ze=(e,t)=>!Object.is(e,t),In=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Jn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let fr;const Qn=()=>fr||(fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ks(e){if(V(e)){const t={};for(let n=0;n{if(n){const s=n.split(Bo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function jt(e){let t="";if(se(e))t=e;else if(V(e))for(let n=0;nyt(n,t))}const mi=e=>!!(e&&e.__v_isRef===!0),Rt=e=>se(e)?e:e==null?"":V(e)||q(e)&&(e.toString===di||!B(e.toString))?mi(e)?Rt(e.value):JSON.stringify(e,_i,2):String(e),_i=(e,t)=>mi(t)?_i(e,t.value):Bt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[cs(s,i)+" =>"]=r,n),{})}:Yt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>cs(n))}:Je(t)?cs(t):q(t)&&!V(t)&&!hi(t)?String(t):t,cs=(e,t="")=>{var n;return Je(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**/function js(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const X={},Ut=[],Je=()=>{},ui=()=>!1,Wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),qn=e=>e.startsWith("onUpdate:"),de=Object.assign,ks=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Lo=Object.prototype.hasOwnProperty,W=(e,t)=>Lo.call(e,t),V=Array.isArray,Bt=e=>Sn(e)==="[object Map]",Jt=e=>Sn(e)==="[object Set]",ur=e=>Sn(e)==="[object Date]",B=e=>typeof e=="function",se=e=>typeof e=="string",Ye=e=>typeof e=="symbol",q=e=>e!==null&&typeof e=="object",fi=e=>(q(e)||B(e))&&B(e.then)&&B(e.catch),di=Object.prototype.toString,Sn=e=>di.call(e),Vo=e=>Sn(e).slice(8,-1),hi=e=>Sn(e)==="[object Object]",Gs=e=>se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,cn=js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Fo=/-\w/g,ve=zn(e=>e.replace(Fo,t=>t.slice(1).toUpperCase())),Ho=/\B([A-Z])/g,bt=zn(e=>e.replace(Ho,"-$1").toLowerCase()),Jn=zn(e=>e.charAt(0).toUpperCase()+e.slice(1)),ls=zn(e=>e?`on${Jn(e)}`:""),ze=(e,t)=>!Object.is(e,t),In=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Yn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let fr;const Qn=()=>fr||(fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ks(e){if(V(e)){const t={};for(let n=0;n{if(n){const s=n.split(Bo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function jt(e){let t="";if(se(e))t=e;else if(V(e))for(let n=0;nyt(n,t))}const mi=e=>!!(e&&e.__v_isRef===!0),Rt=e=>se(e)?e:e==null?"":V(e)||q(e)&&(e.toString===di||!B(e.toString))?mi(e)?Rt(e.value):JSON.stringify(e,_i,2):String(e),_i=(e,t)=>mi(t)?_i(e,t.value):Bt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[cs(s,i)+" =>"]=r,n),{})}:Jt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>cs(n))}:Ye(t)?cs(t):q(t)&&!V(t)&&!hi(t)?String(t):t,cs=(e,t="")=>{var n;return Ye(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let fe;class Wo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&fe&&(fe.active?(this.parent=fe,this.index=(fe.scopes||(fe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(fe===this)fe=this.prevScope;else{let t=fe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(un){let t=un;for(un=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;an;){let t=an;for(an=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ei(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),zs(s),zo(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Rs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Si(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Si(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===gn)||(e.globalVersion=gn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Rs(e))))return;e.flags|=2;const t=e.dep,n=Z,s=Ie;Z=e,Ie=!0;try{Ei(e);const r=e.fn(e._value);(t.version===0||ze(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Z=n,Ie=s,wi(e),e.flags&=-3}}function zs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)zs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zo(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ie=!0;const Ai=[];function ot(){Ai.push(Ie),Ie=!1}function lt(){const e=Ai.pop();Ie=e===void 0?!0:e}function dr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Z;Z=void 0;try{t()}finally{Z=n}}}let gn=0;class Yo{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ys{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Z||!Ie||Z===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Z)n=this.activeLink=new Yo(Z,this),Z.deps?(n.prevDep=Z.depsTail,Z.depsTail.nextDep=n,Z.depsTail=n):Z.deps=Z.depsTail=n,Ri(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Z.depsTail,n.nextDep=void 0,Z.depsTail.nextDep=n,Z.depsTail=n,Z.deps===n&&(Z.deps=s)}return n}trigger(t){this.version++,gn++,this.notify(t)}notify(t){Ws();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qs()}}}function Ri(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ri(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const xs=new WeakMap,Ct=Symbol(""),Ts=Symbol(""),mn=Symbol("");function he(e,t,n){if(Ie&&Z){let s=xs.get(e);s||xs.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Ys),r.map=s,r.key=n),r.track()}}function st(e,t,n,s,r,i){const o=xs.get(e);if(!o){gn++;return}const l=c=>{c&&c.trigger()};if(Ws(),t==="clear")o.forEach(l);else{const c=V(e),f=c&&Gs(n);if(c&&n==="length"){const u=Number(s);o.forEach((h,g)=>{(g==="length"||g===mn||!Je(g)&&g>=u)&&l(h)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),f&&l(o.get(mn)),t){case"add":c?f&&l(o.get("length")):(l(o.get(Ct)),Bt(e)&&l(o.get(Ts)));break;case"delete":c||(l(o.get(Ct)),Bt(e)&&l(o.get(Ts)));break;case"set":Bt(e)&&l(o.get(Ct));break}}qs()}function Dt(e){const t=$(e);return t===e?t:(he(t,"iterate",mn),Pe(e)?t:t.map(Me))}function Xn(e){return he(e=$(e),"iterate",mn),e}function We(e,t){return ct(e)?Kt(Pt(e)?Me(t):t):Me(t)}const Jo={__proto__:null,[Symbol.iterator](){return us(this,Symbol.iterator,e=>We(this,e))},concat(...e){return Dt(this).concat(...e.map(t=>V(t)?Dt(t):t))},entries(){return us(this,"entries",e=>(e[1]=We(this,e[1]),e))},every(e,t){return Xe(this,"every",e,t,void 0,arguments)},filter(e,t){return Xe(this,"filter",e,t,n=>n.map(s=>We(this,s)),arguments)},find(e,t){return Xe(this,"find",e,t,n=>We(this,n),arguments)},findIndex(e,t){return Xe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xe(this,"findLast",e,t,n=>We(this,n),arguments)},findLastIndex(e,t){return Xe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xe(this,"forEach",e,t,void 0,arguments)},includes(...e){return fs(this,"includes",e)},indexOf(...e){return fs(this,"indexOf",e)},join(e){return Dt(this).join(e)},lastIndexOf(...e){return fs(this,"lastIndexOf",e)},map(e,t){return Xe(this,"map",e,t,void 0,arguments)},pop(){return Zt(this,"pop")},push(...e){return Zt(this,"push",e)},reduce(e,...t){return hr(this,"reduce",e,t)},reduceRight(e,...t){return hr(this,"reduceRight",e,t)},shift(){return Zt(this,"shift")},some(e,t){return Xe(this,"some",e,t,void 0,arguments)},splice(...e){return Zt(this,"splice",e)},toReversed(){return Dt(this).toReversed()},toSorted(e){return Dt(this).toSorted(e)},toSpliced(...e){return Dt(this).toSpliced(...e)},unshift(...e){return Zt(this,"unshift",e)},values(){return us(this,"values",e=>We(this,e))}};function us(e,t,n){const s=Xn(e),r=s[t]();return s!==e&&!Pe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Qo=Array.prototype;function Xe(e,t,n,s,r,i){const o=Xn(e),l=o!==e&&!Pe(e),c=o[t];if(c!==Qo[t]){const h=c.apply(e,i);return l?Me(h):h}let f=n;o!==e&&(l?f=function(h,g){return n.call(this,We(e,h),g,e)}:n.length>2&&(f=function(h,g){return n.call(this,h,g,e)}));const u=c.call(o,f,s);return l&&r?r(u):u}function hr(e,t,n,s){const r=Xn(e),i=r!==e&&!Pe(e);let o=n,l=!1;r!==e&&(i?(l=s.length===0,o=function(f,u,h){return l&&(l=!1,f=We(e,f)),n.call(this,f,We(e,u),h,e)}):n.length>3&&(o=function(f,u,h){return n.call(this,f,u,h,e)}));const c=r[t](o,...s);return l?We(e,c):c}function fs(e,t,n){const s=$(e);he(s,"iterate",mn);const r=s[t](...n);return(r===-1||r===!1)&&Xs(n[0])?(n[0]=$(n[0]),s[t](...n)):r}function Zt(e,t,n=[]){ot(),Ws();const s=$(e)[t].apply(e,n);return qs(),lt(),s}const Xo=js("__proto__,__v_isRef,__isVue"),xi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Je));function Zo(e){Je(e)||(e=String(e));const t=$(this);return he(t,"has",e),t.hasOwnProperty(e)}class Ti{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?al:Ii:i?Oi:Pi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=V(t);if(!r){let c;if(o&&(c=Jo[n]))return c;if(n==="hasOwnProperty")return Zo}const l=Reflect.get(t,n,ge(t)?t:s);if((Je(n)?xi.has(n):Xo(n))||(r||he(t,"get",n),i))return l;if(ge(l)){const c=o&&Gs(n)?l:l.value;return r&&q(c)?Ps(c):c}return q(l)?r?Ps(l):Jt(l):l}}class Ci extends Ti{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=V(t)&&Gs(n);if(!this._isShallow){const f=ct(i);if(!Pe(s)&&!ct(s)&&(i=$(i),s=$(s)),!o&&ge(i)&&!ge(s))return f||(i.value=s),!0}const l=o?Number(n)e,xn=e=>Reflect.getPrototypeOf(e);function rl(e,t,n){return function(...s){const r=this.__v_raw,i=$(r),o=Bt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,f=r[e](...s),u=n?Cs:t?Kt:Me;return!t&&he(i,"iterate",c?Ts:Ct),de(Object.create(f),{next(){const{value:h,done:g}=f.next();return g?{value:h,done:g}:{value:l?[u(h[0]),u(h[1])]:u(h),done:g}}})}}function Tn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function il(e,t){const n={get(r){const i=this.__v_raw,o=$(i),l=$(r);e||(ze(r,l)&&he(o,"get",r),he(o,"get",l));const{has:c}=xn(o),f=t?Cs:e?Kt:Me;if(c.call(o,r))return f(i.get(r));if(c.call(o,l))return f(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&he($(r),"iterate",Ct),r.size},has(r){const i=this.__v_raw,o=$(i),l=$(r);return e||(ze(r,l)&&he(o,"has",r),he(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=$(l),f=t?Cs:e?Kt:Me;return!e&&he(c,"iterate",Ct),l.forEach((u,h)=>r.call(i,f(u),f(h),o))}};return de(n,e?{add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear")}:{add(r){const i=$(this),o=xn(i),l=$(r),c=!t&&!Pe(r)&&!ct(r)?l:r;return o.has.call(i,c)||ze(r,c)&&o.has.call(i,r)||ze(l,c)&&o.has.call(i,l)||(i.add(c),st(i,"add",c,c)),this},set(r,i){!t&&!Pe(i)&&!ct(i)&&(i=$(i));const o=$(this),{has:l,get:c}=xn(o);let f=l.call(o,r);f||(r=$(r),f=l.call(o,r));const u=c.call(o,r);return o.set(r,i),f?ze(i,u)&&st(o,"set",r,i):st(o,"add",r,i),this},delete(r){const i=$(this),{has:o,get:l}=xn(i);let c=o.call(i,r);c||(r=$(r),c=o.call(i,r)),l&&l.call(i,r);const f=i.delete(r);return c&&st(i,"delete",r,void 0),f},clear(){const r=$(this),i=r.size!==0,o=r.clear();return i&&st(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=rl(r,e,t)}),n}function Js(e,t){const n=il(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(W(n,r)&&r in s?n:s,r,i)}const ol={get:Js(!1,!1)},ll={get:Js(!1,!0)},cl={get:Js(!0,!1)};const Pi=new WeakMap,Oi=new WeakMap,Ii=new WeakMap,al=new WeakMap;function ul(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jt(e){return ct(e)?e:Qs(e,!1,tl,ol,Pi)}function Ni(e){return Qs(e,!1,sl,ll,Oi)}function Ps(e){return Qs(e,!0,nl,cl,Ii)}function Qs(e,t,n,s,r){if(!q(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=ul(Vo(e));if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function Pt(e){return ct(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function ct(e){return!!(e&&e.__v_isReadonly)}function Pe(e){return!!(e&&e.__v_isShallow)}function Xs(e){return e?!!e.__v_raw:!1}function $(e){const t=e&&e.__v_raw;return t?$(t):e}function fl(e){return!W(e,"__v_skip")&&Object.isExtensible(e)&&pi(e,"__v_skip",!0),e}const Me=e=>q(e)?Jt(e):e,Kt=e=>q(e)?Ps(e):e;function ge(e){return e?e.__v_isRef===!0:!1}function dl(e){return Mi(e,!1)}function hl(e){return Mi(e,!0)}function Mi(e,t){return ge(e)?e:new pl(e,t)}class pl{constructor(t,n){this.dep=new Ys,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:$(t),this._value=n?t:Me(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Pe(t)||ct(t);t=s?t:$(t),ze(t,n)&&(this._rawValue=t,this._value=s?t:Me(t),this.dep.trigger())}}function ae(e){return ge(e)?e.value:e}const gl={get:(e,t,n)=>t==="__v_raw"?e:ae(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ge(r)&&!ge(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Di(e){return Pt(e)?e:new Proxy(e,gl)}class ml{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ys(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Z!==this)return bi(this,!0),!0}get value(){const t=this.dep.track();return Si(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function _l(e,t,n=!1){let s,r;return B(e)?s=e:(s=e.get,r=e.set),new ml(s,r,n)}const Cn={},Vn=new WeakMap;let xt;function yl(e,t=!1,n=xt){if(n){let s=Vn.get(n);s||Vn.set(n,s=[]),s.push(e)}}function vl(e,t,n=X){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,f=O=>r?O:Pe(O)||r===!1||r===0?rt(O,1):rt(O);let u,h,g,m,I=!1,R=!1;if(ge(e)?(h=()=>e.value,I=Pe(e)):Pt(e)?(h=()=>f(e),I=!0):V(e)?(R=!0,I=e.some(O=>Pt(O)||Pe(O)),h=()=>e.map(O=>{if(ge(O))return O.value;if(Pt(O))return f(O);if(B(O))return c?c(O,2):O()})):B(e)?t?h=c?()=>c(e,2):e:h=()=>{if(g){ot();try{g()}finally{lt()}}const O=xt;xt=u;try{return c?c(e,3,[m]):e(m)}finally{xt=O}}:h=Ye,t&&r){const O=h,J=r===!0?1/0:r;h=()=>rt(O(),J)}const U=qo(),F=()=>{u.stop(),U&&U.active&&ks(U.effects,u)};if(i&&t){const O=t;t=(...J)=>{const oe=O(...J);return F(),oe}}let C=R?new Array(e.length).fill(Cn):Cn;const N=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const J=u.run();if(O||r||I||(R?J.some((oe,te)=>ze(oe,C[te])):ze(J,C))){g&&g();const oe=xt;xt=u;try{const te=[J,C===Cn?void 0:R&&C[0]===Cn?[]:C,m];C=J,c?c(t,3,te):t(...te)}finally{xt=oe}}}else u.run()};return l&&l(N),u=new yi(h),u.scheduler=o?()=>o(N,!1):N,m=O=>yl(O,!1,u),g=u.onStop=()=>{const O=Vn.get(u);if(O){if(c)c(O,4);else for(const J of O)J();Vn.delete(u)}},t?s?N(!0):C=u.run():o?o(N.bind(null,!0),!0):u.run(),F.pause=u.pause.bind(u),F.resume=u.resume.bind(u),F.stop=F,F}function rt(e,t=1/0,n){if(t<=0||!q(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ge(e))rt(e.value,t,n);else if(V(e))for(let s=0;s{rt(s,t,n)});else if(hi(e)){for(const s in e)rt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&rt(e[s],t,n)}return e}/** +**/let fe;class Wo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&fe&&(fe.active?(this.parent=fe,this.index=(fe.scopes||(fe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(fe===this)fe=this.prevScope;else{let t=fe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(un){let t=un;for(un=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;an;){let t=an;for(an=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ei(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),zs(s),zo(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Rs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Si(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Si(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===gn)||(e.globalVersion=gn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Rs(e))))return;e.flags|=2;const t=e.dep,n=Z,s=Ie;Z=e,Ie=!0;try{Ei(e);const r=e.fn(e._value);(t.version===0||ze(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Z=n,Ie=s,wi(e),e.flags&=-3}}function zs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)zs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zo(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ie=!0;const Ai=[];function ot(){Ai.push(Ie),Ie=!1}function lt(){const e=Ai.pop();Ie=e===void 0?!0:e}function dr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Z;Z=void 0;try{t()}finally{Z=n}}}let gn=0;class Jo{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Js{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Z||!Ie||Z===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Z)n=this.activeLink=new Jo(Z,this),Z.deps?(n.prevDep=Z.depsTail,Z.depsTail.nextDep=n,Z.depsTail=n):Z.deps=Z.depsTail=n,Ri(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Z.depsTail,n.nextDep=void 0,Z.depsTail.nextDep=n,Z.depsTail=n,Z.deps===n&&(Z.deps=s)}return n}trigger(t){this.version++,gn++,this.notify(t)}notify(t){Ws();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qs()}}}function Ri(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ri(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const xs=new WeakMap,Ct=Symbol(""),Ts=Symbol(""),mn=Symbol("");function he(e,t,n){if(Ie&&Z){let s=xs.get(e);s||xs.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Js),r.map=s,r.key=n),r.track()}}function st(e,t,n,s,r,i){const o=xs.get(e);if(!o){gn++;return}const l=c=>{c&&c.trigger()};if(Ws(),t==="clear")o.forEach(l);else{const c=V(e),f=c&&Gs(n);if(c&&n==="length"){const u=Number(s);o.forEach((h,g)=>{(g==="length"||g===mn||!Ye(g)&&g>=u)&&l(h)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),f&&l(o.get(mn)),t){case"add":c?f&&l(o.get("length")):(l(o.get(Ct)),Bt(e)&&l(o.get(Ts)));break;case"delete":c||(l(o.get(Ct)),Bt(e)&&l(o.get(Ts)));break;case"set":Bt(e)&&l(o.get(Ct));break}}qs()}function Dt(e){const t=$(e);return t===e?t:(he(t,"iterate",mn),Pe(e)?t:t.map(Me))}function Xn(e){return he(e=$(e),"iterate",mn),e}function We(e,t){return ct(e)?Kt(Pt(e)?Me(t):t):Me(t)}const Yo={__proto__:null,[Symbol.iterator](){return us(this,Symbol.iterator,e=>We(this,e))},concat(...e){return Dt(this).concat(...e.map(t=>V(t)?Dt(t):t))},entries(){return us(this,"entries",e=>(e[1]=We(this,e[1]),e))},every(e,t){return Xe(this,"every",e,t,void 0,arguments)},filter(e,t){return Xe(this,"filter",e,t,n=>n.map(s=>We(this,s)),arguments)},find(e,t){return Xe(this,"find",e,t,n=>We(this,n),arguments)},findIndex(e,t){return Xe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xe(this,"findLast",e,t,n=>We(this,n),arguments)},findLastIndex(e,t){return Xe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xe(this,"forEach",e,t,void 0,arguments)},includes(...e){return fs(this,"includes",e)},indexOf(...e){return fs(this,"indexOf",e)},join(e){return Dt(this).join(e)},lastIndexOf(...e){return fs(this,"lastIndexOf",e)},map(e,t){return Xe(this,"map",e,t,void 0,arguments)},pop(){return Zt(this,"pop")},push(...e){return Zt(this,"push",e)},reduce(e,...t){return hr(this,"reduce",e,t)},reduceRight(e,...t){return hr(this,"reduceRight",e,t)},shift(){return Zt(this,"shift")},some(e,t){return Xe(this,"some",e,t,void 0,arguments)},splice(...e){return Zt(this,"splice",e)},toReversed(){return Dt(this).toReversed()},toSorted(e){return Dt(this).toSorted(e)},toSpliced(...e){return Dt(this).toSpliced(...e)},unshift(...e){return Zt(this,"unshift",e)},values(){return us(this,"values",e=>We(this,e))}};function us(e,t,n){const s=Xn(e),r=s[t]();return s!==e&&!Pe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Qo=Array.prototype;function Xe(e,t,n,s,r,i){const o=Xn(e),l=o!==e&&!Pe(e),c=o[t];if(c!==Qo[t]){const h=c.apply(e,i);return l?Me(h):h}let f=n;o!==e&&(l?f=function(h,g){return n.call(this,We(e,h),g,e)}:n.length>2&&(f=function(h,g){return n.call(this,h,g,e)}));const u=c.call(o,f,s);return l&&r?r(u):u}function hr(e,t,n,s){const r=Xn(e),i=r!==e&&!Pe(e);let o=n,l=!1;r!==e&&(i?(l=s.length===0,o=function(f,u,h){return l&&(l=!1,f=We(e,f)),n.call(this,f,We(e,u),h,e)}):n.length>3&&(o=function(f,u,h){return n.call(this,f,u,h,e)}));const c=r[t](o,...s);return l?We(e,c):c}function fs(e,t,n){const s=$(e);he(s,"iterate",mn);const r=s[t](...n);return(r===-1||r===!1)&&Xs(n[0])?(n[0]=$(n[0]),s[t](...n)):r}function Zt(e,t,n=[]){ot(),Ws();const s=$(e)[t].apply(e,n);return qs(),lt(),s}const Xo=js("__proto__,__v_isRef,__isVue"),xi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ye));function Zo(e){Ye(e)||(e=String(e));const t=$(this);return he(t,"has",e),t.hasOwnProperty(e)}class Ti{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?al:Ii:i?Oi:Pi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=V(t);if(!r){let c;if(o&&(c=Yo[n]))return c;if(n==="hasOwnProperty")return Zo}const l=Reflect.get(t,n,ge(t)?t:s);if((Ye(n)?xi.has(n):Xo(n))||(r||he(t,"get",n),i))return l;if(ge(l)){const c=o&&Gs(n)?l:l.value;return r&&q(c)?Ps(c):c}return q(l)?r?Ps(l):Yt(l):l}}class Ci extends Ti{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=V(t)&&Gs(n);if(!this._isShallow){const f=ct(i);if(!Pe(s)&&!ct(s)&&(i=$(i),s=$(s)),!o&&ge(i)&&!ge(s))return f||(i.value=s),!0}const l=o?Number(n)e,xn=e=>Reflect.getPrototypeOf(e);function rl(e,t,n){return function(...s){const r=this.__v_raw,i=$(r),o=Bt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,f=r[e](...s),u=n?Cs:t?Kt:Me;return!t&&he(i,"iterate",c?Ts:Ct),de(Object.create(f),{next(){const{value:h,done:g}=f.next();return g?{value:h,done:g}:{value:l?[u(h[0]),u(h[1])]:u(h),done:g}}})}}function Tn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function il(e,t){const n={get(r){const i=this.__v_raw,o=$(i),l=$(r);e||(ze(r,l)&&he(o,"get",r),he(o,"get",l));const{has:c}=xn(o),f=t?Cs:e?Kt:Me;if(c.call(o,r))return f(i.get(r));if(c.call(o,l))return f(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&he($(r),"iterate",Ct),r.size},has(r){const i=this.__v_raw,o=$(i),l=$(r);return e||(ze(r,l)&&he(o,"has",r),he(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=$(l),f=t?Cs:e?Kt:Me;return!e&&he(c,"iterate",Ct),l.forEach((u,h)=>r.call(i,f(u),f(h),o))}};return de(n,e?{add:Tn("add"),set:Tn("set"),delete:Tn("delete"),clear:Tn("clear")}:{add(r){const i=$(this),o=xn(i),l=$(r),c=!t&&!Pe(r)&&!ct(r)?l:r;return o.has.call(i,c)||ze(r,c)&&o.has.call(i,r)||ze(l,c)&&o.has.call(i,l)||(i.add(c),st(i,"add",c,c)),this},set(r,i){!t&&!Pe(i)&&!ct(i)&&(i=$(i));const o=$(this),{has:l,get:c}=xn(o);let f=l.call(o,r);f||(r=$(r),f=l.call(o,r));const u=c.call(o,r);return o.set(r,i),f?ze(i,u)&&st(o,"set",r,i):st(o,"add",r,i),this},delete(r){const i=$(this),{has:o,get:l}=xn(i);let c=o.call(i,r);c||(r=$(r),c=o.call(i,r)),l&&l.call(i,r);const f=i.delete(r);return c&&st(i,"delete",r,void 0),f},clear(){const r=$(this),i=r.size!==0,o=r.clear();return i&&st(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=rl(r,e,t)}),n}function Ys(e,t){const n=il(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(W(n,r)&&r in s?n:s,r,i)}const ol={get:Ys(!1,!1)},ll={get:Ys(!1,!0)},cl={get:Ys(!0,!1)};const Pi=new WeakMap,Oi=new WeakMap,Ii=new WeakMap,al=new WeakMap;function ul(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yt(e){return ct(e)?e:Qs(e,!1,tl,ol,Pi)}function Ni(e){return Qs(e,!1,sl,ll,Oi)}function Ps(e){return Qs(e,!0,nl,cl,Ii)}function Qs(e,t,n,s,r){if(!q(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=ul(Vo(e));if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function Pt(e){return ct(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function ct(e){return!!(e&&e.__v_isReadonly)}function Pe(e){return!!(e&&e.__v_isShallow)}function Xs(e){return e?!!e.__v_raw:!1}function $(e){const t=e&&e.__v_raw;return t?$(t):e}function fl(e){return!W(e,"__v_skip")&&Object.isExtensible(e)&&pi(e,"__v_skip",!0),e}const Me=e=>q(e)?Yt(e):e,Kt=e=>q(e)?Ps(e):e;function ge(e){return e?e.__v_isRef===!0:!1}function dl(e){return Mi(e,!1)}function hl(e){return Mi(e,!0)}function Mi(e,t){return ge(e)?e:new pl(e,t)}class pl{constructor(t,n){this.dep=new Js,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:$(t),this._value=n?t:Me(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Pe(t)||ct(t);t=s?t:$(t),ze(t,n)&&(this._rawValue=t,this._value=s?t:Me(t),this.dep.trigger())}}function ae(e){return ge(e)?e.value:e}const gl={get:(e,t,n)=>t==="__v_raw"?e:ae(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ge(r)&&!ge(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Di(e){return Pt(e)?e:new Proxy(e,gl)}class ml{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Js(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Z!==this)return bi(this,!0),!0}get value(){const t=this.dep.track();return Si(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function _l(e,t,n=!1){let s,r;return B(e)?s=e:(s=e.get,r=e.set),new ml(s,r,n)}const Cn={},Vn=new WeakMap;let xt;function yl(e,t=!1,n=xt){if(n){let s=Vn.get(n);s||Vn.set(n,s=[]),s.push(e)}}function vl(e,t,n=X){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,f=O=>r?O:Pe(O)||r===!1||r===0?rt(O,1):rt(O);let u,h,g,m,I=!1,R=!1;if(ge(e)?(h=()=>e.value,I=Pe(e)):Pt(e)?(h=()=>f(e),I=!0):V(e)?(R=!0,I=e.some(O=>Pt(O)||Pe(O)),h=()=>e.map(O=>{if(ge(O))return O.value;if(Pt(O))return f(O);if(B(O))return c?c(O,2):O()})):B(e)?t?h=c?()=>c(e,2):e:h=()=>{if(g){ot();try{g()}finally{lt()}}const O=xt;xt=u;try{return c?c(e,3,[m]):e(m)}finally{xt=O}}:h=Je,t&&r){const O=h,Y=r===!0?1/0:r;h=()=>rt(O(),Y)}const U=qo(),F=()=>{u.stop(),U&&U.active&&ks(U.effects,u)};if(i&&t){const O=t;t=(...Y)=>{const oe=O(...Y);return F(),oe}}let C=R?new Array(e.length).fill(Cn):Cn;const N=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const Y=u.run();if(O||r||I||(R?Y.some((oe,te)=>ze(oe,C[te])):ze(Y,C))){g&&g();const oe=xt;xt=u;try{const te=[Y,C===Cn?void 0:R&&C[0]===Cn?[]:C,m];C=Y,c?c(t,3,te):t(...te)}finally{xt=oe}}}else u.run()};return l&&l(N),u=new yi(h),u.scheduler=o?()=>o(N,!1):N,m=O=>yl(O,!1,u),g=u.onStop=()=>{const O=Vn.get(u);if(O){if(c)c(O,4);else for(const Y of O)Y();Vn.delete(u)}},t?s?N(!0):C=u.run():o?o(N.bind(null,!0),!0):u.run(),F.pause=u.pause.bind(u),F.resume=u.resume.bind(u),F.stop=F,F}function rt(e,t=1/0,n){if(t<=0||!q(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ge(e))rt(e.value,t,n);else if(V(e))for(let s=0;s{rt(s,t,n)});else if(hi(e)){for(const s in e)rt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&rt(e[s],t,n)}return e}/** * @vue/runtime-core v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function An(e,t,n,s){try{return s?e(...s):e()}catch(r){Zn(r,t,n)}}function De(e,t,n,s){if(B(e)){const r=An(e,t,n,s);return r&&fi(r)&&r.catch(i=>{Zn(i,t,n)}),r}if(V(e)){const r=[];for(let i=0;i>>1,r=ye[s],i=_n(r);i=_n(n)?ye.push(e):ye.splice(El(t),0,e),e.flags|=1,Vi()}}function Vi(){Fn||(Fn=Li.then(Hi))}function wl(e){if(!V(e))gt&&e.id===-1?gt.splice(Lt+1,0,e):e.flags&1||(kt.push(e),e.flags|=1);else for(let t=0;t_n(n)-_n(s));if(kt.length=0,gt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Hi(e){try{for($e=0;$e{s._d&&jn(-1);const i=Hn(t),o=Ot.length;let l;try{l=e(...r)}finally{for(let c=Ot.length;c>o;c--)fo();Hn(i),s._d&&jn(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Du(e,t){if(Ae===null)return e;const n=rs(Ae),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&B(t)?t.call(s&&s.proxy):t}}const Sl=Symbol.for("v-scx"),Al=()=>Ne(Sl);function Mn(e,t,n){return Bi(e,t,n)}function Bi(e,t,n=X){const{immediate:s,deep:r,flush:i,once:o}=n,l=de({},n),c=t&&s||!t&&i!=="post";let f;if(bn){if(i==="sync"){const m=Al();f=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=Ye,m.resume=Ye,m.pause=Ye,m}}const u=pe;l.call=(m,I,R)=>De(m,u,I,R);let h=!1;i==="post"?l.scheduler=m=>{Ee(m,u&&u.suspense)}:i!=="sync"&&(h=!0,l.scheduler=(m,I)=>{I?m():er(m)}),l.augmentJob=m=>{t&&(m.flags|=4),h&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const g=vl(e,t,l);return bn&&(f?f.push(g):c&&g()),g}function Rl(e,t,n){const s=this.proxy,r=se(e)?e.includes(".")?ji(s,e):()=>s[e]:e.bind(s,s);let i;B(t)?i=t:(i=t.handler,n=t);const o=Rn(this),l=Bi(r,i.bind(s),n);return o(),l}function ji(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,ds=Symbol("_leaveCb");function Tl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}function ki(e){if(!nr(e))return es(e.type)&&e.children?Tl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&B(n.default))return n.default()}}function tr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;tr(es(n.type)&&ki(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t){return B(e)?de({name:e.name},t,{setup:e}):e}function Ki(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function gr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Un=new WeakMap;function fn(e,t,n,s,r=!1){if(V(e)){e.forEach((R,U)=>fn(R,t&&(V(t)?t[U]:t),n,s,r));return}if(dn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&fn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?rs(s.component):s.el,o=r?null:i,{i:l,r:c}=e,f=t&&t.r,u=l.refs===X?l.refs={}:l.refs,h=l.setupState,g=$(h),m=h===X?ui:R=>gr(u,R)?!1:W(g,R),I=(R,U)=>!(U&&gr(u,U));if(f!=null&&f!==c){if(mr(t),se(f))u[f]=null,m(f)&&(h[f]=null);else if(ge(f)){const R=t;I(f,R.k)&&(f.value=null),R.k&&(u[R.k]=null)}}if(B(c))An(c,l,12,[o,u]);else{const R=se(c),U=ge(c);if(R||U){const F=()=>{if(e.f){const C=R?m(c)?h[c]:u[c]:I()||!e.k?c.value:u[e.k];if(r)V(C)&&ks(C,i);else if(V(C))C.includes(i)||C.push(i);else if(R)u[c]=[i],m(c)&&(h[c]=u[c]);else{const N=[i];I(c,e.k)&&(c.value=N),e.k&&(u[e.k]=N)}}else R?(u[c]=o,m(c)&&(h[c]=o)):U&&(I(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){const C=()=>{F(),Un.delete(e)};C.id=-1,Un.set(e,C),Ee(C,n)}else mr(e),F()}}}function mr(e){const t=Un.get(e);t&&(t.flags|=8,Un.delete(e))}Qn().requestIdleCallback;Qn().cancelIdleCallback;const dn=e=>!!e.type.__asyncLoader,nr=e=>e.type.__isKeepAlive;function Cl(e,t){$i(e,"a",t)}function Pl(e,t){$i(e,"da",t)}function $i(e,t,n=pe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ts(t,s,n),n){let r=n.parent;for(;r&&r.parent;)nr(r.parent.vnode)&&Ol(s,t,n,r),r=r.parent}}function Ol(e,t,n,s){const r=ts(t,e,s,!0);qi(()=>{ks(s[t],r)},n)}function ts(e,t,n=pe,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{ot();const l=Rn(n),c=De(t,n,e,o);return l(),lt(),c});return s?r.unshift(i):r.push(i),i}}const ut=e=>(t,n=pe)=>{(!bn||e==="sp")&&ts(e,(...s)=>t(...s),n)},Il=ut("bm"),Wi=ut("m"),Nl=ut("bu"),Ml=ut("u"),Dl=ut("bum"),qi=ut("um"),Ll=ut("sp"),Vl=ut("rtg"),Fl=ut("rtc");function Hl(e,t=pe){ts("ec",e,t)}const Ul="components";function _r(e,t){return jl(Ul,e,!0,t)||e}const Bl=Symbol.for("v-ndc");function jl(e,t,n=!0,s=!1){const r=Ae||pe;if(r){const i=r.type;{const l=Rc(i,!1);if(l&&(l===t||l===ve(t)||l===Yn(ve(t))))return i}const o=yr(r[e]||i[e],t)||yr(r.appContext[e],t);return!o&&s?i:o}}function yr(e,t){return e&&(e[t]||e[ve(t)]||e[Yn(ve(t))])}function Lu(e,t,n,s){let r;const i=n,o=V(e);if(o||se(e)){const l=o&&Pt(e);let c=!1,f=!1;l&&(c=!Pe(e),f=ct(e),e=Xn(e)),r=new Array(e.length);for(let u=0,h=e.length;ut(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;ce?go(e)?rs(e):Os(e.parent):null,hn=de(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Os(e.parent),$root:e=>Os(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Yi(e),$forceUpdate:e=>e.f||(e.f=()=>{er(e.update)}),$nextTick:e=>e.n||(e.n=Zs.bind(e.proxy)),$watch:e=>Rl.bind(e)}),hs=(e,t)=>e!==X&&!e.__isScriptSetup&&W(e,t),kl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;if(t[0]!=="$"){const g=o[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(hs(s,t))return o[t]=1,s[t];if(r!==X&&W(r,t))return o[t]=2,r[t];if(W(i,t))return o[t]=3,i[t];if(n!==X&&W(n,t))return o[t]=4,n[t];Is&&(o[t]=0)}}const f=hn[t];let u,h;if(f)return t==="$attrs"&&he(e.attrs,"get",""),f(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==X&&W(n,t))return o[t]=4,n[t];if(h=c.config.globalProperties,W(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return hs(r,t)?(r[t]=n,!0):s!==X&&W(s,t)?(s[t]=n,!0):W(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let c;return!!(n[l]||e!==X&&l[0]!=="$"&&W(e,l)||hs(t,l)||W(i,l)||W(s,l)||W(hn,l)||W(r.config.globalProperties,l)||(c=o.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:W(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function vr(e){return V(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Is=!0;function Gl(e){const t=Yi(e),n=e.proxy,s=e.ctx;Is=!1,t.beforeCreate&&br(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:f,created:u,beforeMount:h,mounted:g,beforeUpdate:m,updated:I,activated:R,deactivated:U,beforeDestroy:F,beforeUnmount:C,destroyed:N,unmounted:O,render:J,renderTracked:oe,renderTriggered:te,errorCaptured:Ve,serverPrefetch:ft,expose:Fe,inheritAttrs:dt,components:Et,directives:He,filters:Qt}=t;if(f&&Kl(f,s,null),o)for(const z in o){const G=o[z];B(G)&&(s[z]=G.bind(n))}if(r){const z=r.call(n,n);q(z)&&(e.data=Jt(z))}if(Is=!0,i)for(const z in i){const G=i[z],Qe=B(G)?G.bind(n,n):B(G.get)?G.get.bind(n,n):Ye,ht=!B(G)&&B(G.set)?G.set.bind(n):Ye,Ue=Oe({get:Qe,set:ht});Object.defineProperty(s,z,{enumerable:!0,configurable:!0,get:()=>Ue.value,set:be=>Ue.value=be})}if(l)for(const z in l)zi(l[z],s,n,z);if(c){const z=B(c)?c.call(n):c;Reflect.ownKeys(z).forEach(G=>{Nn(G,z[G])})}u&&br(u,e,"c");function ce(z,G){V(G)?G.forEach(Qe=>z(Qe.bind(n))):G&&z(G.bind(n))}if(ce(Il,h),ce(Wi,g),ce(Nl,m),ce(Ml,I),ce(Cl,R),ce(Pl,U),ce(Hl,Ve),ce(Fl,oe),ce(Vl,te),ce(Dl,C),ce(qi,O),ce(Ll,ft),V(Fe))if(Fe.length){const z=e.exposed||(e.exposed={});Fe.forEach(G=>{Object.defineProperty(z,G,{get:()=>n[G],set:Qe=>n[G]=Qe,enumerable:!0})})}else e.exposed||(e.exposed={});J&&e.render===Ye&&(e.render=J),dt!=null&&(e.inheritAttrs=dt),Et&&(e.components=Et),He&&(e.directives=He),ft&&Ki(e)}function Kl(e,t,n=Ye){V(e)&&(e=Ns(e));for(const s in e){const r=e[s];let i;q(r)?"default"in r?i=Ne(r.from||s,r.default,!0):i=Ne(r.from||s):i=Ne(r),ge(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function br(e,t,n){De(V(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function zi(e,t,n,s){let r=s.includes(".")?ji(n,s):()=>n[s];if(se(e)){const i=t[e];B(i)&&Mn(r,i)}else if(B(e))Mn(r,e.bind(n));else if(q(e))if(V(e))e.forEach(i=>zi(i,t,n,s));else{const i=B(e.handler)?e.handler.bind(n):t[e.handler];B(i)&&Mn(r,i,e)}}function Yi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>Bn(c,f,o,!0)),Bn(c,t,o)),q(t)&&i.set(t,c),c}function Bn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Bn(e,i,n,!0),r&&r.forEach(o=>Bn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=$l[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const $l={data:Er,props:wr,emits:wr,methods:rn,computed:rn,beforeCreate:me,created:me,beforeMount:me,mounted:me,beforeUpdate:me,updated:me,beforeDestroy:me,beforeUnmount:me,destroyed:me,unmounted:me,activated:me,deactivated:me,errorCaptured:me,serverPrefetch:me,components:rn,directives:rn,watch:ql,provide:Er,inject:Wl};function Er(e,t){return t?e?function(){return de(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function Wl(e,t){return rn(Ns(e),Ns(t))}function Ns(e){if(V(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ve(t)}Modifiers`]||e[`${bt(t)}Modifiers`];function Ql(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||X;let r=n;const i=t.startsWith("update:"),o=i&&Jl(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>se(u)?u.trim():u)),o.number&&(r=n.map(Jn)));let l,c=s[l=ls(t)]||s[l=ls(ve(t))];!c&&i&&(c=s[l=ls(bt(t))]),c&&De(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,De(f,e,6,r)}}const Xl=new WeakMap;function Qi(e,t,n=!1){const s=n?Xl:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!B(e)){const c=f=>{const u=Qi(f,t,!0);u&&(l=!0,de(o,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(q(e)&&s.set(e,null),null):(V(i)?i.forEach(c=>o[c]=null):de(o,i),q(e)&&s.set(e,o),o)}function ns(e,t){return!e||!Wn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),W(e,t[0].toLowerCase()+t.slice(1))||W(e,bt(t))||W(e,t))}function Sr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:f,renderCache:u,props:h,data:g,setupState:m,ctx:I,inheritAttrs:R}=e,U=Hn(e);let F,C;try{if(n.shapeFlag&4){const O=r||s,J=O;F=qe(f.call(J,O,u,h,m,g,I)),C=l}else{const O=t;F=qe(O.length>1?O(h,{attrs:l,slots:o,emit:c}):O(h,null)),C=t.props?l:Zl(l)}}catch(O){Ot.length=0,Zn(O,e,1),F=ie(at)}let N=F;if(C&&R!==!1){const O=Object.keys(C),{shapeFlag:J}=N;O.length&&J&7&&(i&&O.some(qn)&&(C=ec(C,i)),N=$t(N,C,!1,!0))}if(n.dirs&&(N=$t(N,null,!1,!0),N.dirs=N.dirs?N.dirs.concat(n.dirs):n.dirs),n.transition){const O=es(N.type)&&ki(N)||N;tr(O,n.transition)}return F=N,Hn(U),F}const Zl=e=>{let t;for(const n in e)(n==="class"||n==="style"||Wn(n))&&((t||(t={}))[n]=e[n]);return t},ec=(e,t)=>{const n={};for(const s in e)(!qn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function tc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Ar(s,o,f):!!o;if(c&8){const u=t.dynamicProps;for(let h=0;hObject.create(Zi),to=e=>Object.getPrototypeOf(e)===Zi;function sc(e,t,n,s=!1){const r={},i=eo();e.propsDefaults=Object.create(null),no(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Ni(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function rc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=$(r),[c]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[g,m]=so(h,t,!0);de(o,g),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!c)return q(e)&&s.set(e,Ut),Ut;if(V(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",rr=e=>V(e)?e.map(qe):[qe(e)],oc=(e,t,n)=>{if(t._n)return t;const s=Vt((...r)=>rr(t(...r)),n);return s._c=!1,s},ro=(e,t,n)=>{const s=e._ctx;for(const r in e){if(sr(r))continue;const i=e[r];if(B(i))t[r]=oc(r,i,s);else if(i!=null){const o=rr(i);t[r]=()=>o}}},io=(e,t)=>{const n=rr(t);e.slots.default=()=>n},oo=(e,t,n)=>{for(const s in t)(n||!sr(s))&&(e[s]=t[s])},lc=(e,t,n)=>{const s=e.slots=eo();if(e.vnode.shapeFlag&32){const r=t._;r?(oo(s,t,n),n&&pi(s,"_",r,!0)):ro(t,s)}else t&&io(e,t)},cc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=X;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:oo(r,t,n):(i=!t.$stable,ro(t,r)),o=t}else t&&(io(e,t),o={default:1});if(i)for(const l in r)!sr(l)&&o[l]==null&&delete r[l]},Ee=hc;function ac(e){return uc(e)}function uc(e,t){const n=Qn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:f,setElementText:u,parentNode:h,nextSibling:g,setScopeId:m=Ye,insertStaticContent:I}=e,R=(a,d,p,y=null,b=null,_=null,A=void 0,S=null,w=!!d.dynamicChildren)=>{if(a===d)return;a&&!en(a,d)&&(y=v(a),be(a,b,_,!0),a=null),d.patchFlag===-2&&(w=!1,d.dynamicChildren=null);const{type:E,ref:L,shapeFlag:T}=d;switch(E){case ss:U(a,d,p,y);break;case at:F(a,d,p,y);break;case Dn:a==null&&C(d,p,y,A);break;case tt:Et(a,d,p,y,b,_,A,S,w);break;default:T&1?J(a,d,p,y,b,_,A,S,w):T&6?He(a,d,p,y,b,_,A,S,w):(T&64||T&128)&&E.process(a,d,p,y,b,_,A,S,w,M)}L!=null&&b?fn(L,a&&a.ref,_,d||a,!d):L==null&&a&&a.ref!=null&&fn(a.ref,null,_,a,!0)},U=(a,d,p,y)=>{if(a==null)s(d.el=l(d.children),p,y);else{const b=d.el=a.el;d.children!==a.children&&f(b,d.children)}},F=(a,d,p,y)=>{a==null?s(d.el=c(d.children||""),p,y):d.el=a.el},C=(a,d,p,y)=>{[a.el,a.anchor]=I(a.children,d,p,y,a.el,a.anchor)},N=({el:a,anchor:d},p,y)=>{let b;for(;a&&a!==d;)b=g(a),s(a,p,y),a=b;s(d,p,y)},O=({el:a,anchor:d})=>{let p;for(;a&&a!==d;)p=g(a),r(a),a=p;r(d)},J=(a,d,p,y,b,_,A,S,w)=>{if(d.type==="svg"?A="svg":d.type==="math"&&(A="mathml"),a==null)oe(d,p,y,b,_,A,S,w);else{const E=a.el&&a.el._isVueCE?a.el:null;try{E&&E._beginPatch(),ft(a,d,b,_,A,S,w)}finally{E&&E._endPatch()}}},oe=(a,d,p,y,b,_,A,S)=>{let w,E;const{props:L,shapeFlag:T,transition:D,dirs:H}=a;if(w=a.el=o(a.type,_,L&&L.is,L),T&8?u(w,a.children):T&16&&Ve(a.children,w,null,y,b,ps(a,_),A,S),H&&St(a,null,y,"created"),te(w,a,a.scopeId,A,y),L){for(const Q in L)Q!=="value"&&!cn(Q)&&i(w,Q,null,L[Q],_,y);"value"in L&&i(w,"value",null,L.value,_),(E=L.onVnodeBeforeMount)&&Ge(E,y,a)}H&&St(a,null,y,"beforeMount");const k=fc(b,D);k&&D.beforeEnter(w),s(w,d,p),((E=L&&L.onVnodeMounted)||k||H)&&Ee(()=>{try{E&&Ge(E,y,a),k&&D.enter(w),H&&St(a,null,y,"mounted")}finally{}},b)},te=(a,d,p,y,b)=>{if(p&&m(a,p),y)for(let _=0;_{for(let E=w;E{const S=d.el=a.el;let{patchFlag:w,dynamicChildren:E,dirs:L}=d;w|=a.patchFlag&16;const T=a.props||X,D=d.props||X;let H;if(p&&At(p,!1),(H=D.onVnodeBeforeUpdate)&&Ge(H,p,d,a),L&&St(d,a,p,"beforeUpdate"),p&&At(p,!0),E&&(!a.dynamicChildren||a.dynamicChildren.length!==E.length)&&(w=0,A=!1,E=null),(T.innerHTML&&D.innerHTML==null||T.textContent&&D.textContent==null)&&u(S,""),E?Fe(a.dynamicChildren,E,S,p,y,ps(d,b),_):A||G(a,d,S,null,p,y,ps(d,b),_,!1),w>0){if(w&16)dt(S,T,D,p,b);else if(w&2&&T.class!==D.class&&i(S,"class",null,D.class,b),w&4&&i(S,"style",T.style,D.style,b),w&8){const k=d.dynamicProps;for(let Q=0;Q{H&&Ge(H,p,d,a),L&&St(d,a,p,"updated")},y)},Fe=(a,d,p,y,b,_,A)=>{for(let S=0;S{if(d!==p){if(d!==X)for(const _ in d)!cn(_)&&!(_ in p)&&i(a,_,d[_],null,b,y);for(const _ in p){if(cn(_))continue;const A=p[_],S=d[_];A!==S&&_!=="value"&&i(a,_,S,A,b,y)}"value"in p&&i(a,"value",d.value,p.value,b)}},Et=(a,d,p,y,b,_,A,S,w)=>{const E=d.el=a?a.el:l(""),L=d.anchor=a?a.anchor:l("");let{patchFlag:T,dynamicChildren:D,slotScopeIds:H}=d;H&&(S=S?S.concat(H):H),a==null?(s(E,p,y),s(L,p,y),Ve(d.children||[],p,L,b,_,A,S,w)):T>0&&T&64&&D&&a.dynamicChildren&&a.dynamicChildren.length===D.length?(Fe(a.dynamicChildren,D,p,b,_,A,S),(d.key!=null||b&&d===b.subTree)&&lo(a,d,!0)):G(a,d,p,L,b,_,A,S,w)},He=(a,d,p,y,b,_,A,S,w)=>{d.slotScopeIds=S,a==null?d.shapeFlag&512?b.ctx.activate(d,p,y,A,w):Qt(d,p,y,b,_,A,w):It(a,d,w)},Qt=(a,d,p,y,b,_,A)=>{const S=a.component=vc(a,y,b);if(nr(a)&&(S.ctx.renderer=M),Ec(S,!1,A),S.asyncDep){if(b&&b.registerDep(S,ce,A),!a.el){const w=S.subTree=ie(at);F(null,w,d,p),a.placeholder=w.el}}else ce(S,a,d,p,b,_,A)},It=(a,d,p)=>{const y=d.component=a.component;if(tc(a,d,p))if(y.asyncDep&&!y.asyncResolved){z(y,d,p);return}else y.next=d,y.update();else d.el=a.el,y.vnode=d},ce=(a,d,p,y,b,_,A)=>{const S=()=>{if(a.isMounted){let{next:T,bu:D,u:H,parent:k,vnode:Q}=a;{const je=co(a);if(je){T&&(T.el=Q.el,z(a,T,A)),je.asyncDep.then(()=>{Ee(()=>{a.isUnmounted||E()},b)});return}}let Y=T,re;At(a,!1),T?(T.el=Q.el,z(a,T,A)):T=Q,D&&In(D),(re=T.props&&T.props.onVnodeBeforeUpdate)&&Ge(re,k,T,Q),At(a,!0);const ue=Sr(a),Be=a.subTree;a.subTree=ue,R(Be,ue,h(Be.el),v(Be),a,b,_),T.el=ue.el,Y===null&&nc(a,ue.el),H&&Ee(H,b),(re=T.props&&T.props.onVnodeUpdated)&&Ee(()=>Ge(re,k,T,Q),b)}else{let T;const{el:D,props:H}=d,{bm:k,m:Q,parent:Y,root:re,type:ue}=a,Be=dn(d);At(a,!1),k&&In(k),!Be&&(T=H&&H.onVnodeBeforeMount)&&Ge(T,Y,d),At(a,!0);{re.ce&&re.ce._hasShadowRoot()&&re.ce._injectChildStyle(ue,a.parent?a.parent.type:void 0);const je=a.subTree=Sr(a);R(null,je,p,y,a,b,_),d.el=je.el}if(Q&&Ee(Q,b),!Be&&(T=H&&H.onVnodeMounted)){const je=d;Ee(()=>Ge(T,Y,je),b)}(d.shapeFlag&256||Y&&dn(Y.vnode)&&Y.vnode.shapeFlag&256)&&a.a&&Ee(a.a,b),a.isMounted=!0,d=p=y=null}};a.scope.on();const w=a.effect=new yi(S);a.scope.off();const E=a.update=w.run.bind(w),L=a.job=w.runIfDirty.bind(w);L.i=a,L.id=a.uid,w.scheduler=()=>er(L),At(a,!0),E()},z=(a,d,p)=>{d.component=a;const y=a.vnode.props;a.vnode=d,a.next=null,rc(a,d.props,y,p),cc(a,d.children,p),ot(),pr(a),lt()},G=(a,d,p,y,b,_,A,S,w=!1)=>{const E=a&&a.children,L=a?a.shapeFlag:0,T=d.children,{patchFlag:D,shapeFlag:H}=d;if(D>0){if(D&128){ht(E,T,p,y,b,_,A,S,w);return}else if(D&256){Qe(E,T,p,y,b,_,A,S,w);return}}H&8?(L&16&&Te(E,b,_),T!==E&&u(p,T)):L&16?H&16?ht(E,T,p,y,b,_,A,S,w):Te(E,b,_,!0):(L&8&&u(p,""),H&16&&Ve(T,p,y,b,_,A,S,w))},Qe=(a,d,p,y,b,_,A,S,w)=>{a=a||Ut,d=d||Ut;const E=a.length,L=d.length,T=Math.min(E,L);let D;for(D=0;DL?Te(a,b,_,!0,!1,T):Ve(d,p,y,b,_,A,S,w,T)},ht=(a,d,p,y,b,_,A,S,w)=>{let E=0;const L=d.length;let T=a.length-1,D=L-1;for(;E<=T&&E<=D;){const H=a[E],k=d[E]=w?nt(d[E]):qe(d[E]);if(en(H,k))R(H,k,p,null,b,_,A,S,w);else break;E++}for(;E<=T&&E<=D;){const H=a[T],k=d[D]=w?nt(d[D]):qe(d[D]);if(en(H,k))R(H,k,p,null,b,_,A,S,w);else break;T--,D--}if(E>T){if(E<=D){const H=D+1,k=HD)for(;E<=T;)be(a[E],b,_,!0),E++;else{const H=E,k=E,Q=new Map;for(E=k;E<=D;E++){const we=d[E]=w?nt(d[E]):qe(d[E]);we.key!=null&&Q.set(we.key,E)}let Y,re=0;const ue=D-k+1;let Be=!1,je=0;const Xt=new Array(ue);for(E=0;E=ue){be(we,b,_,!0);continue}let ke;if(we.key!=null)ke=Q.get(we.key);else for(Y=k;Y<=D;Y++)if(Xt[Y-k]===0&&en(we,d[Y])){ke=Y;break}ke===void 0?be(we,b,_,!0):(Xt[ke-k]=E+1,ke>=je?je=ke:Be=!0,R(we,d[ke],p,null,b,_,A,S,w),re++)}const lr=Be?dc(Xt):Ut;for(Y=lr.length-1,E=ue-1;E>=0;E--){const we=k+E,ke=d[we],cr=d[we+1],ar=we+1{const{el:_,type:A,transition:S,children:w,shapeFlag:E}=a;if(E&6){Ue(a.component.subTree,d,p,y);return}if(E&128){a.suspense.move(d,p,y);return}if(E&64){A.move(a,d,p,M);return}if(A===tt){s(_,d,p);for(let T=0;TS.enter(_),b));else{const{leave:T,delayLeave:D,afterLeave:H}=S,k=()=>{a.ctx.isUnmounted?r(_):s(_,d,p)},Q=()=>{const Y=_._isLeaving||!!_[ds];_._isLeaving&&_[ds](!0),S.persisted&&!Y?k():T(_,()=>{k(),H&&H()})};D?D(_,k,Q):Q()}else s(_,d,p)},be=(a,d,p,y=!1,b=!1)=>{const{type:_,props:A,ref:S,children:w,dynamicChildren:E,shapeFlag:L,patchFlag:T,dirs:D,cacheIndex:H,memo:k}=a;if(T===-2&&(b=!1),S!=null&&(ot(),fn(S,null,p,a,!0),lt()),H!=null&&(d.renderCache[H]=void 0),L&256){d.ctx.deactivate(a);return}const Q=L&1&&D,Y=!dn(a);let re;if(Y&&(re=A&&A.onVnodeBeforeUnmount)&&Ge(re,d,a),L&6)wt(a.component,p,y);else{if(L&128){a.suspense.unmount(p,y);return}Q&&St(a,null,d,"beforeUnmount"),L&64?a.type.remove(a,d,p,M,y):E&&!E.hasOnce&&(_!==tt||T>0&&T&64)?Te(E,d,p,!1,!0):(_===tt&&T&384||!b&&L&16)&&Te(w,d,p),y&&Nt(a)}const ue=k!=null&&H==null;(Y&&(re=A&&A.onVnodeUnmounted)||Q||ue)&&Ee(()=>{re&&Ge(re,d,a),Q&&St(a,null,d,"unmounted"),ue&&(a.el=null)},p)},Nt=a=>{const{type:d,el:p,anchor:y,transition:b}=a;if(d===tt){Mt(p,y);return}if(d===Dn){O(a);return}const _=()=>{r(p),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(a.shapeFlag&1&&b&&!b.persisted){const{leave:A,delayLeave:S}=b,w=()=>A(p,_);S?S(a.el,_,w):w()}else _()},Mt=(a,d)=>{let p;for(;a!==d;)p=g(a),r(a),a=p;r(d)},wt=(a,d,p)=>{const{bum:y,scope:b,job:_,subTree:A,um:S,m:w,a:E}=a;xr(w),xr(E),y&&In(y),b.stop(),_&&(_.flags|=8,be(A,a,d,p)),S&&Ee(S,d),Ee(()=>{a.isUnmounted=!0},d)},Te=(a,d,p,y=!1,b=!1,_=0)=>{for(let A=_;A{if(a.shapeFlag&6)return v(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const d=g(a.anchor||a.el),p=d&&d[xl];return p?g(p):d};let P=!1;const x=(a,d,p)=>{let y;a==null?d._vnode&&(be(d._vnode,null,null,!0),y=d._vnode.component):R(d._vnode||null,a,d,null,null,null,p),d._vnode=a,P||(P=!0,pr(y),Fi(),P=!1)},M={p:R,um:be,m:Ue,r:Nt,mt:Qt,mc:Ve,pc:G,pbc:Fe,n:v,o:e};return{render:x,hydrate:void 0,createApp:Yl(x)}}function ps({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function At({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function lo(e,t,n=!1){const s=e.children,r=t.children;if(V(s)&&V(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function co(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:co(t)}function xr(e){if(e)for(let t=0;te.__isSuspense;function hc(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):wl(e)}const tt=Symbol.for("v-fgt"),ss=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Dn=Symbol.for("v-stc"),Ot=[];let Re=null;function on(e=!1){Ot.push(Re=e?null:[])}function fo(){Ot.pop(),Re=Ot[Ot.length-1]||null}let yn=1;function jn(e,t=!1){yn+=e,e<0&&Re&&t&&(Re.hasOnce=!0)}function ho(e){return e.dynamicChildren=yn>0?Re||Ut:null,fo(),yn>0&&Re&&Re.push(e),e}function Tr(e,t,n,s,r,i){return ho(mt(e,t,n,s,r,i,!0))}function Ds(e,t,n,s,r){return ho(ie(e,t,n,s,r,!0))}function kn(e){return e?e.__v_isVNode===!0:!1}function en(e,t){return e.type===t.type&&e.key===t.key}const po=({key:e})=>e??null,Ln=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?se(e)||ge(e)||B(e)?{i:Ae,r:e,k:t,f:!!n}:e:null);function mt(e,t=null,n=null,s=0,r=null,i=e===tt?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&po(t),ref:t&&Ln(t),scopeId:Ui,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ae};return l?(Gn(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=se(n)?8:16),yn>0&&!o&&Re&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Re.push(c),c}const ie=pc;function pc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Bl)&&(e=at),kn(e)){const l=$t(e,t,!0);return n&&Gn(l,n),yn>0&&!i&&Re&&(l.shapeFlag&6?Re[Re.indexOf(e)]=l:Re.push(l)),l.patchFlag=-2,l}if(xc(e)&&(e=e.__vccOpts),t){t=gc(t);let{class:l,style:c}=t;l&&!se(l)&&(t.class=jt(l)),q(c)&&(Xs(c)&&!V(c)&&(c=de({},c)),t.style=Ks(c))}const o=se(e)?1:uo(e)?128:es(e)?64:q(e)?4:B(e)?2:0;return mt(e,t,n,s,r,o,i,!0)}function gc(e){return e?Xs(e)||to(e)?de({},e):e:null}function $t(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,f=t?mc(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&po(f),ref:t&&t.ref?n&&i?V(i)?i.concat(Ln(t)):[i,Ln(t)]:Ln(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==tt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$t(e.ssContent),ssFallback:e.ssFallback&&$t(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&tr(u,c.clone(u)),u}function Ft(e=" ",t=0){return ie(ss,null,e,t)}function Vu(e,t){const n=ie(Dn,null,e);return n.staticCount=t,n}function Cr(e="",t=!1){return t?(on(),Ds(at,null,e)):ie(at,null,e)}function qe(e){return e==null||typeof e=="boolean"?ie(at):V(e)?ie(tt,null,e.slice()):kn(e)?nt(e):ie(ss,null,String(e))}function nt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$t(e)}function Gn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(V(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Gn(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!to(t)?t._ctx=Ae:r===3&&Ae&&(Ae.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(B(t)){if(s&65){Gn(e,{default:t});return}t={default:t,_ctx:Ae},n=32}else t=String(t),s&64?(n=16,t=[Ft(t)]):n=8;e.children=t,e.shapeFlag|=n}function mc(...e){const t={};for(let n=0;npe||Ae;let Kn,vn;{const e=Qn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Kn=t("__VUE_INSTANCE_SETTERS__",n=>pe=n),vn=t("__VUE_SSR_SETTERS__",n=>bn=n)}const Rn=e=>{const t=pe;return Kn(e),e.scope.on(),()=>{e.scope.off(),Kn(t)}},Pr=()=>{pe&&pe.scope.off(),Kn(null)};function go(e){return e.vnode.shapeFlag&4}let bn=!1;function Ec(e,t=!1,n=!1){t&&vn(t);const{props:s,children:r}=e.vnode,i=go(e);sc(e,s,i,t),lc(e,r,n||t);const o=i?wc(e,t):void 0;return t&&vn(!1),o}function wc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,kl);const{setup:s}=n;if(s){ot();const r=e.setupContext=s.length>1?Ac(e):null,i=Rn(e),o=An(s,e,0,[e.props,r]),l=fi(o);if(lt(),i(),(l||e.sp)&&!dn(e)&&Ki(e),l){if(o.then(Pr,Pr),t)return o.then(c=>{vn(!0);try{Or(e,c,t)}finally{vn(!1)}}).catch(c=>{Zn(c,e,0)});e.asyncDep=o}else Or(e,o)}else mo(e)}function Or(e,t,n){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:q(t)&&(e.setupState=Di(t)),mo(e)}function mo(e,t,n){const s=e.type;e.render||(e.render=s.render||Ye);{const r=Rn(e);ot();try{Gl(e)}finally{lt(),r()}}}const Sc={get(e,t){return he(e,"get",""),e[t]}};function Ac(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Sc),slots:e.slots,emit:e.emit,expose:t}}function rs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Di(fl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hn)return hn[n](e)},has(t,n){return n in t||n in hn}})):e.proxy}function Rc(e,t=!0){return B(e)?e.displayName||e.name:e.name||t&&e.__name}function xc(e){return B(e)&&"__vccOpts"in e}const Oe=(e,t)=>_l(e,t,bn);function En(e,t,n){try{jn(-1);const s=arguments.length;return s===2?q(t)&&!V(t)?kn(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&kn(n)&&(n=[n]),ie(e,t,n))}finally{jn(1)}}const Tc="3.5.41";/** +**/function An(e,t,n,s){try{return s?e(...s):e()}catch(r){Zn(r,t,n)}}function De(e,t,n,s){if(B(e)){const r=An(e,t,n,s);return r&&fi(r)&&r.catch(i=>{Zn(i,t,n)}),r}if(V(e)){const r=[];for(let i=0;i>>1,r=ye[s],i=_n(r);i=_n(n)?ye.push(e):ye.splice(El(t),0,e),e.flags|=1,Vi()}}function Vi(){Fn||(Fn=Li.then(Hi))}function wl(e){if(!V(e))gt&&e.id===-1?gt.splice(Lt+1,0,e):e.flags&1||(kt.push(e),e.flags|=1);else for(let t=0;t_n(n)-_n(s));if(kt.length=0,gt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Hi(e){try{for($e=0;$e{s._d&&jn(-1);const i=Hn(t),o=Ot.length;let l;try{l=e(...r)}finally{for(let c=Ot.length;c>o;c--)fo();Hn(i),s._d&&jn(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Du(e,t){if(Ae===null)return e;const n=rs(Ae),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&B(t)?t.call(s&&s.proxy):t}}const Sl=Symbol.for("v-scx"),Al=()=>Ne(Sl);function Mn(e,t,n){return Bi(e,t,n)}function Bi(e,t,n=X){const{immediate:s,deep:r,flush:i,once:o}=n,l=de({},n),c=t&&s||!t&&i!=="post";let f;if(bn){if(i==="sync"){const m=Al();f=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=Je,m.resume=Je,m.pause=Je,m}}const u=pe;l.call=(m,I,R)=>De(m,u,I,R);let h=!1;i==="post"?l.scheduler=m=>{Ee(m,u&&u.suspense)}:i!=="sync"&&(h=!0,l.scheduler=(m,I)=>{I?m():er(m)}),l.augmentJob=m=>{t&&(m.flags|=4),h&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const g=vl(e,t,l);return bn&&(f?f.push(g):c&&g()),g}function Rl(e,t,n){const s=this.proxy,r=se(e)?e.includes(".")?ji(s,e):()=>s[e]:e.bind(s,s);let i;B(t)?i=t:(i=t.handler,n=t);const o=Rn(this),l=Bi(r,i.bind(s),n);return o(),l}function ji(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,ds=Symbol("_leaveCb");function Tl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}function ki(e){if(!nr(e))return es(e.type)&&e.children?Tl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&B(n.default))return n.default()}}function tr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;tr(es(n.type)&&ki(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t){return B(e)?de({name:e.name},t,{setup:e}):e}function Ki(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function gr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Un=new WeakMap;function fn(e,t,n,s,r=!1){if(V(e)){e.forEach((R,U)=>fn(R,t&&(V(t)?t[U]:t),n,s,r));return}if(dn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&fn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?rs(s.component):s.el,o=r?null:i,{i:l,r:c}=e,f=t&&t.r,u=l.refs===X?l.refs={}:l.refs,h=l.setupState,g=$(h),m=h===X?ui:R=>gr(u,R)?!1:W(g,R),I=(R,U)=>!(U&&gr(u,U));if(f!=null&&f!==c){if(mr(t),se(f))u[f]=null,m(f)&&(h[f]=null);else if(ge(f)){const R=t;I(f,R.k)&&(f.value=null),R.k&&(u[R.k]=null)}}if(B(c))An(c,l,12,[o,u]);else{const R=se(c),U=ge(c);if(R||U){const F=()=>{if(e.f){const C=R?m(c)?h[c]:u[c]:I()||!e.k?c.value:u[e.k];if(r)V(C)&&ks(C,i);else if(V(C))C.includes(i)||C.push(i);else if(R)u[c]=[i],m(c)&&(h[c]=u[c]);else{const N=[i];I(c,e.k)&&(c.value=N),e.k&&(u[e.k]=N)}}else R?(u[c]=o,m(c)&&(h[c]=o)):U&&(I(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){const C=()=>{F(),Un.delete(e)};C.id=-1,Un.set(e,C),Ee(C,n)}else mr(e),F()}}}function mr(e){const t=Un.get(e);t&&(t.flags|=8,Un.delete(e))}Qn().requestIdleCallback;Qn().cancelIdleCallback;const dn=e=>!!e.type.__asyncLoader,nr=e=>e.type.__isKeepAlive;function Cl(e,t){$i(e,"a",t)}function Pl(e,t){$i(e,"da",t)}function $i(e,t,n=pe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ts(t,s,n),n){let r=n.parent;for(;r&&r.parent;)nr(r.parent.vnode)&&Ol(s,t,n,r),r=r.parent}}function Ol(e,t,n,s){const r=ts(t,e,s,!0);qi(()=>{ks(s[t],r)},n)}function ts(e,t,n=pe,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{ot();const l=Rn(n),c=De(t,n,e,o);return l(),lt(),c});return s?r.unshift(i):r.push(i),i}}const ut=e=>(t,n=pe)=>{(!bn||e==="sp")&&ts(e,(...s)=>t(...s),n)},Il=ut("bm"),Wi=ut("m"),Nl=ut("bu"),Ml=ut("u"),Dl=ut("bum"),qi=ut("um"),Ll=ut("sp"),Vl=ut("rtg"),Fl=ut("rtc");function Hl(e,t=pe){ts("ec",e,t)}const Ul="components";function _r(e,t){return jl(Ul,e,!0,t)||e}const Bl=Symbol.for("v-ndc");function jl(e,t,n=!0,s=!1){const r=Ae||pe;if(r){const i=r.type;{const l=Rc(i,!1);if(l&&(l===t||l===ve(t)||l===Jn(ve(t))))return i}const o=yr(r[e]||i[e],t)||yr(r.appContext[e],t);return!o&&s?i:o}}function yr(e,t){return e&&(e[t]||e[ve(t)]||e[Jn(ve(t))])}function Lu(e,t,n,s){let r;const i=n,o=V(e);if(o||se(e)){const l=o&&Pt(e);let c=!1,f=!1;l&&(c=!Pe(e),f=ct(e),e=Xn(e)),r=new Array(e.length);for(let u=0,h=e.length;ut(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;ce?go(e)?rs(e):Os(e.parent):null,hn=de(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Os(e.parent),$root:e=>Os(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ji(e),$forceUpdate:e=>e.f||(e.f=()=>{er(e.update)}),$nextTick:e=>e.n||(e.n=Zs.bind(e.proxy)),$watch:e=>Rl.bind(e)}),hs=(e,t)=>e!==X&&!e.__isScriptSetup&&W(e,t),kl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;if(t[0]!=="$"){const g=o[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(hs(s,t))return o[t]=1,s[t];if(r!==X&&W(r,t))return o[t]=2,r[t];if(W(i,t))return o[t]=3,i[t];if(n!==X&&W(n,t))return o[t]=4,n[t];Is&&(o[t]=0)}}const f=hn[t];let u,h;if(f)return t==="$attrs"&&he(e.attrs,"get",""),f(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==X&&W(n,t))return o[t]=4,n[t];if(h=c.config.globalProperties,W(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return hs(r,t)?(r[t]=n,!0):s!==X&&W(s,t)?(s[t]=n,!0):W(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let c;return!!(n[l]||e!==X&&l[0]!=="$"&&W(e,l)||hs(t,l)||W(i,l)||W(s,l)||W(hn,l)||W(r.config.globalProperties,l)||(c=o.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:W(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function vr(e){return V(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Is=!0;function Gl(e){const t=Ji(e),n=e.proxy,s=e.ctx;Is=!1,t.beforeCreate&&br(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:f,created:u,beforeMount:h,mounted:g,beforeUpdate:m,updated:I,activated:R,deactivated:U,beforeDestroy:F,beforeUnmount:C,destroyed:N,unmounted:O,render:Y,renderTracked:oe,renderTriggered:te,errorCaptured:Ve,serverPrefetch:ft,expose:Fe,inheritAttrs:dt,components:Et,directives:He,filters:Qt}=t;if(f&&Kl(f,s,null),o)for(const z in o){const G=o[z];B(G)&&(s[z]=G.bind(n))}if(r){const z=r.call(n,n);q(z)&&(e.data=Yt(z))}if(Is=!0,i)for(const z in i){const G=i[z],Qe=B(G)?G.bind(n,n):B(G.get)?G.get.bind(n,n):Je,ht=!B(G)&&B(G.set)?G.set.bind(n):Je,Ue=Oe({get:Qe,set:ht});Object.defineProperty(s,z,{enumerable:!0,configurable:!0,get:()=>Ue.value,set:be=>Ue.value=be})}if(l)for(const z in l)zi(l[z],s,n,z);if(c){const z=B(c)?c.call(n):c;Reflect.ownKeys(z).forEach(G=>{Nn(G,z[G])})}u&&br(u,e,"c");function ce(z,G){V(G)?G.forEach(Qe=>z(Qe.bind(n))):G&&z(G.bind(n))}if(ce(Il,h),ce(Wi,g),ce(Nl,m),ce(Ml,I),ce(Cl,R),ce(Pl,U),ce(Hl,Ve),ce(Fl,oe),ce(Vl,te),ce(Dl,C),ce(qi,O),ce(Ll,ft),V(Fe))if(Fe.length){const z=e.exposed||(e.exposed={});Fe.forEach(G=>{Object.defineProperty(z,G,{get:()=>n[G],set:Qe=>n[G]=Qe,enumerable:!0})})}else e.exposed||(e.exposed={});Y&&e.render===Je&&(e.render=Y),dt!=null&&(e.inheritAttrs=dt),Et&&(e.components=Et),He&&(e.directives=He),ft&&Ki(e)}function Kl(e,t,n=Je){V(e)&&(e=Ns(e));for(const s in e){const r=e[s];let i;q(r)?"default"in r?i=Ne(r.from||s,r.default,!0):i=Ne(r.from||s):i=Ne(r),ge(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function br(e,t,n){De(V(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function zi(e,t,n,s){let r=s.includes(".")?ji(n,s):()=>n[s];if(se(e)){const i=t[e];B(i)&&Mn(r,i)}else if(B(e))Mn(r,e.bind(n));else if(q(e))if(V(e))e.forEach(i=>zi(i,t,n,s));else{const i=B(e.handler)?e.handler.bind(n):t[e.handler];B(i)&&Mn(r,i,e)}}function Ji(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>Bn(c,f,o,!0)),Bn(c,t,o)),q(t)&&i.set(t,c),c}function Bn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Bn(e,i,n,!0),r&&r.forEach(o=>Bn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=$l[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const $l={data:Er,props:wr,emits:wr,methods:rn,computed:rn,beforeCreate:me,created:me,beforeMount:me,mounted:me,beforeUpdate:me,updated:me,beforeDestroy:me,beforeUnmount:me,destroyed:me,unmounted:me,activated:me,deactivated:me,errorCaptured:me,serverPrefetch:me,components:rn,directives:rn,watch:ql,provide:Er,inject:Wl};function Er(e,t){return t?e?function(){return de(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function Wl(e,t){return rn(Ns(e),Ns(t))}function Ns(e){if(V(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ve(t)}Modifiers`]||e[`${bt(t)}Modifiers`];function Ql(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||X;let r=n;const i=t.startsWith("update:"),o=i&&Yl(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>se(u)?u.trim():u)),o.number&&(r=n.map(Yn)));let l,c=s[l=ls(t)]||s[l=ls(ve(t))];!c&&i&&(c=s[l=ls(bt(t))]),c&&De(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,De(f,e,6,r)}}const Xl=new WeakMap;function Qi(e,t,n=!1){const s=n?Xl:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!B(e)){const c=f=>{const u=Qi(f,t,!0);u&&(l=!0,de(o,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(q(e)&&s.set(e,null),null):(V(i)?i.forEach(c=>o[c]=null):de(o,i),q(e)&&s.set(e,o),o)}function ns(e,t){return!e||!Wn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),W(e,t[0].toLowerCase()+t.slice(1))||W(e,bt(t))||W(e,t))}function Sr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:f,renderCache:u,props:h,data:g,setupState:m,ctx:I,inheritAttrs:R}=e,U=Hn(e);let F,C;try{if(n.shapeFlag&4){const O=r||s,Y=O;F=qe(f.call(Y,O,u,h,m,g,I)),C=l}else{const O=t;F=qe(O.length>1?O(h,{attrs:l,slots:o,emit:c}):O(h,null)),C=t.props?l:Zl(l)}}catch(O){Ot.length=0,Zn(O,e,1),F=ie(at)}let N=F;if(C&&R!==!1){const O=Object.keys(C),{shapeFlag:Y}=N;O.length&&Y&7&&(i&&O.some(qn)&&(C=ec(C,i)),N=$t(N,C,!1,!0))}if(n.dirs&&(N=$t(N,null,!1,!0),N.dirs=N.dirs?N.dirs.concat(n.dirs):n.dirs),n.transition){const O=es(N.type)&&ki(N)||N;tr(O,n.transition)}return F=N,Hn(U),F}const Zl=e=>{let t;for(const n in e)(n==="class"||n==="style"||Wn(n))&&((t||(t={}))[n]=e[n]);return t},ec=(e,t)=>{const n={};for(const s in e)(!qn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function tc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Ar(s,o,f):!!o;if(c&8){const u=t.dynamicProps;for(let h=0;hObject.create(Zi),to=e=>Object.getPrototypeOf(e)===Zi;function sc(e,t,n,s=!1){const r={},i=eo();e.propsDefaults=Object.create(null),no(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Ni(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function rc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=$(r),[c]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[g,m]=so(h,t,!0);de(o,g),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!c)return q(e)&&s.set(e,Ut),Ut;if(V(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",rr=e=>V(e)?e.map(qe):[qe(e)],oc=(e,t,n)=>{if(t._n)return t;const s=Vt((...r)=>rr(t(...r)),n);return s._c=!1,s},ro=(e,t,n)=>{const s=e._ctx;for(const r in e){if(sr(r))continue;const i=e[r];if(B(i))t[r]=oc(r,i,s);else if(i!=null){const o=rr(i);t[r]=()=>o}}},io=(e,t)=>{const n=rr(t);e.slots.default=()=>n},oo=(e,t,n)=>{for(const s in t)(n||!sr(s))&&(e[s]=t[s])},lc=(e,t,n)=>{const s=e.slots=eo();if(e.vnode.shapeFlag&32){const r=t._;r?(oo(s,t,n),n&&pi(s,"_",r,!0)):ro(t,s)}else t&&io(e,t)},cc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=X;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:oo(r,t,n):(i=!t.$stable,ro(t,r)),o=t}else t&&(io(e,t),o={default:1});if(i)for(const l in r)!sr(l)&&o[l]==null&&delete r[l]},Ee=hc;function ac(e){return uc(e)}function uc(e,t){const n=Qn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:f,setElementText:u,parentNode:h,nextSibling:g,setScopeId:m=Je,insertStaticContent:I}=e,R=(a,d,p,y=null,b=null,_=null,A=void 0,S=null,w=!!d.dynamicChildren)=>{if(a===d)return;a&&!en(a,d)&&(y=v(a),be(a,b,_,!0),a=null),d.patchFlag===-2&&(w=!1,d.dynamicChildren=null);const{type:E,ref:L,shapeFlag:T}=d;switch(E){case ss:U(a,d,p,y);break;case at:F(a,d,p,y);break;case Dn:a==null&&C(d,p,y,A);break;case tt:Et(a,d,p,y,b,_,A,S,w);break;default:T&1?Y(a,d,p,y,b,_,A,S,w):T&6?He(a,d,p,y,b,_,A,S,w):(T&64||T&128)&&E.process(a,d,p,y,b,_,A,S,w,M)}L!=null&&b?fn(L,a&&a.ref,_,d||a,!d):L==null&&a&&a.ref!=null&&fn(a.ref,null,_,a,!0)},U=(a,d,p,y)=>{if(a==null)s(d.el=l(d.children),p,y);else{const b=d.el=a.el;d.children!==a.children&&f(b,d.children)}},F=(a,d,p,y)=>{a==null?s(d.el=c(d.children||""),p,y):d.el=a.el},C=(a,d,p,y)=>{[a.el,a.anchor]=I(a.children,d,p,y,a.el,a.anchor)},N=({el:a,anchor:d},p,y)=>{let b;for(;a&&a!==d;)b=g(a),s(a,p,y),a=b;s(d,p,y)},O=({el:a,anchor:d})=>{let p;for(;a&&a!==d;)p=g(a),r(a),a=p;r(d)},Y=(a,d,p,y,b,_,A,S,w)=>{if(d.type==="svg"?A="svg":d.type==="math"&&(A="mathml"),a==null)oe(d,p,y,b,_,A,S,w);else{const E=a.el&&a.el._isVueCE?a.el:null;try{E&&E._beginPatch(),ft(a,d,b,_,A,S,w)}finally{E&&E._endPatch()}}},oe=(a,d,p,y,b,_,A,S)=>{let w,E;const{props:L,shapeFlag:T,transition:D,dirs:H}=a;if(w=a.el=o(a.type,_,L&&L.is,L),T&8?u(w,a.children):T&16&&Ve(a.children,w,null,y,b,ps(a,_),A,S),H&&St(a,null,y,"created"),te(w,a,a.scopeId,A,y),L){for(const Q in L)Q!=="value"&&!cn(Q)&&i(w,Q,null,L[Q],_,y);"value"in L&&i(w,"value",null,L.value,_),(E=L.onVnodeBeforeMount)&&Ge(E,y,a)}H&&St(a,null,y,"beforeMount");const k=fc(b,D);k&&D.beforeEnter(w),s(w,d,p),((E=L&&L.onVnodeMounted)||k||H)&&Ee(()=>{try{E&&Ge(E,y,a),k&&D.enter(w),H&&St(a,null,y,"mounted")}finally{}},b)},te=(a,d,p,y,b)=>{if(p&&m(a,p),y)for(let _=0;_{for(let E=w;E{const S=d.el=a.el;let{patchFlag:w,dynamicChildren:E,dirs:L}=d;w|=a.patchFlag&16;const T=a.props||X,D=d.props||X;let H;if(p&&At(p,!1),(H=D.onVnodeBeforeUpdate)&&Ge(H,p,d,a),L&&St(d,a,p,"beforeUpdate"),p&&At(p,!0),E&&(!a.dynamicChildren||a.dynamicChildren.length!==E.length)&&(w=0,A=!1,E=null),(T.innerHTML&&D.innerHTML==null||T.textContent&&D.textContent==null)&&u(S,""),E?Fe(a.dynamicChildren,E,S,p,y,ps(d,b),_):A||G(a,d,S,null,p,y,ps(d,b),_,!1),w>0){if(w&16)dt(S,T,D,p,b);else if(w&2&&T.class!==D.class&&i(S,"class",null,D.class,b),w&4&&i(S,"style",T.style,D.style,b),w&8){const k=d.dynamicProps;for(let Q=0;Q{H&&Ge(H,p,d,a),L&&St(d,a,p,"updated")},y)},Fe=(a,d,p,y,b,_,A)=>{for(let S=0;S{if(d!==p){if(d!==X)for(const _ in d)!cn(_)&&!(_ in p)&&i(a,_,d[_],null,b,y);for(const _ in p){if(cn(_))continue;const A=p[_],S=d[_];A!==S&&_!=="value"&&i(a,_,S,A,b,y)}"value"in p&&i(a,"value",d.value,p.value,b)}},Et=(a,d,p,y,b,_,A,S,w)=>{const E=d.el=a?a.el:l(""),L=d.anchor=a?a.anchor:l("");let{patchFlag:T,dynamicChildren:D,slotScopeIds:H}=d;H&&(S=S?S.concat(H):H),a==null?(s(E,p,y),s(L,p,y),Ve(d.children||[],p,L,b,_,A,S,w)):T>0&&T&64&&D&&a.dynamicChildren&&a.dynamicChildren.length===D.length?(Fe(a.dynamicChildren,D,p,b,_,A,S),(d.key!=null||b&&d===b.subTree)&&lo(a,d,!0)):G(a,d,p,L,b,_,A,S,w)},He=(a,d,p,y,b,_,A,S,w)=>{d.slotScopeIds=S,a==null?d.shapeFlag&512?b.ctx.activate(d,p,y,A,w):Qt(d,p,y,b,_,A,w):It(a,d,w)},Qt=(a,d,p,y,b,_,A)=>{const S=a.component=vc(a,y,b);if(nr(a)&&(S.ctx.renderer=M),Ec(S,!1,A),S.asyncDep){if(b&&b.registerDep(S,ce,A),!a.el){const w=S.subTree=ie(at);F(null,w,d,p),a.placeholder=w.el}}else ce(S,a,d,p,b,_,A)},It=(a,d,p)=>{const y=d.component=a.component;if(tc(a,d,p))if(y.asyncDep&&!y.asyncResolved){z(y,d,p);return}else y.next=d,y.update();else d.el=a.el,y.vnode=d},ce=(a,d,p,y,b,_,A)=>{const S=()=>{if(a.isMounted){let{next:T,bu:D,u:H,parent:k,vnode:Q}=a;{const je=co(a);if(je){T&&(T.el=Q.el,z(a,T,A)),je.asyncDep.then(()=>{Ee(()=>{a.isUnmounted||E()},b)});return}}let J=T,re;At(a,!1),T?(T.el=Q.el,z(a,T,A)):T=Q,D&&In(D),(re=T.props&&T.props.onVnodeBeforeUpdate)&&Ge(re,k,T,Q),At(a,!0);const ue=Sr(a),Be=a.subTree;a.subTree=ue,R(Be,ue,h(Be.el),v(Be),a,b,_),T.el=ue.el,J===null&&nc(a,ue.el),H&&Ee(H,b),(re=T.props&&T.props.onVnodeUpdated)&&Ee(()=>Ge(re,k,T,Q),b)}else{let T;const{el:D,props:H}=d,{bm:k,m:Q,parent:J,root:re,type:ue}=a,Be=dn(d);At(a,!1),k&&In(k),!Be&&(T=H&&H.onVnodeBeforeMount)&&Ge(T,J,d),At(a,!0);{re.ce&&re.ce._hasShadowRoot()&&re.ce._injectChildStyle(ue,a.parent?a.parent.type:void 0);const je=a.subTree=Sr(a);R(null,je,p,y,a,b,_),d.el=je.el}if(Q&&Ee(Q,b),!Be&&(T=H&&H.onVnodeMounted)){const je=d;Ee(()=>Ge(T,J,je),b)}(d.shapeFlag&256||J&&dn(J.vnode)&&J.vnode.shapeFlag&256)&&a.a&&Ee(a.a,b),a.isMounted=!0,d=p=y=null}};a.scope.on();const w=a.effect=new yi(S);a.scope.off();const E=a.update=w.run.bind(w),L=a.job=w.runIfDirty.bind(w);L.i=a,L.id=a.uid,w.scheduler=()=>er(L),At(a,!0),E()},z=(a,d,p)=>{d.component=a;const y=a.vnode.props;a.vnode=d,a.next=null,rc(a,d.props,y,p),cc(a,d.children,p),ot(),pr(a),lt()},G=(a,d,p,y,b,_,A,S,w=!1)=>{const E=a&&a.children,L=a?a.shapeFlag:0,T=d.children,{patchFlag:D,shapeFlag:H}=d;if(D>0){if(D&128){ht(E,T,p,y,b,_,A,S,w);return}else if(D&256){Qe(E,T,p,y,b,_,A,S,w);return}}H&8?(L&16&&Te(E,b,_),T!==E&&u(p,T)):L&16?H&16?ht(E,T,p,y,b,_,A,S,w):Te(E,b,_,!0):(L&8&&u(p,""),H&16&&Ve(T,p,y,b,_,A,S,w))},Qe=(a,d,p,y,b,_,A,S,w)=>{a=a||Ut,d=d||Ut;const E=a.length,L=d.length,T=Math.min(E,L);let D;for(D=0;DL?Te(a,b,_,!0,!1,T):Ve(d,p,y,b,_,A,S,w,T)},ht=(a,d,p,y,b,_,A,S,w)=>{let E=0;const L=d.length;let T=a.length-1,D=L-1;for(;E<=T&&E<=D;){const H=a[E],k=d[E]=w?nt(d[E]):qe(d[E]);if(en(H,k))R(H,k,p,null,b,_,A,S,w);else break;E++}for(;E<=T&&E<=D;){const H=a[T],k=d[D]=w?nt(d[D]):qe(d[D]);if(en(H,k))R(H,k,p,null,b,_,A,S,w);else break;T--,D--}if(E>T){if(E<=D){const H=D+1,k=HD)for(;E<=T;)be(a[E],b,_,!0),E++;else{const H=E,k=E,Q=new Map;for(E=k;E<=D;E++){const we=d[E]=w?nt(d[E]):qe(d[E]);we.key!=null&&Q.set(we.key,E)}let J,re=0;const ue=D-k+1;let Be=!1,je=0;const Xt=new Array(ue);for(E=0;E=ue){be(we,b,_,!0);continue}let ke;if(we.key!=null)ke=Q.get(we.key);else for(J=k;J<=D;J++)if(Xt[J-k]===0&&en(we,d[J])){ke=J;break}ke===void 0?be(we,b,_,!0):(Xt[ke-k]=E+1,ke>=je?je=ke:Be=!0,R(we,d[ke],p,null,b,_,A,S,w),re++)}const lr=Be?dc(Xt):Ut;for(J=lr.length-1,E=ue-1;E>=0;E--){const we=k+E,ke=d[we],cr=d[we+1],ar=we+1{const{el:_,type:A,transition:S,children:w,shapeFlag:E}=a;if(E&6){Ue(a.component.subTree,d,p,y);return}if(E&128){a.suspense.move(d,p,y);return}if(E&64){A.move(a,d,p,M);return}if(A===tt){s(_,d,p);for(let T=0;TS.enter(_),b));else{const{leave:T,delayLeave:D,afterLeave:H}=S,k=()=>{a.ctx.isUnmounted?r(_):s(_,d,p)},Q=()=>{const J=_._isLeaving||!!_[ds];_._isLeaving&&_[ds](!0),S.persisted&&!J?k():T(_,()=>{k(),H&&H()})};D?D(_,k,Q):Q()}else s(_,d,p)},be=(a,d,p,y=!1,b=!1)=>{const{type:_,props:A,ref:S,children:w,dynamicChildren:E,shapeFlag:L,patchFlag:T,dirs:D,cacheIndex:H,memo:k}=a;if(T===-2&&(b=!1),S!=null&&(ot(),fn(S,null,p,a,!0),lt()),H!=null&&(d.renderCache[H]=void 0),L&256){d.ctx.deactivate(a);return}const Q=L&1&&D,J=!dn(a);let re;if(J&&(re=A&&A.onVnodeBeforeUnmount)&&Ge(re,d,a),L&6)wt(a.component,p,y);else{if(L&128){a.suspense.unmount(p,y);return}Q&&St(a,null,d,"beforeUnmount"),L&64?a.type.remove(a,d,p,M,y):E&&!E.hasOnce&&(_!==tt||T>0&&T&64)?Te(E,d,p,!1,!0):(_===tt&&T&384||!b&&L&16)&&Te(w,d,p),y&&Nt(a)}const ue=k!=null&&H==null;(J&&(re=A&&A.onVnodeUnmounted)||Q||ue)&&Ee(()=>{re&&Ge(re,d,a),Q&&St(a,null,d,"unmounted"),ue&&(a.el=null)},p)},Nt=a=>{const{type:d,el:p,anchor:y,transition:b}=a;if(d===tt){Mt(p,y);return}if(d===Dn){O(a);return}const _=()=>{r(p),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(a.shapeFlag&1&&b&&!b.persisted){const{leave:A,delayLeave:S}=b,w=()=>A(p,_);S?S(a.el,_,w):w()}else _()},Mt=(a,d)=>{let p;for(;a!==d;)p=g(a),r(a),a=p;r(d)},wt=(a,d,p)=>{const{bum:y,scope:b,job:_,subTree:A,um:S,m:w,a:E}=a;xr(w),xr(E),y&&In(y),b.stop(),_&&(_.flags|=8,be(A,a,d,p)),S&&Ee(S,d),Ee(()=>{a.isUnmounted=!0},d)},Te=(a,d,p,y=!1,b=!1,_=0)=>{for(let A=_;A{if(a.shapeFlag&6)return v(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const d=g(a.anchor||a.el),p=d&&d[xl];return p?g(p):d};let P=!1;const x=(a,d,p)=>{let y;a==null?d._vnode&&(be(d._vnode,null,null,!0),y=d._vnode.component):R(d._vnode||null,a,d,null,null,null,p),d._vnode=a,P||(P=!0,pr(y),Fi(),P=!1)},M={p:R,um:be,m:Ue,r:Nt,mt:Qt,mc:Ve,pc:G,pbc:Fe,n:v,o:e};return{render:x,hydrate:void 0,createApp:Jl(x)}}function ps({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function At({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function lo(e,t,n=!1){const s=e.children,r=t.children;if(V(s)&&V(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function co(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:co(t)}function xr(e){if(e)for(let t=0;te.__isSuspense;function hc(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):wl(e)}const tt=Symbol.for("v-fgt"),ss=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Dn=Symbol.for("v-stc"),Ot=[];let Re=null;function on(e=!1){Ot.push(Re=e?null:[])}function fo(){Ot.pop(),Re=Ot[Ot.length-1]||null}let yn=1;function jn(e,t=!1){yn+=e,e<0&&Re&&t&&(Re.hasOnce=!0)}function ho(e){return e.dynamicChildren=yn>0?Re||Ut:null,fo(),yn>0&&Re&&Re.push(e),e}function Tr(e,t,n,s,r,i){return ho(mt(e,t,n,s,r,i,!0))}function Ds(e,t,n,s,r){return ho(ie(e,t,n,s,r,!0))}function kn(e){return e?e.__v_isVNode===!0:!1}function en(e,t){return e.type===t.type&&e.key===t.key}const po=({key:e})=>e??null,Ln=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?se(e)||ge(e)||B(e)?{i:Ae,r:e,k:t,f:!!n}:e:null);function mt(e,t=null,n=null,s=0,r=null,i=e===tt?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&po(t),ref:t&&Ln(t),scopeId:Ui,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ae};return l?(Gn(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=se(n)?8:16),yn>0&&!o&&Re&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Re.push(c),c}const ie=pc;function pc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Bl)&&(e=at),kn(e)){const l=$t(e,t,!0);return n&&Gn(l,n),yn>0&&!i&&Re&&(l.shapeFlag&6?Re[Re.indexOf(e)]=l:Re.push(l)),l.patchFlag=-2,l}if(xc(e)&&(e=e.__vccOpts),t){t=gc(t);let{class:l,style:c}=t;l&&!se(l)&&(t.class=jt(l)),q(c)&&(Xs(c)&&!V(c)&&(c=de({},c)),t.style=Ks(c))}const o=se(e)?1:uo(e)?128:es(e)?64:q(e)?4:B(e)?2:0;return mt(e,t,n,s,r,o,i,!0)}function gc(e){return e?Xs(e)||to(e)?de({},e):e:null}function $t(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,f=t?mc(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&po(f),ref:t&&t.ref?n&&i?V(i)?i.concat(Ln(t)):[i,Ln(t)]:Ln(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==tt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$t(e.ssContent),ssFallback:e.ssFallback&&$t(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&tr(u,c.clone(u)),u}function Ft(e=" ",t=0){return ie(ss,null,e,t)}function Vu(e,t){const n=ie(Dn,null,e);return n.staticCount=t,n}function Cr(e="",t=!1){return t?(on(),Ds(at,null,e)):ie(at,null,e)}function qe(e){return e==null||typeof e=="boolean"?ie(at):V(e)?ie(tt,null,e.slice()):kn(e)?nt(e):ie(ss,null,String(e))}function nt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$t(e)}function Gn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(V(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Gn(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!to(t)?t._ctx=Ae:r===3&&Ae&&(Ae.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(B(t)){if(s&65){Gn(e,{default:t});return}t={default:t,_ctx:Ae},n=32}else t=String(t),s&64?(n=16,t=[Ft(t)]):n=8;e.children=t,e.shapeFlag|=n}function mc(...e){const t={};for(let n=0;npe||Ae;let Kn,vn;{const e=Qn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Kn=t("__VUE_INSTANCE_SETTERS__",n=>pe=n),vn=t("__VUE_SSR_SETTERS__",n=>bn=n)}const Rn=e=>{const t=pe;return Kn(e),e.scope.on(),()=>{e.scope.off(),Kn(t)}},Pr=()=>{pe&&pe.scope.off(),Kn(null)};function go(e){return e.vnode.shapeFlag&4}let bn=!1;function Ec(e,t=!1,n=!1){t&&vn(t);const{props:s,children:r}=e.vnode,i=go(e);sc(e,s,i,t),lc(e,r,n||t);const o=i?wc(e,t):void 0;return t&&vn(!1),o}function wc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,kl);const{setup:s}=n;if(s){ot();const r=e.setupContext=s.length>1?Ac(e):null,i=Rn(e),o=An(s,e,0,[e.props,r]),l=fi(o);if(lt(),i(),(l||e.sp)&&!dn(e)&&Ki(e),l){if(o.then(Pr,Pr),t)return o.then(c=>{vn(!0);try{Or(e,c,t)}finally{vn(!1)}}).catch(c=>{Zn(c,e,0)});e.asyncDep=o}else Or(e,o)}else mo(e)}function Or(e,t,n){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:q(t)&&(e.setupState=Di(t)),mo(e)}function mo(e,t,n){const s=e.type;e.render||(e.render=s.render||Je);{const r=Rn(e);ot();try{Gl(e)}finally{lt(),r()}}}const Sc={get(e,t){return he(e,"get",""),e[t]}};function Ac(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Sc),slots:e.slots,emit:e.emit,expose:t}}function rs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Di(fl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hn)return hn[n](e)},has(t,n){return n in t||n in hn}})):e.proxy}function Rc(e,t=!0){return B(e)?e.displayName||e.name:e.name||t&&e.__name}function xc(e){return B(e)&&"__vccOpts"in e}const Oe=(e,t)=>_l(e,t,bn);function En(e,t,n){try{jn(-1);const s=arguments.length;return s===2?q(t)&&!V(t)?kn(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&kn(n)&&(n=[n]),ie(e,t,n))}finally{jn(1)}}const Tc="3.5.41";/** * @vue/runtime-dom v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Ls;const Ir=typeof window<"u"&&window.trustedTypes;if(Ir)try{Ls=Ir.createPolicy("vue",{createHTML:e=>e})}catch{}const _o=Ls?e=>Ls.createHTML(e):e=>e,Cc="http://www.w3.org/2000/svg",Pc="http://www.w3.org/1998/Math/MathML",et=typeof document<"u"?document:null,Nr=et&&et.createElement("template"),Oc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?et.createElementNS(Cc,e):t==="mathml"?et.createElementNS(Pc,e):n?et.createElement(e,{is:n}):et.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>et.createTextNode(e),createComment:e=>et.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>et.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Nr.innerHTML=_o(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Nr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ic=Symbol("_vtc");function Nc(e,t,n){const s=e[Ic];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $n=Symbol("_vod"),yo=Symbol("_vsh"),Fu={name:"show",beforeMount(e,{value:t},{transition:n}){e[$n]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):tn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),tn(e,!0),s.enter(e)):s.leave(e,()=>{tn(e,!1)}):tn(e,t))},beforeUnmount(e,{value:t}){tn(e,t)}};function tn(e,t){e.style.display=t?e[$n]:"none",e[yo]=!t}const Mc=Symbol(""),Dc=/(?:^|;)\s*display\s*:/;function Lc(e,t,n){const s=e.style,r=se(n);let i=!1;if(n&&!r){if(t)if(se(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&ln(s,l,"")}else for(const o in t)n[o]==null&&ln(s,o,"");for(const o in n){o==="display"&&(i=!0);const l=n[o];l!=null?Fc(e,o,!se(t)&&t?t[o]:void 0,l)||ln(s,o,l):ln(s,o,"")}}else if(r){if(t!==n){const o=s[Mc];o&&(n+=";"+o),s.cssText=n,i=Dc.test(n)}}else t&&e.removeAttribute("style");$n in e&&(e[$n]=i?s.display:"",e[yo]&&(s.display="none"))}const Mr=/\s*!important$/;function ln(e,t,n){if(V(n))n.forEach(s=>ln(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Vc(e,t);Mr.test(n)?e.setProperty(bt(s),n.replace(Mr,""),"important"):e[s]=n}}const Dr=["Webkit","Moz","ms"],gs={};function Vc(e,t){const n=gs[t];if(n)return n;let s=ve(t);if(s!=="filter"&&s in e)return gs[t]=s;s=Yn(s);for(let r=0;rms||(Gc.then(()=>ms=0),ms=Date.now());function $c(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(V(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Wc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Nc(e,s,o):t==="style"?Lc(e,n,s):Wn(t)?qn(t)||Uc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):qc(e,t,s,o))?(Fr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vr(e,t,s,o,i,t!=="value")):e._isVueCE&&(zc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!se(s)))?Fr(e,ve(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Vr(e,t,s,o))};function qc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ur(t)&&B(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Ur(t)&&se(n)?!1:t in e}function zc(e,t){const n=e._def.props;if(!n)return!1;const s=ve(t);return Array.isArray(n)?n.some(r=>ve(r)===s):Object.keys(n).some(r=>ve(r)===s)}const vt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return V(t)?n=>In(t,n):t};function Yc(e){e.target.composing=!0}function Br(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xe=Symbol("_assign"),Pn=Symbol("_initialValue");function _s(e,t,n){return t&&(e=e.trim()),n&&(e=Jn(e)),e}const jr={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[Pn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Pn]=e.defaultValue.replace(/\r\n?/g,` -`))),e[xe]=vt(r);const i=s||r.props&&r.props.type==="number";it(e,t?"change":"input",o=>{o.target.composing||e[xe](_s(e.value,n,i))}),(n||i)&&it(e,"change",()=>{e.value=_s(e.value,n,i)}),t||(it(e,"compositionstart",Yc),it(e,"compositionend",Br),it(e,"change",Br))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",i=e[Pn];delete e[Pn],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[xe](_s(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[xe]=vt(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Jn(e.value):e.value,c=t??"";if(l===c)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Jc={deep:!0,created(e,t,n){e[xe]=vt(n),it(e,"change",()=>{const s=e._modelValue,r=Wt(e),i=e.checked,o=e[xe];if(V(s)){const l=$s(s,r),c=l!==-1;if(i&&!c)o(s.concat(r));else if(!i&&c){const f=[...s];f.splice(l,1),o(f)}}else if(Yt(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(vo(e,i))})},mounted:kr,beforeUpdate(e,t,n){e[xe]=vt(n),kr(e,t,n)}};function kr(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(V(t))r=$s(t,s.props.value)>-1;else if(Yt(t))r=t.has(s.props.value);else{if(t===n)return;r=yt(t,vo(e,!0))}e.checked!==r&&(e.checked=r)}const Qc={created(e,{value:t},n){e.checked=yt(t,n.props.value),e[xe]=vt(n),it(e,"change",()=>{e[xe](Wt(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[xe]=vt(s),t!==n&&(e.checked=yt(t,s.props.value))}},Xc={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,it(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Jn(Wt(i)):Wt(i));e[xe](e.multiple?Yt(e._modelValue)?new Set(r):r:r[0]),e._assigning=!0,Zs(()=>{e._assigning=!1})}),e[xe]=vt(s)},mounted(e,{value:t}){Gr(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[xe]=vt(n)},updated(e,{value:t}){e._assigning||Gr(e,t)}};function Gr(e,t){const n=e.multiple,s=V(t);if(!(n&&!s&&!Yt(t))){for(let r=0,i=e.options.length;rString(f)===String(l)):o.selected=$s(t,l)>-1}else o.selected=t.has(l);else if(yt(Wt(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Wt(e){return"_value"in e?e._value:e.value}function vo(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Hu={created(e,t,n){On(e,t,n,null,"created")},mounted(e,t,n){On(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){On(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){On(e,t,n,s,"updated")}};function Zc(e,t){switch(e){case"SELECT":return Xc;case"TEXTAREA":return jr;default:switch(t){case"checkbox":return Jc;case"radio":return Qc;default:return jr}}}function On(e,t,n,s,r){const o=Zc(e.tagName,n.props&&n.props.type)[r];o&&o(e,t,n,s)}const ea=["ctrl","shift","alt","meta"],ta={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ea.some(n=>e[`${n}Key`]&&!t.includes(n))},Uu=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=bt(r.key);if(t.some(o=>o===i||na[o]===i))return e(r)})},sa=de({patchProp:Wc},Oc);let Kr;function ra(){return Kr||(Kr=ac(sa))}const ia=(...e)=>{const t=ra().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=la(s);if(!r)return;const i=t._component;!B(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,oa(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function oa(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function la(e){return se(e)?document.querySelector(e):e}/*! +**/let Ls;const Ir=typeof window<"u"&&window.trustedTypes;if(Ir)try{Ls=Ir.createPolicy("vue",{createHTML:e=>e})}catch{}const _o=Ls?e=>Ls.createHTML(e):e=>e,Cc="http://www.w3.org/2000/svg",Pc="http://www.w3.org/1998/Math/MathML",et=typeof document<"u"?document:null,Nr=et&&et.createElement("template"),Oc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?et.createElementNS(Cc,e):t==="mathml"?et.createElementNS(Pc,e):n?et.createElement(e,{is:n}):et.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>et.createTextNode(e),createComment:e=>et.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>et.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Nr.innerHTML=_o(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Nr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ic=Symbol("_vtc");function Nc(e,t,n){const s=e[Ic];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $n=Symbol("_vod"),yo=Symbol("_vsh"),Fu={name:"show",beforeMount(e,{value:t},{transition:n}){e[$n]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):tn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),tn(e,!0),s.enter(e)):s.leave(e,()=>{tn(e,!1)}):tn(e,t))},beforeUnmount(e,{value:t}){tn(e,t)}};function tn(e,t){e.style.display=t?e[$n]:"none",e[yo]=!t}const Mc=Symbol(""),Dc=/(?:^|;)\s*display\s*:/;function Lc(e,t,n){const s=e.style,r=se(n);let i=!1;if(n&&!r){if(t)if(se(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&ln(s,l,"")}else for(const o in t)n[o]==null&&ln(s,o,"");for(const o in n){o==="display"&&(i=!0);const l=n[o];l!=null?Fc(e,o,!se(t)&&t?t[o]:void 0,l)||ln(s,o,l):ln(s,o,"")}}else if(r){if(t!==n){const o=s[Mc];o&&(n+=";"+o),s.cssText=n,i=Dc.test(n)}}else t&&e.removeAttribute("style");$n in e&&(e[$n]=i?s.display:"",e[yo]&&(s.display="none"))}const Mr=/\s*!important$/;function ln(e,t,n){if(V(n))n.forEach(s=>ln(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Vc(e,t);Mr.test(n)?e.setProperty(bt(s),n.replace(Mr,""),"important"):e[s]=n}}const Dr=["Webkit","Moz","ms"],gs={};function Vc(e,t){const n=gs[t];if(n)return n;let s=ve(t);if(s!=="filter"&&s in e)return gs[t]=s;s=Jn(s);for(let r=0;rms||(Gc.then(()=>ms=0),ms=Date.now());function $c(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(V(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Wc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Nc(e,s,o):t==="style"?Lc(e,n,s):Wn(t)?qn(t)||Uc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):qc(e,t,s,o))?(Fr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vr(e,t,s,o,i,t!=="value")):e._isVueCE&&(zc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!se(s)))?Fr(e,ve(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Vr(e,t,s,o))};function qc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ur(t)&&B(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Ur(t)&&se(n)?!1:t in e}function zc(e,t){const n=e._def.props;if(!n)return!1;const s=ve(t);return Array.isArray(n)?n.some(r=>ve(r)===s):Object.keys(n).some(r=>ve(r)===s)}const vt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return V(t)?n=>In(t,n):t};function Jc(e){e.target.composing=!0}function Br(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xe=Symbol("_assign"),Pn=Symbol("_initialValue");function _s(e,t,n){return t&&(e=e.trim()),n&&(e=Yn(e)),e}const jr={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[Pn]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Pn]=e.defaultValue.replace(/\r\n?/g,` +`))),e[xe]=vt(r);const i=s||r.props&&r.props.type==="number";it(e,t?"change":"input",o=>{o.target.composing||e[xe](_s(e.value,n,i))}),(n||i)&&it(e,"change",()=>{e.value=_s(e.value,n,i)}),t||(it(e,"compositionstart",Jc),it(e,"compositionend",Br),it(e,"change",Br))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",i=e[Pn];delete e[Pn],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[xe](_s(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[xe]=vt(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Yn(e.value):e.value,c=t??"";if(l===c)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Yc={deep:!0,created(e,t,n){e[xe]=vt(n),it(e,"change",()=>{const s=e._modelValue,r=Wt(e),i=e.checked,o=e[xe];if(V(s)){const l=$s(s,r),c=l!==-1;if(i&&!c)o(s.concat(r));else if(!i&&c){const f=[...s];f.splice(l,1),o(f)}}else if(Jt(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(vo(e,i))})},mounted:kr,beforeUpdate(e,t,n){e[xe]=vt(n),kr(e,t,n)}};function kr(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(V(t))r=$s(t,s.props.value)>-1;else if(Jt(t))r=t.has(s.props.value);else{if(t===n)return;r=yt(t,vo(e,!0))}e.checked!==r&&(e.checked=r)}const Qc={created(e,{value:t},n){e.checked=yt(t,n.props.value),e[xe]=vt(n),it(e,"change",()=>{e[xe](Wt(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[xe]=vt(s),t!==n&&(e.checked=yt(t,s.props.value))}},Xc={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,it(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Yn(Wt(i)):Wt(i));e[xe](e.multiple?Jt(e._modelValue)?new Set(r):r:r[0]),e._assigning=!0,Zs(()=>{e._assigning=!1})}),e[xe]=vt(s)},mounted(e,{value:t}){Gr(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[xe]=vt(n)},updated(e,{value:t}){e._assigning||Gr(e,t)}};function Gr(e,t){const n=e.multiple,s=V(t);if(!(n&&!s&&!Jt(t))){for(let r=0,i=e.options.length;rString(f)===String(l)):o.selected=$s(t,l)>-1}else o.selected=t.has(l);else if(yt(Wt(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Wt(e){return"_value"in e?e._value:e.value}function vo(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Hu={created(e,t,n){On(e,t,n,null,"created")},mounted(e,t,n){On(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){On(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){On(e,t,n,s,"updated")}};function Zc(e,t){switch(e){case"SELECT":return Xc;case"TEXTAREA":return jr;default:switch(t){case"checkbox":return Yc;case"radio":return Qc;default:return jr}}}function On(e,t,n,s,r){const o=Zc(e.tagName,n.props&&n.props.type)[r];o&&o(e,t,n,s)}const ea=["ctrl","shift","alt","meta"],ta={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ea.some(n=>e[`${n}Key`]&&!t.includes(n))},Uu=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=bt(r.key);if(t.some(o=>o===i||na[o]===i))return e(r)})},sa=de({patchProp:Wc},Oc);let Kr;function ra(){return Kr||(Kr=ac(sa))}const ia=(...e)=>{const t=ra().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=la(s);if(!r)return;const i=t._component;!B(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,oa(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function oa(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function la(e){return se(e)?document.querySelector(e):e}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Ht=typeof document<"u";function bo(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ca(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&bo(e.default)}const K=Object.assign;function ys(e,t){const n={};for(const s in t){const r=t[s];n[s]=Le(r)?r.map(e):e(r)}return n}const pn=()=>{},Le=Array.isArray;function $r(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Eo=/#/g,aa=/&/g,ua=/\//g,fa=/=/g,da=/\?/g,wo=/\+/g,ha=/%5B/g,pa=/%5D/g,So=/%5E/g,ga=/%60/g,Ao=/%7B/g,ma=/%7C/g,Ro=/%7D/g,_a=/%20/g;function ir(e){return e==null?"":encodeURI(""+e).replace(ma,"|").replace(ha,"[").replace(pa,"]")}function ya(e){return ir(e).replace(Ao,"{").replace(Ro,"}").replace(So,"^")}function Vs(e){return ir(e).replace(wo,"%2B").replace(_a,"+").replace(Eo,"%23").replace(aa,"%26").replace(ga,"`").replace(Ao,"{").replace(Ro,"}").replace(So,"^")}function va(e){return Vs(e).replace(fa,"%3D")}function ba(e){return ir(e).replace(Eo,"%23").replace(da,"%3F")}function Ea(e){return ba(e).replace(ua,"%2F")}function wn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const wa=/\/$/,Sa=e=>e.replace(wa,"");function vs(e,t,n="/"){let s,r={},i="",o="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),i=t.slice(c,l>0?l:t.length),r=e(i.slice(1))),l>=0&&(s=s||t.slice(0,l),o=t.slice(l,t.length)),s=Ta(s??t,n),{fullPath:s+i+o,path:s,query:r,hash:wn(o)}}function Aa(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Wr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ra(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&qt(t.matched[s],n.matched[r])&&xo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function qt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function xo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!xa(e[n],t[n]))return!1;return!0}function xa(e,t){return Le(e)?qr(e,t):Le(t)?qr(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function qr(e,t){return Le(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ta(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let i=n.length-1,o,l;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(o).join("/")}const pt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Fs=function(e){return e.pop="pop",e.push="push",e}({}),bs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Ca(e){if(!e)if(Ht){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Sa(e)}const Pa=/^[^#]+#/;function Oa(e,t){return e.replace(Pa,"#")+t}function Ia(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const is=()=>({left:window.scrollX,top:window.scrollY});function Na(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Ia(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function zr(e,t){return(history.state?history.state.position-t:-1)+e}const Hs=new Map;function Ma(e,t){Hs.set(e,t)}function Da(e){const t=Hs.get(e);return Hs.delete(e),t}function La(e){return typeof e=="string"||e&&typeof e=="object"}function To(e){return typeof e=="string"||typeof e=="symbol"}let ne=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Co=Symbol("");ne.MATCHER_NOT_FOUND+"",ne.NAVIGATION_GUARD_REDIRECT+"",ne.NAVIGATION_ABORTED+"",ne.NAVIGATION_CANCELLED+"",ne.NAVIGATION_DUPLICATED+"";function zt(e,t){return K(new Error,{type:e,[Co]:!0},t)}function Ze(e,t){return e instanceof Error&&Co in e&&(t==null||!!(e.type&t))}const Va=["params","query","hash"];function Fa(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Va)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Ha(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&Vs(r)):[s&&Vs(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Ua(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Le(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Ba=Symbol(""),Jr=Symbol(""),os=Symbol(""),or=Symbol(""),Us=Symbol("");function nn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function _t(e,t,n,s,r,i=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const f=g=>{g===!1?c(zt(ne.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?c(g):La(g)?c(zt(ne.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(o&&s.enterCallbacks[r]===o&&typeof g=="function"&&o.push(g),l())},u=i(()=>e.call(s&&s.instances[r],t,n,f));let h=Promise.resolve(u);e.length<3&&(h=h.then(f)),h.catch(g=>c(g))})}function Es(e,t,n,s,r=i=>i()){const i=[];for(const o of e)for(const l in o.components){let c=o.components[l];if(!(t!=="beforeRouteEnter"&&!o.instances[l]))if(bo(c)){const f=(c.__vccOpts||c)[t];f&&i.push(_t(f,n,s,o,l,r))}else{let f=c();i.push(()=>f.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${o.path}"`);const h=ca(u)?u.default:u;o.mods[l]=u,o.components[l]=h;const g=(h.__vccOpts||h)[t];return g&&_t(g,n,s,o,l,r)()}))}}return i}function ja(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oqt(f,l))?s.push(l):n.push(l));const c=e.matched[o];c&&(t.matched.find(f=>qt(f,c))||r.push(c))}return[n,s,r]}/*! + */const Ht=typeof document<"u";function bo(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ca(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&bo(e.default)}const K=Object.assign;function ys(e,t){const n={};for(const s in t){const r=t[s];n[s]=Le(r)?r.map(e):e(r)}return n}const pn=()=>{},Le=Array.isArray;function $r(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Eo=/#/g,aa=/&/g,ua=/\//g,fa=/=/g,da=/\?/g,wo=/\+/g,ha=/%5B/g,pa=/%5D/g,So=/%5E/g,ga=/%60/g,Ao=/%7B/g,ma=/%7C/g,Ro=/%7D/g,_a=/%20/g;function ir(e){return e==null?"":encodeURI(""+e).replace(ma,"|").replace(ha,"[").replace(pa,"]")}function ya(e){return ir(e).replace(Ao,"{").replace(Ro,"}").replace(So,"^")}function Vs(e){return ir(e).replace(wo,"%2B").replace(_a,"+").replace(Eo,"%23").replace(aa,"%26").replace(ga,"`").replace(Ao,"{").replace(Ro,"}").replace(So,"^")}function va(e){return Vs(e).replace(fa,"%3D")}function ba(e){return ir(e).replace(Eo,"%23").replace(da,"%3F")}function Ea(e){return ba(e).replace(ua,"%2F")}function wn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const wa=/\/$/,Sa=e=>e.replace(wa,"");function vs(e,t,n="/"){let s,r={},i="",o="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),i=t.slice(c,l>0?l:t.length),r=e(i.slice(1))),l>=0&&(s=s||t.slice(0,l),o=t.slice(l,t.length)),s=Ta(s??t,n),{fullPath:s+i+o,path:s,query:r,hash:wn(o)}}function Aa(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Wr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ra(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&qt(t.matched[s],n.matched[r])&&xo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function qt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function xo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!xa(e[n],t[n]))return!1;return!0}function xa(e,t){return Le(e)?qr(e,t):Le(t)?qr(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function qr(e,t){return Le(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Ta(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let i=n.length-1,o,l;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(o).join("/")}const pt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Fs=function(e){return e.pop="pop",e.push="push",e}({}),bs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Ca(e){if(!e)if(Ht){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Sa(e)}const Pa=/^[^#]+#/;function Oa(e,t){return e.replace(Pa,"#")+t}function Ia(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const is=()=>({left:window.scrollX,top:window.scrollY});function Na(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Ia(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function zr(e,t){return(history.state?history.state.position-t:-1)+e}const Hs=new Map;function Ma(e,t){Hs.set(e,t)}function Da(e){const t=Hs.get(e);return Hs.delete(e),t}function La(e){return typeof e=="string"||e&&typeof e=="object"}function To(e){return typeof e=="string"||typeof e=="symbol"}let ne=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Co=Symbol("");ne.MATCHER_NOT_FOUND+"",ne.NAVIGATION_GUARD_REDIRECT+"",ne.NAVIGATION_ABORTED+"",ne.NAVIGATION_CANCELLED+"",ne.NAVIGATION_DUPLICATED+"";function zt(e,t){return K(new Error,{type:e,[Co]:!0},t)}function Ze(e,t){return e instanceof Error&&Co in e&&(t==null||!!(e.type&t))}const Va=["params","query","hash"];function Fa(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Va)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Ha(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&Vs(r)):[s&&Vs(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Ua(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Le(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Ba=Symbol(""),Yr=Symbol(""),os=Symbol(""),or=Symbol(""),Us=Symbol("");function nn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function _t(e,t,n,s,r,i=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const f=g=>{g===!1?c(zt(ne.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?c(g):La(g)?c(zt(ne.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(o&&s.enterCallbacks[r]===o&&typeof g=="function"&&o.push(g),l())},u=i(()=>e.call(s&&s.instances[r],t,n,f));let h=Promise.resolve(u);e.length<3&&(h=h.then(f)),h.catch(g=>c(g))})}function Es(e,t,n,s,r=i=>i()){const i=[];for(const o of e)for(const l in o.components){let c=o.components[l];if(!(t!=="beforeRouteEnter"&&!o.instances[l]))if(bo(c)){const f=(c.__vccOpts||c)[t];f&&i.push(_t(f,n,s,o,l,r))}else{let f=c();i.push(()=>f.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${o.path}"`);const h=ca(u)?u.default:u;o.mods[l]=u,o.components[l]=h;const g=(h.__vccOpts||h)[t];return g&&_t(g,n,s,o,l,r)()}))}}return i}function ja(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;oqt(f,l))?s.push(l):n.push(l));const c=e.matched[o];c&&(t.matched.find(f=>qt(f,c))||r.push(c))}return[n,s,r]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let ka=()=>location.protocol+"//"+location.host;function Po(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(o);return l[0]!=="/"&&(l="/"+l),Wr(l,"")}return Wr(n,e)+s+r}function Ga(e,t,n,s){let r=[],i=[],o=null;const l=({state:g})=>{const m=Po(e,location),I=n.value,R=t.value;let U=0;if(g){if(n.value=m,t.value=g,o&&o===I){o=null;return}U=R?g.position-R.position:0}else s(m);r.forEach(F=>{F(n.value,I,{delta:U,type:Fs.pop,direction:U?U>0?bs.forward:bs.back:bs.unknown})})};function c(){o=n.value}function f(g){r.push(g);const m=()=>{const I=r.indexOf(g);I>-1&&r.splice(I,1)};return i.push(m),m}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(K({},g.state,{scroll:is()}),"")}}function h(){for(const g of i)g();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:f,destroy:h}}function Qr(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?is():null}}function Ka(e){const{history:t,location:n}=window,s={value:Po(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,f,u){const h=e.indexOf("#"),g=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:ka()+e+c;try{t[u?"replaceState":"pushState"](f,"",g),r.value=f}catch(m){console.error(m),n[u?"replace":"assign"](g)}}function o(c,f){i(c,K({},t.state,Qr(r.value.back,c,r.value.forward,!0),f,{position:r.value.position}),!0),s.value=c}function l(c,f){const u=K({},r.value,t.state,{forward:c,scroll:is()});i(u.current,u,!0),i(c,K({},Qr(s.value,c,null),{position:u.position+1},f),!1),s.value=c}return{location:s,state:r,push:l,replace:o}}function $a(e){e=Ca(e);const t=Ka(e),n=Ga(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=K({location:"",base:e,go:s,createHref:Oa.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Tt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var le=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(le||{});const Wa={type:Tt.Static,value:""},qa=/[a-zA-Z0-9_]/;function za(e){if(!e)return[[]];if(e==="/")return[[Wa]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${f}": ${m}`)}let n=le.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,c,f="",u="";function h(){f&&(n===le.Static?i.push({type:Tt.Static,value:f}):n===le.Param||n===le.ParamRegExp||n===le.ParamRegExpEnd?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Tt.Param,value:f,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),f="")}function g(){f+=c}for(;lt.length?t.length===1&&t[0]===_e.Static+_e.Segment?1:-1:0}function Oo(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Za={strict:!1,end:!0,sensitive:!1};function eu(e,t,n){const s=Qa(za(e.path),n),r=K(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function tu(e,t){const n=[],s=new Map;t=$r(Za,t);function r(h){return s.get(h)}function i(h,g,m){const I=!m,R=ti(h);R.aliasOf=m&&m.record;const U=$r(t,h),F=[R];if("alias"in h){const O=typeof h.alias=="string"?[h.alias]:h.alias;for(const J of O)F.push(ti(K({},R,{components:m?m.record.components:R.components,path:J,aliasOf:m?m.record:R})))}let C,N;for(const O of F){const{path:J}=O;if(g&&J[0]!=="/"){const oe=g.record.path,te=oe[oe.length-1]==="/"?"":"/";O.path=g.record.path+(J&&te+J)}if(C=eu(O,g,U),m?m.alias.push(C):(N=N||C,N!==C&&N.alias.push(C),I&&h.name&&!ni(C)&&o(h.name)),Io(C)&&c(C),R.children){const oe=R.children;for(let te=0;te{o(N)}:pn}function o(h){if(To(h)){const g=s.get(h);g&&(s.delete(h),n.splice(n.indexOf(g),1),g.children.forEach(o),g.alias.forEach(o))}else{const g=n.indexOf(h);g>-1&&(n.splice(g,1),h.record.name&&s.delete(h.record.name),h.children.forEach(o),h.alias.forEach(o))}}function l(){return n}function c(h){const g=ru(h,n);n.splice(g,0,h),h.record.name&&!ni(h)&&s.set(h.record.name,h)}function f(h,g){let m,I={},R,U;if("name"in h&&h.name){if(m=s.get(h.name),!m)throw zt(ne.MATCHER_NOT_FOUND,{location:h});U=m.record.name,I=K(ei(g.params,m.keys.filter(N=>!N.optional).concat(m.parent?m.parent.keys.filter(N=>N.optional):[]).map(N=>N.name)),h.params&&ei(h.params,m.keys.map(N=>N.name))),R=m.stringify(I)}else if(h.path!=null)R=h.path,m=n.find(N=>N.re.test(R)),m&&(I=m.parse(R),U=m.record.name);else{if(m=g.name?s.get(g.name):n.find(N=>N.re.test(g.path)),!m)throw zt(ne.MATCHER_NOT_FOUND,{location:h,currentLocation:g});U=m.record.name,I=K({},g.params,h.params),R=m.stringify(I)}const F=[];let C=m;for(;C;)F.unshift(C.record),C=C.parent;return{name:U,path:R,params:I,matched:F,meta:su(F)}}e.forEach(h=>i(h));function u(){n.length=0,s.clear()}return{addRoute:i,resolve:f,removeRoute:o,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function ei(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function ti(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:nu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function nu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function ni(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function su(e){return e.reduce((t,n)=>K(t,n.meta),{})}function ru(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;Oo(e,t[i])<0?s=i:n=i+1}const r=iu(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function iu(e){let t=e;for(;t=t.parent;)if(Io(t)&&Oo(e,t)===0)return t}function Io({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function si(e){const t=Ne(os),n=Ne(or),s=Oe(()=>{const c=ae(e.to);return t.resolve(c)}),r=Oe(()=>{const{matched:c}=s.value,{length:f}=c,u=c[f-1],h=n.matched;if(!u||!h.length)return-1;const g=h.findIndex(qt.bind(null,u));if(g>-1)return g;const m=ri(c[f-2]);return f>1&&ri(u)===m&&h[h.length-1].path!==m?h.findIndex(qt.bind(null,c[f-2])):g}),i=Oe(()=>r.value>-1&&uu(n.params,s.value.params)),o=Oe(()=>r.value>-1&&r.value===n.matched.length-1&&xo(n.params,s.value.params));function l(c={}){if(au(c)){const f=t[ae(e.replace)?"replace":"push"](ae(e.to)).catch(pn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:s,href:Oe(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}function ou(e){return e.length===1?e[0]:e}const lu=Gi({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:si,setup(e,{slots:t}){const n=Jt(si(e)),{options:s}=Ne(os),r=Oe(()=>({[ii(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ii(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&ou(t.default(n));return e.custom?i:En("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),cu=lu;function au(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function uu(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Le(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function ri(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ii=(e,t,n)=>e??t??n,fu=Gi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ne(Us),r=Oe(()=>e.route||s.value),i=Ne(Jr,0),o=Oe(()=>{let f=ae(i);const{matched:u}=r.value;let h;for(;(h=u[f])&&!h.components;)f++;return f}),l=Oe(()=>r.value.matched[o.value]);Nn(Jr,Oe(()=>o.value+1)),Nn(Ba,l),Nn(Us,r);const c=dl();return Mn(()=>[c.value,l.value,e.name],([f,u,h],[g,m,I])=>{u&&(u.instances[h]=f,m&&m!==u&&f&&f===g&&(u.leaveGuards.size||(u.leaveGuards=m.leaveGuards),u.updateGuards.size||(u.updateGuards=m.updateGuards))),f&&u&&(!m||!qt(u,m)||!g)&&(u.enterCallbacks[h]||[]).forEach(R=>R(f))},{flush:"post"}),()=>{const f=r.value,u=e.name,h=l.value,g=h&&h.components[u];if(!g)return oi(n.default,{Component:g,route:f});const m=h.props[u],I=m?m===!0?f.params:typeof m=="function"?m(f):m:null,U=En(g,K({},I,t,{onVnodeUnmounted:F=>{F.component.isUnmounted&&(h.instances[u]=null)},ref:c}));return oi(n.default,{Component:U,route:f})||U}}});function oi(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const du=fu;function hu(e){const t=tu(e.routes,e),n=e.parseQuery||Ha,s=e.stringifyQuery||Yr,r=e.history,i=nn(),o=nn(),l=nn(),c=hl(pt);let f=pt;Ht&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ys.bind(null,v=>""+v),h=ys.bind(null,Ea),g=ys.bind(null,wn);function m(v,P){let x,M;return To(v)?(x=t.getRecordMatcher(v),M=P):M=v,t.addRoute(M,x)}function I(v){const P=t.getRecordMatcher(v);P&&t.removeRoute(P)}function R(){return t.getRoutes().map(v=>v.record)}function U(v){return!!t.getRecordMatcher(v)}function F(v,P){if(P=K({},P||c.value),typeof v=="string"){const p=vs(n,v,P.path),y=t.resolve({path:p.path},P),b=r.createHref(p.fullPath);return K(p,y,{params:g(y.params),hash:wn(p.hash),redirectedFrom:void 0,href:b})}let x;if(v.path!=null)x=K({},v,{path:vs(n,v.path,P.path).path});else{const p=K({},v.params);for(const y in p)p[y]==null&&delete p[y];x=K({},v,{params:h(p)}),P.params=h(P.params)}const M=t.resolve(x,P),j=v.hash||"";M.params=u(g(M.params));const a=Aa(s,K({},v,{hash:ya(j),path:M.path})),d=r.createHref(a);return K({fullPath:a,hash:j,query:s===Yr?Ua(v.query):v.query||{}},M,{redirectedFrom:void 0,href:d})}function C(v){return typeof v=="string"?vs(n,v,c.value.path):K({},v)}function N(v,P){if(f!==v)return zt(ne.NAVIGATION_CANCELLED,{from:P,to:v})}function O(v){return te(v)}function J(v){return O(K(C(v),{replace:!0}))}function oe(v,P){const x=v.matched[v.matched.length-1];if(x&&x.redirect){const{redirect:M}=x;let j=typeof M=="function"?M(v,P):M;return typeof j=="string"&&(j=j.includes("?")||j.includes("#")?j=C(j):{path:j},j.params={}),K({query:v.query,hash:v.hash,params:j.path!=null?{}:v.params},j)}}function te(v,P){const x=f=F(v),M=c.value,j=v.state,a=v.force,d=v.replace===!0,p=oe(x,M);if(p)return te(K(C(p),{state:typeof p=="object"?K({},j,p.state):j,force:a,replace:d}),P||x);const y=x;y.redirectedFrom=P;let b;return!a&&Ra(s,M,x)&&(b=zt(ne.NAVIGATION_DUPLICATED,{to:y,from:M}),Ue(M,M,!0,!1)),(b?Promise.resolve(b):Fe(y,M)).catch(_=>Ze(_)?Ze(_,ne.NAVIGATION_GUARD_REDIRECT)?_:ht(_):G(_,y,M)).then(_=>{if(_){if(Ze(_,ne.NAVIGATION_GUARD_REDIRECT))return te(K({replace:d},C(_.to),{state:typeof _.to=="object"?K({},j,_.to.state):j,force:a}),P||y)}else _=Et(y,M,!0,d,j);return dt(y,M,_),_})}function Ve(v,P){const x=N(v,P);return x?Promise.reject(x):Promise.resolve()}function ft(v){const P=Mt.values().next().value;return P&&typeof P.runWithContext=="function"?P.runWithContext(v):v()}function Fe(v,P){let x;const[M,j,a]=ja(v,P);x=Es(M.reverse(),"beforeRouteLeave",v,P);for(const p of M)p.leaveGuards.forEach(y=>{x.push(_t(y,v,P))});const d=Ve.bind(null,v,P);return x.push(d),Te(x).then(()=>{x=[];for(const p of i.list())x.push(_t(p,v,P));return x.push(d),Te(x)}).then(()=>{x=Es(j,"beforeRouteUpdate",v,P);for(const p of j)p.updateGuards.forEach(y=>{x.push(_t(y,v,P))});return x.push(d),Te(x)}).then(()=>{x=[];for(const p of a)if(p.beforeEnter)if(Le(p.beforeEnter))for(const y of p.beforeEnter)x.push(_t(y,v,P));else x.push(_t(p.beforeEnter,v,P));return x.push(d),Te(x)}).then(()=>(v.matched.forEach(p=>p.enterCallbacks={}),x=Es(a,"beforeRouteEnter",v,P,ft),x.push(d),Te(x))).then(()=>{x=[];for(const p of o.list())x.push(_t(p,v,P));return x.push(d),Te(x)}).catch(p=>Ze(p,ne.NAVIGATION_CANCELLED)?p:Promise.reject(p))}function dt(v,P,x){l.list().forEach(M=>ft(()=>M(v,P,x)))}function Et(v,P,x,M,j){const a=N(v,P);if(a)return a;const d=P===pt,p=Ht?history.state:{};x&&(M||d?r.replace(v.fullPath,K({scroll:d&&p&&p.scroll},j)):r.push(v.fullPath,j)),c.value=v,Ue(v,P,x,d),ht()}let He;function Qt(){He||(He=r.listen((v,P,x)=>{if(!wt.listening)return;const M=F(v),j=oe(M,wt.currentRoute.value);if(j){te(K(j,{replace:!0,force:!0}),M).catch(pn);return}f=M;const a=c.value;Ht&&Ma(zr(a.fullPath,x.delta),is()),Fe(M,a).catch(d=>Ze(d,ne.NAVIGATION_ABORTED|ne.NAVIGATION_CANCELLED)?d:Ze(d,ne.NAVIGATION_GUARD_REDIRECT)?(te(K(C(d.to),{force:!0}),M).then(p=>{Ze(p,ne.NAVIGATION_ABORTED|ne.NAVIGATION_DUPLICATED)&&!x.delta&&x.type===Fs.pop&&r.go(-1,!1)}).catch(pn),Promise.reject()):(x.delta&&r.go(-x.delta,!1),G(d,M,a))).then(d=>{d=d||Et(M,a,!1),d&&(x.delta&&!Ze(d,ne.NAVIGATION_CANCELLED)?r.go(-x.delta,!1):x.type===Fs.pop&&Ze(d,ne.NAVIGATION_ABORTED|ne.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),dt(M,a,d)}).catch(pn)}))}let It=nn(),ce=nn(),z;function G(v,P,x){ht(v);const M=ce.list();return M.length?M.forEach(j=>j(v,P,x)):console.error(v),Promise.reject(v)}function Qe(){return z&&c.value!==pt?Promise.resolve():new Promise((v,P)=>{It.add([v,P])})}function ht(v){return z||(z=!v,Qt(),It.list().forEach(([P,x])=>v?x(v):P()),It.reset()),v}function Ue(v,P,x,M){const{scrollBehavior:j}=e;if(!Ht||!j)return Promise.resolve();const a=!x&&Da(zr(v.fullPath,0))||(M||!x)&&history.state&&history.state.scroll||null;return Zs().then(()=>j(v,P,a)).then(d=>d&&Na(d)).catch(d=>G(d,v,P))}const be=v=>r.go(v);let Nt;const Mt=new Set,wt={currentRoute:c,listening:!0,addRoute:m,removeRoute:I,clearRoutes:t.clearRoutes,hasRoute:U,getRoutes:R,resolve:F,options:e,push:O,replace:J,go:be,back:()=>be(-1),forward:()=>be(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:ce.add,isReady:Qe,install(v){v.component("RouterLink",cu),v.component("RouterView",du),v.config.globalProperties.$router=wt,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>ae(c)}),Ht&&!Nt&&c.value===pt&&(Nt=!0,O(r.location).catch(M=>{}));const P={};for(const M in pt)Object.defineProperty(P,M,{get:()=>c.value[M],enumerable:!0});v.provide(os,wt),v.provide(or,Ni(P)),v.provide(Us,c);const x=v.unmount;Mt.add(v),v.unmount=function(){Mt.delete(v),Mt.size<1&&(f=pt,He&&He(),He=null,c.value=pt,Nt=!1,z=!1),x()}}};function Te(v){return v.reduce((P,x)=>P.then(()=>ft(x)),Promise.resolve())}return wt}function pu(){return Ne(os)}function ju(e){return Ne(or)}/** + */let ka=()=>location.protocol+"//"+location.host;function Po(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(o);return l[0]!=="/"&&(l="/"+l),Wr(l,"")}return Wr(n,e)+s+r}function Ga(e,t,n,s){let r=[],i=[],o=null;const l=({state:g})=>{const m=Po(e,location),I=n.value,R=t.value;let U=0;if(g){if(n.value=m,t.value=g,o&&o===I){o=null;return}U=R?g.position-R.position:0}else s(m);r.forEach(F=>{F(n.value,I,{delta:U,type:Fs.pop,direction:U?U>0?bs.forward:bs.back:bs.unknown})})};function c(){o=n.value}function f(g){r.push(g);const m=()=>{const I=r.indexOf(g);I>-1&&r.splice(I,1)};return i.push(m),m}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(K({},g.state,{scroll:is()}),"")}}function h(){for(const g of i)g();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:f,destroy:h}}function Qr(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?is():null}}function Ka(e){const{history:t,location:n}=window,s={value:Po(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,f,u){const h=e.indexOf("#"),g=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:ka()+e+c;try{t[u?"replaceState":"pushState"](f,"",g),r.value=f}catch(m){console.error(m),n[u?"replace":"assign"](g)}}function o(c,f){i(c,K({},t.state,Qr(r.value.back,c,r.value.forward,!0),f,{position:r.value.position}),!0),s.value=c}function l(c,f){const u=K({},r.value,t.state,{forward:c,scroll:is()});i(u.current,u,!0),i(c,K({},Qr(s.value,c,null),{position:u.position+1},f),!1),s.value=c}return{location:s,state:r,push:l,replace:o}}function $a(e){e=Ca(e);const t=Ka(e),n=Ga(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=K({location:"",base:e,go:s,createHref:Oa.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Tt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var le=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(le||{});const Wa={type:Tt.Static,value:""},qa=/[a-zA-Z0-9_]/;function za(e){if(!e)return[[]];if(e==="/")return[[Wa]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${f}": ${m}`)}let n=le.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,c,f="",u="";function h(){f&&(n===le.Static?i.push({type:Tt.Static,value:f}):n===le.Param||n===le.ParamRegExp||n===le.ParamRegExpEnd?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Tt.Param,value:f,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),f="")}function g(){f+=c}for(;lt.length?t.length===1&&t[0]===_e.Static+_e.Segment?1:-1:0}function Oo(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Za={strict:!1,end:!0,sensitive:!1};function eu(e,t,n){const s=Qa(za(e.path),n),r=K(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function tu(e,t){const n=[],s=new Map;t=$r(Za,t);function r(h){return s.get(h)}function i(h,g,m){const I=!m,R=ti(h);R.aliasOf=m&&m.record;const U=$r(t,h),F=[R];if("alias"in h){const O=typeof h.alias=="string"?[h.alias]:h.alias;for(const Y of O)F.push(ti(K({},R,{components:m?m.record.components:R.components,path:Y,aliasOf:m?m.record:R})))}let C,N;for(const O of F){const{path:Y}=O;if(g&&Y[0]!=="/"){const oe=g.record.path,te=oe[oe.length-1]==="/"?"":"/";O.path=g.record.path+(Y&&te+Y)}if(C=eu(O,g,U),m?m.alias.push(C):(N=N||C,N!==C&&N.alias.push(C),I&&h.name&&!ni(C)&&o(h.name)),Io(C)&&c(C),R.children){const oe=R.children;for(let te=0;te{o(N)}:pn}function o(h){if(To(h)){const g=s.get(h);g&&(s.delete(h),n.splice(n.indexOf(g),1),g.children.forEach(o),g.alias.forEach(o))}else{const g=n.indexOf(h);g>-1&&(n.splice(g,1),h.record.name&&s.delete(h.record.name),h.children.forEach(o),h.alias.forEach(o))}}function l(){return n}function c(h){const g=ru(h,n);n.splice(g,0,h),h.record.name&&!ni(h)&&s.set(h.record.name,h)}function f(h,g){let m,I={},R,U;if("name"in h&&h.name){if(m=s.get(h.name),!m)throw zt(ne.MATCHER_NOT_FOUND,{location:h});U=m.record.name,I=K(ei(g.params,m.keys.filter(N=>!N.optional).concat(m.parent?m.parent.keys.filter(N=>N.optional):[]).map(N=>N.name)),h.params&&ei(h.params,m.keys.map(N=>N.name))),R=m.stringify(I)}else if(h.path!=null)R=h.path,m=n.find(N=>N.re.test(R)),m&&(I=m.parse(R),U=m.record.name);else{if(m=g.name?s.get(g.name):n.find(N=>N.re.test(g.path)),!m)throw zt(ne.MATCHER_NOT_FOUND,{location:h,currentLocation:g});U=m.record.name,I=K({},g.params,h.params),R=m.stringify(I)}const F=[];let C=m;for(;C;)F.unshift(C.record),C=C.parent;return{name:U,path:R,params:I,matched:F,meta:su(F)}}e.forEach(h=>i(h));function u(){n.length=0,s.clear()}return{addRoute:i,resolve:f,removeRoute:o,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function ei(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function ti(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:nu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function nu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function ni(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function su(e){return e.reduce((t,n)=>K(t,n.meta),{})}function ru(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;Oo(e,t[i])<0?s=i:n=i+1}const r=iu(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function iu(e){let t=e;for(;t=t.parent;)if(Io(t)&&Oo(e,t)===0)return t}function Io({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function si(e){const t=Ne(os),n=Ne(or),s=Oe(()=>{const c=ae(e.to);return t.resolve(c)}),r=Oe(()=>{const{matched:c}=s.value,{length:f}=c,u=c[f-1],h=n.matched;if(!u||!h.length)return-1;const g=h.findIndex(qt.bind(null,u));if(g>-1)return g;const m=ri(c[f-2]);return f>1&&ri(u)===m&&h[h.length-1].path!==m?h.findIndex(qt.bind(null,c[f-2])):g}),i=Oe(()=>r.value>-1&&uu(n.params,s.value.params)),o=Oe(()=>r.value>-1&&r.value===n.matched.length-1&&xo(n.params,s.value.params));function l(c={}){if(au(c)){const f=t[ae(e.replace)?"replace":"push"](ae(e.to)).catch(pn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:s,href:Oe(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}function ou(e){return e.length===1?e[0]:e}const lu=Gi({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:si,setup(e,{slots:t}){const n=Yt(si(e)),{options:s}=Ne(os),r=Oe(()=>({[ii(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ii(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&ou(t.default(n));return e.custom?i:En("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),cu=lu;function au(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function uu(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Le(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function ri(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ii=(e,t,n)=>e??t??n,fu=Gi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ne(Us),r=Oe(()=>e.route||s.value),i=Ne(Yr,0),o=Oe(()=>{let f=ae(i);const{matched:u}=r.value;let h;for(;(h=u[f])&&!h.components;)f++;return f}),l=Oe(()=>r.value.matched[o.value]);Nn(Yr,Oe(()=>o.value+1)),Nn(Ba,l),Nn(Us,r);const c=dl();return Mn(()=>[c.value,l.value,e.name],([f,u,h],[g,m,I])=>{u&&(u.instances[h]=f,m&&m!==u&&f&&f===g&&(u.leaveGuards.size||(u.leaveGuards=m.leaveGuards),u.updateGuards.size||(u.updateGuards=m.updateGuards))),f&&u&&(!m||!qt(u,m)||!g)&&(u.enterCallbacks[h]||[]).forEach(R=>R(f))},{flush:"post"}),()=>{const f=r.value,u=e.name,h=l.value,g=h&&h.components[u];if(!g)return oi(n.default,{Component:g,route:f});const m=h.props[u],I=m?m===!0?f.params:typeof m=="function"?m(f):m:null,U=En(g,K({},I,t,{onVnodeUnmounted:F=>{F.component.isUnmounted&&(h.instances[u]=null)},ref:c}));return oi(n.default,{Component:U,route:f})||U}}});function oi(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const du=fu;function hu(e){const t=tu(e.routes,e),n=e.parseQuery||Ha,s=e.stringifyQuery||Jr,r=e.history,i=nn(),o=nn(),l=nn(),c=hl(pt);let f=pt;Ht&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ys.bind(null,v=>""+v),h=ys.bind(null,Ea),g=ys.bind(null,wn);function m(v,P){let x,M;return To(v)?(x=t.getRecordMatcher(v),M=P):M=v,t.addRoute(M,x)}function I(v){const P=t.getRecordMatcher(v);P&&t.removeRoute(P)}function R(){return t.getRoutes().map(v=>v.record)}function U(v){return!!t.getRecordMatcher(v)}function F(v,P){if(P=K({},P||c.value),typeof v=="string"){const p=vs(n,v,P.path),y=t.resolve({path:p.path},P),b=r.createHref(p.fullPath);return K(p,y,{params:g(y.params),hash:wn(p.hash),redirectedFrom:void 0,href:b})}let x;if(v.path!=null)x=K({},v,{path:vs(n,v.path,P.path).path});else{const p=K({},v.params);for(const y in p)p[y]==null&&delete p[y];x=K({},v,{params:h(p)}),P.params=h(P.params)}const M=t.resolve(x,P),j=v.hash||"";M.params=u(g(M.params));const a=Aa(s,K({},v,{hash:ya(j),path:M.path})),d=r.createHref(a);return K({fullPath:a,hash:j,query:s===Jr?Ua(v.query):v.query||{}},M,{redirectedFrom:void 0,href:d})}function C(v){return typeof v=="string"?vs(n,v,c.value.path):K({},v)}function N(v,P){if(f!==v)return zt(ne.NAVIGATION_CANCELLED,{from:P,to:v})}function O(v){return te(v)}function Y(v){return O(K(C(v),{replace:!0}))}function oe(v,P){const x=v.matched[v.matched.length-1];if(x&&x.redirect){const{redirect:M}=x;let j=typeof M=="function"?M(v,P):M;return typeof j=="string"&&(j=j.includes("?")||j.includes("#")?j=C(j):{path:j},j.params={}),K({query:v.query,hash:v.hash,params:j.path!=null?{}:v.params},j)}}function te(v,P){const x=f=F(v),M=c.value,j=v.state,a=v.force,d=v.replace===!0,p=oe(x,M);if(p)return te(K(C(p),{state:typeof p=="object"?K({},j,p.state):j,force:a,replace:d}),P||x);const y=x;y.redirectedFrom=P;let b;return!a&&Ra(s,M,x)&&(b=zt(ne.NAVIGATION_DUPLICATED,{to:y,from:M}),Ue(M,M,!0,!1)),(b?Promise.resolve(b):Fe(y,M)).catch(_=>Ze(_)?Ze(_,ne.NAVIGATION_GUARD_REDIRECT)?_:ht(_):G(_,y,M)).then(_=>{if(_){if(Ze(_,ne.NAVIGATION_GUARD_REDIRECT))return te(K({replace:d},C(_.to),{state:typeof _.to=="object"?K({},j,_.to.state):j,force:a}),P||y)}else _=Et(y,M,!0,d,j);return dt(y,M,_),_})}function Ve(v,P){const x=N(v,P);return x?Promise.reject(x):Promise.resolve()}function ft(v){const P=Mt.values().next().value;return P&&typeof P.runWithContext=="function"?P.runWithContext(v):v()}function Fe(v,P){let x;const[M,j,a]=ja(v,P);x=Es(M.reverse(),"beforeRouteLeave",v,P);for(const p of M)p.leaveGuards.forEach(y=>{x.push(_t(y,v,P))});const d=Ve.bind(null,v,P);return x.push(d),Te(x).then(()=>{x=[];for(const p of i.list())x.push(_t(p,v,P));return x.push(d),Te(x)}).then(()=>{x=Es(j,"beforeRouteUpdate",v,P);for(const p of j)p.updateGuards.forEach(y=>{x.push(_t(y,v,P))});return x.push(d),Te(x)}).then(()=>{x=[];for(const p of a)if(p.beforeEnter)if(Le(p.beforeEnter))for(const y of p.beforeEnter)x.push(_t(y,v,P));else x.push(_t(p.beforeEnter,v,P));return x.push(d),Te(x)}).then(()=>(v.matched.forEach(p=>p.enterCallbacks={}),x=Es(a,"beforeRouteEnter",v,P,ft),x.push(d),Te(x))).then(()=>{x=[];for(const p of o.list())x.push(_t(p,v,P));return x.push(d),Te(x)}).catch(p=>Ze(p,ne.NAVIGATION_CANCELLED)?p:Promise.reject(p))}function dt(v,P,x){l.list().forEach(M=>ft(()=>M(v,P,x)))}function Et(v,P,x,M,j){const a=N(v,P);if(a)return a;const d=P===pt,p=Ht?history.state:{};x&&(M||d?r.replace(v.fullPath,K({scroll:d&&p&&p.scroll},j)):r.push(v.fullPath,j)),c.value=v,Ue(v,P,x,d),ht()}let He;function Qt(){He||(He=r.listen((v,P,x)=>{if(!wt.listening)return;const M=F(v),j=oe(M,wt.currentRoute.value);if(j){te(K(j,{replace:!0,force:!0}),M).catch(pn);return}f=M;const a=c.value;Ht&&Ma(zr(a.fullPath,x.delta),is()),Fe(M,a).catch(d=>Ze(d,ne.NAVIGATION_ABORTED|ne.NAVIGATION_CANCELLED)?d:Ze(d,ne.NAVIGATION_GUARD_REDIRECT)?(te(K(C(d.to),{force:!0}),M).then(p=>{Ze(p,ne.NAVIGATION_ABORTED|ne.NAVIGATION_DUPLICATED)&&!x.delta&&x.type===Fs.pop&&r.go(-1,!1)}).catch(pn),Promise.reject()):(x.delta&&r.go(-x.delta,!1),G(d,M,a))).then(d=>{d=d||Et(M,a,!1),d&&(x.delta&&!Ze(d,ne.NAVIGATION_CANCELLED)?r.go(-x.delta,!1):x.type===Fs.pop&&Ze(d,ne.NAVIGATION_ABORTED|ne.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),dt(M,a,d)}).catch(pn)}))}let It=nn(),ce=nn(),z;function G(v,P,x){ht(v);const M=ce.list();return M.length?M.forEach(j=>j(v,P,x)):console.error(v),Promise.reject(v)}function Qe(){return z&&c.value!==pt?Promise.resolve():new Promise((v,P)=>{It.add([v,P])})}function ht(v){return z||(z=!v,Qt(),It.list().forEach(([P,x])=>v?x(v):P()),It.reset()),v}function Ue(v,P,x,M){const{scrollBehavior:j}=e;if(!Ht||!j)return Promise.resolve();const a=!x&&Da(zr(v.fullPath,0))||(M||!x)&&history.state&&history.state.scroll||null;return Zs().then(()=>j(v,P,a)).then(d=>d&&Na(d)).catch(d=>G(d,v,P))}const be=v=>r.go(v);let Nt;const Mt=new Set,wt={currentRoute:c,listening:!0,addRoute:m,removeRoute:I,clearRoutes:t.clearRoutes,hasRoute:U,getRoutes:R,resolve:F,options:e,push:O,replace:Y,go:be,back:()=>be(-1),forward:()=>be(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:ce.add,isReady:Qe,install(v){v.component("RouterLink",cu),v.component("RouterView",du),v.config.globalProperties.$router=wt,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>ae(c)}),Ht&&!Nt&&c.value===pt&&(Nt=!0,O(r.location).catch(M=>{}));const P={};for(const M in pt)Object.defineProperty(P,M,{get:()=>c.value[M],enumerable:!0});v.provide(os,wt),v.provide(or,Ni(P)),v.provide(Us,c);const x=v.unmount;Mt.add(v),v.unmount=function(){Mt.delete(v),Mt.size<1&&(f=pt,He&&He(),He=null,c.value=pt,Nt=!1,z=!1),x()}}};function Te(v){return v.reduce((P,x)=>P.then(()=>ft(x)),Promise.resolve())}return wt}function pu(){return Ne(os)}function ju(e){return Ne(or)}/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. @@ -79,4 +79,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Login-BFjXrLpo. * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Eu=No("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Bs="st_token";function Mo(){return localStorage.getItem(Bs)}function ws(e){e?localStorage.setItem(Bs,e):localStorage.removeItem(Bs)}async function ee(e,t,n,s=!1){const r={},i=Mo();i&&(r.Authorization=`Bearer ${i}`);let o=n;!s&&n!==void 0&&n!==null&&(r["Content-Type"]="application/json",o=JSON.stringify(n));const l=await fetch(t,{method:e,headers:r,body:o});let c=null;try{c=await l.json()}catch{}if(!l.ok){const f=c&&(c.error||c.message)||`HTTP ${l.status}`;throw new Error(f)}return c}const Ss={login:(e,t)=>ee("POST","/api/auth/login",{username:e,password:t}),me:()=>ee("GET","/api/auth/me"),setup:e=>ee("POST","/api/auth/setup",e),updateProfile:e=>ee("PATCH","/api/auth/profile",e),adminCreateUser:e=>ee("POST","/api/admin/users",e),adminListUsers:()=>ee("GET","/api/admin/users"),adminUpdateUser:(e,t)=>ee("PUT",`/api/admin/users/${e}`,t),createGroup:e=>ee("POST","/api/groups",e,!0),listGroups:()=>ee("GET","/api/groups"),getGroup:e=>ee("GET",`/api/groups/${e}`),analyzeGroup:e=>ee("POST",`/api/groups/${e}/analyze`),listPersonas:e=>ee("GET",`/api/groups/${e}/personas`),getPersona:(e,t)=>ee("GET",`/api/groups/${e}/personas/${t}`),updatePersona:(e,t,n)=>ee("PUT",`/api/groups/${e}/personas/${t}`,n),chatStart:(e,t,n,s)=>ee("POST",`/api/chat/${e}/personas/${t}/chat/start`,{scenario:n,locale:s}),chatResume:(e,t)=>ee("GET",`/api/chat/${e}/personas/${t}/chat/resume`),chatSend:(e,t,n)=>ee("POST",`/api/chat/${e}/personas/${t}/chat/send`,{text:n}),chatFinish:(e,t)=>ee("POST",`/api/chat/${e}/personas/${t}/chat/finish`),mySessions:()=>ee("GET","/api/chat/sessions"),myBoard:()=>ee("GET","/api/me/board"),weakAreas:()=>ee("GET","/api/me/weak-areas"),myPersonas:()=>ee("GET","/api/me/personas"),generatePersona:e=>ee("POST","/api/me/personas/generate",e),analytics:(e={})=>{const t=new URLSearchParams;e.from&&t.set("from",e.from),e.to&&t.set("to",e.to);const n=t.toString();return ee("GET",`/api/analytics${n?`?${n}`:""}`)}},Ce=Jt({user:null,token:Mo(),mustSetup:!1,get role(){return this.user?this.user.role:null},get isAdmin(){return this.role==="admin"||this.role==="super_admin"},get isSuperAdmin(){return this.role==="super_admin"},async load(){var e;if(!this.token)return null;try{const t=await Ss.me();return this.user=t.user,this.mustSetup=!!((e=t.user)!=null&&e.must_setup),this.user}catch{return this.user=null,this.mustSetup=!1,ws(null),null}},async login(e,t){const n=await Ss.login(e,t);return this.token=n.token,ws(n.token),this.user=n.user,this.mustSetup=!!n.must_setup,n.user},async finishSetup(e,t){const n=await Ss.setup({username:this.user.username||this.user.id,email:e,password:t});return this.user=n.user,this.mustSetup=!1,n.user},logout(){this.user=null,this.token=null,this.mustSetup=!1,ws(null)}}),As={en:{app:"Sales Trainer",login:"Login",logout:"Logout",username:"Username",email:"Email",password:"Password",newPassword:"New password",confirmPassword:"Confirm password",save:"Save",passwordTooShort:"Password must be at least 4 characters",passwordMismatch:"Passwords do not match",setupTitle:"Set up your account",setupSubtitle:"First login for ",loginError:"Invalid credentials",dashboard:"Dashboard",training:"Training",myDashboard:"My dashboard",adminOverview:"Admin overview",guideTitle:"How to use / คู่มือใช้งาน",settings:"Settings",account:"Account",profile:"Profile",readonly:"read-only",name:"Display name",saveProfile:"Save profile",changePassword:"Change password",optional:"optional",saved:"Saved",total:"Total",dateRange:"Date range",apply:"Apply",clear:"Clear",hardestPersonas:"Hardest personas",closeRate:"Close rate",managePersonas:"Manage personas",difficulty:"Difficulty",trained:"Trained",addProduct:"Add product",trainingSubtitle:"Pick a product group, then choose a persona to practice closing the sale.",noTraining:"No training groups available",groups:"Persona Groups",myTraining:"My Training",adminTools:"Admin Tools",users:"Users",analytics:"Analytics",groupBuilder:"Group Builder",create:"Create",analyze:"Analyze",manual:"Manual",edit:"Edit",product:"Product",segment:"Initial customer segment (optional)",description:"Additional description / scenario (optional)",channel:"Channel",facebook:"Facebook",line:"LINE",language:"Language",thai:"Thai",english:"English",personas:"Personas",tierA:"Tier A — Ready to buy",tierB:"Tier B — Unsure",tierC:"Tier C — Not interested but has pain",selectPersona:"Select a persona to practice",chooseScenario:"Choose a scenario",chatGuideTitle:"How to practice",chatGuideText:'You are playing the salesperson. Chat with this customer and try to close the sale. Ask about their needs, solve their pain, and handle their objections. When you are done, press "Finish & get result" to see your score and coaching.',chat:"Chat",start:"Start",send:"Send",finish:"Finish & get result",debrief:"Result & Coaching",won:"Won",lost:"Lost",notTried:"Not tried",score:"Score",pain:"Pain",why:"Reason",reveal:"Revealed persona details",generatePersona:"Generate my persona",weakAreas:"My weak areas",mySessions:"My sessions",openSaleTask:"The customer did NOT message first. You must open the sale.",sellerInitiated:"You must open the sale (outbound)",customerInitiated:"The customer will message you first"},th:{app:"ระบบฝึกทักษะการขาย",login:"เข้าสู่ระบบ",logout:"ออกจากระบบ",username:"ชื่อผู้ใช้",email:"อีเมล",password:"รหัสผ่าน",newPassword:"รหัสผ่านใหม่",confirmPassword:"ยืนยันรหัสผ่าน",save:"บันทึก",passwordTooShort:"รหัสผ่านต้องมีความยาวอย่างน้อย 4 ตัวอักษร",passwordMismatch:"รหัสผ่านที่ยืนยันไม่ตรงกัน",setupTitle:"ตั้งค่าบัญชีของคุณ",setupSubtitle:"เข้าสู่ระบบครั้งแรกสำหรับ ",loginError:"ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง กรุณาลองอีกครั้ง",dashboard:"หน้าหลัก",training:"การฝึก",myDashboard:"ภาพรวมผลการฝึก",adminOverview:"ภาพรวมผู้ดูแล",settings:"การตั้งค่า",account:"บัญชี",profile:"ข้อมูลส่วนตัว",readonly:"อ่านอย่างเดียว",name:"ชื่อที่แสดง",saveProfile:"บันทึกข้อมูล",changePassword:"เปลี่ยนรหัสผ่าน",optional:"ไม่บังคับ",saved:"บันทึกเรียบร้อย",total:"ทั้งหมด",dateRange:"ช่วงเวลา",apply:"กรอง",clear:"ล้าง",hardestPersonas:"บุคคลต้นแบบที่ขายยากที่สุด",closeRate:"อัตราปิดการขาย",managePersonas:"จัดการบุคคลต้นแบบ",difficulty:"ระดับความยาก",trained:"ฝึกแล้ว",addProduct:"เพิ่มสินค้า",trainingSubtitle:"เลือกกลุ่มสินค้า แล้วเลือกบุคคลต้นแบบเพื่อฝึกปิดการขาย",noTraining:"ยังไม่มีกลุ่มฝึก",groups:"กลุ่มบุคคลต้นแบบลูกค้า (Persona)",myTraining:"ประวัติการฝึก",adminTools:"เครื่องมือผู้ดูแลระบบ",users:"ผู้ใช้งาน",analytics:"สถิติ",groupBuilder:"สร้างกลุ่มบุคคลต้นแบบ",create:"สร้าง",analyze:"วิเคราะห์",manual:"ระบุเอง",edit:"แก้ไข",product:"สินค้า/บริการ",segment:"กลุ่มลูกค้าเป้าหมายเบื้องต้น (ไม่บังคับ)",description:"คำอธิบายหรือรายละเอียดเพิ่มเติม (ไม่บังคับ)",channel:"ช่องทางติดต่อ",facebook:"Facebook",line:"LINE",language:"ภาษา",thai:"ไทย",english:"อังกฤษ",personas:"บุคคลต้นแบบ",tierA:"ระดับ A — พร้อมตัดสินใจซื้อ",tierB:"ระดับ B — ยังไม่แน่ใจ",tierC:"ระดับ C — ไม่สนใจแต่มีปัญหา",selectPersona:"เลือกบุคคลต้นแบบเพื่อฝึก",chooseScenario:"เลือกสถานการณ์",chatGuideTitle:"วิธีฝึก",chatGuideText:'คุณรับบทเป็นพนักงานขาย พูดคุยกับลูกค้าคนนี้เพื่อพยายามปิดการขายให้ได้ สอบถามความต้องการ แก้ไขปัญหาของลูกค้า และรับมือกับข้อโต้แย้ง เมื่อพอใจแล้วกด "สรุปผล" เพื่อดูคะแนนและข้อเสนอแนะ',chat:"แชท",start:"เริ่มต้น",send:"ส่ง",finish:"สรุปผล",debrief:"ผลลัพธ์และข้อเสนอแนะ",won:"ปิดการขายได้",lost:"ปิดการขายไม่ได้",notTried:"ยังไม่ได้ฝึก",score:"คะแนน",pain:"ปัญหาของลูกค้า",why:"เหตุผล",reveal:"รายละเอียดบุคคลต้นแบบที่ถูกซ่อนไว้",generatePersona:"สร้างบุคคลต้นแบบเพิ่มเติม",weakAreas:"จุดอ่อนที่ควรฝึกเพิ่มเติม",mySessions:"ประวัติการฝึกของฉัน",openSaleTask:"ลูกค้ายังไม่ได้ทักเข้ามา คุณต้องเป็นฝ่ายเริ่มบทสนทนาการขายเอง",sellerInitiated:"คุณต้องเริ่มการขายในเชิงรุก",customerInitiated:"ลูกค้าจะติดต่อเข้ามาก่อน"}},Ke=Jt({locale:localStorage.getItem("locale")||"th",t(e){return As[this.locale]&&As[this.locale][e]||As.en[e]||e},set(e){this.locale=e,localStorage.setItem("locale",e)}}),wu=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Su={class:"app"},Au={key:0,class:"topnav"},Ru={class:"tabs"},xu={class:"nav-right"},Tu={class:"txt"},Cu={class:"main"},Pu={__name:"App",setup(e){const t=pu();function n(){Ke.set(Ke.locale==="th"?"en":"th")}function s(){Ce.logout(),t.push("/login")}return Wi(()=>{Ce.token&&!Ce.user&&Ce.load()}),(r,i)=>{const o=_r("router-link"),l=_r("router-view");return on(),Tr("div",Su,[ae(Ce).user?(on(),Tr("nav",Au,[ie(o,{to:"/",class:"brand"},{default:Vt(()=>[Ft(Rt(ae(Ke).t("app")),1)]),_:1}),mt("div",Ru,[ae(Ce).isAdmin?(on(),Ds(o,{key:0,to:"/",class:jt(["tab",{active:r.$route.path==="/"}])},{default:Vt(()=>[Ft(Rt(ae(Ke).t("adminOverview")),1)]),_:1},8,["class"])):Cr("",!0),ie(o,{to:"/my/board",class:jt(["tab",{active:r.$route.path==="/my/board"}])},{default:Vt(()=>[Ft(Rt(ae(Ke).t("myDashboard")),1)]),_:1},8,["class"]),ie(o,{to:"/training",class:jt(["tab",{active:r.$route.path==="/training"}])},{default:Vt(()=>[Ft(Rt(ae(Ke).t("training")),1)]),_:1},8,["class"])]),mt("div",xu,[mt("button",{onClick:n,class:"lang"},Rt(ae(Ke).locale==="th"?"EN":"TH"),1),ie(o,{to:"/settings",class:"icon-btn",title:ae(Ke).t("settings")},{default:Vt(()=>[ie(ae(Eu),{size:20,"stroke-width":1.8})]),_:1},8,["title"]),mt("button",{onClick:s,class:"logout-btn"},[ie(ae(bu),{size:18,"stroke-width":1.8}),i[0]||(i[0]=Ft()),mt("span",Tu,Rt(ae(Ke).t("logout")),1)])])])):Cr("",!0),mt("main",Cu,[(on(),Ds(l,{key:ae(Ke).locale}))])])}}},Ou=wu(Pu,[["__scopeId","data-v-f29a3a4f"]]),Iu="modulepreload",Nu=function(e){return"/"+e},ai={},Se=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Nu(c),c in ai)return;ai[c]=!0;const f=c.endsWith(".css"),u=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":Iu,f||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),f)return new Promise((g,m)=>{h.addEventListener("load",g),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Mu=[{path:"/login",component:()=>Se(()=>import("./Login-BFjXrLpo.js"),__vite__mapDeps([0,1])),meta:{public:!0}},{path:"/setup",component:()=>Se(()=>import("./Setup-B6q98ArM.js"),__vite__mapDeps([2,3,4]))},{path:"/",component:()=>Se(()=>import("./Analytics-DzK25pzJ.js"),__vite__mapDeps([5,6,7,8])),meta:{admin:!0}},{path:"/my/board",component:()=>Se(()=>import("./MyBoard-wXpWmFYg.js"),__vite__mapDeps([9,10,11]))},{path:"/training",component:()=>Se(()=>import("./Training-C9KC4ygo.js"),__vite__mapDeps([12,13,14,7,15]))},{path:"/groups/:gid/personas",component:()=>Se(()=>import("./Personas-BK-v3zL-.js"),__vite__mapDeps([16,13,17,18]))},{path:"/groups/:gid/chat/:pid",component:()=>Se(()=>import("./Chat-B4cA4NlX.js"),__vite__mapDeps([19,13,17,20]))},{path:"/settings",component:()=>Se(()=>import("./Settings-k8fzlPYr.js"),__vite__mapDeps([21,3,22]))},{path:"/guide",component:()=>Se(()=>import("./Guide-Bx9T4hBF.js"),__vite__mapDeps([23,14,10,13,24]))},{path:"/admin/new-group",component:()=>Se(()=>import("./GroupBuilder-DpQWbscg.js"),__vite__mapDeps([25,17,26])),meta:{admin:!0}},{path:"/admin/groups/:gid/edit",component:()=>Se(()=>import("./GroupEdit-PGVs7eZc.js"),__vite__mapDeps([27,6,24,28])),meta:{admin:!0}},{path:"/admin/users",component:()=>Se(()=>import("./AdminUsers-BXR4J5iM.js"),__vite__mapDeps([29,6,30])),meta:{admin:!0}},{path:"/admin/analytics",component:()=>Se(()=>import("./Analytics-DzK25pzJ.js"),__vite__mapDeps([5,6,7,8])),meta:{admin:!0}}],Do=hu({history:$a(),routes:Mu});Do.beforeEach(async e=>e.meta.public?!0:(Ce.user||await Ce.load(),Ce.user?Ce.mustSetup&&e.path!=="/setup"?{path:"/setup"}:e.path==="/"&&!Ce.isAdmin?{path:"/my/board"}:e.meta.admin&&!Ce.isAdmin?{path:"/my/board"}:!0:{path:"/login",query:{redirect:e.fullPath}}));ia(Ou).use(Do).mount("#app");export{Oe as A,jt as B,Zs as C,Vu as D,Xc as E,tt as F,Mn as G,Jt as H,Uu as I,Eu as S,wu as _,Tr as a,mt as b,No as c,Bu as d,Hu as e,Ds as f,Cr as g,Ce as h,Ke as i,pu as j,ju as k,ie as l,Ft as m,Wi as n,on as o,Vt as p,Ks as q,dl as r,Lu as s,Rt as t,ae as u,jr as v,Du as w,Ss as x,_r as y,Fu as z}; + */const Eu=No("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Bs="st_token";function Mo(){return localStorage.getItem(Bs)}function ws(e){e?localStorage.setItem(Bs,e):localStorage.removeItem(Bs)}async function ee(e,t,n,s=!1){const r={},i=Mo();i&&(r.Authorization=`Bearer ${i}`);let o=n;!s&&n!==void 0&&n!==null&&(r["Content-Type"]="application/json",o=JSON.stringify(n));const l=await fetch(t,{method:e,headers:r,body:o});let c=null;try{c=await l.json()}catch{}if(!l.ok){const f=c&&(c.error||c.message)||`HTTP ${l.status}`;throw new Error(f)}return c}const Ss={login:(e,t)=>ee("POST","/api/auth/login",{username:e,password:t}),me:()=>ee("GET","/api/auth/me"),setup:e=>ee("POST","/api/auth/setup",e),updateProfile:e=>ee("PATCH","/api/auth/profile",e),adminCreateUser:e=>ee("POST","/api/admin/users",e),adminListUsers:()=>ee("GET","/api/admin/users"),adminUpdateUser:(e,t)=>ee("PUT",`/api/admin/users/${e}`,t),createGroup:e=>ee("POST","/api/groups",e,!0),listGroups:()=>ee("GET","/api/groups"),getGroup:e=>ee("GET",`/api/groups/${e}`),analyzeGroup:e=>ee("POST",`/api/groups/${e}/analyze`),listPersonas:e=>ee("GET",`/api/groups/${e}/personas`),getPersona:(e,t)=>ee("GET",`/api/groups/${e}/personas/${t}`),updatePersona:(e,t,n)=>ee("PUT",`/api/groups/${e}/personas/${t}`,n),chatStart:(e,t,n,s)=>ee("POST",`/api/chat/${e}/personas/${t}/chat/start`,{scenario:n,locale:s}),chatResume:(e,t)=>ee("GET",`/api/chat/${e}/personas/${t}/chat/resume`),chatSend:(e,t,n)=>ee("POST",`/api/chat/${e}/personas/${t}/chat/send`,{text:n}),chatFinish:(e,t)=>ee("POST",`/api/chat/${e}/personas/${t}/chat/finish`),mySessions:()=>ee("GET","/api/chat/sessions"),myBoard:()=>ee("GET","/api/me/board"),weakAreas:()=>ee("GET","/api/me/weak-areas"),myPersonas:()=>ee("GET","/api/me/personas"),generatePersona:e=>ee("POST","/api/me/personas/generate",e),analytics:(e={})=>{const t=new URLSearchParams;e.from&&t.set("from",e.from),e.to&&t.set("to",e.to);const n=t.toString();return ee("GET",`/api/analytics${n?`?${n}`:""}`)}},Ce=Yt({user:null,token:Mo(),mustSetup:!1,get role(){return this.user?this.user.role:null},get isAdmin(){return this.role==="admin"||this.role==="super_admin"},get isSuperAdmin(){return this.role==="super_admin"},async load(){var e;if(!this.token)return null;try{const t=await Ss.me();return this.user=t.user,this.mustSetup=!!((e=t.user)!=null&&e.must_setup),this.user}catch{return this.user=null,this.mustSetup=!1,ws(null),null}},async login(e,t){const n=await Ss.login(e,t);return this.token=n.token,ws(n.token),this.user=n.user,this.mustSetup=!!n.must_setup,n.user},async finishSetup(e,t,n=!1){const s=await Ss.setup({username:this.user.username||this.user.id,email:e,password:t,accepted_terms:n});return this.user=s.user,this.mustSetup=!1,s.user},logout(){this.user=null,this.token=null,this.mustSetup=!1,ws(null)}}),As={en:{app:"Sales Trainer",login:"Login",logout:"Logout",username:"Username",email:"Email",password:"Password",newPassword:"New password",confirmPassword:"Confirm password",save:"Save",passwordTooShort:"Password must be at least 4 characters",passwordMismatch:"Passwords do not match",setupTitle:"Set up your account",setupSubtitle:"First login for ",loginError:"Invalid credentials",dashboard:"Dashboard",training:"Training",myDashboard:"My dashboard",adminOverview:"Admin overview",guideTitle:"How to use / คู่มือใช้งาน",settings:"Settings",account:"Account",profile:"Profile",readonly:"read-only",name:"Display name",saveProfile:"Save profile",changePassword:"Change password",optional:"optional",saved:"Saved",total:"Total",dateRange:"Date range",apply:"Apply",clear:"Clear",hardestPersonas:"Hardest personas",closeRate:"Close rate",managePersonas:"Manage personas",difficulty:"Difficulty",trained:"Trained",addProduct:"Add product",trainingSubtitle:"Pick a product group, then choose a persona to practice closing the sale.",noTraining:"No training groups available",groups:"Persona Groups",myTraining:"My Training",adminTools:"Admin Tools",users:"Users",analytics:"Analytics",groupBuilder:"Group Builder",create:"Create",analyze:"Analyze",manual:"Manual",edit:"Edit",product:"Product",segment:"Initial customer segment (optional)",description:"Additional description / scenario (optional)",channel:"Channel",facebook:"Facebook",line:"LINE",language:"Language",thai:"Thai",english:"English",personas:"Personas",tierA:"Tier A — Ready to buy",tierB:"Tier B — Unsure",tierC:"Tier C — Not interested but has pain",selectPersona:"Select a persona to practice",chooseScenario:"Choose a scenario",chatGuideTitle:"How to practice",chatGuideText:'You are playing the salesperson. Chat with this customer and try to close the sale. Ask about their needs, solve their pain, and handle their objections. When you are done, press "Finish & get result" to see your score and coaching.',chat:"Chat",start:"Start",send:"Send",finish:"Finish & get result",debrief:"Result & Coaching",won:"Won",lost:"Lost",notTried:"Not tried",score:"Score",pain:"Pain",why:"Reason",reveal:"Revealed persona details",generatePersona:"Generate my persona",weakAreas:"My weak areas",mySessions:"My sessions",openSaleTask:"The customer did NOT message first. You must open the sale.",sellerInitiated:"You must open the sale (outbound)",customerInitiated:"The customer will message you first"},th:{app:"ระบบฝึกทักษะการขาย",login:"เข้าสู่ระบบ",logout:"ออกจากระบบ",username:"ชื่อผู้ใช้",email:"อีเมล",password:"รหัสผ่าน",newPassword:"รหัสผ่านใหม่",confirmPassword:"ยืนยันรหัสผ่าน",save:"บันทึก",passwordTooShort:"รหัสผ่านต้องมีความยาวอย่างน้อย 4 ตัวอักษร",passwordMismatch:"รหัสผ่านที่ยืนยันไม่ตรงกัน",setupTitle:"ตั้งค่าบัญชีของคุณ",setupSubtitle:"เข้าสู่ระบบครั้งแรกสำหรับ ",loginError:"ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง กรุณาลองอีกครั้ง",dashboard:"หน้าหลัก",training:"การฝึก",myDashboard:"ภาพรวมผลการฝึก",adminOverview:"ภาพรวมผู้ดูแล",settings:"การตั้งค่า",account:"บัญชี",profile:"ข้อมูลส่วนตัว",readonly:"อ่านอย่างเดียว",name:"ชื่อที่แสดง",saveProfile:"บันทึกข้อมูล",changePassword:"เปลี่ยนรหัสผ่าน",optional:"ไม่บังคับ",saved:"บันทึกเรียบร้อย",total:"ทั้งหมด",dateRange:"ช่วงเวลา",apply:"กรอง",clear:"ล้าง",hardestPersonas:"บุคคลต้นแบบที่ขายยากที่สุด",closeRate:"อัตราปิดการขาย",managePersonas:"จัดการบุคคลต้นแบบ",difficulty:"ระดับความยาก",trained:"ฝึกแล้ว",addProduct:"เพิ่มสินค้า",trainingSubtitle:"เลือกกลุ่มสินค้า แล้วเลือกบุคคลต้นแบบเพื่อฝึกปิดการขาย",noTraining:"ยังไม่มีกลุ่มฝึก",groups:"กลุ่มบุคคลต้นแบบลูกค้า (Persona)",myTraining:"ประวัติการฝึก",adminTools:"เครื่องมือผู้ดูแลระบบ",users:"ผู้ใช้งาน",analytics:"สถิติ",groupBuilder:"สร้างกลุ่มบุคคลต้นแบบ",create:"สร้าง",analyze:"วิเคราะห์",manual:"ระบุเอง",edit:"แก้ไข",product:"สินค้า/บริการ",segment:"กลุ่มลูกค้าเป้าหมายเบื้องต้น (ไม่บังคับ)",description:"คำอธิบายหรือรายละเอียดเพิ่มเติม (ไม่บังคับ)",channel:"ช่องทางติดต่อ",facebook:"Facebook",line:"LINE",language:"ภาษา",thai:"ไทย",english:"อังกฤษ",personas:"บุคคลต้นแบบ",tierA:"ระดับ A — พร้อมตัดสินใจซื้อ",tierB:"ระดับ B — ยังไม่แน่ใจ",tierC:"ระดับ C — ไม่สนใจแต่มีปัญหา",selectPersona:"เลือกบุคคลต้นแบบเพื่อฝึก",chooseScenario:"เลือกสถานการณ์",chatGuideTitle:"วิธีฝึก",chatGuideText:'คุณรับบทเป็นพนักงานขาย พูดคุยกับลูกค้าคนนี้เพื่อพยายามปิดการขายให้ได้ สอบถามความต้องการ แก้ไขปัญหาของลูกค้า และรับมือกับข้อโต้แย้ง เมื่อพอใจแล้วกด "สรุปผล" เพื่อดูคะแนนและข้อเสนอแนะ',chat:"แชท",start:"เริ่มต้น",send:"ส่ง",finish:"สรุปผล",debrief:"ผลลัพธ์และข้อเสนอแนะ",won:"ปิดการขายได้",lost:"ปิดการขายไม่ได้",notTried:"ยังไม่ได้ฝึก",score:"คะแนน",pain:"ปัญหาของลูกค้า",why:"เหตุผล",reveal:"รายละเอียดบุคคลต้นแบบที่ถูกซ่อนไว้",generatePersona:"สร้างบุคคลต้นแบบเพิ่มเติม",weakAreas:"จุดอ่อนที่ควรฝึกเพิ่มเติม",mySessions:"ประวัติการฝึกของฉัน",openSaleTask:"ลูกค้ายังไม่ได้ทักเข้ามา คุณต้องเป็นฝ่ายเริ่มบทสนทนาการขายเอง",sellerInitiated:"คุณต้องเริ่มการขายในเชิงรุก",customerInitiated:"ลูกค้าจะติดต่อเข้ามาก่อน"}},Ke=Yt({locale:localStorage.getItem("locale")||"th",t(e){return As[this.locale]&&As[this.locale][e]||As.en[e]||e},set(e){this.locale=e,localStorage.setItem("locale",e)}}),wu=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Su={class:"app"},Au={key:0,class:"topnav"},Ru={class:"tabs"},xu={class:"nav-right"},Tu={class:"txt"},Cu={class:"main"},Pu={__name:"App",setup(e){const t=pu();function n(){Ke.set(Ke.locale==="th"?"en":"th")}function s(){Ce.logout(),t.push("/login")}return Wi(()=>{Ce.token&&!Ce.user&&Ce.load()}),(r,i)=>{const o=_r("router-link"),l=_r("router-view");return on(),Tr("div",Su,[ae(Ce).user?(on(),Tr("nav",Au,[ie(o,{to:"/",class:"brand"},{default:Vt(()=>[Ft(Rt(ae(Ke).t("app")),1)]),_:1}),mt("div",Ru,[ae(Ce).isAdmin?(on(),Ds(o,{key:0,to:"/",class:jt(["tab",{active:r.$route.path==="/"}])},{default:Vt(()=>[Ft(Rt(ae(Ke).t("adminOverview")),1)]),_:1},8,["class"])):Cr("",!0),ie(o,{to:"/my/board",class:jt(["tab",{active:r.$route.path==="/my/board"}])},{default:Vt(()=>[Ft(Rt(ae(Ke).t("myDashboard")),1)]),_:1},8,["class"]),ie(o,{to:"/training",class:jt(["tab",{active:r.$route.path==="/training"}])},{default:Vt(()=>[Ft(Rt(ae(Ke).t("training")),1)]),_:1},8,["class"])]),mt("div",xu,[mt("button",{onClick:n,class:"lang"},Rt(ae(Ke).locale==="th"?"EN":"TH"),1),ie(o,{to:"/settings",class:"icon-btn",title:ae(Ke).t("settings")},{default:Vt(()=>[ie(ae(Eu),{size:20,"stroke-width":1.8})]),_:1},8,["title"]),mt("button",{onClick:s,class:"logout-btn"},[ie(ae(bu),{size:18,"stroke-width":1.8}),i[0]||(i[0]=Ft()),mt("span",Tu,Rt(ae(Ke).t("logout")),1)])])])):Cr("",!0),mt("main",Cu,[(on(),Ds(l,{key:ae(Ke).locale}))])])}}},Ou=wu(Pu,[["__scopeId","data-v-f29a3a4f"]]),Iu="modulepreload",Nu=function(e){return"/"+e},ai={},Se=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Nu(c),c in ai)return;ai[c]=!0;const f=c.endsWith(".css"),u=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":Iu,f||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),f)return new Promise((g,m)=>{h.addEventListener("load",g),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Mu=[{path:"/login",component:()=>Se(()=>import("./Login-B1BFq5lO.js"),__vite__mapDeps([0,1])),meta:{public:!0}},{path:"/setup",component:()=>Se(()=>import("./Setup-DlVOMLoz.js"),__vite__mapDeps([2,3,4]))},{path:"/",component:()=>Se(()=>import("./Analytics-CWNDFvS5.js"),__vite__mapDeps([5,6,7,8])),meta:{admin:!0}},{path:"/my/board",component:()=>Se(()=>import("./MyBoard-C2XKgiYF.js"),__vite__mapDeps([9,10,11]))},{path:"/training",component:()=>Se(()=>import("./Training-DuHwYoAr.js"),__vite__mapDeps([12,13,14,7,15]))},{path:"/groups/:gid/personas",component:()=>Se(()=>import("./Personas-C1zt2UAW.js"),__vite__mapDeps([16,13,17,18]))},{path:"/groups/:gid/chat/:pid",component:()=>Se(()=>import("./Chat-BUYTG6XR.js"),__vite__mapDeps([19,13,17,20]))},{path:"/settings",component:()=>Se(()=>import("./Settings-C6ZMNY2Q.js"),__vite__mapDeps([21,3,22]))},{path:"/guide",component:()=>Se(()=>import("./Guide-PlIFuOuL.js"),__vite__mapDeps([23,14,10,13,24]))},{path:"/admin/new-group",component:()=>Se(()=>import("./GroupBuilder-j2iPAhDG.js"),__vite__mapDeps([25,17,26])),meta:{admin:!0}},{path:"/admin/groups/:gid/edit",component:()=>Se(()=>import("./GroupEdit-CJ3zMSjJ.js"),__vite__mapDeps([27,6,24,28])),meta:{admin:!0}},{path:"/admin/users",component:()=>Se(()=>import("./AdminUsers-Bev0W-FI.js"),__vite__mapDeps([29,6,30])),meta:{admin:!0}},{path:"/admin/analytics",component:()=>Se(()=>import("./Analytics-CWNDFvS5.js"),__vite__mapDeps([5,6,7,8])),meta:{admin:!0}}],Do=hu({history:$a(),routes:Mu});Do.beforeEach(async e=>e.meta.public?!0:(Ce.user||await Ce.load(),Ce.user?Ce.mustSetup&&e.path!=="/setup"?{path:"/setup"}:e.path==="/"&&!Ce.isAdmin?{path:"/my/board"}:e.meta.admin&&!Ce.isAdmin?{path:"/my/board"}:!0:{path:"/login",query:{redirect:e.fullPath}}));ia(Ou).use(Do).mount("#app");export{Fu as A,Oe as B,jt as C,Zs as D,Vu as E,tt as F,Xc as G,Mn as H,Yt as I,Uu as J,Eu as S,wu as _,Tr as a,mt as b,No as c,Bu as d,Hu as e,Ds as f,Cr as g,Ce as h,Ke as i,pu as j,ju as k,ie as l,Ft as m,Yc as n,on as o,Wi as p,Vt as q,dl as r,Ks as s,Rt as t,ae as u,jr as v,Du as w,Lu as x,Ss as y,_r as z}; diff --git a/frontend/dist/assets/layout-dashboard-Djj77ueX.js b/frontend/dist/assets/layout-dashboard-D4d1g6OI.js similarity index 91% rename from frontend/dist/assets/layout-dashboard-Djj77ueX.js rename to frontend/dist/assets/layout-dashboard-D4d1g6OI.js index 2b12c72..367aaed 100644 --- a/frontend/dist/assets/layout-dashboard-Djj77ueX.js +++ b/frontend/dist/assets/layout-dashboard-D4d1g6OI.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-BCax2GDh.js";/** +import{c as t}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/lock-uERjsrGr.js b/frontend/dist/assets/lock-CERtIuBL.js similarity index 88% rename from frontend/dist/assets/lock-uERjsrGr.js rename to frontend/dist/assets/lock-CERtIuBL.js index f15f508..af9530f 100644 --- a/frontend/dist/assets/lock-uERjsrGr.js +++ b/frontend/dist/assets/lock-CERtIuBL.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCax2GDh.js";/** +import{c as e}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/plus-B9zMVgv0.js b/frontend/dist/assets/plus-zB_wweS5.js similarity index 86% rename from frontend/dist/assets/plus-B9zMVgv0.js rename to frontend/dist/assets/plus-zB_wweS5.js index 9d36835..bdd9646 100644 --- a/frontend/dist/assets/plus-B9zMVgv0.js +++ b/frontend/dist/assets/plus-zB_wweS5.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCax2GDh.js";/** +import{c as e}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/sparkles-E3Xd6eY7.js b/frontend/dist/assets/sparkles-CWO9Md85.js similarity index 93% rename from frontend/dist/assets/sparkles-E3Xd6eY7.js rename to frontend/dist/assets/sparkles-CWO9Md85.js index e9f5238..ba376ba 100644 --- a/frontend/dist/assets/sparkles-E3Xd6eY7.js +++ b/frontend/dist/assets/sparkles-CWO9Md85.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-BCax2GDh.js";/** +import{c as a}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/target-BFC5gbdb.js b/frontend/dist/assets/target-CUBX0ybh.js similarity index 90% rename from frontend/dist/assets/target-BFC5gbdb.js rename to frontend/dist/assets/target-CUBX0ybh.js index 250f3d5..4c00f0b 100644 --- a/frontend/dist/assets/target-BFC5gbdb.js +++ b/frontend/dist/assets/target-CUBX0ybh.js @@ -1,4 +1,4 @@ -import{c}from"./index-BCax2GDh.js";/** +import{c}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/users-NPxa3eQ_.js b/frontend/dist/assets/users-CknR8rxo.js similarity index 90% rename from frontend/dist/assets/users-NPxa3eQ_.js rename to frontend/dist/assets/users-CknR8rxo.js index b817a69..04a470d 100644 --- a/frontend/dist/assets/users-NPxa3eQ_.js +++ b/frontend/dist/assets/users-CknR8rxo.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-BCax2GDh.js";/** +import{c as e}from"./index-Cr5KFgzf.js";/** * @license lucide-vue-next v1.0.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/index.html b/frontend/dist/index.html index b0582a3..0dc1874 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -4,7 +4,7 @@ Sales Trainer - + diff --git a/frontend/src/store/auth.js b/frontend/src/store/auth.js index 1bab4f5..6930721 100644 --- a/frontend/src/store/auth.js +++ b/frontend/src/store/auth.js @@ -37,8 +37,8 @@ export const auth = reactive({ this.mustSetup = !!data.must_setup return data.user }, - async finishSetup(email, password) { - const data = await api.setup({ username: this.user.username || this.user.id, email, password }) + async finishSetup(email, password, acceptedTerms = false) { + const data = await api.setup({ username: this.user.username || this.user.id, email, password, accepted_terms: acceptedTerms }) this.user = data.user this.mustSetup = false return data.user diff --git a/frontend/src/views/Setup.vue b/frontend/src/views/Setup.vue index 52bbef5..30c052b 100644 --- a/frontend/src/views/Setup.vue +++ b/frontend/src/views/Setup.vue @@ -13,9 +13,14 @@ + + - @@ -34,6 +39,8 @@ const router = useRouter() const email = ref('') const password = ref('') const confirm = ref('') +const accepted = ref(false) +const termsUrl = '/legal' const error = ref('') const busy = ref(false) @@ -49,7 +56,7 @@ async function submit() { } busy.value = true try { - await auth.finishSetup(email.value.trim(), password.value) + await auth.finishSetup(email.value.trim(), password.value, true) router.push('/') } catch (e) { error.value = e.message @@ -67,4 +74,7 @@ async function submit() { .setup-card { width: 460px; max-width: 100%; padding: 28px 30px; } h1 { margin-top: 0; font-size: 24px; } .wide { width: 100%; min-height: 46px; font-size: 15px; padding: 12px 14px; } +.terms { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; } +.terms input { width: auto; min-height: auto; margin: 0; } +.terms a { color: var(--accent); }