diff --git a/YakPanel-server/backend/app/api/files.py b/YakPanel-server/backend/app/api/files.py index e8bdeddb..3b91f9cf 100644 --- a/YakPanel-server/backend/app/api/files.py +++ b/YakPanel-server/backend/app/api/files.py @@ -1,8 +1,13 @@ """YakPanel - File manager API""" import os +import shutil +import stat +import zipfile +from datetime import datetime, timezone + from fastapi import APIRouter, Depends, HTTPException, UploadFile, File, Form from fastapi.responses import FileResponse -from pydantic import BaseModel +from pydantic import BaseModel, Field from app.core.config import get_runtime_config from app.core.utils import read_file, write_file, path_safe_check @@ -56,6 +61,40 @@ def _resolve_path(path: str) -> str: return full +def _stat_entry(path: str, name: str) -> dict | None: + item_path = os.path.join(path, name) + try: + st = os.stat(item_path, follow_symlinks=False) + except OSError: + return None + is_dir = os.path.isdir(item_path) + owner = str(st.st_uid) + group = str(st.st_gid) + try: + import pwd + import grp + + owner = pwd.getpwuid(st.st_uid).pw_name + group = grp.getgrgid(st.st_gid).gr_name + except (ImportError, KeyError, OSError): + pass + try: + sym = stat.filemode(st.st_mode) + except Exception: + sym = "" + return { + "name": name, + "is_dir": is_dir, + "size": st.st_size if not is_dir else 0, + "mtime": datetime.fromtimestamp(st.st_mtime, tz=timezone.utc).strftime("%Y-%m-%d %H:%M:%S"), + "mtime_ts": int(st.st_mtime), + "mode": format(st.st_mode & 0o777, "o"), + "mode_symbolic": sym, + "owner": owner, + "group": group, + } + + @router.get("/list") async def files_list( path: str = "/", @@ -77,21 +116,94 @@ async def files_list( raise HTTPException(status_code=404, detail="Not found") except OSError as e: raise HTTPException(status_code=500, detail=str(e)) - for name in names: - item_path = os.path.join(full, name) - try: - stat = os.stat(item_path) - items.append({ - "name": name, - "is_dir": os.path.isdir(item_path), - "size": stat.st_size if os.path.isfile(item_path) else 0, - }) - except OSError: - pass + for name in sorted(names, key=str.lower): + row = _stat_entry(full, name) + if row: + items.append(row) display_path = full if full == "/" else full.rstrip("/") return {"path": display_path, "items": items} +@router.get("/dir-size") +async def files_dir_size( + path: str, + current_user: User = Depends(get_current_user), +): + """Return total byte size of directory tree (may be slow on large trees).""" + try: + full = _resolve_path(path) + except HTTPException: + raise + if not os.path.isdir(full): + raise HTTPException(status_code=400, detail="Not a directory") + total = 0 + try: + for root, _dirs, files in os.walk(full): + for fn in files: + fp = os.path.join(root, fn) + try: + total += os.path.getsize(fp) + except OSError: + pass + except PermissionError: + raise HTTPException(status_code=403, detail="Permission denied") + return {"size": total} + + +@router.get("/search") +async def files_search( + q: str, + path: str = "/", + max_results: int = 200, + current_user: User = Depends(get_current_user), +): + """Find files/folders whose name contains q (case-insensitive), walking from path.""" + if not q or not q.strip(): + return {"path": path, "results": []} + try: + root = _resolve_path(path) + except HTTPException: + raise + if not os.path.isdir(root): + raise HTTPException(status_code=400, detail="Not a directory") + qn = q.strip().lower() + results: list[dict] = [] + skip_prefixes = tuple() + if os.name != "nt" and root in ("/", "//"): + skip_prefixes = ("/proc", "/sys", "/dev") + + def should_skip(p: str) -> bool: + ap = os.path.abspath(p) + return any(ap == sp or ap.startswith(sp + os.sep) for sp in skip_prefixes) + + try: + for dirpath, dirnames, filenames in os.walk(root, topdown=True): + if len(results) >= max_results: + break + if should_skip(dirpath): + dirnames[:] = [] + continue + try: + for dn in list(dirnames): + if len(results) >= max_results: + break + if qn in dn.lower(): + rel = os.path.join(dirpath, dn) + results.append({"path": rel.replace("\\", "/"), "name": dn, "is_dir": True}) + for fn in filenames: + if len(results) >= max_results: + break + if qn in fn.lower(): + rel = os.path.join(dirpath, fn) + results.append({"path": rel.replace("\\", "/"), "name": fn, "is_dir": False}) + except OSError: + continue + except PermissionError: + raise HTTPException(status_code=403, detail="Permission denied") + + return {"path": path, "query": q, "results": results[:max_results]} + + @router.get("/read") async def files_read( path: str, @@ -265,3 +377,211 @@ async def files_write( if not write_file(full, body.content): raise HTTPException(status_code=500, detail="Failed to write file") return {"status": True, "msg": "Saved"} + + +class TouchRequest(BaseModel): + path: str + name: str + + +class ChmodRequest(BaseModel): + file_path: str + mode: str = Field(description="Octal mode e.g. 0644 or 755") + recursive: bool = False + + +class CopyRequest(BaseModel): + path: str + name: str + dest_path: str + dest_name: str | None = None + + +class MoveRequest(BaseModel): + path: str + name: str + dest_path: str + dest_name: str | None = None + + +class CompressRequest(BaseModel): + path: str + names: list[str] + archive_name: str + + +@router.post("/touch") +async def files_touch( + body: TouchRequest, + current_user: User = Depends(get_current_user), +): + """Create an empty file in directory path.""" + try: + parent = _resolve_path(body.path) + except HTTPException: + raise + if not body.name or ".." in body.name or "/" in body.name or "\\" in body.name: + raise HTTPException(status_code=400, detail="Invalid name") + if not path_safe_check(body.name): + raise HTTPException(status_code=400, detail="Invalid name") + full = os.path.join(parent, body.name) + if os.path.exists(full): + raise HTTPException(status_code=400, detail="Already exists") + try: + open(full, "a", encoding="utf-8").close() + except OSError as e: + raise HTTPException(status_code=500, detail=str(e)) + return {"status": True, "msg": "Created"} + + +@router.post("/chmod") +async def files_chmod( + body: ChmodRequest, + current_user: User = Depends(get_current_user), +): + """chmod a file or directory. mode is octal string (644, 0755).""" + try: + full = _resolve_path(body.file_path) + except HTTPException: + raise + if not os.path.exists(full): + raise HTTPException(status_code=404, detail="Not found") + try: + mode = int(body.mode.strip(), 8) + except ValueError: + raise HTTPException(status_code=400, detail="Invalid mode") + if mode < 0 or mode > 0o7777: + raise HTTPException(status_code=400, detail="Invalid mode") + + def _chmod_one(p: str) -> None: + os.chmod(p, mode) + + try: + if body.recursive and os.path.isdir(full): + for root, dirs, files in os.walk(full): + for d in dirs: + _chmod_one(os.path.join(root, d)) + for f in files: + _chmod_one(os.path.join(root, f)) + _chmod_one(full) + else: + _chmod_one(full) + except PermissionError: + raise HTTPException(status_code=403, detail="Permission denied") + except OSError as e: + raise HTTPException(status_code=500, detail=str(e)) + return {"status": True, "msg": "Permissions updated"} + + +@router.post("/copy") +async def files_copy( + body: CopyRequest, + current_user: User = Depends(get_current_user), +): + """Copy file or directory into dest_path (optionally new name).""" + try: + src_parent = _resolve_path(body.path) + dest_parent = _resolve_path(body.dest_path) + except HTTPException: + raise + if not body.name or ".." in body.name: + raise HTTPException(status_code=400, detail="Invalid name") + src = os.path.join(src_parent, body.name) + dest_name = body.dest_name or body.name + if ".." in dest_name or "/" in dest_name or "\\" in dest_name: + raise HTTPException(status_code=400, detail="Invalid destination name") + dest = os.path.join(dest_parent, dest_name) + if not os.path.exists(src): + raise HTTPException(status_code=404, detail="Source not found") + if os.path.exists(dest): + raise HTTPException(status_code=400, detail="Destination already exists") + if not os.path.isdir(dest_parent): + raise HTTPException(status_code=400, detail="Destination parent must be a directory") + try: + if os.path.isdir(src): + shutil.copytree(src, dest, symlinks=True) + else: + shutil.copy2(src, dest) + except OSError as e: + raise HTTPException(status_code=500, detail=str(e)) + return {"status": True, "msg": "Copied"} + + +@router.post("/move") +async def files_move( + body: MoveRequest, + current_user: User = Depends(get_current_user), +): + """Move (rename) file or directory to another folder.""" + try: + src_parent = _resolve_path(body.path) + dest_parent = _resolve_path(body.dest_path) + except HTTPException: + raise + if not body.name or ".." in body.name: + raise HTTPException(status_code=400, detail="Invalid name") + src = os.path.join(src_parent, body.name) + dest_name = body.dest_name or body.name + if ".." in dest_name or "/" in dest_name or "\\" in dest_name: + raise HTTPException(status_code=400, detail="Invalid destination name") + dest = os.path.join(dest_parent, dest_name) + if not os.path.exists(src): + raise HTTPException(status_code=404, detail="Source not found") + if os.path.exists(dest): + raise HTTPException(status_code=400, detail="Destination already exists") + if not os.path.isdir(dest_parent): + raise HTTPException(status_code=400, detail="Destination parent must be a directory") + try: + shutil.move(src, dest) + except OSError as e: + raise HTTPException(status_code=500, detail=str(e)) + return {"status": True, "msg": "Moved"} + + +@router.post("/compress") +async def files_compress( + body: CompressRequest, + current_user: User = Depends(get_current_user), +): + """Create a zip in path containing named files/folders.""" + try: + parent = _resolve_path(body.path) + except HTTPException: + raise + if not os.path.isdir(parent): + raise HTTPException(status_code=400, detail="Not a directory") + if not body.names: + raise HTTPException(status_code=400, detail="Nothing to compress") + name = (body.archive_name or "archive").strip() + if not name.lower().endswith(".zip"): + name += ".zip" + if ".." in name or "/" in name or "\\" in name: + raise HTTPException(status_code=400, detail="Invalid archive name") + zip_path = os.path.join(parent, name) + if os.path.exists(zip_path): + raise HTTPException(status_code=400, detail="Archive already exists") + + try: + with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zf: + for entry in body.names: + if not entry or ".." in entry or "/" in entry or "\\" in entry: + continue + src = os.path.join(parent, entry) + if not os.path.exists(src): + continue + if os.path.isfile(src): + zf.write(src, arcname=entry.replace("\\", "/")) + elif os.path.isdir(src): + for root, _dirs, files in os.walk(src): + for f in files: + fp = os.path.join(root, f) + zn = os.path.relpath(fp, parent).replace("\\", "/") + zf.write(fp, zn) + except OSError as e: + if os.path.exists(zip_path): + try: + os.remove(zip_path) + except OSError: + pass + raise HTTPException(status_code=500, detail=str(e)) + return {"status": True, "msg": "Compressed", "archive": name} diff --git a/YakPanel-server/frontend/dist/assets/AdminAlert-yrdXFH0e.js b/YakPanel-server/frontend/dist/assets/AdminAlert-DW1IRWce.js similarity index 82% rename from YakPanel-server/frontend/dist/assets/AdminAlert-yrdXFH0e.js rename to YakPanel-server/frontend/dist/assets/AdminAlert-DW1IRWce.js index b186bd2a..6eb50cc2 100644 --- a/YakPanel-server/frontend/dist/assets/AdminAlert-yrdXFH0e.js +++ b/YakPanel-server/frontend/dist/assets/AdminAlert-DW1IRWce.js @@ -1 +1 @@ -import{j as t}from"./index-cE9w-Kq7.js";function o({variant:l="danger",children:r,className:a="",dismissible:e,onDismiss:s}){return t.jsxs("div",{className:`alert alert-${l} ${e?"alert-dismissible fade show":""} ${a}`.trim(),role:"alert",children:[r,e?t.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:s}):null]})}export{o as A}; +import{j as t}from"./index-CRR9sQ49.js";function o({variant:l="danger",children:r,className:a="",dismissible:e,onDismiss:s}){return t.jsxs("div",{className:`alert alert-${l} ${e?"alert-dismissible fade show":""} ${a}`.trim(),role:"alert",children:[r,e?t.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:s}):null]})}export{o as A}; diff --git a/YakPanel-server/frontend/dist/assets/AdminButton-ByutG8m-.js b/YakPanel-server/frontend/dist/assets/AdminButton-Bd2cLTu3.js similarity index 76% rename from YakPanel-server/frontend/dist/assets/AdminButton-ByutG8m-.js rename to YakPanel-server/frontend/dist/assets/AdminButton-Bd2cLTu3.js index 801df4bb..58835a97 100644 --- a/YakPanel-server/frontend/dist/assets/AdminButton-ByutG8m-.js +++ b/YakPanel-server/frontend/dist/assets/AdminButton-Bd2cLTu3.js @@ -1 +1 @@ -import{j as a}from"./index-cE9w-Kq7.js";function i({children:n,variant:r="primary",size:t,type:o="button",disabled:m,className:s="",...u}){return a.jsx("button",{type:o,disabled:m,className:`btn btn-${r}${t?` btn-${t}`:""} ${s}`.trim(),...u,children:n})}export{i as A}; +import{j as a}from"./index-CRR9sQ49.js";function i({children:n,variant:r="primary",size:t,type:o="button",disabled:m,className:s="",...u}){return a.jsx("button",{type:o,disabled:m,className:`btn btn-${r}${t?` btn-${t}`:""} ${s}`.trim(),...u,children:n})}export{i as A}; diff --git a/YakPanel-server/frontend/dist/assets/AdminCard-BvdkSQBp.js b/YakPanel-server/frontend/dist/assets/AdminCard-DNA70pGd.js similarity index 88% rename from YakPanel-server/frontend/dist/assets/AdminCard-BvdkSQBp.js rename to YakPanel-server/frontend/dist/assets/AdminCard-DNA70pGd.js index eb5d977d..0625b251 100644 --- a/YakPanel-server/frontend/dist/assets/AdminCard-BvdkSQBp.js +++ b/YakPanel-server/frontend/dist/assets/AdminCard-DNA70pGd.js @@ -1 +1 @@ -import{j as e}from"./index-cE9w-Kq7.js";function c({title:s,iconClass:a,children:i,headerExtra:r,className:d="",bodyClassName:l=""}){return e.jsxs("div",{className:`card flex-fill ${d}`.trim(),children:[(s||r)&&e.jsxs("div",{className:"card-header border-0 pb-0 d-flex align-items-center justify-content-between flex-wrap gap-2",children:[e.jsxs("h4",{className:"mb-0 d-flex align-items-center gap-2",children:[a?e.jsx("i",{className:a,"aria-hidden":!0}):null,s]}),r]}),e.jsx("div",{className:`card-body ${l}`.trim(),children:i})]})}export{c as A}; +import{j as e}from"./index-CRR9sQ49.js";function c({title:s,iconClass:a,children:i,headerExtra:r,className:d="",bodyClassName:l=""}){return e.jsxs("div",{className:`card flex-fill ${d}`.trim(),children:[(s||r)&&e.jsxs("div",{className:"card-header border-0 pb-0 d-flex align-items-center justify-content-between flex-wrap gap-2",children:[e.jsxs("h4",{className:"mb-0 d-flex align-items-center gap-2",children:[a?e.jsx("i",{className:a,"aria-hidden":!0}):null,s]}),r]}),e.jsx("div",{className:`card-body ${l}`.trim(),children:i})]})}export{c as A}; diff --git a/YakPanel-server/frontend/dist/assets/AdminTable-eCi7S__-.js b/YakPanel-server/frontend/dist/assets/AdminTable-BLiLxfnS.js similarity index 75% rename from YakPanel-server/frontend/dist/assets/AdminTable-eCi7S__-.js rename to YakPanel-server/frontend/dist/assets/AdminTable-BLiLxfnS.js index 7c7368ee..714a2287 100644 --- a/YakPanel-server/frontend/dist/assets/AdminTable-eCi7S__-.js +++ b/YakPanel-server/frontend/dist/assets/AdminTable-BLiLxfnS.js @@ -1 +1 @@ -import{j as t}from"./index-cE9w-Kq7.js";function l({children:r,className:s="",responsive:a=!0}){const e=t.jsx("table",{className:`table table-hover ${s}`.trim(),children:r});return a?t.jsx("div",{className:"table-responsive",children:e}):e}export{l as A}; +import{j as t}from"./index-CRR9sQ49.js";function l({children:r,className:s="",responsive:a=!0}){const e=t.jsx("table",{className:`table table-hover ${s}`.trim(),children:r});return a?t.jsx("div",{className:"table-responsive",children:e}):e}export{l as A}; diff --git a/YakPanel-server/frontend/dist/assets/BackupPlansPage-CbIqdsVx.js b/YakPanel-server/frontend/dist/assets/BackupPlansPage-CbIqdsVx.js deleted file mode 100644 index f2e78eb9..00000000 --- a/YakPanel-server/frontend/dist/assets/BackupPlansPage-CbIqdsVx.js +++ /dev/null @@ -1 +0,0 @@ -import{r as l,V as I,a as R,j as e,W as X,X as Z,Y as z,Z as G}from"./index-cE9w-Kq7.js";import{M as n}from"./Modal-CL3xZqxR.js";import{A as J}from"./AdminAlert-yrdXFH0e.js";import{A as m}from"./AdminButton-ByutG8m-.js";import{A as K}from"./AdminTable-eCi7S__-.js";import{E as ee}from"./EmptyState-CmnFWkSO.js";import{P as q}from"./PageHeader-HdM4gpcn.js";function de(){var A,D;const[g,v]=l.useState([]),[u,L]=l.useState([]),[h,$]=l.useState([]),[w,k]=l.useState(!0),[_,d]=l.useState(""),[F,x]=l.useState(!1),[S,P]=l.useState(!1),[r,p]=l.useState(null),[c,C]=l.useState("site"),[b,T]=l.useState(!1),[f,B]=l.useState(null),[E,H]=l.useState("site"),N=()=>{I().then(v).catch(a=>d(a.message))};l.useEffect(()=>{k(!0),Promise.all([I(),R("/site/list"),R("/database/list")]).then(([a,s,t])=>{v(a),L(s),$(t.filter(i=>["MySQL","PostgreSQL","MongoDB"].includes(i.db_type)))}).catch(a=>d(a.message)).finally(()=>k(!1))},[]);const M=a=>{a.preventDefault();const s=a.currentTarget,t=s.elements.namedItem("name").value.trim(),i=s.elements.namedItem("plan_type").value,o=Number(s.elements.namedItem("target_id").value),j=s.elements.namedItem("schedule").value.trim(),y=s.elements.namedItem("enabled").checked;if(!t||!j||!o){d("Name, target and schedule are required");return}P(!0),G({name:t,plan_type:i,target_id:o,schedule:j,enabled:y}).then(()=>{x(!1),s.reset(),N()}).catch(W=>d(W.message)).finally(()=>P(!1))},V=(a,s)=>{confirm(`Delete backup plan "${s}"?`)&&Z(a).then(N).catch(t=>d(t.message))},Q=a=>{p(a),C(a.plan_type)},U=a=>{if(a.preventDefault(),!r)return;const s=a.currentTarget,t=s.elements.namedItem("edit_name").value.trim(),i=Number(s.elements.namedItem("edit_target_id").value),o=s.elements.namedItem("edit_schedule").value.trim(),j=s.elements.namedItem("edit_enabled").checked;!t||!o||!i||z(r.id,{name:t,plan_type:c,target_id:i,schedule:o,enabled:j}).then(()=>{p(null),N()}).catch(y=>d(y.message))},Y=()=>{T(!0),B(null),X().then(a=>B(a.results)).catch(a=>d(a.message)).finally(()=>T(!1))},O=a=>{if(a.plan_type==="site"){const t=u.find(i=>i.id===a.target_id);return t?t.name:`#${a.target_id}`}const s=h.find(t=>t.id===a.target_id);return s?s.name:`#${a.target_id}`};return w?e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(m,{variant:"primary",disabled:b,onClick:Y,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-player-play me-1","aria-hidden":!0}),b?"Running…":"Run Scheduled"]}),e.jsxs(m,{variant:"primary",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Plan"]})]})}),_?e.jsx(J,{className:"mb-3",children:_}):null,f&&f.length>0?e.jsx("div",{className:"card mb-3",children:e.jsxs("div",{className:"card-body py-3",children:[e.jsx("h6",{className:"mb-2",children:"Last run results"}),e.jsx("ul",{className:"mb-0 small list-unstyled",children:f.map((a,s)=>e.jsxs("li",{children:[a.plan,": ",a.status==="ok"?"✓":a.status==="skipped"?"⊘":"✗"," ",a.msg||""]},s))})]})}):null,e.jsxs("p",{className:"small text-secondary mb-3",children:["Schedule automated backups. Add a cron entry (e.g. ",e.jsx("code",{children:"0 * * * *"})," hourly) to call"," ",e.jsx("code",{children:"POST /api/v1/backup/run-scheduled"})," with your auth token."]}),e.jsx("div",{className:"card",children:e.jsxs(K,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Target"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Enabled"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:g.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(ee,{title:"No backup plans",description:'Click "Add Plan" to create one.'})})}):g.map(a=>e.jsxs("tr",{children:[e.jsx("td",{children:a.name}),e.jsx("td",{children:a.plan_type}),e.jsx("td",{children:O(a)}),e.jsx("td",{children:e.jsx("code",{className:"small",children:a.schedule})}),e.jsx("td",{children:a.enabled?"Yes":"No"}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>Q(a),children:e.jsx("i",{className:"ti ti-pencil","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>V(a.id,a.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},a.id))})]})}),e.jsxs(n,{show:!!r,onHide:()=>p(null),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Edit Backup Plan"})}),r?e.jsxs("form",{onSubmit:U,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"edit_name",type:"text",defaultValue:r.name,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{value:c,onChange:a=>C(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsx("select",{name:"edit_target_id",defaultValue:c===r.plan_type?r.target_id:c==="site"?(A=u[0])==null?void 0:A.id:(D=h[0])==null?void 0:D.id,className:"form-select",required:!0,children:c==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))},c)]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"edit_schedule",type:"text",defaultValue:r.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"edit_enabled",type:"checkbox",defaultChecked:r.enabled,className:"form-check-input",id:"edit_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"edit_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>p(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",children:"Update"})]})]}):null]}),e.jsxs(n,{show:F,onHide:()=>x(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add Backup Plan"})}),e.jsxs("form",{onSubmit:M,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"Daily site backup",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"plan_type",value:E,onChange:a=>H(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsxs("select",{name:"target_id",className:"form-select",required:!0,children:[e.jsx("option",{value:"",children:"Select…"}),E==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"schedule",type:"text",placeholder:"0 2 * * *",className:"form-control",required:!0}),e.jsx("div",{className:"form-text",children:"e.g. 0 2 * * * = daily at 2am, 0 */6 * * * = every 6 hours"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"enabled",type:"checkbox",defaultChecked:!0,className:"form-check-input",id:"plan_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"plan_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:S,children:S?"Creating…":"Create"})]})]})]})]})}export{de as BackupPlansPage}; diff --git a/YakPanel-server/frontend/dist/assets/BackupPlansPage-CgzFMegr.js b/YakPanel-server/frontend/dist/assets/BackupPlansPage-CgzFMegr.js new file mode 100644 index 00000000..05ab3914 --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/BackupPlansPage-CgzFMegr.js @@ -0,0 +1 @@ +import{r as l,a1 as I,a as R,j as e,a2 as G,a3 as J,a4 as K,a5 as W}from"./index-CRR9sQ49.js";import{M as n}from"./Modal-B7V4w_St.js";import{A as X}from"./AdminAlert-DW1IRWce.js";import{A as m}from"./AdminButton-Bd2cLTu3.js";import{A as Z}from"./AdminTable-BLiLxfnS.js";import{E as ee}from"./EmptyState-C61VdEFl.js";import{P as q}from"./PageHeader-BcjNf7GG.js";function de(){var A,D;const[g,v]=l.useState([]),[u,L]=l.useState([]),[h,$]=l.useState([]),[w,k]=l.useState(!0),[_,d]=l.useState(""),[F,x]=l.useState(!1),[S,P]=l.useState(!1),[r,p]=l.useState(null),[c,C]=l.useState("site"),[b,T]=l.useState(!1),[f,B]=l.useState(null),[E,H]=l.useState("site"),N=()=>{I().then(v).catch(a=>d(a.message))};l.useEffect(()=>{k(!0),Promise.all([I(),R("/site/list"),R("/database/list")]).then(([a,s,t])=>{v(a),L(s),$(t.filter(i=>["MySQL","PostgreSQL","MongoDB"].includes(i.db_type)))}).catch(a=>d(a.message)).finally(()=>k(!1))},[]);const M=a=>{a.preventDefault();const s=a.currentTarget,t=s.elements.namedItem("name").value.trim(),i=s.elements.namedItem("plan_type").value,o=Number(s.elements.namedItem("target_id").value),j=s.elements.namedItem("schedule").value.trim(),y=s.elements.namedItem("enabled").checked;if(!t||!j||!o){d("Name, target and schedule are required");return}P(!0),W({name:t,plan_type:i,target_id:o,schedule:j,enabled:y}).then(()=>{x(!1),s.reset(),N()}).catch(z=>d(z.message)).finally(()=>P(!1))},V=(a,s)=>{confirm(`Delete backup plan "${s}"?`)&&J(a).then(N).catch(t=>d(t.message))},Q=a=>{p(a),C(a.plan_type)},U=a=>{if(a.preventDefault(),!r)return;const s=a.currentTarget,t=s.elements.namedItem("edit_name").value.trim(),i=Number(s.elements.namedItem("edit_target_id").value),o=s.elements.namedItem("edit_schedule").value.trim(),j=s.elements.namedItem("edit_enabled").checked;!t||!o||!i||K(r.id,{name:t,plan_type:c,target_id:i,schedule:o,enabled:j}).then(()=>{p(null),N()}).catch(y=>d(y.message))},O=()=>{T(!0),B(null),G().then(a=>B(a.results)).catch(a=>d(a.message)).finally(()=>T(!1))},Y=a=>{if(a.plan_type==="site"){const t=u.find(i=>i.id===a.target_id);return t?t.name:`#${a.target_id}`}const s=h.find(t=>t.id===a.target_id);return s?s.name:`#${a.target_id}`};return w?e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Backup Plans",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(m,{variant:"primary",disabled:b,onClick:O,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-player-play me-1","aria-hidden":!0}),b?"Running…":"Run Scheduled"]}),e.jsxs(m,{variant:"primary",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Plan"]})]})}),_?e.jsx(X,{className:"mb-3",children:_}):null,f&&f.length>0?e.jsx("div",{className:"card mb-3",children:e.jsxs("div",{className:"card-body py-3",children:[e.jsx("h6",{className:"mb-2",children:"Last run results"}),e.jsx("ul",{className:"mb-0 small list-unstyled",children:f.map((a,s)=>e.jsxs("li",{children:[a.plan,": ",a.status==="ok"?"✓":a.status==="skipped"?"⊘":"✗"," ",a.msg||""]},s))})]})}):null,e.jsxs("p",{className:"small text-secondary mb-3",children:["Schedule automated backups. Add a cron entry (e.g. ",e.jsx("code",{children:"0 * * * *"})," hourly) to call"," ",e.jsx("code",{children:"POST /api/v1/backup/run-scheduled"})," with your auth token."]}),e.jsx("div",{className:"card",children:e.jsxs(Z,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Target"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Enabled"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:g.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(ee,{title:"No backup plans",description:'Click "Add Plan" to create one.'})})}):g.map(a=>e.jsxs("tr",{children:[e.jsx("td",{children:a.name}),e.jsx("td",{children:a.plan_type}),e.jsx("td",{children:Y(a)}),e.jsx("td",{children:e.jsx("code",{className:"small",children:a.schedule})}),e.jsx("td",{children:a.enabled?"Yes":"No"}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>Q(a),children:e.jsx("i",{className:"ti ti-pencil","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>V(a.id,a.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},a.id))})]})}),e.jsxs(n,{show:!!r,onHide:()=>p(null),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Edit Backup Plan"})}),r?e.jsxs("form",{onSubmit:U,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"edit_name",type:"text",defaultValue:r.name,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{value:c,onChange:a=>C(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsx("select",{name:"edit_target_id",defaultValue:c===r.plan_type?r.target_id:c==="site"?(A=u[0])==null?void 0:A.id:(D=h[0])==null?void 0:D.id,className:"form-select",required:!0,children:c==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))},c)]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"edit_schedule",type:"text",defaultValue:r.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"edit_enabled",type:"checkbox",defaultChecked:r.enabled,className:"form-check-input",id:"edit_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"edit_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>p(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",children:"Update"})]})]}):null]}),e.jsxs(n,{show:F,onHide:()=>x(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add Backup Plan"})}),e.jsxs("form",{onSubmit:M,children:[e.jsxs(n.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"Daily site backup",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"plan_type",value:E,onChange:a=>H(a.target.value),className:"form-select",children:[e.jsx("option",{value:"site",children:"Site"}),e.jsx("option",{value:"database",children:"Database"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Target"}),e.jsxs("select",{name:"target_id",className:"form-select",required:!0,children:[e.jsx("option",{value:"",children:"Select…"}),E==="site"?u.map(a=>e.jsx("option",{value:a.id,children:a.name},`s-${a.id}`)):h.map(a=>e.jsxs("option",{value:a.id,children:[a.name," (",a.db_type,")"]},`d-${a.id}`))]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsx("input",{name:"schedule",type:"text",placeholder:"0 2 * * *",className:"form-control",required:!0}),e.jsx("div",{className:"form-text",children:"e.g. 0 2 * * * = daily at 2am, 0 */6 * * * = every 6 hours"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{name:"enabled",type:"checkbox",defaultChecked:!0,className:"form-check-input",id:"plan_enabled"}),e.jsx("label",{className:"form-check-label",htmlFor:"plan_enabled",children:"Enabled"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:S,children:S?"Creating…":"Create"})]})]})]})]})}export{de as BackupPlansPage}; diff --git a/YakPanel-server/frontend/dist/assets/ConfigPage-BIvuvwCK.js b/YakPanel-server/frontend/dist/assets/ConfigPage-eLTvRUp2.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/ConfigPage-BIvuvwCK.js rename to YakPanel-server/frontend/dist/assets/ConfigPage-eLTvRUp2.js index 07c6dd55..f96351de 100644 --- a/YakPanel-server/frontend/dist/assets/ConfigPage-BIvuvwCK.js +++ b/YakPanel-server/frontend/dist/assets/ConfigPage-eLTvRUp2.js @@ -1 +1 @@ -import{r as l,a,j as e,J as B,K as Q}from"./index-cE9w-Kq7.js";import{A as j}from"./AdminAlert-yrdXFH0e.js";import{A as b}from"./AdminButton-ByutG8m-.js";import{A as p}from"./AdminCard-BvdkSQBp.js";import{P as N}from"./PageHeader-HdM4gpcn.js";function Y(){const[r,E]=l.useState(null),[m,I]=l.useState({}),[q,J]=l.useState(!0),[i,v]=l.useState(""),[A,y]=l.useState(!1),[R,w]=l.useState(!1),[g,o]=l.useState(""),[u,h]=l.useState(null);l.useEffect(()=>{Promise.all([a("/config/panel"),a("/config/keys")]).then(([t,s])=>{E(t),I(s||{})}).catch(t=>v(t.message)).finally(()=>J(!1))},[]);const L=t=>{t.preventDefault(),w(!1),o("");const s=t.currentTarget,c=s.elements.namedItem("old_password").value,n=s.elements.namedItem("new_password").value,x=s.elements.namedItem("confirm_password").value;if(!c||!n){o("All fields required");return}if(n!==x){o("New passwords do not match");return}if(n.length<6){o("Password must be at least 6 characters");return}Q(c,n).then(()=>{w(!0),s.reset()}).catch(f=>o(f.message))},V=()=>{h(null),B().then(()=>h("Test email sent!")).catch(t=>h(`Failed: ${t.message}`))},M=t=>{var P,k,O,T,C;t.preventDefault(),y(!1);const s=t.currentTarget,c=s.elements.namedItem("panel_port").value,n=s.elements.namedItem("www_root").value,x=s.elements.namedItem("setup_path").value,f=s.elements.namedItem("webserver_type").value,S=s.elements.namedItem("mysql_root").value,F=((P=s.elements.namedItem("email_to"))==null?void 0:P.value)||"",W=((k=s.elements.namedItem("smtp_server"))==null?void 0:k.value)||"",U=((O=s.elements.namedItem("smtp_port"))==null?void 0:O.value)||"587",D=((T=s.elements.namedItem("smtp_user"))==null?void 0:T.value)||"",_=((C=s.elements.namedItem("smtp_password"))==null?void 0:C.value)||"",d=[a("/config/set",{method:"POST",body:JSON.stringify({key:"panel_port",value:c})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"www_root",value:n})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"setup_path",value:x})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"webserver_type",value:f})})];S&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"mysql_root",value:S})})),d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"email_to",value:F})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_server",value:W})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_port",value:U})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_user",value:D})})),_&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_password",value:_})})),Promise.all(d).then(()=>y(!0)).catch(K=>v(K.message))};return q?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):r?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{className:"mb-3",children:i}):null,e.jsxs("form",{onSubmit:M,className:"row g-3",children:[e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Panel",iconClass:"ti ti-adjustments-horizontal",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Panel Port"}),e.jsx("input",{name:"panel_port",type:"number",defaultValue:r.panel_port,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"WWW Root"}),e.jsx("input",{name:"www_root",type:"text",defaultValue:r.www_root,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Setup Path"}),e.jsx("input",{name:"setup_path",type:"text",defaultValue:r.setup_path,className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Webserver"}),e.jsxs("select",{name:"webserver_type",defaultValue:r.webserver_type,className:"form-select",children:[e.jsx("option",{value:"nginx",children:"Nginx"}),e.jsx("option",{value:"apache",children:"Apache"}),e.jsx("option",{value:"openlitespeed",children:"OpenLiteSpeed"})]})]})]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Notifications (Email)",iconClass:"ti ti-mail",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Email To"}),e.jsx("input",{name:"email_to",type:"email",defaultValue:m.email_to,placeholder:"admin@example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Server"}),e.jsx("input",{name:"smtp_server",type:"text",defaultValue:m.smtp_server,placeholder:"smtp.gmail.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Port"}),e.jsx("input",{name:"smtp_port",type:"number",defaultValue:m.smtp_port||"587",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP User"}),e.jsx("input",{name:"smtp_user",type:"text",defaultValue:m.smtp_user,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Password"}),e.jsx("input",{name:"smtp_password",type:"password",placeholder:m.smtp_password?"•••••••• (leave blank to keep)":"Optional",className:"form-control"})]}),e.jsx("p",{className:"small text-secondary",children:"Used for panel alerts (e.g. backup completion, security warnings)."}),e.jsxs(b,{type:"button",variant:"warning",className:"mt-2",onClick:V,children:[e.jsx("i",{className:"ti ti-mail me-1","aria-hidden":!0}),"Send Test Email"]}),u?e.jsx("p",{className:`small mt-2 mb-0 ${u.startsWith("Failed")?"text-danger":"text-success"}`,children:u}):null]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsx(p,{title:"MySQL",iconClass:"ti ti-database",children:e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Root Password"}),e.jsx("input",{name:"mysql_root",type:"password",placeholder:r.mysql_root_set?"•••••••• (leave blank to keep)":"Required for real DB creation",className:"form-control"}),e.jsx("p",{className:"small text-secondary mt-2 mb-0",children:"Used to create/drop MySQL databases. Leave blank to keep current."})]})})}),e.jsxs("div",{className:"col-12",children:[e.jsxs(b,{type:"submit",variant:"primary",children:[e.jsx("i",{className:"ti ti-device-floppy me-1","aria-hidden":!0}),"Save"]}),A?e.jsx("span",{className:"text-success ms-3 small",children:"Saved"}):null]})]}),e.jsx("div",{className:"col-12 col-xl-6 mt-3 px-0",children:e.jsx(p,{title:"Change Password",iconClass:"ti ti-key",children:e.jsxs("form",{onSubmit:L,children:[g?e.jsx(j,{className:"mb-3",children:g}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Current Password"}),e.jsx("input",{name:"old_password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Confirm New Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs(b,{type:"submit",variant:"warning",children:[e.jsx("i",{className:"ti ti-key me-1","aria-hidden":!0}),"Change Password"]}),R?e.jsx("span",{className:"text-success ms-3 small",children:"Password changed"}):null]})})}),e.jsxs("div",{className:"alert alert-secondary mt-4 mb-0",children:[e.jsxs("p",{className:"mb-1",children:[e.jsx("strong",{children:"App:"})," ",r.app_name," v",r.app_version]}),e.jsx("p",{className:"mb-0 small",children:"Note: Some settings require a panel restart to take effect."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{children:i}):null]})}export{Y as ConfigPage}; +import{r as l,a,j as e,R as K,S as Q}from"./index-CRR9sQ49.js";import{A as j}from"./AdminAlert-DW1IRWce.js";import{A as b}from"./AdminButton-Bd2cLTu3.js";import{A as p}from"./AdminCard-DNA70pGd.js";import{P as N}from"./PageHeader-BcjNf7GG.js";function Y(){const[r,E]=l.useState(null),[m,I]=l.useState({}),[q,A]=l.useState(!0),[i,v]=l.useState(""),[J,y]=l.useState(!1),[R,w]=l.useState(!1),[g,o]=l.useState(""),[u,h]=l.useState(null);l.useEffect(()=>{Promise.all([a("/config/panel"),a("/config/keys")]).then(([t,s])=>{E(t),I(s||{})}).catch(t=>v(t.message)).finally(()=>A(!1))},[]);const L=t=>{t.preventDefault(),w(!1),o("");const s=t.currentTarget,c=s.elements.namedItem("old_password").value,n=s.elements.namedItem("new_password").value,x=s.elements.namedItem("confirm_password").value;if(!c||!n){o("All fields required");return}if(n!==x){o("New passwords do not match");return}if(n.length<6){o("Password must be at least 6 characters");return}Q(c,n).then(()=>{w(!0),s.reset()}).catch(f=>o(f.message))},V=()=>{h(null),K().then(()=>h("Test email sent!")).catch(t=>h(`Failed: ${t.message}`))},M=t=>{var P,k,O,T,C;t.preventDefault(),y(!1);const s=t.currentTarget,c=s.elements.namedItem("panel_port").value,n=s.elements.namedItem("www_root").value,x=s.elements.namedItem("setup_path").value,f=s.elements.namedItem("webserver_type").value,S=s.elements.namedItem("mysql_root").value,F=((P=s.elements.namedItem("email_to"))==null?void 0:P.value)||"",W=((k=s.elements.namedItem("smtp_server"))==null?void 0:k.value)||"",U=((O=s.elements.namedItem("smtp_port"))==null?void 0:O.value)||"587",D=((T=s.elements.namedItem("smtp_user"))==null?void 0:T.value)||"",_=((C=s.elements.namedItem("smtp_password"))==null?void 0:C.value)||"",d=[a("/config/set",{method:"POST",body:JSON.stringify({key:"panel_port",value:c})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"www_root",value:n})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"setup_path",value:x})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"webserver_type",value:f})})];S&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"mysql_root",value:S})})),d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"email_to",value:F})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_server",value:W})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_port",value:U})}),a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_user",value:D})})),_&&d.push(a("/config/set",{method:"POST",body:JSON.stringify({key:"smtp_password",value:_})})),Promise.all(d).then(()=>y(!0)).catch(B=>v(B.message))};return q?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):r?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{className:"mb-3",children:i}):null,e.jsxs("form",{onSubmit:M,className:"row g-3",children:[e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Panel",iconClass:"ti ti-adjustments-horizontal",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Panel Port"}),e.jsx("input",{name:"panel_port",type:"number",defaultValue:r.panel_port,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"WWW Root"}),e.jsx("input",{name:"www_root",type:"text",defaultValue:r.www_root,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Setup Path"}),e.jsx("input",{name:"setup_path",type:"text",defaultValue:r.setup_path,className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Webserver"}),e.jsxs("select",{name:"webserver_type",defaultValue:r.webserver_type,className:"form-select",children:[e.jsx("option",{value:"nginx",children:"Nginx"}),e.jsx("option",{value:"apache",children:"Apache"}),e.jsx("option",{value:"openlitespeed",children:"OpenLiteSpeed"})]})]})]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsxs(p,{title:"Notifications (Email)",iconClass:"ti ti-mail",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Email To"}),e.jsx("input",{name:"email_to",type:"email",defaultValue:m.email_to,placeholder:"admin@example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Server"}),e.jsx("input",{name:"smtp_server",type:"text",defaultValue:m.smtp_server,placeholder:"smtp.gmail.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Port"}),e.jsx("input",{name:"smtp_port",type:"number",defaultValue:m.smtp_port||"587",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP User"}),e.jsx("input",{name:"smtp_user",type:"text",defaultValue:m.smtp_user,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SMTP Password"}),e.jsx("input",{name:"smtp_password",type:"password",placeholder:m.smtp_password?"•••••••• (leave blank to keep)":"Optional",className:"form-control"})]}),e.jsx("p",{className:"small text-secondary",children:"Used for panel alerts (e.g. backup completion, security warnings)."}),e.jsxs(b,{type:"button",variant:"warning",className:"mt-2",onClick:V,children:[e.jsx("i",{className:"ti ti-mail me-1","aria-hidden":!0}),"Send Test Email"]}),u?e.jsx("p",{className:`small mt-2 mb-0 ${u.startsWith("Failed")?"text-danger":"text-success"}`,children:u}):null]})}),e.jsx("div",{className:"col-12 col-xl-6",children:e.jsx(p,{title:"MySQL",iconClass:"ti ti-database",children:e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Root Password"}),e.jsx("input",{name:"mysql_root",type:"password",placeholder:r.mysql_root_set?"•••••••• (leave blank to keep)":"Required for real DB creation",className:"form-control"}),e.jsx("p",{className:"small text-secondary mt-2 mb-0",children:"Used to create/drop MySQL databases. Leave blank to keep current."})]})})}),e.jsxs("div",{className:"col-12",children:[e.jsxs(b,{type:"submit",variant:"primary",children:[e.jsx("i",{className:"ti ti-device-floppy me-1","aria-hidden":!0}),"Save"]}),J?e.jsx("span",{className:"text-success ms-3 small",children:"Saved"}):null]})]}),e.jsx("div",{className:"col-12 col-xl-6 mt-3 px-0",children:e.jsx(p,{title:"Change Password",iconClass:"ti ti-key",children:e.jsxs("form",{onSubmit:L,children:[g?e.jsx(j,{className:"mb-3",children:g}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Current Password"}),e.jsx("input",{name:"old_password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Confirm New Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs(b,{type:"submit",variant:"warning",children:[e.jsx("i",{className:"ti ti-key me-1","aria-hidden":!0}),"Change Password"]}),R?e.jsx("span",{className:"text-success ms-3 small",children:"Password changed"}):null]})})}),e.jsxs("div",{className:"alert alert-secondary mt-4 mb-0",children:[e.jsxs("p",{className:"mb-1",children:[e.jsx("strong",{children:"App:"})," ",r.app_name," v",r.app_version]}),e.jsx("p",{className:"mb-0 small",children:"Note: Some settings require a panel restart to take effect."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Settings"}),i?e.jsx(j,{children:i}):null]})}export{Y as ConfigPage}; diff --git a/YakPanel-server/frontend/dist/assets/CrontabPage-DeEqYskK.js b/YakPanel-server/frontend/dist/assets/CrontabPage-BfaMKQc8.js similarity index 84% rename from YakPanel-server/frontend/dist/assets/CrontabPage-DeEqYskK.js rename to YakPanel-server/frontend/dist/assets/CrontabPage-BfaMKQc8.js index 6eea5889..abbff36b 100644 --- a/YakPanel-server/frontend/dist/assets/CrontabPage-DeEqYskK.js +++ b/YakPanel-server/frontend/dist/assets/CrontabPage-BfaMKQc8.js @@ -1 +1 @@ -import{r as s,j as e,a as m,I as L}from"./index-cE9w-Kq7.js";import{M as i}from"./Modal-CL3xZqxR.js";import{A}from"./AdminAlert-yrdXFH0e.js";import{A as h}from"./AdminButton-ByutG8m-.js";import{A as J}from"./AdminTable-eCi7S__-.js";import{E as M}from"./EmptyState-CmnFWkSO.js";import{P as w}from"./PageHeader-HdM4gpcn.js";const O=[{label:"Every minute",value:"* * * * *"},{label:"Every 5 min",value:"*/5 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Daily",value:"0 0 * * *"},{label:"Weekly",value:"0 0 * * 0"}];function K(){const[u,k]=s.useState([]),[D,j]=s.useState(!0),[f,x]=s.useState(""),[I,n]=s.useState(!1),[r,c]=s.useState(null),[l,o]=s.useState(null),[y,v]=s.useState(!1),[N,p]=s.useState(""),[b,g]=s.useState(!1),d=()=>{j(!0),m("/crontab/list").then(k).catch(t=>x(t.message)).finally(()=>j(!1))};s.useEffect(()=>{d()},[]);const T=t=>{t.preventDefault();const a=t.currentTarget,B=a.elements.namedItem("name").value.trim(),S=a.elements.namedItem("schedule").value.trim(),E=a.elements.namedItem("execstr").value.trim();if(!S||!E){p("Schedule and command are required");return}v(!0),p("");const C={name:B,type:"shell",schedule:S,execstr:E};(r?m(`/crontab/${r}`,{method:"PUT",body:JSON.stringify(C)}):m("/crontab/create",{method:"POST",body:JSON.stringify(C)})).then(()=>{n(!1),c(null),a.reset(),d()}).catch(H=>p(H.message)).finally(()=>v(!1))},F=t=>{c(t.id),o(t),n(!0)},P=t=>{confirm("Delete this cron job?")&&m(`/crontab/${t}`,{method:"DELETE"}).then(d).catch(a=>x(a.message))},q=()=>{g(!0),L().then(d).catch(t=>x(t.message)).finally(()=>g(!1))};return D?e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(h,{variant:"success",disabled:b||u.length===0,onClick:q,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),b?"Applying…":"Apply to System"]}),e.jsxs(h,{variant:"primary",onClick:()=>{c(null),o(null),n(!0)},children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Cron"]})]})}),f?e.jsx(A,{className:"mb-3",children:f}):null,e.jsxs(i,{show:I,onHide:()=>{n(!1),c(null),o(null)},centered:!0,size:"lg",children:[e.jsx(i.Header,{closeButton:!0,children:e.jsx(i.Title,{children:r?"Edit Cron Job":"Create Cron Job"})}),e.jsxs("form",{onSubmit:T,children:[e.jsxs(i.Body,{children:[N?e.jsx(A,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{id:"cron-name",name:"name",type:"text",placeholder:"My task",defaultValue:l==null?void 0:l.name,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsxs("select",{className:"form-select mb-2",onChange:t=>{const a=t.target.value;a&&(document.getElementById("cron-schedule").value=a)},children:[e.jsx("option",{value:"",children:"Select preset…"}),O.map(t=>e.jsxs("option",{value:t.value,children:[t.label," (",t.value,")"]},t.value))]}),e.jsx("input",{id:"cron-schedule",name:"schedule",type:"text",placeholder:"* * * * *",defaultValue:l==null?void 0:l.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Command"}),e.jsx("textarea",{id:"cron-execstr",name:"execstr",rows:3,placeholder:"/usr/bin/php /www/wwwroot/script.php",defaultValue:l==null?void 0:l.execstr,className:"form-control",required:!0})]})]}),e.jsxs(i.Footer,{children:[e.jsx(h,{type:"button",variant:"secondary",onClick:()=>{n(!1),c(null),o(null)},children:"Cancel"}),e.jsx(h,{type:"submit",variant:"primary",disabled:y,children:y?"Saving…":r?"Update":"Create"})]})]},r??"new")]}),e.jsx("div",{className:"alert alert-warning small mb-3",children:'Jobs are stored in the panel. Click "Apply to System" to sync them to the system crontab (root).'}),e.jsx("div",{className:"card",children:e.jsxs(J,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Command"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:u.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(M,{title:"No cron jobs",description:'Click "Add Cron" to create one.'})})}):u.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name||"—"}),e.jsx("td",{children:e.jsx("code",{className:"small",children:t.schedule})}),e.jsx("td",{className:"small font-monospace text-truncate",style:{maxWidth:280},title:t.execstr,children:t.execstr}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>F(t),children:e.jsx("i",{className:"ti ti-edit","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>P(t.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},t.id))})]})})]})}export{K as CrontabPage}; +import{r as s,j as e,a as m,Q as L}from"./index-CRR9sQ49.js";import{M as i}from"./Modal-B7V4w_St.js";import{A}from"./AdminAlert-DW1IRWce.js";import{A as h}from"./AdminButton-Bd2cLTu3.js";import{A as J}from"./AdminTable-BLiLxfnS.js";import{E as M}from"./EmptyState-C61VdEFl.js";import{P as w}from"./PageHeader-BcjNf7GG.js";const O=[{label:"Every minute",value:"* * * * *"},{label:"Every 5 min",value:"*/5 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Daily",value:"0 0 * * *"},{label:"Weekly",value:"0 0 * * 0"}];function G(){const[u,k]=s.useState([]),[D,j]=s.useState(!0),[f,x]=s.useState(""),[T,n]=s.useState(!1),[r,c]=s.useState(null),[l,o]=s.useState(null),[y,v]=s.useState(!1),[N,p]=s.useState(""),[b,g]=s.useState(!1),d=()=>{j(!0),m("/crontab/list").then(k).catch(t=>x(t.message)).finally(()=>j(!1))};s.useEffect(()=>{d()},[]);const F=t=>{t.preventDefault();const a=t.currentTarget,B=a.elements.namedItem("name").value.trim(),S=a.elements.namedItem("schedule").value.trim(),E=a.elements.namedItem("execstr").value.trim();if(!S||!E){p("Schedule and command are required");return}v(!0),p("");const C={name:B,type:"shell",schedule:S,execstr:E};(r?m(`/crontab/${r}`,{method:"PUT",body:JSON.stringify(C)}):m("/crontab/create",{method:"POST",body:JSON.stringify(C)})).then(()=>{n(!1),c(null),a.reset(),d()}).catch(H=>p(H.message)).finally(()=>v(!1))},I=t=>{c(t.id),o(t),n(!0)},P=t=>{confirm("Delete this cron job?")&&m(`/crontab/${t}`,{method:"DELETE"}).then(d).catch(a=>x(a.message))},q=()=>{g(!0),L().then(d).catch(t=>x(t.message)).finally(()=>g(!1))};return D?e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"Cron",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(h,{variant:"success",disabled:b||u.length===0,onClick:q,children:[b?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),b?"Applying…":"Apply to System"]}),e.jsxs(h,{variant:"primary",onClick:()=>{c(null),o(null),n(!0)},children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Cron"]})]})}),f?e.jsx(A,{className:"mb-3",children:f}):null,e.jsxs(i,{show:T,onHide:()=>{n(!1),c(null),o(null)},centered:!0,size:"lg",children:[e.jsx(i.Header,{closeButton:!0,children:e.jsx(i.Title,{children:r?"Edit Cron Job":"Create Cron Job"})}),e.jsxs("form",{onSubmit:F,children:[e.jsxs(i.Body,{children:[N?e.jsx(A,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{id:"cron-name",name:"name",type:"text",placeholder:"My task",defaultValue:l==null?void 0:l.name,className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Schedule (cron)"}),e.jsxs("select",{className:"form-select mb-2",onChange:t=>{const a=t.target.value;a&&(document.getElementById("cron-schedule").value=a)},children:[e.jsx("option",{value:"",children:"Select preset…"}),O.map(t=>e.jsxs("option",{value:t.value,children:[t.label," (",t.value,")"]},t.value))]}),e.jsx("input",{id:"cron-schedule",name:"schedule",type:"text",placeholder:"* * * * *",defaultValue:l==null?void 0:l.schedule,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Command"}),e.jsx("textarea",{id:"cron-execstr",name:"execstr",rows:3,placeholder:"/usr/bin/php /www/wwwroot/script.php",defaultValue:l==null?void 0:l.execstr,className:"form-control",required:!0})]})]}),e.jsxs(i.Footer,{children:[e.jsx(h,{type:"button",variant:"secondary",onClick:()=>{n(!1),c(null),o(null)},children:"Cancel"}),e.jsx(h,{type:"submit",variant:"primary",disabled:y,children:y?"Saving…":r?"Update":"Create"})]})]},r??"new")]}),e.jsx("div",{className:"alert alert-warning small mb-3",children:'Jobs are stored in the panel. Click "Apply to System" to sync them to the system crontab (root).'}),e.jsx("div",{className:"card",children:e.jsxs(J,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Schedule"}),e.jsx("th",{children:"Command"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:u.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(M,{title:"No cron jobs",description:'Click "Add Cron" to create one.'})})}):u.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name||"—"}),e.jsx("td",{children:e.jsx("code",{className:"small",children:t.schedule})}),e.jsx("td",{className:"small font-monospace text-truncate",style:{maxWidth:280},title:t.execstr,children:t.execstr}),e.jsxs("td",{className:"text-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Edit",onClick:()=>I(t),children:e.jsx("i",{className:"ti ti-edit","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>P(t.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})]},t.id))})]})})]})}export{G as CrontabPage}; diff --git a/YakPanel-server/frontend/dist/assets/DashboardPage-B3SRQ3PP.js b/YakPanel-server/frontend/dist/assets/DashboardPage-CukNUmp0.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/DashboardPage-B3SRQ3PP.js rename to YakPanel-server/frontend/dist/assets/DashboardPage-CukNUmp0.js index 45f5b051..ce98b0a7 100644 --- a/YakPanel-server/frontend/dist/assets/DashboardPage-B3SRQ3PP.js +++ b/YakPanel-server/frontend/dist/assets/DashboardPage-CukNUmp0.js @@ -1 +1 @@ -import{r as i,g as m,j as s}from"./index-cE9w-Kq7.js";import{A as n}from"./AdminAlert-yrdXFH0e.js";import{A as o}from"./AdminCard-BvdkSQBp.js";import{P as d}from"./PageHeader-HdM4gpcn.js";function p(){const[e,r]=i.useState(null),[a,l]=i.useState("");return i.useEffect(()=>{m().then(r).catch(c=>l(c.message))},[]),a?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx(n,{variant:"danger",children:a})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsxs("div",{className:"row g-3 mb-4",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-world",title:"Websites",value:e.site_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-folder-share",title:"FTP Accounts",value:e.ftp_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database",title:"Databases",value:e.database_count})})]}),s.jsxs("div",{className:"row g-3",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.system.cpu_percent}%`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-device-desktop",title:"Memory",value:`${e.system.memory_percent}%`,subtitle:`${e.system.memory_used_mb} / ${e.system.memory_total_mb} MB`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database-export",title:"Disk",value:`${e.system.disk_percent}%`,subtitle:`${e.system.disk_used_gb} / ${e.system.disk_total_gb} GB`})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx("div",{className:"placeholder-glow",children:s.jsx("span",{className:"placeholder col-12 rounded",style:{height:"8rem"}})})]})}function t({iconClass:e,title:r,value:a,subtitle:l}){return s.jsxs(o,{className:"border-0 shadow-sm",bodyClassName:"d-flex align-items-center gap-3",children:[s.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded-circle d-flex align-items-center justify-content-center flex-shrink-0",children:s.jsx("i",{className:`${e} fs-4`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-muted mb-0 small",children:r}),s.jsx("p",{className:"fs-4 fw-semibold mb-0",children:a}),l?s.jsx("p",{className:"text-muted small mb-0",children:l}):null]})]})}export{p as DashboardPage}; +import{r as i,g as m,j as s}from"./index-CRR9sQ49.js";import{A as n}from"./AdminAlert-DW1IRWce.js";import{A as o}from"./AdminCard-DNA70pGd.js";import{P as d}from"./PageHeader-BcjNf7GG.js";function p(){const[e,r]=i.useState(null),[a,l]=i.useState("");return i.useEffect(()=>{m().then(r).catch(c=>l(c.message))},[]),a?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx(n,{variant:"danger",children:a})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsxs("div",{className:"row g-3 mb-4",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-world",title:"Websites",value:e.site_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-folder-share",title:"FTP Accounts",value:e.ftp_count})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database",title:"Databases",value:e.database_count})})]}),s.jsxs("div",{className:"row g-3",children:[s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.system.cpu_percent}%`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-device-desktop",title:"Memory",value:`${e.system.memory_percent}%`,subtitle:`${e.system.memory_used_mb} / ${e.system.memory_total_mb} MB`})}),s.jsx("div",{className:"col-md-4 d-flex",children:s.jsx(t,{iconClass:"ti ti-database-export",title:"Disk",value:`${e.system.disk_percent}%`,subtitle:`${e.system.disk_used_gb} / ${e.system.disk_total_gb} GB`})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(d,{}),s.jsx("div",{className:"placeholder-glow",children:s.jsx("span",{className:"placeholder col-12 rounded",style:{height:"8rem"}})})]})}function t({iconClass:e,title:r,value:a,subtitle:l}){return s.jsxs(o,{className:"border-0 shadow-sm",bodyClassName:"d-flex align-items-center gap-3",children:[s.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded-circle d-flex align-items-center justify-content-center flex-shrink-0",children:s.jsx("i",{className:`${e} fs-4`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-muted mb-0 small",children:r}),s.jsx("p",{className:"fs-4 fw-semibold mb-0",children:a}),l?s.jsx("p",{className:"text-muted small mb-0",children:l}):null]})]})}export{p as DashboardPage}; diff --git a/YakPanel-server/frontend/dist/assets/DatabasePage-CuN032AR.js b/YakPanel-server/frontend/dist/assets/DatabasePage-sZfqfvMQ.js similarity index 84% rename from YakPanel-server/frontend/dist/assets/DatabasePage-CuN032AR.js rename to YakPanel-server/frontend/dist/assets/DatabasePage-sZfqfvMQ.js index b9e778b6..92376e84 100644 --- a/YakPanel-server/frontend/dist/assets/DatabasePage-CuN032AR.js +++ b/YakPanel-server/frontend/dist/assets/DatabasePage-sZfqfvMQ.js @@ -1 +1 @@ -import{r as n,j as e,a as D,B as M,C as K,D as G,E as V,F as W}from"./index-cE9w-Kq7.js";import{M as a}from"./Modal-CL3xZqxR.js";import{A as b}from"./AdminAlert-yrdXFH0e.js";import{A as _}from"./AdminButton-ByutG8m-.js";import{A as X}from"./AdminTable-eCi7S__-.js";import{E as Y}from"./EmptyState-CmnFWkSO.js";import{P as v}from"./PageHeader-HdM4gpcn.js";function re(){const[j,T]=n.useState([]),[A,C]=n.useState(!0),[o,c]=n.useState(""),[I,d]=n.useState(!1),[B,S]=n.useState(!1),[P,f]=n.useState(""),[l,m]=n.useState(null),[L,g]=n.useState([]),[N,u]=n.useState(!1),[y,h]=n.useState(null),[E,p]=n.useState(""),w=()=>{C(!0),D("/database/list").then(T).catch(s=>c(s.message)).finally(()=>C(!1))};n.useEffect(()=>{w()},[]);const Q=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("name").value.trim(),i=t.elements.namedItem("username").value.trim(),x=t.elements.namedItem("password").value,k=t.elements.namedItem("db_type").value,O=t.elements.namedItem("ps").value.trim();if(!r||!i||!x){f("Name, username and password are required");return}S(!0),f(""),D("/database/create",{method:"POST",body:JSON.stringify({name:r,username:i,password:x,db_type:k,ps:O})}).then(()=>{d(!1),t.reset(),w()}).catch(J=>f(J.message)).finally(()=>S(!1))},F=(s,t)=>{confirm(`Delete database "${t}"?`)&&D(`/database/${s}`,{method:"DELETE"}).then(w).catch(r=>c(r.message))},q=s=>{m(s),g([]),M(s).then(t=>g(t.backups||[])).catch(t=>c(t.message))},H=()=>{l&&(u(!0),K(l).then(()=>M(l).then(s=>g(s.backups||[]))).catch(s=>c(s.message)).finally(()=>u(!1)))},R=s=>{!l||!confirm(`Restore from ${s}? This will overwrite the database.`)||(u(!0),V(l,s).then(()=>m(null)).catch(t=>c(t.message)).finally(()=>u(!1)))},z=s=>{l&&G(l,s).catch(t=>c(t.message))},U=(s,t)=>{s.preventDefault();const r=s.currentTarget,i=r.elements.namedItem("new_password").value,x=r.elements.namedItem("confirm_password").value;if(!i||i.length<6){p("Password must be at least 6 characters");return}if(i!==x){p("Passwords do not match");return}p(""),W(t,i).then(()=>h(null)).catch(k=>p(k.message))},$=s=>s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":(s/1024/1024).toFixed(1)+" MB";return A?e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Databases"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):o&&!j.length?e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Databases"}),e.jsx(b,{variant:"danger",children:o})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Databases",actions:e.jsxs(_,{onClick:()=>d(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Database"]})}),o?e.jsx(b,{variant:"warning",children:o}):null,e.jsxs(a,{show:I,onHide:()=>d(!1),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Create Database"})}),e.jsxs("form",{onSubmit:Q,children:[e.jsxs(a.Body,{children:[P?e.jsx(b,{variant:"danger",children:P}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Database Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"mydb",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"dbuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"db_type",className:"form-select",children:[e.jsx("option",{value:"MySQL",children:"MySQL (full support)"}),e.jsx("option",{value:"PostgreSQL",children:"PostgreSQL (full support)"}),e.jsx("option",{value:"MongoDB",children:"MongoDB (full support)"}),e.jsx("option",{value:"Redis",children:"Redis (panel record only)"})]}),e.jsx("div",{className:"form-text",children:"MySQL, PostgreSQL, MongoDB: create, delete, backup/restore. Password change supported for those types."})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My database",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>d(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:B,className:"btn btn-primary",children:B?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(X,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:j.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Y,{title:"No databases",description:'Click "Add Database" to create one.'})})}):j.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.username}),e.jsx("td",{className:"align-middle",children:s.db_type}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>q(s.id),className:"btn btn-sm btn-outline-primary me-1",title:"Backup",children:e.jsx("i",{className:"ti ti-archive"})}),(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>h(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>F(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(a,{show:l!=null,onHide:()=>m(null),centered:!0,size:"lg",children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Database Backup"})}),e.jsxs(a.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(_,{onClick:H,disabled:N,children:[e.jsx("i",{className:"ti ti-archive me-1"}),N?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small text-uppercase",children:"Existing backups"}),L.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:L.map(s=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small flex-grow-1 text-truncate",children:s.filename}),e.jsx("span",{className:"text-muted small flex-shrink-0",children:$(s.size)}),e.jsxs("span",{className:"flex-shrink-0",children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1",onClick:()=>z(s.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1 text-warning",onClick:()=>R(s.filename),disabled:N,title:"Restore",children:e.jsx("i",{className:"ti ti-restore"})})]})]},s.filename))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>m(null),children:"Close"})})]}),e.jsxs(a,{show:y!=null,onHide:()=>h(null),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Change Database Password"})}),y!=null?e.jsxs("form",{onSubmit:s=>U(s,y),children:[e.jsxs(a.Body,{children:[E?e.jsx(b,{variant:"danger",children:E}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>h(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{re as DatabasePage}; +import{r as n,j as e,a as v,J as E,K as O,L as G,M as V,N as W}from"./index-CRR9sQ49.js";import{M as a}from"./Modal-B7V4w_St.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as _}from"./AdminButton-Bd2cLTu3.js";import{A as X}from"./AdminTable-BLiLxfnS.js";import{E as Y}from"./EmptyState-C61VdEFl.js";import{P as D}from"./PageHeader-BcjNf7GG.js";function re(){const[j,T]=n.useState([]),[A,C]=n.useState(!0),[o,c]=n.useState(""),[I,d]=n.useState(!1),[S,B]=n.useState(!1),[P,f]=n.useState(""),[l,m]=n.useState(null),[L,g]=n.useState([]),[N,u]=n.useState(!1),[y,h]=n.useState(null),[M,p]=n.useState(""),w=()=>{C(!0),v("/database/list").then(T).catch(s=>c(s.message)).finally(()=>C(!1))};n.useEffect(()=>{w()},[]);const Q=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("name").value.trim(),i=t.elements.namedItem("username").value.trim(),x=t.elements.namedItem("password").value,k=t.elements.namedItem("db_type").value,J=t.elements.namedItem("ps").value.trim();if(!r||!i||!x){f("Name, username and password are required");return}B(!0),f(""),v("/database/create",{method:"POST",body:JSON.stringify({name:r,username:i,password:x,db_type:k,ps:J})}).then(()=>{d(!1),t.reset(),w()}).catch(K=>f(K.message)).finally(()=>B(!1))},F=(s,t)=>{confirm(`Delete database "${t}"?`)&&v(`/database/${s}`,{method:"DELETE"}).then(w).catch(r=>c(r.message))},q=s=>{m(s),g([]),E(s).then(t=>g(t.backups||[])).catch(t=>c(t.message))},H=()=>{l&&(u(!0),O(l).then(()=>E(l).then(s=>g(s.backups||[]))).catch(s=>c(s.message)).finally(()=>u(!1)))},R=s=>{!l||!confirm(`Restore from ${s}? This will overwrite the database.`)||(u(!0),V(l,s).then(()=>m(null)).catch(t=>c(t.message)).finally(()=>u(!1)))},z=s=>{l&&G(l,s).catch(t=>c(t.message))},U=(s,t)=>{s.preventDefault();const r=s.currentTarget,i=r.elements.namedItem("new_password").value,x=r.elements.namedItem("confirm_password").value;if(!i||i.length<6){p("Password must be at least 6 characters");return}if(i!==x){p("Passwords do not match");return}p(""),W(t,i).then(()=>h(null)).catch(k=>p(k.message))},$=s=>s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":(s/1024/1024).toFixed(1)+" MB";return A?e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):o&&!j.length?e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases"}),e.jsx(b,{variant:"danger",children:o})]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Databases",actions:e.jsxs(_,{onClick:()=>d(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Database"]})}),o?e.jsx(b,{variant:"warning",children:o}):null,e.jsxs(a,{show:I,onHide:()=>d(!1),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Create Database"})}),e.jsxs("form",{onSubmit:Q,children:[e.jsxs(a.Body,{children:[P?e.jsx(b,{variant:"danger",children:P}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Database Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"mydb",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"dbuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Type"}),e.jsxs("select",{name:"db_type",className:"form-select",children:[e.jsx("option",{value:"MySQL",children:"MySQL (full support)"}),e.jsx("option",{value:"PostgreSQL",children:"PostgreSQL (full support)"}),e.jsx("option",{value:"MongoDB",children:"MongoDB (full support)"}),e.jsx("option",{value:"Redis",children:"Redis (panel record only)"})]}),e.jsx("div",{className:"form-text",children:"MySQL, PostgreSQL, MongoDB: create, delete, backup/restore. Password change supported for those types."})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My database",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>d(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:S,className:"btn btn-primary",children:S?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(X,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Type"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:j.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Y,{title:"No databases",description:'Click "Add Database" to create one.'})})}):j.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.username}),e.jsx("td",{className:"align-middle",children:s.db_type}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>q(s.id),className:"btn btn-sm btn-outline-primary me-1",title:"Backup",children:e.jsx("i",{className:"ti ti-archive"})}),(s.db_type==="MySQL"||s.db_type==="PostgreSQL"||s.db_type==="MongoDB")&&e.jsx("button",{type:"button",onClick:()=>h(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>F(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(a,{show:l!=null,onHide:()=>m(null),centered:!0,size:"lg",children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Database Backup"})}),e.jsxs(a.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(_,{onClick:H,disabled:N,children:[e.jsx("i",{className:"ti ti-archive me-1"}),N?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small text-uppercase",children:"Existing backups"}),L.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:L.map(s=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small flex-grow-1 text-truncate",children:s.filename}),e.jsx("span",{className:"text-muted small flex-shrink-0",children:$(s.size)}),e.jsxs("span",{className:"flex-shrink-0",children:[e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1",onClick:()=>z(s.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link p-1 text-warning",onClick:()=>R(s.filename),disabled:N,title:"Restore",children:e.jsx("i",{className:"ti ti-restore"})})]})]},s.filename))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>m(null),children:"Close"})})]}),e.jsxs(a,{show:y!=null,onHide:()=>h(null),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Change Database Password"})}),y!=null?e.jsxs("form",{onSubmit:s=>U(s,y),children:[e.jsxs(a.Body,{children:[M?e.jsx(b,{variant:"danger",children:M}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>h(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{re as DatabasePage}; diff --git a/YakPanel-server/frontend/dist/assets/DockerPage-CbiMbPMF.js b/YakPanel-server/frontend/dist/assets/DockerPage-D1AIK8Rv.js similarity index 85% rename from YakPanel-server/frontend/dist/assets/DockerPage-CbiMbPMF.js rename to YakPanel-server/frontend/dist/assets/DockerPage-D1AIK8Rv.js index 81a29166..8c2a67a1 100644 --- a/YakPanel-server/frontend/dist/assets/DockerPage-CbiMbPMF.js +++ b/YakPanel-server/frontend/dist/assets/DockerPage-D1AIK8Rv.js @@ -1 +1 @@ -import{r as t,j as e,O as B,P as H,Q as M,R as W,a as j}from"./index-cE9w-Kq7.js";import{M as o}from"./Modal-CL3xZqxR.js";import{A as Q}from"./AdminAlert-yrdXFH0e.js";import{A as d}from"./AdminButton-ByutG8m-.js";import{A}from"./AdminTable-eCi7S__-.js";import{E as G}from"./EmptyState-CmnFWkSO.js";import{P as _}from"./PageHeader-HdM4gpcn.js";function p({show:m}){return m?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function ee(){const[m,E]=t.useState([]),[f,T]=t.useState([]),[z,g]=t.useState(!0),[b,a]=t.useState(""),[i,r]=t.useState(null),[D,c]=t.useState(!1),[u,x]=t.useState(""),[N,y]=t.useState(""),[S,v]=t.useState(""),[k,C]=t.useState(!1),[h,R]=t.useState(""),[P,w]=t.useState(!1),l=()=>{g(!0),Promise.all([B(),H()]).then(([s,n])=>{E(s.containers||[]),T(n.images||[]),a(s.error||n.error||"")}).catch(s=>a(s.message)).finally(()=>g(!1))};t.useEffect(()=>{l()},[]);const $=s=>{r(s),j(`/docker/${s}/start`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},F=s=>{r(s),j(`/docker/${s}/stop`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},L=s=>{r(s),j(`/docker/${s}/restart`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},I=s=>s.toLowerCase().startsWith("up")||s.toLowerCase().includes("running"),O=s=>{s.preventDefault(),u.trim()&&(C(!0),W(u.trim(),N.trim()||void 0,S.trim()||void 0).then(()=>{c(!1),x(""),y(""),v(""),l()}).catch(n=>a(n.message)).finally(()=>C(!1)))},q=()=>{h.trim()&&(w(!0),M(h.trim()).then(()=>{R(""),l()}).catch(s=>a(s.message)).finally(()=>w(!1)))};return z?e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[e.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[e.jsx("input",{value:h,onChange:s=>R(s.target.value),placeholder:"nginx:latest",className:"form-control form-control-sm",style:{width:"10rem"}}),e.jsxs(d,{variant:"warning",size:"sm",onClick:q,disabled:P||!h.trim(),children:[P?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-download me-1","aria-hidden":!0}),"Pull"]})]}),e.jsxs(d,{variant:"primary",size:"sm",onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Run Container"]}),e.jsxs(d,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(o,{show:D,onHide:()=>c(!1),centered:!0,children:[e.jsx(o.Header,{closeButton:!0,children:e.jsx(o.Title,{children:"Run Container"})}),e.jsxs("form",{onSubmit:O,children:[e.jsxs(o.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Image"}),e.jsx("input",{value:u,onChange:s=>x(s.target.value),placeholder:"nginx:latest",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:N,onChange:s=>y(s.target.value),placeholder:"my-nginx",className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Ports (optional, e.g. 80:80 or 8080:80)"}),e.jsx("input",{value:S,onChange:s=>v(s.target.value),placeholder:"80:80",className:"form-control"})]})]}),e.jsxs(o.Footer,{children:[e.jsx(d,{type:"button",variant:"secondary",onClick:()=>c(!1),children:"Cancel"}),e.jsx(d,{type:"submit",variant:"primary",disabled:k,children:k?"Starting…":"Run"})]})]})]}),b?e.jsx(Q,{variant:"warning",className:"mb-3",children:b}):null,e.jsx("div",{className:"card",children:e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Container"}),e.jsx("th",{children:"Image"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Ports"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:m.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(G,{title:"No containers",description:"Install Docker and run some containers."})})}):m.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace small",children:s.names||s.id}),e.jsx("td",{children:s.image}),e.jsx("td",{children:e.jsx("span",{className:I(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{className:"small text-truncate",style:{maxWidth:200},children:s.ports||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:I(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:i===s.id_full,onClick:()=>L(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:i===s.id_full,onClick:()=>F(s.id_full),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:i===s.id_full,onClick:()=>$(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},s.id))})]})}),e.jsx("h2",{className:"h5 mt-4 mb-3",children:"Images"}),e.jsx("div",{className:"card",children:f.length===0?e.jsx("div",{className:"card-body",children:e.jsx("p",{className:"text-secondary text-center mb-0",children:"No images. Pull one above."})}):e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Repository"}),e.jsx("th",{children:"Tag"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"text-end",children:"Action"})]})}),e.jsx("tbody",{children:f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.repository}),e.jsx("td",{children:s.tag}),e.jsx("td",{children:s.size}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Run",onClick:()=>{x(`${s.repository}:${s.tag}`),c(!0)},children:e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})]},s.id))})]})})]})}export{ee as DockerPage}; +import{r as t,j as e,W as H,X as O,Y as W,Z as M,a as j}from"./index-CRR9sQ49.js";import{M as o}from"./Modal-B7V4w_St.js";import{A as X}from"./AdminAlert-DW1IRWce.js";import{A as d}from"./AdminButton-Bd2cLTu3.js";import{A}from"./AdminTable-BLiLxfnS.js";import{E as Y}from"./EmptyState-C61VdEFl.js";import{P as _}from"./PageHeader-BcjNf7GG.js";function p({show:m}){return m?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function ee(){const[m,E]=t.useState([]),[f,T]=t.useState([]),[z,g]=t.useState(!0),[b,a]=t.useState(""),[i,r]=t.useState(null),[D,c]=t.useState(!1),[u,x]=t.useState(""),[N,y]=t.useState(""),[S,v]=t.useState(""),[k,C]=t.useState(!1),[h,R]=t.useState(""),[P,w]=t.useState(!1),l=()=>{g(!0),Promise.all([H(),O()]).then(([s,n])=>{E(s.containers||[]),T(n.images||[]),a(s.error||n.error||"")}).catch(s=>a(s.message)).finally(()=>g(!1))};t.useEffect(()=>{l()},[]);const $=s=>{r(s),j(`/docker/${s}/start`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},F=s=>{r(s),j(`/docker/${s}/stop`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},L=s=>{r(s),j(`/docker/${s}/restart`,{method:"POST"}).then(l).catch(n=>a(n.message)).finally(()=>r(null))},I=s=>s.toLowerCase().startsWith("up")||s.toLowerCase().includes("running"),q=s=>{s.preventDefault(),u.trim()&&(C(!0),M(u.trim(),N.trim()||void 0,S.trim()||void 0).then(()=>{c(!1),x(""),y(""),v(""),l()}).catch(n=>a(n.message)).finally(()=>C(!1)))},B=()=>{h.trim()&&(w(!0),W(h.trim()).then(()=>{R(""),l()}).catch(s=>a(s.message)).finally(()=>w(!1)))};return z?e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(_,{title:"Docker",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[e.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[e.jsx("input",{value:h,onChange:s=>R(s.target.value),placeholder:"nginx:latest",className:"form-control form-control-sm",style:{width:"10rem"}}),e.jsxs(d,{variant:"warning",size:"sm",onClick:B,disabled:P||!h.trim(),children:[P?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-download me-1","aria-hidden":!0}),"Pull"]})]}),e.jsxs(d,{variant:"primary",size:"sm",onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Run Container"]}),e.jsxs(d,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(o,{show:D,onHide:()=>c(!1),centered:!0,children:[e.jsx(o.Header,{closeButton:!0,children:e.jsx(o.Title,{children:"Run Container"})}),e.jsxs("form",{onSubmit:q,children:[e.jsxs(o.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Image"}),e.jsx("input",{value:u,onChange:s=>x(s.target.value),placeholder:"nginx:latest",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:N,onChange:s=>y(s.target.value),placeholder:"my-nginx",className:"form-control"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Ports (optional, e.g. 80:80 or 8080:80)"}),e.jsx("input",{value:S,onChange:s=>v(s.target.value),placeholder:"80:80",className:"form-control"})]})]}),e.jsxs(o.Footer,{children:[e.jsx(d,{type:"button",variant:"secondary",onClick:()=>c(!1),children:"Cancel"}),e.jsx(d,{type:"submit",variant:"primary",disabled:k,children:k?"Starting…":"Run"})]})]})]}),b?e.jsx(X,{variant:"warning",className:"mb-3",children:b}):null,e.jsx("div",{className:"card",children:e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Container"}),e.jsx("th",{children:"Image"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Ports"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:m.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Y,{title:"No containers",description:"Install Docker and run some containers."})})}):m.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace small",children:s.names||s.id}),e.jsx("td",{children:s.image}),e.jsx("td",{children:e.jsx("span",{className:I(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{className:"small text-truncate",style:{maxWidth:200},children:s.ports||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:I(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:i===s.id_full,onClick:()=>L(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:i===s.id_full,onClick:()=>F(s.id_full),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:i===s.id_full,onClick:()=>$(s.id_full),children:i===s.id_full?e.jsx(p,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},s.id))})]})}),e.jsx("h2",{className:"h5 mt-4 mb-3",children:"Images"}),e.jsx("div",{className:"card",children:f.length===0?e.jsx("div",{className:"card-body",children:e.jsx("p",{className:"text-secondary text-center mb-0",children:"No images. Pull one above."})}):e.jsxs(A,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Repository"}),e.jsx("th",{children:"Tag"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"text-end",children:"Action"})]})}),e.jsx("tbody",{children:f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.repository}),e.jsx("td",{children:s.tag}),e.jsx("td",{children:s.size}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Run",onClick:()=>{x(`${s.repository}:${s.tag}`),c(!0)},children:e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})]},s.id))})]})})]})}export{ee as DockerPage}; diff --git a/YakPanel-server/frontend/dist/assets/DomainsPage-CMAJOz1U.js b/YakPanel-server/frontend/dist/assets/DomainsPage-DVTACiDJ.js similarity index 94% rename from YakPanel-server/frontend/dist/assets/DomainsPage-CMAJOz1U.js rename to YakPanel-server/frontend/dist/assets/DomainsPage-DVTACiDJ.js index 06cb2d61..8f13ee11 100644 --- a/YakPanel-server/frontend/dist/assets/DomainsPage-CMAJOz1U.js +++ b/YakPanel-server/frontend/dist/assets/DomainsPage-DVTACiDJ.js @@ -1 +1 @@ -import{r as t,j as e,a as o}from"./index-cE9w-Kq7.js";import{M as l}from"./Modal-CL3xZqxR.js";import{A as R}from"./AdminAlert-yrdXFH0e.js";import{A as m}from"./AdminButton-ByutG8m-.js";import{P as N}from"./PageHeader-HdM4gpcn.js";function k(){const[d,y]=t.useState([]),[c,b]=t.useState([]),[v,u]=t.useState(!0),[x,h]=t.useState(""),[i,p]=t.useState(null),[a,n]=t.useState(null),[j,f]=t.useState(""),g=()=>{u(!0),Promise.all([o("/ssl/domains"),o("/ssl/certificates")]).then(([s,r])=>{y(s),b(r.certificates||[])}).catch(s=>h(s.message)).finally(()=>u(!1))};t.useEffect(()=>{g()},[]);const S=s=>{s.preventDefault(),a&&(p(a.name),o("/ssl/request",{method:"POST",body:JSON.stringify({domain:a.name,webroot:a.site_path,email:j})}).then(()=>{n(null),g()}).catch(r=>h(r.message)).finally(()=>p(null)))},q=s=>c.some(r=>r.name===s||r.name.startsWith(s+" "));return v?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),x?e.jsx(R,{className:"mb-3",children:x}):null,e.jsx("div",{className:"alert alert-warning small mb-4",children:"Request Let's Encrypt certificates for your site domains. Requires certbot and nginx configured for the domain."}),e.jsxs("div",{className:"row g-4",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Domains (from sites)"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:d.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No domains. Add a site first."}):d.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsxs("div",{className:"small",children:[e.jsx("span",{className:"font-monospace",children:s.name}),s.port!=="80"?e.jsxs("span",{className:"text-secondary ms-1",children:[":",s.port]}):null,e.jsxs("span",{className:"text-secondary ms-2",children:["(",s.site_name,")"]})]}),e.jsx("div",{children:q(s.name)?e.jsxs("span",{className:"text-success small",children:[e.jsx("i",{className:"ti ti-shield-check me-1","aria-hidden":!0}),"Cert"]}):e.jsx(m,{variant:"outline-primary",size:"sm",disabled:!!i,onClick:()=>{n(s),f("")},children:i===s.name?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):"Request SSL"})})]},s.id))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Certificates"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:c.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No certificates yet"}):c.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-shield-check text-success flex-shrink-0","aria-hidden":!0}),e.jsx("span",{className:"font-monospace small text-break",children:s.name})]},s.name))})]})})]}),e.jsxs(l,{show:!!a,onHide:()=>n(null),centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsxs(l.Title,{children:["Request SSL for ",a==null?void 0:a.name]})}),a?e.jsxs("form",{onSubmit:S,children:[e.jsxs(l.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain"}),e.jsx("input",{type:"text",value:a.name,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Webroot (site path)"}),e.jsx("input",{type:"text",value:a.site_path,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (for Let's Encrypt)"}),e.jsx("input",{type:"email",value:j,onChange:s=>f(s.target.value),placeholder:"admin@example.com",className:"form-control",required:!0})]})]}),e.jsxs(l.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>n(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:!!i,children:i?"Requesting…":"Request"})]})]}):null]})]})}export{k as DomainsPage}; +import{r as t,j as e,a as o}from"./index-CRR9sQ49.js";import{M as l}from"./Modal-B7V4w_St.js";import{A as R}from"./AdminAlert-DW1IRWce.js";import{A as m}from"./AdminButton-Bd2cLTu3.js";import{P as N}from"./PageHeader-BcjNf7GG.js";function k(){const[d,y]=t.useState([]),[c,b]=t.useState([]),[v,u]=t.useState(!0),[x,h]=t.useState(""),[i,p]=t.useState(null),[a,n]=t.useState(null),[j,f]=t.useState(""),g=()=>{u(!0),Promise.all([o("/ssl/domains"),o("/ssl/certificates")]).then(([s,r])=>{y(s),b(r.certificates||[])}).catch(s=>h(s.message)).finally(()=>u(!1))};t.useEffect(()=>{g()},[]);const S=s=>{s.preventDefault(),a&&(p(a.name),o("/ssl/request",{method:"POST",body:JSON.stringify({domain:a.name,webroot:a.site_path,email:j})}).then(()=>{n(null),g()}).catch(r=>h(r.message)).finally(()=>p(null)))},q=s=>c.some(r=>r.name===s||r.name.startsWith(s+" "));return v?e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{title:"Domains & SSL"}),x?e.jsx(R,{className:"mb-3",children:x}):null,e.jsx("div",{className:"alert alert-warning small mb-4",children:"Request Let's Encrypt certificates for your site domains. Requires certbot and nginx configured for the domain."}),e.jsxs("div",{className:"row g-4",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Domains (from sites)"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:d.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No domains. Add a site first."}):d.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsxs("div",{className:"small",children:[e.jsx("span",{className:"font-monospace",children:s.name}),s.port!=="80"?e.jsxs("span",{className:"text-secondary ms-1",children:[":",s.port]}):null,e.jsxs("span",{className:"text-secondary ms-2",children:["(",s.site_name,")"]})]}),e.jsx("div",{children:q(s.name)?e.jsxs("span",{className:"text-success small",children:[e.jsx("i",{className:"ti ti-shield-check me-1","aria-hidden":!0}),"Cert"]}):e.jsx(m,{variant:"outline-primary",size:"sm",disabled:!!i,onClick:()=>{n(s),f("")},children:i===s.name?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):"Request SSL"})})]},s.id))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header",children:"Certificates"}),e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:"20rem"},children:c.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"No certificates yet"}):c.map(s=>e.jsxs("div",{className:"list-group-item d-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-shield-check text-success flex-shrink-0","aria-hidden":!0}),e.jsx("span",{className:"font-monospace small text-break",children:s.name})]},s.name))})]})})]}),e.jsxs(l,{show:!!a,onHide:()=>n(null),centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsxs(l.Title,{children:["Request SSL for ",a==null?void 0:a.name]})}),a?e.jsxs("form",{onSubmit:S,children:[e.jsxs(l.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain"}),e.jsx("input",{type:"text",value:a.name,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Webroot (site path)"}),e.jsx("input",{type:"text",value:a.site_path,readOnly:!0,className:"form-control-plaintext border rounded px-3 py-2 bg-body-secondary"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (for Let's Encrypt)"}),e.jsx("input",{type:"email",value:j,onChange:s=>f(s.target.value),placeholder:"admin@example.com",className:"form-control",required:!0})]})]}),e.jsxs(l.Footer,{children:[e.jsx(m,{type:"button",variant:"secondary",onClick:()=>n(null),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",disabled:!!i,children:i?"Requesting…":"Request"})]})]}):null]})]})}export{k as DomainsPage}; diff --git a/YakPanel-server/frontend/dist/assets/EmptyState-CmnFWkSO.js b/YakPanel-server/frontend/dist/assets/EmptyState-C61VdEFl.js similarity index 82% rename from YakPanel-server/frontend/dist/assets/EmptyState-CmnFWkSO.js rename to YakPanel-server/frontend/dist/assets/EmptyState-C61VdEFl.js index afa3afbf..a081f7de 100644 --- a/YakPanel-server/frontend/dist/assets/EmptyState-CmnFWkSO.js +++ b/YakPanel-server/frontend/dist/assets/EmptyState-C61VdEFl.js @@ -1 +1 @@ -import{j as t}from"./index-cE9w-Kq7.js";function m({iconClass:s="ti ti-inbox",title:a,description:e,action:i}){return t.jsxs("div",{className:"text-center py-5 text-muted",children:[t.jsx("i",{className:`${s} display-4 d-block mb-3`,"aria-hidden":!0}),t.jsx("h5",{className:"text-body",children:a}),e?t.jsx("p",{className:"mb-3",children:e}):null,i]})}export{m as E}; +import{j as t}from"./index-CRR9sQ49.js";function m({iconClass:s="ti ti-inbox",title:a,description:e,action:i}){return t.jsxs("div",{className:"text-center py-5 text-muted",children:[t.jsx("i",{className:`${s} display-4 d-block mb-3`,"aria-hidden":!0}),t.jsx("h5",{className:"text-body",children:a}),e?t.jsx("p",{className:"mb-3",children:e}):null,i]})}export{m as E}; diff --git a/YakPanel-server/frontend/dist/assets/FilesPage-B-ZILwyi.js b/YakPanel-server/frontend/dist/assets/FilesPage-B-ZILwyi.js deleted file mode 100644 index 998faa99..00000000 --- a/YakPanel-server/frontend/dist/assets/FilesPage-B-ZILwyi.js +++ /dev/null @@ -1 +0,0 @@ -import{r as l,j as e,p as q,q as G,t as J,w as O,v as Q,x as Y,y as Z,z as ee}from"./index-cE9w-Kq7.js";import{M as r}from"./Modal-CL3xZqxR.js";import{A as te}from"./AdminAlert-yrdXFH0e.js";import{A as c}from"./AdminButton-ByutG8m-.js";import{A as ne}from"./AdminTable-eCi7S__-.js";import{E as se}from"./EmptyState-CmnFWkSO.js";import{P as ae}from"./PageHeader-HdM4gpcn.js";function le(s){return s<1024?s+" B":s<1024*1024?(s/1024).toFixed(1)+" KB":(s/1024/1024).toFixed(1)+" MB"}const ie=[".txt",".html",".htm",".css",".js",".json",".xml",".md",".py",".php",".sh",".conf",".env"];function pe(){const[s,z]=l.useState("/"),[g,A]=l.useState([]),[H,N]=l.useState(!0),[y,i]=l.useState(""),[k,v]=l.useState(null),[w,C]=l.useState(!1),[m,u]=l.useState(null),[S,F]=l.useState(""),[E,B]=l.useState(!1),[M,h]=l.useState(!1),[_,x]=l.useState(""),[d,p]=l.useState(null),[j,f]=l.useState(""),D=l.useRef(null),o=t=>{N(!0),i(""),q(t).then(n=>{z(n.path),A(n.items.sort((a,b)=>a.is_dir===b.is_dir?0:a.is_dir?-1:1))}).catch(n=>i(n.message)).finally(()=>N(!1))};l.useEffect(()=>{o(s)},[]);const R=t=>{if(t.is_dir){const n=s.endsWith("/")?s+t.name:s+"/"+t.name;o(n)}},T=()=>{const t=s.replace(/\/$/,"").split("/").filter(Boolean);if(t.length<=1)return;t.pop();const n=t.length===0?"/":"/"+t.join("/");o(n)},U=t=>{if(t.is_dir)return;const n=s.endsWith("/")?s+t.name:s+"/"+t.name;v(t.name),Z(n).catch(a=>i(a.message)).finally(()=>v(null))},W=t=>{var a;const n=(a=t.target.files)==null?void 0:a[0];n&&(C(!0),i(""),G(s,n).then(()=>o(s)).catch(b=>i(b.message)).finally(()=>{C(!1),t.target.value=""}))},$=t=>{const n=s.endsWith("/")?s+t.name:s+"/"+t.name;Y(n).then(a=>{u(n),F(typeof a.content=="string"?a.content:String(a.content))}).catch(a=>i(a.message))},I=()=>{m&&(B(!0),O(m,S).then(()=>{u(null),o(s)}).catch(t=>i(t.message)).finally(()=>B(!1)))},K=t=>ie.some(n=>t.toLowerCase().endsWith(n)),L=t=>{t.preventDefault();const n=_.trim();n&&J(s,n).then(()=>{h(!1),x(""),o(s)}).catch(a=>i(a.message))},P=()=>{if(!d||!j.trim())return;const t=j.trim();if(t===d.name){p(null);return}Q(s,d.name,t).then(()=>{p(null),f(""),o(s)}).catch(n=>i(n.message))},V=t=>{confirm(`Delete ${t.is_dir?"folder":"file"} "${t.name}"?`)&&ee(s,t.name,t.is_dir).then(()=>o(s)).catch(n=>i(n.message))},X=s.split("/").filter(Boolean).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(ae,{title:"Files"}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-3",children:[e.jsxs(c,{variant:"secondary",size:"sm",onClick:T,disabled:!X,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsx("input",{ref:D,type:"file",className:"d-none",onChange:W}),e.jsxs(c,{variant:"success",size:"sm",onClick:()=>h(!0),children:[e.jsx("i",{className:"ti ti-folder-plus me-1","aria-hidden":!0}),"New Folder"]}),e.jsxs(c,{variant:"primary",size:"sm",onClick:()=>{var t;return(t=D.current)==null?void 0:t.click()},disabled:w,children:[w?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-upload me-1","aria-hidden":!0}),"Upload"]}),e.jsxs("code",{className:"small bg-body-secondary px-2 py-1 rounded ms-auto text-break",children:["Path: ",s]})]}),e.jsxs(r,{show:M,onHide:()=>{h(!1),x("")},centered:!0,children:[e.jsx(r.Header,{closeButton:!0,children:e.jsx(r.Title,{children:"New Folder"})}),e.jsxs("form",{onSubmit:L,children:[e.jsx(r.Body,{children:e.jsx("input",{value:_,onChange:t=>x(t.target.value),placeholder:"Folder name",className:"form-control",autoFocus:!0})}),e.jsxs(r.Footer,{children:[e.jsx(c,{type:"button",variant:"secondary",onClick:()=>{h(!1),x("")},children:"Cancel"}),e.jsx(c,{type:"submit",variant:"success",children:"Create"})]})]})]}),e.jsxs(r,{show:!!m,onHide:()=>u(null),fullscreen:"lg-down",size:"lg",children:[e.jsx(r.Header,{closeButton:!0,children:e.jsx(r.Title,{className:"text-break small font-monospace",children:m})}),e.jsx(r.Body,{className:"d-flex flex-column p-0",style:{minHeight:400},children:e.jsx("textarea",{value:S,onChange:t=>F(t.target.value),className:"form-control font-monospace small flex-grow-1 rounded-0 border-0",style:{minHeight:400},spellCheck:!1})}),e.jsxs(r.Footer,{children:[e.jsx(c,{variant:"secondary",onClick:()=>u(null),children:"Cancel"}),e.jsx(c,{variant:"primary",onClick:I,disabled:E,children:E?"Saving…":"Save"})]})]}),y?e.jsx(te,{className:"mb-3",children:y}):null,e.jsx("div",{className:"card",children:H?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsxs(ne,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:g.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"p-0",children:e.jsx(se,{title:"Empty directory",description:"Upload files or create a folder."})})}):g.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsxs("button",{type:"button",onClick:()=>R(t),className:"btn btn-link text-start text-decoration-none p-0 d-inline-flex align-items-center gap-2",children:[e.jsx("i",{className:`ti ${t.is_dir?"ti-folder text-warning":"ti-file text-secondary"}`,"aria-hidden":!0}),e.jsx("span",{children:t.name})]})}),e.jsx("td",{className:"text-secondary",children:t.is_dir?"—":le(t.size)}),e.jsx("td",{className:"text-end",children:(d==null?void 0:d.name)===t.name?e.jsxs("span",{className:"d-inline-flex gap-1 align-items-center flex-wrap justify-content-end",children:[e.jsx("input",{value:j,onChange:n=>f(n.target.value),onKeyDown:n=>n.key==="Enter"&&P(),className:"form-control form-control-sm",style:{width:"8rem"},autoFocus:!0}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Save",onClick:P,children:e.jsx("i",{className:"ti ti-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-1",onClick:()=>{p(null),f("")},children:"Cancel"})]}):e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-secondary p-1",title:"Rename",onClick:()=>{p(t),f(t.name)},children:e.jsx("i",{className:"ti ti-pencil","aria-hidden":!0})}),!t.is_dir&&K(t.name)?e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Edit",onClick:()=>$(t),children:e.jsx("i",{className:"ti ti-edit","aria-hidden":!0})}):null,t.is_dir?null:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-primary p-1",title:"Download",disabled:k===t.name,onClick:()=>U(t),children:k===t.name?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):e.jsx("i",{className:"ti ti-download","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>V(t),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})})]},t.name))})]})})]})}export{pe as FilesPage}; diff --git a/YakPanel-server/frontend/dist/assets/FilesPage-DLgTKzsa.js b/YakPanel-server/frontend/dist/assets/FilesPage-DLgTKzsa.js new file mode 100644 index 00000000..2f3bd80c --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/FilesPage-DLgTKzsa.js @@ -0,0 +1 @@ +import{r as a,p as Ze,j as e,D as d,q as Je,t as Ye,v as es,w as ss,x as ge,y as ts,z as ns,A as as,B as ls,C as is,E as rs,F as cs,G as os,H as ds}from"./index-CRR9sQ49.js";import{M as l}from"./Modal-B7V4w_St.js";import{A as ms}from"./AdminAlert-DW1IRWce.js";import{A as r}from"./AdminButton-Bd2cLTu3.js";import{A as hs}from"./AdminTable-BLiLxfnS.js";import{E as us}from"./EmptyState-C61VdEFl.js";import{P as ps}from"./PageHeader-BcjNf7GG.js";function f(n,p){return n==="/"?`/${p}`:`${n.replace(/\/$/,"")}/${p}`}function Ne(n){const p=n.replace(/\/$/,"").split("/").filter(Boolean);return p.pop(),p.length===0?"/":`/${p.join("/")}`}function be(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)} MB`:`${(n/1024/1024/1024).toFixed(2)} GB`}const xs=[".txt",".html",".htm",".css",".js",".json",".xml",".md",".py",".php",".sh",".conf",".env",".ini",".log",".yml",".yaml"];function vs(){const[n,p]=a.useState("/"),[W,G]=a.useState("/"),[k,Ce]=a.useState([]),[M,K]=a.useState(!0),[O,m]=a.useState(""),[H,ye]=a.useState(""),[g,N]=a.useState(()=>new Set),[h,b]=a.useState(null),[U,q]=a.useState({}),[ve,Q]=a.useState(null),[V,X]=a.useState(!1),[S,w]=a.useState(null),[Z,J]=a.useState(""),[Y,ee]=a.useState(!1),[ke,F]=a.useState(!1),[se,z]=a.useState(""),[Se,$]=a.useState(!1),[te,D]=a.useState(""),[x,B]=a.useState(null),[T,_]=a.useState(""),[we,P]=a.useState(!1),[j,E]=a.useState(null),[ne,ae]=a.useState("0644"),[le,ie]=a.useState(!1),[Fe,C]=a.useState(!1),[R,A]=a.useState("archive.zip"),[ze,L]=a.useState(!1),[I,$e]=a.useState(""),[re,ce]=a.useState(!1),[oe,de]=a.useState([]),me=a.useRef(null),c=a.useCallback(s=>{K(!0),m(""),N(new Set),Ze(s).then(t=>{p(t.path),G(t.path),Ce(t.items.sort((i,v)=>i.is_dir===v.is_dir?0:i.is_dir?-1:1)),q({})}).catch(t=>m(t.message)).finally(()=>K(!1))},[]);a.useEffect(()=>{c(n)},[]);const u=a.useMemo(()=>{const s=H.trim().toLowerCase();return s?k.filter(t=>t.name.toLowerCase().includes(s)):k},[k,H]),y=n.replace(/\/$/,"").split("/").filter(Boolean),he=y.length>0,De=s=>{N(t=>{const i=new Set(t);return i.has(s)?i.delete(s):i.add(s),i})},Be=()=>{g.size===u.length?N(new Set):N(new Set(u.map(s=>s.name)))},o=a.useMemo(()=>u.filter(s=>g.has(s.name)),[u,g]),ue=s=>{s.is_dir&&c(f(n,s.name))},_e=()=>{he&&c(Ne(n))},pe=()=>{const s=W.trim()||"/";c(s.startsWith("/")?s:`/${s}`)},xe=s=>{if(s.is_dir)return;const t=f(n,s.name);Q(s.name),Ye(t).catch(i=>m(i.message)).finally(()=>Q(null))},Pe=s=>{var i;const t=(i=s.target.files)==null?void 0:i[0];t&&(X(!0),m(""),Je(n,t).then(()=>c(n)).catch(v=>m(v.message)).finally(()=>{X(!1),s.target.value=""}))},Ee=s=>{const t=f(n,s.name);ds(t).then(i=>{w(t),J(typeof i.content=="string"?i.content:String(i.content))}).catch(i=>m(i.message))},Ie=()=>{S&&(ee(!0),rs(S,Z).then(()=>{w(null),c(n)}).catch(s=>m(s.message)).finally(()=>ee(!1)))},Me=s=>xs.some(t=>s.toLowerCase().endsWith(t)),He=s=>{s.preventDefault();const t=se.trim();t&&ns(n,t).then(()=>{F(!1),z(""),c(n)}).catch(i=>m(i.message))},Te=s=>{s.preventDefault();const t=te.trim();t&&as(n,t).then(()=>{$(!1),D(""),c(n)}).catch(i=>m(i.message))},je=()=>{if(!x||!T.trim())return;const s=T.trim();if(s===x.name){B(null);return}os(n,x.name,s).then(()=>{B(null),_(""),c(n)}).catch(t=>m(t.message))},Re=s=>{confirm(`Delete ${s.is_dir?"folder":"file"} "${s.name}"?`)&&ge(n,s.name,s.is_dir).then(()=>c(n)).catch(t=>m(t.message))},Ae=()=>{o.length!==0&&confirm(`Delete ${o.length} item(s)?`)&&Promise.all(o.map(s=>ge(n,s.name,s.is_dir))).then(()=>c(n)).catch(s=>m(s.message))},Le=()=>{o.length!==0&&b({op:"copy",entries:o.map(s=>({parent:n,name:s.name}))})},We=()=>{o.length!==0&&b({op:"cut",entries:o.map(s=>({parent:n,name:s.name}))})},Ge=()=>{if(!h||h.entries.length===0)return;const s=h.entries.map(t=>h.op==="copy"?es(t.parent,t.name,n):ss(t.parent,t.name,n));Promise.all(s).then(()=>{(h==null?void 0:h.op)==="cut"&&b(null),c(n)}).catch(t=>m(t.message))},Ke=s=>{E(s),ae(s.mode?s.mode.padStart(3,"0"):"0644"),ie(s.is_dir),P(!0)},Oe=()=>{if(!j)return;const s=f(n,j.name);ls(s,ne,le&&j.is_dir).then(()=>{P(!1),E(null),c(n)}).catch(t=>m(t.message))},Ue=()=>{(o.length>0?o.map(t=>t.name):[]).length!==0&&(A(`archive-${Date.now()}.zip`),C(!0))},qe=()=>{const s=o.length>0?o.map(t=>t.name):[];!R.trim()||s.length===0||is(n,s,R.trim()).then(()=>{C(!1),c(n)}).catch(t=>m(t.message))},Qe=s=>{if(!s.is_dir)return;const t=f(n,s.name);cs(t).then(i=>q(v=>({...v,[s.name]:i.size}))).catch(i=>m(i.message))},fe=()=>{const s=I.trim();s&&(ce(!0),de([]),ts(s,n,300).then(t=>{de(t.results),L(!0)}).catch(t=>m(t.message)).finally(()=>ce(!1)))},Ve=s=>{L(!1),s.is_dir?c(s.path):c(Ne(s.path))},Xe=s=>{if(s<0){c("/");return}const t=y.slice(0,s+1);c(`/${t.join("/")}`)};return e.jsxs(e.Fragment,{children:[e.jsx(ps,{title:"Files"}),e.jsx("div",{className:"card mb-3",children:e.jsxs("div",{className:"card-body py-2",children:[e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-2",children:[e.jsxs(r,{variant:"secondary",size:"sm",onClick:_e,disabled:!he,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:()=>c(n),disabled:M,children:[e.jsx("i",{className:"ti ti-refresh me-1","aria-hidden":!0}),"Refresh"]}),e.jsxs(d,{as:"span",children:[e.jsxs(d.Toggle,{variant:"success",size:"sm",id:"files-new-dropdown",children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"New"]}),e.jsxs(d.Menu,{children:[e.jsxs(d.Item,{onClick:()=>F(!0),children:[e.jsx("i",{className:"ti ti-folder-plus me-2"}),"Folder"]}),e.jsxs(d.Item,{onClick:()=>$(!0),children:[e.jsx("i",{className:"ti ti-file-plus me-2"}),"File"]})]})]}),e.jsx("input",{ref:me,type:"file",className:"d-none",onChange:Pe}),e.jsxs(r,{variant:"primary",size:"sm",onClick:()=>{var s;return(s=me.current)==null?void 0:s.click()},disabled:V,children:[V?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-upload me-1","aria-hidden":!0}),"Upload"]}),o.length===1&&!o[0].is_dir?e.jsxs(r,{variant:"outline-primary",size:"sm",onClick:()=>xe(o[0]),children:[e.jsx("i",{className:"ti ti-download me-1","aria-hidden":!0}),"Download"]}):null,e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:Le,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-copy me-1","aria-hidden":!0}),"Copy"]}),e.jsxs(r,{variant:"outline-secondary",size:"sm",onClick:We,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-cut me-1","aria-hidden":!0}),"Cut"]}),e.jsxs(r,{variant:"outline-primary",size:"sm",onClick:Ge,disabled:!h||h.entries.length===0,children:[e.jsx("i",{className:"ti ti-clipboard me-1","aria-hidden":!0}),"Paste"]}),e.jsxs(r,{variant:"warning",size:"sm",onClick:Ue,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-file-zip me-1","aria-hidden":!0}),"Compress"]}),e.jsxs(r,{variant:"outline-danger",size:"sm",onClick:Ae,disabled:o.length===0,children:[e.jsx("i",{className:"ti ti-trash me-1","aria-hidden":!0}),"Delete"]})]}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[e.jsxs("div",{className:"input-group input-group-sm",style:{minWidth:240,maxWidth:480},children:[e.jsx("span",{className:"input-group-text",children:"Path"}),e.jsx("input",{className:"form-control font-monospace small",value:W,onChange:s=>G(s.target.value),onKeyDown:s=>s.key==="Enter"&&pe()}),e.jsx(r,{variant:"primary",size:"sm",className:"rounded-0 rounded-end",type:"button",onClick:pe,children:"Go"})]}),e.jsxs("div",{className:"input-group input-group-sm flex-grow-1",style:{minWidth:200},children:[e.jsx("span",{className:"input-group-text",children:e.jsx("i",{className:"ti ti-search","aria-hidden":!0})}),e.jsx("input",{className:"form-control",placeholder:"Filter current folder…",value:H,onChange:s=>ye(s.target.value)})]}),e.jsxs("div",{className:"input-group input-group-sm",style:{minWidth:200},children:[e.jsx("input",{className:"form-control",placeholder:"Search subfolders…",value:I,onChange:s=>$e(s.target.value),onKeyDown:s=>s.key==="Enter"&&fe()}),e.jsx(r,{variant:"outline-secondary",size:"sm",type:"button",onClick:fe,disabled:re,children:re?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):"Search"})]})]}),e.jsx("nav",{"aria-label":"breadcrumb",className:"mt-2 mb-0",children:e.jsxs("ol",{className:"breadcrumb mb-0 small py-1",children:[e.jsx("li",{className:"breadcrumb-item",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 text-decoration-none",onClick:()=>c("/"),children:"/"})}),y.map((s,t)=>e.jsx("li",{className:`breadcrumb-item${t===y.length-1?" active":""}`,children:t===y.length-1?s:e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 text-decoration-none",onClick:()=>Xe(t),children:s})},`${s}-${t}`))]})})]})}),e.jsxs(l,{show:ke,onHide:()=>{F(!1),z("")},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"New folder"})}),e.jsxs("form",{onSubmit:He,children:[e.jsx(l.Body,{children:e.jsx("input",{value:se,onChange:s=>z(s.target.value),placeholder:"Folder name",className:"form-control",autoFocus:!0})}),e.jsxs(l.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{F(!1),z("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"success",children:"Create"})]})]})]}),e.jsxs(l,{show:Se,onHide:()=>{$(!1),D("")},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"New file"})}),e.jsxs("form",{onSubmit:Te,children:[e.jsx(l.Body,{children:e.jsx("input",{value:te,onChange:s=>D(s.target.value),placeholder:"filename.txt",className:"form-control",autoFocus:!0})}),e.jsxs(l.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{$(!1),D("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"primary",children:"Create"})]})]})]}),e.jsxs(l,{show:we,onHide:()=>{P(!1),E(null)},centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"Permissions"})}),e.jsx(l.Body,{children:j?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"small font-monospace text-break mb-2",children:f(n,j.name)}),e.jsx("label",{className:"form-label small",children:"Mode (octal)"}),e.jsx("input",{className:"form-control mb-2 font-monospace",value:ne,onChange:s=>ae(s.target.value),placeholder:"0644"}),j.is_dir?e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"checkbox",id:"chmod-rec",checked:le,onChange:s=>ie(s.target.checked)}),e.jsx("label",{className:"form-check-label small",htmlFor:"chmod-rec",children:"Recursive (chmod entire tree)"})]}):null]}):null}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>{P(!1),E(null)},children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:Oe,children:"Apply"})]})]}),e.jsxs(l,{show:Fe,onHide:()=>C(!1),centered:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{children:"Compress to ZIP"})}),e.jsxs(l.Body,{children:[e.jsxs("p",{className:"small text-secondary mb-2",children:[o.length," item(s) selected"]}),e.jsx("label",{className:"form-label small",children:"Archive name"}),e.jsx("input",{className:"form-control font-monospace",value:R,onChange:s=>A(s.target.value)})]}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>C(!1),children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:qe,children:"Create ZIP"})]})]}),e.jsxs(l,{show:ze,onHide:()=>L(!1),size:"lg",scrollable:!0,children:[e.jsx(l.Header,{closeButton:!0,children:e.jsxs(l.Title,{children:["Search results",I?`: “${I}”`:""]})}),e.jsx(l.Body,{children:oe.length===0?e.jsx("p",{className:"text-secondary small mb-0",children:"No matches."}):e.jsx("ul",{className:"list-group list-group-flush",children:oe.map(s=>e.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center",children:[e.jsx("span",{className:"small font-monospace text-break me-2",children:s.path}),e.jsx(r,{size:"sm",variant:"outline-primary",onClick:()=>Ve(s),children:"Open"})]},s.path))})})]}),e.jsxs(l,{show:!!S,onHide:()=>w(null),fullscreen:"lg-down",size:"lg",children:[e.jsx(l.Header,{closeButton:!0,children:e.jsx(l.Title,{className:"text-break small font-monospace",children:S})}),e.jsx(l.Body,{className:"d-flex flex-column p-0",style:{minHeight:400},children:e.jsx("textarea",{value:Z,onChange:s=>J(s.target.value),className:"form-control font-monospace small flex-grow-1 rounded-0 border-0",style:{minHeight:400},spellCheck:!1})}),e.jsxs(l.Footer,{children:[e.jsx(r,{variant:"secondary",onClick:()=>w(null),children:"Cancel"}),e.jsx(r,{variant:"primary",onClick:Ie,disabled:Y,children:Y?"Saving…":"Save"})]})]}),O?e.jsx(ms,{className:"mb-3",children:O}):null,e.jsx("div",{className:"card",children:M?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsxs(e.Fragment,{children:[e.jsxs(hs,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{width:40},children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:u.length>0&&g.size===u.length,onChange:Be,"aria-label":"Select all"})}),e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Size"}),e.jsx("th",{className:"d-none d-lg-table-cell",children:"Modified"}),e.jsx("th",{className:"d-none d-md-table-cell",children:"Permission"}),e.jsx("th",{className:"d-none d-xl-table-cell",children:"Owner"}),e.jsx("th",{className:"text-end",style:{minWidth:120},children:"Operation"})]})}),e.jsx("tbody",{children:u.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"p-0",children:e.jsx(us,{title:"Empty directory",description:"Upload files, create a folder, or adjust the path filter."})})}):u.map(s=>e.jsxs("tr",{children:[e.jsx("td",{onClick:t=>t.stopPropagation(),children:e.jsx("input",{type:"checkbox",className:"form-check-input",checked:g.has(s.name),onChange:()=>De(s.name),"aria-label":`Select ${s.name}`})}),e.jsx("td",{children:s.is_dir?e.jsxs("button",{type:"button",onClick:()=>ue(s),className:"btn btn-link text-start text-decoration-none p-0 d-inline-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-folder text-warning","aria-hidden":!0}),e.jsx("span",{children:s.name})]}):e.jsxs("span",{className:"d-inline-flex align-items-center gap-2",children:[e.jsx("i",{className:"ti ti-file text-secondary","aria-hidden":!0}),s.name]})}),e.jsx("td",{className:"text-secondary small",children:s.is_dir?U[s.name]!==void 0?be(U[s.name]):e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0",onClick:()=>Qe(s),children:"Calculate"}):be(s.size)}),e.jsx("td",{className:"small text-secondary d-none d-lg-table-cell",children:s.mtime??"—"}),e.jsx("td",{className:"small font-monospace d-none d-md-table-cell",children:s.mode_symbolic?e.jsx(e.Fragment,{children:e.jsx("span",{title:`${s.mode_symbolic} (${s.mode})`,children:s.mode_symbolic})}):s.mode??"—"}),e.jsx("td",{className:"small d-none d-xl-table-cell",children:s.owner?`${s.owner}:${s.group??""}`:"—"}),e.jsx("td",{className:"text-end",children:(x==null?void 0:x.name)===s.name?e.jsxs("span",{className:"d-inline-flex gap-1 align-items-center flex-wrap justify-content-end",children:[e.jsx("input",{value:T,onChange:t=>_(t.target.value),onKeyDown:t=>t.key==="Enter"&&je(),className:"form-control form-control-sm",style:{width:"7rem"},autoFocus:!0}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Save",onClick:je,children:e.jsx("i",{className:"ti ti-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm p-1",onClick:()=>{B(null),_("")},children:"Cancel"})]}):e.jsxs(d,{align:"end",onClick:t=>t.stopPropagation(),children:[e.jsx(d.Toggle,{variant:"light",size:"sm",className:"py-0 border",children:"More"}),e.jsxs(d.Menu,{children:[s.is_dir?e.jsxs(d.Item,{onClick:()=>ue(s),children:[e.jsx("i",{className:"ti ti-folder-open me-2"}),"Open"]}):e.jsxs(e.Fragment,{children:[e.jsxs(d.Item,{onClick:()=>xe(s),disabled:ve===s.name,children:[e.jsx("i",{className:"ti ti-download me-2"}),"Download"]}),Me(s.name)?e.jsxs(d.Item,{onClick:()=>Ee(s),children:[e.jsx("i",{className:"ti ti-edit me-2"}),"Edit"]}):null]}),e.jsx(d.Divider,{}),e.jsxs(d.Item,{onClick:()=>{b({op:"copy",entries:[{parent:n,name:s.name}]})},children:[e.jsx("i",{className:"ti ti-copy me-2"}),"Copy"]}),e.jsxs(d.Item,{onClick:()=>{b({op:"cut",entries:[{parent:n,name:s.name}]})},children:[e.jsx("i",{className:"ti ti-cut me-2"}),"Cut"]}),e.jsxs(d.Item,{onClick:()=>{B(s),_(s.name)},children:[e.jsx("i",{className:"ti ti-pencil me-2"}),"Rename"]}),e.jsxs(d.Item,{onClick:()=>Ke(s),children:[e.jsx("i",{className:"ti ti-lock me-2"}),"Permission"]}),e.jsxs(d.Item,{onClick:()=>{N(new Set([s.name])),A(`${s.name.replace(/\.[^/.]+$/,"")||"archive"}.zip`),C(!0)},children:[e.jsx("i",{className:"ti ti-file-zip me-2"}),"Compress"]}),e.jsx(d.Divider,{}),e.jsxs(d.Item,{className:"text-danger",onClick:()=>Re(s),children:[e.jsx("i",{className:"ti ti-trash me-2"}),"Delete"]})]})]})})]},s.name))})]}),!M&&u.length>0?e.jsxs("div",{className:"card-footer py-2 small text-secondary d-flex flex-wrap gap-3",children:[e.jsxs("span",{children:["Directories:"," ",e.jsx("strong",{children:u.filter(s=>s.is_dir).length})]}),e.jsxs("span",{children:["Files:"," ",e.jsx("strong",{children:u.filter(s=>!s.is_dir).length})]}),e.jsxs("span",{children:["Showing ",e.jsx("strong",{children:u.length})," of ",e.jsx("strong",{children:k.length})," in folder"]})]}):null]})}),h&&h.entries.length>0?e.jsxs("div",{className:"alert alert-light border mt-3 mb-0 small py-2",children:[e.jsx("i",{className:"ti ti-clipboard me-1","aria-hidden":!0}),"Clipboard: ",e.jsx("strong",{children:h.op})," (",h.entries.length," item) — use ",e.jsx("strong",{children:"Paste"})," in the target folder."]}):null]})}export{vs as FilesPage}; diff --git a/YakPanel-server/frontend/dist/assets/FirewallPage-DfITVzrM.js b/YakPanel-server/frontend/dist/assets/FirewallPage-Bu-mOiN9.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/FirewallPage-DfITVzrM.js rename to YakPanel-server/frontend/dist/assets/FirewallPage-Bu-mOiN9.js index 43667eef..0fc30b9f 100644 --- a/YakPanel-server/frontend/dist/assets/FirewallPage-DfITVzrM.js +++ b/YakPanel-server/frontend/dist/assets/FirewallPage-Bu-mOiN9.js @@ -1 +1 @@ -import{r as t,j as e,a as p,N as k}from"./index-cE9w-Kq7.js";import{M as r}from"./Modal-CL3xZqxR.js";import{A as y}from"./AdminAlert-yrdXFH0e.js";import{A as c}from"./AdminButton-ByutG8m-.js";import{A as D}from"./AdminTable-eCi7S__-.js";import{E as H}from"./EmptyState-CmnFWkSO.js";import{P as g}from"./PageHeader-HdM4gpcn.js";function W(){const[o,v]=t.useState([]),[A,x]=t.useState(!0),[u,d]=t.useState(""),[w,a]=t.useState(!1),[j,f]=t.useState(!1),[N,m]=t.useState(""),[h,b]=t.useState(!1),n=()=>{x(!0),p("/firewall/list").then(v).catch(s=>d(s.message)).finally(()=>x(!1))};t.useEffect(()=>{n()},[]);const S=s=>{s.preventDefault();const l=s.currentTarget,i=l.elements.namedItem("port").value.trim(),E=l.elements.namedItem("protocol").value,F=l.elements.namedItem("action").value,R=l.elements.namedItem("ps").value.trim();if(!i){m("Port is required");return}f(!0),m(""),p("/firewall/create",{method:"POST",body:JSON.stringify({port:i,protocol:E,action:F,ps:R})}).then(()=>{a(!1),l.reset(),n()}).catch(T=>m(T.message)).finally(()=>f(!1))},C=(s,l)=>{confirm(`Delete rule for port ${l}?`)&&p(`/firewall/${s}`,{method:"DELETE"}).then(n).catch(i=>d(i.message))},P=()=>{b(!0),k().then(()=>n()).catch(s=>d(s.message)).finally(()=>b(!1))};return A?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(c,{variant:"success",disabled:h||o.length===0,onClick:P,children:[h?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),h?"Applying…":"Apply to UFW"]}),e.jsxs(c,{variant:"primary",onClick:()=>a(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Rule"]})]})}),u?e.jsx(y,{className:"mb-3",children:u}):null,e.jsxs("div",{className:"alert alert-warning small mb-3",children:['Rules are stored in the panel. Click "Apply to UFW" to run ',e.jsx("code",{className:"font-monospace",children:"ufw allow/deny"})," for each rule."]}),e.jsxs(r,{show:w,onHide:()=>a(!1),centered:!0,children:[e.jsx(r.Header,{closeButton:!0,children:e.jsx(r.Title,{children:"Add Firewall Rule"})}),e.jsxs("form",{onSubmit:S,children:[e.jsxs(r.Body,{children:[N?e.jsx(y,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Port"}),e.jsx("input",{name:"port",type:"text",placeholder:"80 or 80-90 or 80,443",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Protocol"}),e.jsxs("select",{name:"protocol",className:"form-select",children:[e.jsx("option",{value:"tcp",children:"TCP"}),e.jsx("option",{value:"udp",children:"UDP"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Action"}),e.jsxs("select",{name:"action",className:"form-select",children:[e.jsx("option",{value:"accept",children:"Accept"}),e.jsx("option",{value:"drop",children:"Drop"}),e.jsx("option",{value:"reject",children:"Reject"})]})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"HTTP",className:"form-control"})]})]}),e.jsxs(r.Footer,{children:[e.jsx(c,{type:"button",variant:"secondary",onClick:()=>a(!1),children:"Cancel"}),e.jsx(c,{type:"submit",variant:"primary",disabled:j,children:j?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Port"}),e.jsx("th",{children:"Protocol"}),e.jsx("th",{children:"Action"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(H,{title:"No rules",description:'Click "Add Rule" to create one.'})})}):o.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.port}),e.jsx("td",{children:s.protocol}),e.jsx("td",{children:s.action}),e.jsx("td",{children:s.ps||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>C(s.id,s.port),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})})]},s.id))})]})})]})}export{W as FirewallPage}; +import{r as t,j as e,a as p,V as k}from"./index-CRR9sQ49.js";import{M as r}from"./Modal-B7V4w_St.js";import{A as y}from"./AdminAlert-DW1IRWce.js";import{A as c}from"./AdminButton-Bd2cLTu3.js";import{A as D}from"./AdminTable-BLiLxfnS.js";import{E as H}from"./EmptyState-C61VdEFl.js";import{P as g}from"./PageHeader-BcjNf7GG.js";function W(){const[o,v]=t.useState([]),[A,x]=t.useState(!0),[u,d]=t.useState(""),[w,a]=t.useState(!1),[j,f]=t.useState(!1),[N,m]=t.useState(""),[h,b]=t.useState(!1),n=()=>{x(!0),p("/firewall/list").then(v).catch(s=>d(s.message)).finally(()=>x(!1))};t.useEffect(()=>{n()},[]);const S=s=>{s.preventDefault();const l=s.currentTarget,i=l.elements.namedItem("port").value.trim(),E=l.elements.namedItem("protocol").value,F=l.elements.namedItem("action").value,R=l.elements.namedItem("ps").value.trim();if(!i){m("Port is required");return}f(!0),m(""),p("/firewall/create",{method:"POST",body:JSON.stringify({port:i,protocol:E,action:F,ps:R})}).then(()=>{a(!1),l.reset(),n()}).catch(T=>m(T.message)).finally(()=>f(!1))},C=(s,l)=>{confirm(`Delete rule for port ${l}?`)&&p(`/firewall/${s}`,{method:"DELETE"}).then(n).catch(i=>d(i.message))},P=()=>{b(!0),k().then(()=>n()).catch(s=>d(s.message)).finally(()=>b(!1))};return A?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Security / Firewall",actions:e.jsxs("div",{className:"d-flex flex-wrap gap-2",children:[e.jsxs(c,{variant:"success",disabled:h||o.length===0,onClick:P,children:[h?e.jsx("span",{className:"spinner-border spinner-border-sm me-1",role:"status"}):e.jsx("i",{className:"ti ti-bolt me-1","aria-hidden":!0}),h?"Applying…":"Apply to UFW"]}),e.jsxs(c,{variant:"primary",onClick:()=>a(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Rule"]})]})}),u?e.jsx(y,{className:"mb-3",children:u}):null,e.jsxs("div",{className:"alert alert-warning small mb-3",children:['Rules are stored in the panel. Click "Apply to UFW" to run ',e.jsx("code",{className:"font-monospace",children:"ufw allow/deny"})," for each rule."]}),e.jsxs(r,{show:w,onHide:()=>a(!1),centered:!0,children:[e.jsx(r.Header,{closeButton:!0,children:e.jsx(r.Title,{children:"Add Firewall Rule"})}),e.jsxs("form",{onSubmit:S,children:[e.jsxs(r.Body,{children:[N?e.jsx(y,{className:"mb-3",children:N}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Port"}),e.jsx("input",{name:"port",type:"text",placeholder:"80 or 80-90 or 80,443",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Protocol"}),e.jsxs("select",{name:"protocol",className:"form-select",children:[e.jsx("option",{value:"tcp",children:"TCP"}),e.jsx("option",{value:"udp",children:"UDP"})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Action"}),e.jsxs("select",{name:"action",className:"form-select",children:[e.jsx("option",{value:"accept",children:"Accept"}),e.jsx("option",{value:"drop",children:"Drop"}),e.jsx("option",{value:"reject",children:"Reject"})]})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"HTTP",className:"form-control"})]})]}),e.jsxs(r.Footer,{children:[e.jsx(c,{type:"button",variant:"secondary",onClick:()=>a(!1),children:"Cancel"}),e.jsx(c,{type:"submit",variant:"primary",disabled:j,children:j?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Port"}),e.jsx("th",{children:"Protocol"}),e.jsx("th",{children:"Action"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(H,{title:"No rules",description:'Click "Add Rule" to create one.'})})}):o.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.port}),e.jsx("td",{children:s.protocol}),e.jsx("td",{children:s.action}),e.jsx("td",{children:s.ps||"—"}),e.jsx("td",{className:"text-end",children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>C(s.id,s.port),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})})]},s.id))})]})})]})}export{W as FirewallPage}; diff --git a/YakPanel-server/frontend/dist/assets/FtpPage-CR_nYo9X.js b/YakPanel-server/frontend/dist/assets/FtpPage-DG8coQcY.js similarity index 94% rename from YakPanel-server/frontend/dist/assets/FtpPage-CR_nYo9X.js rename to YakPanel-server/frontend/dist/assets/FtpPage-DG8coQcY.js index 53147c44..557ddf91 100644 --- a/YakPanel-server/frontend/dist/assets/FtpPage-CR_nYo9X.js +++ b/YakPanel-server/frontend/dist/assets/FtpPage-DG8coQcY.js @@ -1 +1 @@ -import{r,j as e,a as x,A as q}from"./index-cE9w-Kq7.js";import{M as t}from"./Modal-CL3xZqxR.js";import{A as j}from"./AdminAlert-yrdXFH0e.js";import{A as D}from"./AdminButton-ByutG8m-.js";import{A as B}from"./AdminTable-eCi7S__-.js";import{E as H}from"./EmptyState-CmnFWkSO.js";import{P as b}from"./PageHeader-HdM4gpcn.js";function J(){const[f,F]=r.useState([]),[T,N]=r.useState(!0),[w,g]=r.useState(""),[S,c]=r.useState(!1),[P,y]=r.useState(!1),[v,m]=r.useState(""),[h,i]=r.useState(null),[C,o]=r.useState(""),u=()=>{N(!0),x("/ftp/list").then(F).catch(s=>g(s.message)).finally(()=>N(!1))};r.useEffect(()=>{u()},[]);const A=s=>{s.preventDefault();const a=s.currentTarget,n=a.elements.namedItem("name").value.trim(),l=a.elements.namedItem("password").value,d=a.elements.namedItem("path").value.trim(),p=a.elements.namedItem("ps").value.trim();if(!n||!l||!d){m("Name, password and path are required");return}y(!0),m(""),x("/ftp/create",{method:"POST",body:JSON.stringify({name:n,password:l,path:d,ps:p})}).then(()=>{c(!1),a.reset(),u()}).catch(k=>m(k.message)).finally(()=>y(!1))},E=(s,a)=>{s.preventDefault();const n=s.currentTarget,l=n.elements.namedItem("new_password").value,d=n.elements.namedItem("confirm_password").value;if(!l||l.length<6){o("Password must be at least 6 characters");return}if(l!==d){o("Passwords do not match");return}o(""),q(a,l).then(()=>i(null)).catch(p=>o(p.message))},I=(s,a)=>{confirm(`Delete FTP account "${a}"?`)&&x(`/ftp/${s}`,{method:"DELETE"}).then(u).catch(n=>g(n.message))};return T?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):w?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx(j,{variant:"danger",children:w})]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP",actions:e.jsxs(D,{onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add FTP"]})}),e.jsxs("div",{className:"alert alert-secondary",role:"note",children:["FTP accounts use Pure-FTPd (pure-pw). Path must be under www root. Install:"," ",e.jsx("code",{children:"apt install pure-ftpd pure-ftpd-common"})]}),e.jsxs(t,{show:S,onHide:()=>c(!1),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Create FTP Account"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[v?e.jsx(j,{variant:"danger",children:v}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"name",type:"text",placeholder:"ftpuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My FTP",className:"form-control"})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>c(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:P,className:"btn btn-primary",children:P?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(B,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Path"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:f.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(H,{title:"No FTP accounts",description:'Click "Add FTP" to create one.'})})}):f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.path}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[e.jsx("button",{type:"button",onClick:()=>i(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>I(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(t,{show:h!=null,onHide:()=>i(null),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Change FTP Password"})}),h!=null?e.jsxs("form",{onSubmit:s=>E(s,h),children:[e.jsxs(t.Body,{children:[C?e.jsx(j,{variant:"danger",children:C}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>i(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{J as FtpPage}; +import{r,j as e,a as x,I as q}from"./index-CRR9sQ49.js";import{M as t}from"./Modal-B7V4w_St.js";import{A as j}from"./AdminAlert-DW1IRWce.js";import{A as D}from"./AdminButton-Bd2cLTu3.js";import{A as B}from"./AdminTable-BLiLxfnS.js";import{E as H}from"./EmptyState-C61VdEFl.js";import{P as b}from"./PageHeader-BcjNf7GG.js";function J(){const[f,F]=r.useState([]),[T,N]=r.useState(!0),[w,g]=r.useState(""),[S,c]=r.useState(!1),[P,y]=r.useState(!1),[v,m]=r.useState(""),[h,i]=r.useState(null),[C,o]=r.useState(""),u=()=>{N(!0),x("/ftp/list").then(F).catch(s=>g(s.message)).finally(()=>N(!1))};r.useEffect(()=>{u()},[]);const A=s=>{s.preventDefault();const a=s.currentTarget,n=a.elements.namedItem("name").value.trim(),l=a.elements.namedItem("password").value,d=a.elements.namedItem("path").value.trim(),p=a.elements.namedItem("ps").value.trim();if(!n||!l||!d){m("Name, password and path are required");return}y(!0),m(""),x("/ftp/create",{method:"POST",body:JSON.stringify({name:n,password:l,path:d,ps:p})}).then(()=>{c(!1),a.reset(),u()}).catch(k=>m(k.message)).finally(()=>y(!1))},E=(s,a)=>{s.preventDefault();const n=s.currentTarget,l=n.elements.namedItem("new_password").value,d=n.elements.namedItem("confirm_password").value;if(!l||l.length<6){o("Password must be at least 6 characters");return}if(l!==d){o("Passwords do not match");return}o(""),q(a,l).then(()=>i(null)).catch(p=>o(p.message))},I=(s,a)=>{confirm(`Delete FTP account "${a}"?`)&&x(`/ftp/${s}`,{method:"DELETE"}).then(u).catch(n=>g(n.message))};return T?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):w?e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP"}),e.jsx(j,{variant:"danger",children:w})]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"FTP",actions:e.jsxs(D,{onClick:()=>c(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add FTP"]})}),e.jsxs("div",{className:"alert alert-secondary",role:"note",children:["FTP accounts use Pure-FTPd (pure-pw). Path must be under www root. Install:"," ",e.jsx("code",{children:"apt install pure-ftpd pure-ftpd-common"})]}),e.jsxs(t,{show:S,onHide:()=>c(!1),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Create FTP Account"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[v?e.jsx(j,{variant:"danger",children:v}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"name",type:"text",placeholder:"ftpuser",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My FTP",className:"form-control"})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>c(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:P,className:"btn btn-primary",children:P?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(B,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Path"}),e.jsx("th",{children:"Note"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:f.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"p-0",children:e.jsx(H,{title:"No FTP accounts",description:'Click "Add FTP" to create one.'})})}):f.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:s.name}),e.jsx("td",{className:"align-middle",children:s.path}),e.jsx("td",{className:"align-middle text-muted",children:s.ps||"—"}),e.jsxs("td",{className:"align-middle text-end",children:[e.jsx("button",{type:"button",onClick:()=>i(s.id),className:"btn btn-sm btn-outline-warning me-1",title:"Change password",children:e.jsx("i",{className:"ti ti-key"})}),e.jsx("button",{type:"button",onClick:()=>I(s.id,s.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},s.id))})]})})}),e.jsxs(t,{show:h!=null,onHide:()=>i(null),centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Change FTP Password"})}),h!=null?e.jsxs("form",{onSubmit:s=>E(s,h),children:[e.jsxs(t.Body,{children:[C?e.jsx(j,{variant:"danger",children:C}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"New Password"}),e.jsx("input",{name:"new_password",type:"password",minLength:6,className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Confirm Password"}),e.jsx("input",{name:"confirm_password",type:"password",minLength:6,className:"form-control",required:!0})]})]}),e.jsxs(t.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>i(null),children:"Cancel"}),e.jsx("button",{type:"submit",className:"btn btn-primary",children:"Update"})]})]}):null]})]})}export{J as FtpPage}; diff --git a/YakPanel-server/frontend/dist/assets/LogsPage-B9d2xgc8.js b/YakPanel-server/frontend/dist/assets/LogsPage-B1uIfI5z.js similarity index 95% rename from YakPanel-server/frontend/dist/assets/LogsPage-B9d2xgc8.js rename to YakPanel-server/frontend/dist/assets/LogsPage-B1uIfI5z.js index 7a17ab82..1b8da449 100644 --- a/YakPanel-server/frontend/dist/assets/LogsPage-B9d2xgc8.js +++ b/YakPanel-server/frontend/dist/assets/LogsPage-B1uIfI5z.js @@ -1 +1 @@ -import{r as t,L as p,j as e,M as C}from"./index-cE9w-Kq7.js";import{A as P}from"./AdminAlert-yrdXFH0e.js";import{A as g}from"./AdminButton-ByutG8m-.js";import{P as E}from"./PageHeader-HdM4gpcn.js";function _(a){return a<1024?a+" B":a<1024*1024?(a/1024).toFixed(1)+" KB":(a/1024/1024).toFixed(1)+" MB"}function $(){const[a,j]=t.useState("/"),[m,N]=t.useState([]),[v,x]=t.useState(!0),[h,i]=t.useState(""),[l,y]=t.useState(null),[b,u]=t.useState(""),[o,r]=t.useState(!1),[c,w]=t.useState(500),d=s=>{x(!0),i(""),C(s).then(n=>{j(n.path),N(n.items.sort((f,F)=>f.is_dir===F.is_dir?0:f.is_dir?-1:1))}).catch(n=>i(n.message)).finally(()=>x(!1))};t.useEffect(()=>{d(a)},[]),t.useEffect(()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},[l,c]);const k=s=>{if(s.is_dir){const n=a==="/"?"/"+s.name:a+"/"+s.name;d(n)}else y(a==="/"?s.name:a+"/"+s.name)},L=()=>{const s=a.replace(/\/$/,"").split("/").filter(Boolean);if(s.length<=1)return;s.pop();const n=s.length===0?"/":"/"+s.join("/");d(n)},S=()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},B=a.split("/").filter(Boolean).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"Logs"}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-3",children:[e.jsxs(g,{variant:"secondary",size:"sm",onClick:L,disabled:!B,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsxs("code",{className:"small bg-body-secondary px-2 py-1 rounded text-break",children:["Path: ",a||"/"]})]}),h?e.jsx(P,{className:"mb-3",children:h}):null,e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header small fw-medium",children:"Log files"}),v?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:500},children:m.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"Empty directory"}):m.map(s=>e.jsxs("button",{type:"button",className:"list-group-item list-group-item-action d-flex gap-2 align-items-center",onClick:()=>k(s),children:[e.jsx("i",{className:`ti flex-shrink-0 ${s.is_dir?"ti-folder text-warning":"ti-file text-secondary"}`,"aria-hidden":!0}),e.jsx("span",{className:"text-truncate",children:s.name}),s.is_dir?null:e.jsx("span",{className:"small text-secondary ms-auto flex-shrink-0",children:_(s.size)})]},s.name))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100 d-flex flex-column",style:{minHeight:400},children:[e.jsxs("div",{className:"card-header d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsx("span",{className:"small fw-medium text-truncate",children:l||"Select a log file"}),l?e.jsxs("div",{className:"d-flex align-items-center gap-2 flex-shrink-0",children:[e.jsx("label",{className:"small text-secondary mb-0",children:"Lines:"}),e.jsxs("select",{value:c,onChange:s=>w(Number(s.target.value)),className:"form-select form-select-sm",style:{width:"auto"},children:[e.jsx("option",{value:100,children:"100"}),e.jsx("option",{value:500,children:"500"}),e.jsx("option",{value:1e3,children:"1000"}),e.jsx("option",{value:5e3,children:"5000"}),e.jsx("option",{value:1e4,children:"10000"})]}),e.jsx(g,{variant:"light",size:"sm",onClick:S,disabled:o,title:"Refresh",children:o?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):e.jsx("i",{className:"ti ti-refresh","aria-hidden":!0})})]}):null]}),e.jsx("div",{className:"card-body flex-grow-1 overflow-auto",children:l?o?e.jsx("div",{className:"text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("pre",{className:"font-monospace small mb-0 text-break",style:{whiteSpace:"pre-wrap"},children:b||"(empty)"}):e.jsx("p",{className:"text-secondary small mb-0",children:"Click a log file to view"})})]})})]})]})}export{$ as LogsPage}; +import{r as t,T as p,j as e,U as C}from"./index-CRR9sQ49.js";import{A as P}from"./AdminAlert-DW1IRWce.js";import{A as g}from"./AdminButton-Bd2cLTu3.js";import{P as E}from"./PageHeader-BcjNf7GG.js";function _(a){return a<1024?a+" B":a<1024*1024?(a/1024).toFixed(1)+" KB":(a/1024/1024).toFixed(1)+" MB"}function $(){const[a,j]=t.useState("/"),[m,N]=t.useState([]),[v,x]=t.useState(!0),[h,i]=t.useState(""),[l,y]=t.useState(null),[b,u]=t.useState(""),[o,r]=t.useState(!1),[c,w]=t.useState(500),d=s=>{x(!0),i(""),C(s).then(n=>{j(n.path),N(n.items.sort((f,F)=>f.is_dir===F.is_dir?0:f.is_dir?-1:1))}).catch(n=>i(n.message)).finally(()=>x(!1))};t.useEffect(()=>{d(a)},[]),t.useEffect(()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},[l,c]);const k=s=>{if(s.is_dir){const n=a==="/"?"/"+s.name:a+"/"+s.name;d(n)}else y(a==="/"?s.name:a+"/"+s.name)},L=()=>{const s=a.replace(/\/$/,"").split("/").filter(Boolean);if(s.length<=1)return;s.pop();const n=s.length===0?"/":"/"+s.join("/");d(n)},S=()=>{l&&(r(!0),p(l,c).then(s=>u(s.content)).catch(s=>i(s.message)).finally(()=>r(!1)))},B=a.split("/").filter(Boolean).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:"Logs"}),e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-3",children:[e.jsxs(g,{variant:"secondary",size:"sm",onClick:L,disabled:!B,children:[e.jsx("i",{className:"ti ti-arrow-left me-1","aria-hidden":!0}),"Back"]}),e.jsxs("code",{className:"small bg-body-secondary px-2 py-1 rounded text-break",children:["Path: ",a||"/"]})]}),h?e.jsx(P,{className:"mb-3",children:h}):null,e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100",children:[e.jsx("div",{className:"card-header small fw-medium",children:"Log files"}),v?e.jsx("div",{className:"card-body text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("div",{className:"list-group list-group-flush overflow-auto",style:{maxHeight:500},children:m.length===0?e.jsx("div",{className:"list-group-item text-secondary text-center py-4",children:"Empty directory"}):m.map(s=>e.jsxs("button",{type:"button",className:"list-group-item list-group-item-action d-flex gap-2 align-items-center",onClick:()=>k(s),children:[e.jsx("i",{className:`ti flex-shrink-0 ${s.is_dir?"ti-folder text-warning":"ti-file text-secondary"}`,"aria-hidden":!0}),e.jsx("span",{className:"text-truncate",children:s.name}),s.is_dir?null:e.jsx("span",{className:"small text-secondary ms-auto flex-shrink-0",children:_(s.size)})]},s.name))})]})}),e.jsx("div",{className:"col-lg-6",children:e.jsxs("div",{className:"card h-100 d-flex flex-column",style:{minHeight:400},children:[e.jsxs("div",{className:"card-header d-flex align-items-center justify-content-between gap-2 flex-wrap",children:[e.jsx("span",{className:"small fw-medium text-truncate",children:l||"Select a log file"}),l?e.jsxs("div",{className:"d-flex align-items-center gap-2 flex-shrink-0",children:[e.jsx("label",{className:"small text-secondary mb-0",children:"Lines:"}),e.jsxs("select",{value:c,onChange:s=>w(Number(s.target.value)),className:"form-select form-select-sm",style:{width:"auto"},children:[e.jsx("option",{value:100,children:"100"}),e.jsx("option",{value:500,children:"500"}),e.jsx("option",{value:1e3,children:"1000"}),e.jsx("option",{value:5e3,children:"5000"}),e.jsx("option",{value:1e4,children:"10000"})]}),e.jsx(g,{variant:"light",size:"sm",onClick:S,disabled:o,title:"Refresh",children:o?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):e.jsx("i",{className:"ti ti-refresh","aria-hidden":!0})})]}):null]}),e.jsx("div",{className:"card-body flex-grow-1 overflow-auto",children:l?o?e.jsx("div",{className:"text-center py-5",children:e.jsx("span",{className:"spinner-border text-secondary",role:"status"})}):e.jsx("pre",{className:"font-monospace small mb-0 text-break",style:{whiteSpace:"pre-wrap"},children:b||"(empty)"}):e.jsx("p",{className:"text-secondary small mb-0",children:"Click a log file to view"})})]})})]})]})}export{$ as LogsPage}; diff --git a/YakPanel-server/frontend/dist/assets/Modal-CL3xZqxR.js b/YakPanel-server/frontend/dist/assets/Modal-B7V4w_St.js similarity index 98% rename from YakPanel-server/frontend/dist/assets/Modal-CL3xZqxR.js rename to YakPanel-server/frontend/dist/assets/Modal-B7V4w_St.js index d8589996..107481be 100644 --- a/YakPanel-server/frontend/dist/assets/Modal-CL3xZqxR.js +++ b/YakPanel-server/frontend/dist/assets/Modal-B7V4w_St.js @@ -1 +1 @@ -import{r as a,a2 as vt,a3 as Ee,a4 as W,a5 as q,a6 as xt,a7 as me,a8 as qe,j as f,a9 as y,aa as ge,ab as yt,ac as De,ad as I,ae as Rt,af as Tt,ag as $e,ah as X,ai as Z,aj as ke,ak as bt,al as Ue,am as Ct}from"./index-cE9w-Kq7.js";function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Me(e,t)}function Nt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Me(e,t)}const Ot=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",wt=typeof document<"u",Pe=wt||Ot?a.useLayoutEffect:a.useEffect;var Ze={exports:{}},St="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kt=St,Mt=kt;function Je(){}function Qe(){}Qe.resetWarningCache=Je;var jt=function(){function e(r,o,s,i,l,c){if(c!==Mt){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Qe,resetWarningCache:Je};return n.PropTypes=n,n};Ze.exports=jt();var Dt=Ze.exports;const Ce=vt(Dt);function Lt(e){var t=Ee(e);return t&&t.defaultView||window}function At(e,t){return Lt(e).getComputedStyle(e,t)}var Bt=/([A-Z])/g;function Ft(e){return e.replace(Bt,"-$1").toLowerCase()}var It=/^ms-/;function pe(e){return Ft(e).replace(It,"-ms-")}var _t=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Wt(e){return!!(e&&_t.test(e))}function $(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(pe(t))||At(e).getPropertyValue(pe(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(pe(o)):Wt(o)?r+=o+"("+s+") ":n+=pe(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const He={disabled:!1},et=W.createContext(null);var $t=function(t){return t.scrollTop},oe="unmounted",F="exited",D="entering",_="entered",je="exiting",O=function(e){Nt(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=F,s.appearStatus=D):c=_:r.unmountOnExit||r.mountOnEnter?c=oe:c=F,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===oe?{status:F}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==D&&i!==_&&(s=D):(i===D||i===_)&&(s=je)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===D){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this);i&&$t(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===F&&this.setState({status:oe})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[q.findDOMNode(this),l],u=c[0],h=c[1],E=this.getTimeouts(),m=l?E.appear:E.enter;if(!o&&!i||He.disabled){this.safeSetState({status:_},function(){s.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:D},function(){s.props.onEntering(u,h),s.onTransitionEnd(m,function(){s.safeSetState({status:_},function(){s.props.onEntered(u,h)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:q.findDOMNode(this);if(!s||He.disabled){this.safeSetState({status:F},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:je},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:F},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],h=c[1];this.props.addEndListener(u,h)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===oe)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=xt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(et.Provider,{value:null},typeof i=="function"?i(o,l):W.cloneElement(W.Children.only(i),l))},t}(W.Component);O.contextType=et;O.propTypes={};function z(){}O.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:z,onEntering:z,onEntered:z,onExit:z,onExiting:z,onExited:z};O.UNMOUNTED=oe;O.EXITED=F;O.ENTERING=D;O.ENTERED=_;O.EXITING=je;function Ut(e){return e.code==="Escape"||e.keyCode===27}function Pt(){const e=a.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}function ve(e){if(!e||typeof e=="function")return null;const{major:t}=Pt();return t>=19?e.props.ref:e.ref}function Ht(e,t,n,r){if(r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function Gt(e){var t=$(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function Vt(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||Ht(e,"transitionend",!0)},t+n),s=me(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function tt(e,t,n,r){n==null&&(n=Gt(e)||0);var o=Vt(e,n,r),s=me(e,"transitionend",t);return function(){o(),s()}}function Ge(e,t){const n=$(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Kt(e,t){const n=Ge(e,"transitionDuration"),r=Ge(e,"transitionDelay"),o=tt(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Xt(e){e.offsetHeight}function zt(e){return e&&"setState"in e?q.findDOMNode(e):e??null}const nt=W.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},h)=>{const E=a.useRef(null),m=qe(E,c),x=b=>{m(zt(b))},v=b=>k=>{b&&E.current&&b(E.current,k)},w=a.useCallback(v(e),[e]),L=a.useCallback(v(t),[t]),R=a.useCallback(v(n),[n]),A=a.useCallback(v(r),[r]),S=a.useCallback(v(o),[o]),T=a.useCallback(v(s),[s]),N=a.useCallback(v(i),[i]);return f.jsx(O,{ref:h,...u,onEnter:w,onEntered:R,onEntering:L,onExit:A,onExited:T,onExiting:S,addEndListener:N,nodeRef:E,children:typeof l=="function"?(b,k)=>l(b,{...k,ref:x}):W.cloneElement(l,{ref:x})})});nt.displayName="TransitionWrapper";const Yt=e=>a.forwardRef((t,n)=>f.jsx("div",{...t,ref:n,className:y(t.className,e)})),qt={[D]:"show",[_]:"show"},Le=a.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=a.useCallback((c,u)=>{Xt(c),r==null||r(c,u)},[r]);return f.jsx(nt,{ref:s,addEndListener:Kt,...i,onEnter:l,childRef:ve(t),children:(c,u)=>a.cloneElement(t,{...u,className:y("fade",e,t.props.className,qt[c],n[c])})})});Le.displayName="Fade";const Zt={"aria-label":Ce.string,onClick:Ce.func,variant:Ce.oneOf(["white"])},Ae=a.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>f.jsx("button",{ref:o,type:"button",className:y("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));Ae.displayName="CloseButton";Ae.propTypes=Zt;function Jt(e){const t=a.useRef(e);return t.current=e,t}function Qt(e){const t=Jt(e);a.useEffect(()=>()=>t.current(),[])}const Ve=e=>!e||typeof e=="function"?e:t=>{e.current=t};function en(e,t){const n=Ve(e),r=Ve(t);return o=>{n&&n(o),r&&r(o)}}function Be(e,t){return a.useMemo(()=>en(e,t),[e,t])}var he;function Ke(e){if((!he&&he!==0||e)&&ge){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),he=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return he}function tn(){return a.useState(null)}function Ne(e){e===void 0&&(e=Ee());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function nn(e){const t=a.useRef(e);return t.current=e,t}function rn(e){const t=nn(e);a.useEffect(()=>()=>t.current(),[])}function on(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Xe=yt("modal-open");class Fe{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return on(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt($(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Xe,""),$(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Xe),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Oe=(e,t)=>ge?e==null?(t||Ee()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function sn(e,t){const n=De(),[r,o]=a.useState(()=>Oe(e,n==null?void 0:n.document));if(!r){const s=Oe(e);s&&o(s)}return a.useEffect(()=>{},[t,r]),a.useEffect(()=>{const s=Oe(e);s!==r&&o(s)},[e,r]),r}function an({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=a.useRef(null),i=a.useRef(t),l=I(n);a.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=Be(s,ve(e)),u=a.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const ln=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function cn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function un(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:o,onExiting:s,onExited:i,addEndListener:l,children:c}=e,u=cn(e,ln);const h=a.useRef(null),E=Be(h,ve(c)),m=T=>N=>{T&&h.current&&T(h.current,N)},x=a.useCallback(m(t),[t]),v=a.useCallback(m(n),[n]),w=a.useCallback(m(r),[r]),L=a.useCallback(m(o),[o]),R=a.useCallback(m(s),[s]),A=a.useCallback(m(i),[i]),S=a.useCallback(m(l),[l]);return Object.assign({},u,{nodeRef:h},t&&{onEnter:x},n&&{onEntering:v},r&&{onEntered:w},o&&{onExit:L},s&&{onExiting:R},i&&{onExited:A},l&&{addEndListener:S},{children:typeof c=="function"?(T,N)=>c(T,Object.assign({},N,{ref:E})):a.cloneElement(c,{ref:E})})}const dn=["component"];function fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const pn=a.forwardRef((e,t)=>{let{component:n}=e,r=fn(e,dn);const o=un(r);return f.jsx(n,Object.assign({ref:t},o))});function hn({in:e,onTransition:t}){const n=a.useRef(null),r=a.useRef(!0),o=I(t);return Pe(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function mn({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=a.useState(!t);t&&s&&i(!1);const l=hn({in:!!t,onTransition:u=>{const h=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(h,E=>{throw u.in||i(!0),E})}}),c=Be(l,ve(e));return s&&!t?null:a.cloneElement(e,{ref:c})}function ze(e,t,n){return e?f.jsx(pn,Object.assign({},n,{component:e})):t?f.jsx(mn,Object.assign({},n,{transition:t})):f.jsx(an,Object.assign({},n))}const En=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function gn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}let we;function vn(e){return we||(we=new Fe({ownerDocument:e==null?void 0:e.document})),we}function xn(e){const t=De(),n=e||vn(t),r=a.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:a.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:a.useCallback(o=>{r.current.backdrop=o},[])})}const rt=a.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:h,transition:E,runTransition:m,backdropTransition:x,runBackdropTransition:v,autoFocus:w=!0,enforceFocus:L=!0,restoreFocus:R=!0,restoreFocusOptions:A,renderDialog:S,renderBackdrop:T=p=>f.jsx("div",Object.assign({},p)),manager:N,container:b,onShow:k,onHide:J=()=>{},onExit:xe,onExited:Q,onExiting:se,onEnter:ae,onEntering:ie,onEntered:le}=e,ye=gn(e,En);const M=De(),U=sn(b),g=xn(N),Re=Rt(),ce=Tt(n),[B,P]=a.useState(!n),C=a.useRef(null);a.useImperativeHandle(t,()=>g,[g]),ge&&!ce&&n&&(C.current=Ne(M==null?void 0:M.document)),n&&B&&P(!1);const j=I(()=>{if(g.add(),H.current=me(document,"keydown",be),te.current=me(document,"focus",()=>setTimeout(Te),!0),k&&k(),w){var p,fe;const re=Ne((p=(fe=g.dialog)==null?void 0:fe.ownerDocument)!=null?p:M==null?void 0:M.document);g.dialog&&re&&!$e(g.dialog,re)&&(C.current=re,g.dialog.focus())}}),ee=I(()=>{if(g.remove(),H.current==null||H.current(),te.current==null||te.current(),R){var p;(p=C.current)==null||p.focus==null||p.focus(A),C.current=null}});a.useEffect(()=>{!n||!U||j()},[n,U,j]),a.useEffect(()=>{B&&ee()},[B,ee]),rn(()=>{ee()});const Te=I(()=>{if(!L||!Re()||!g.isTopModal())return;const p=Ne(M==null?void 0:M.document);g.dialog&&p&&!$e(g.dialog,p)&&g.dialog.focus()}),ue=I(p=>{p.target===p.currentTarget&&(u==null||u(p),l===!0&&J())}),be=I(p=>{c&&Ut(p)&&g.isTopModal()&&(h==null||h(p),p.defaultPrevented||J())}),te=a.useRef(),H=a.useRef(),de=(...p)=>{P(!0),Q==null||Q(...p)};if(!U)return null;const G=Object.assign({role:r,ref:g.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},ye,{style:s,className:o,tabIndex:-1});let ne=S?S(G):f.jsx("div",Object.assign({},G,{children:a.cloneElement(i,{role:"document"})}));ne=ze(E,m,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:xe,onExiting:se,onExited:de,onEnter:ae,onEntering:ie,onEntered:le,children:ne});let V=null;return l&&(V=T({ref:g.setBackdropRef,onClick:ue}),V=ze(x,v,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:V})),f.jsx(f.Fragment,{children:q.createPortal(f.jsxs(f.Fragment,{children:[V,ne]}),U)})});rt.displayName="Modal";const yn=Object.assign(rt,{Manager:Fe});function Rn(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Tn(e,t){e.classList?e.classList.add(t):Rn(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Ye(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function bn(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Ye(e.className,t):e.setAttribute("class",Ye(e.className&&e.className.baseVal||"",t))}const Y={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Cn extends Fe{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,$(n,{[t]:`${parseFloat($(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],$(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(Tn(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),X(n,Y.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();bn(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.restore(r,s)),X(n,Y.STICKY_CONTENT).forEach(s=>this.restore(o,s)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Se;function Nn(e){return Se||(Se=new Cn(e)),Se}const ot=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-body"),f.jsx(n,{ref:o,className:y(e,t),...r})));ot.displayName="ModalBody";const st=a.createContext({onHide(){}}),Ie=a.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=Z(e,"modal");const h=`${e}-dialog`,E=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return f.jsx("div",{...c,ref:u,className:y(h,t,o&&`${e}-${o}`,r&&`${h}-centered`,l&&`${h}-scrollable`,s&&E),children:f.jsx("div",{className:y(`${e}-content`,n),children:i})})});Ie.displayName="ModalDialog";const at=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-footer"),f.jsx(n,{ref:o,className:y(e,t),...r})));at.displayName="ModalFooter";const it=a.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=a.useContext(st),c=ke(()=>{l==null||l.onHide(),r==null||r()});return f.jsxs("div",{ref:i,...s,children:[o,n&&f.jsx(Ae,{"aria-label":e,variant:t,onClick:c})]})});it.displayName="AbstractModalHeader";const lt=a.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=Z(e,"modal-header"),f.jsx(it,{ref:s,...o,className:y(t,e),closeLabel:n,closeButton:r})));lt.displayName="ModalHeader";const On=Yt("h4"),ct=a.forwardRef(({className:e,bsPrefix:t,as:n=On,...r},o)=>(t=Z(t,"modal-title"),f.jsx(n,{ref:o,className:y(e,t),...r})));ct.displayName="ModalTitle";function wn(e){return f.jsx(Le,{...e,timeout:null})}function Sn(e){return f.jsx(Le,{...e,timeout:null})}const ut=a.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=Ie,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":h,show:E=!1,animation:m=!0,backdrop:x=!0,keyboard:v=!0,onEscapeKeyDown:w,onShow:L,onHide:R,container:A,autoFocus:S=!0,enforceFocus:T=!0,restoreFocus:N=!0,restoreFocusOptions:b,onEntered:k,onExit:J,onExiting:xe,onEnter:Q,onEntering:se,onExited:ae,backdropClassName:ie,manager:le,...ye},M)=>{const[U,g]=a.useState({}),[Re,ce]=a.useState(!1),B=a.useRef(!1),P=a.useRef(!1),C=a.useRef(null),[j,ee]=tn(),Te=qe(M,ee),ue=ke(R),be=bt();e=Z(e,"modal");const te=a.useMemo(()=>({onHide:ue}),[ue]);function H(){return le||Nn({isRTL:be})}function de(d){if(!ge)return;const K=H().getScrollbarWidth()>0,We=d.scrollHeight>Ee(d).documentElement.clientHeight;g({paddingRight:K&&!We?Ke():void 0,paddingLeft:!K&&We?Ke():void 0})}const G=ke(()=>{j&&de(j.dialog)});Qt(()=>{Ue(window,"resize",G),C.current==null||C.current()});const ne=()=>{B.current=!0},V=d=>{B.current&&j&&d.target===j.dialog&&(P.current=!0),B.current=!1},p=()=>{ce(!0),C.current=tt(j.dialog,()=>{ce(!1)})},fe=d=>{d.target===d.currentTarget&&p()},re=d=>{if(x==="static"){fe(d);return}if(P.current||d.target!==d.currentTarget){P.current=!1;return}R==null||R()},dt=d=>{v?w==null||w(d):(d.preventDefault(),x==="static"&&p())},ft=(d,K)=>{d&&de(d),Q==null||Q(d,K)},pt=d=>{C.current==null||C.current(),J==null||J(d)},ht=(d,K)=>{se==null||se(d,K),Ct(window,"resize",G)},mt=d=>{d&&(d.style.display=""),ae==null||ae(d),Ue(window,"resize",G)},Et=a.useCallback(d=>f.jsx("div",{...d,className:y(`${e}-backdrop`,ie,!m&&"show")}),[m,ie,e]),_e={...n,...U};_e.display="block";const gt=d=>f.jsx("div",{role:"dialog",...d,style:_e,className:y(t,e,Re&&`${e}-static`,!m&&"show"),onClick:x?re:void 0,onMouseUp:V,"data-bs-theme":l,"aria-label":h,"aria-labelledby":c,"aria-describedby":u,children:f.jsx(i,{...ye,onMouseDown:ne,className:r,contentClassName:o,children:s})});return f.jsx(st.Provider,{value:te,children:f.jsx(yn,{show:E,ref:Te,backdrop:x,container:A,keyboard:!0,autoFocus:S,enforceFocus:T,restoreFocus:N,restoreFocusOptions:b,onEscapeKeyDown:dt,onShow:L,onHide:R,onEnter:ft,onEntering:ht,onEntered:k,onExit:pt,onExiting:xe,onExited:mt,manager:H(),transition:m?wn:void 0,backdropTransition:m?Sn:void 0,renderBackdrop:Et,renderDialog:gt})})});ut.displayName="Modal";const Mn=Object.assign(ut,{Body:ot,Header:lt,Title:ct,Footer:at,Dialog:Ie,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});export{Mn as M}; +import{r as a,aa as vt,ab as Ee,ac as W,ad as q,ae as xt,af as me,ag as qe,j as f,ah as y,ai as ge,aj as yt,ak as De,al as I,am as Rt,an as Tt,ao as $e,ap as X,aq as Z,ar as ke,as as bt,at as Ue,au as Ct}from"./index-CRR9sQ49.js";function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Me(e,t)}function Nt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Me(e,t)}const Ot=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",wt=typeof document<"u",Pe=wt||Ot?a.useLayoutEffect:a.useEffect;var Ze={exports:{}},St="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kt=St,Mt=kt;function Je(){}function Qe(){}Qe.resetWarningCache=Je;var jt=function(){function e(r,o,s,i,l,c){if(c!==Mt){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Qe,resetWarningCache:Je};return n.PropTypes=n,n};Ze.exports=jt();var Dt=Ze.exports;const Ce=vt(Dt);function Lt(e){var t=Ee(e);return t&&t.defaultView||window}function At(e,t){return Lt(e).getComputedStyle(e,t)}var Bt=/([A-Z])/g;function Ft(e){return e.replace(Bt,"-$1").toLowerCase()}var It=/^ms-/;function pe(e){return Ft(e).replace(It,"-ms-")}var _t=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Wt(e){return!!(e&&_t.test(e))}function $(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(pe(t))||At(e).getPropertyValue(pe(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(pe(o)):Wt(o)?r+=o+"("+s+") ":n+=pe(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const He={disabled:!1},et=W.createContext(null);var $t=function(t){return t.scrollTop},oe="unmounted",F="exited",D="entering",_="entered",je="exiting",O=function(e){Nt(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=F,s.appearStatus=D):c=_:r.unmountOnExit||r.mountOnEnter?c=oe:c=F,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===oe?{status:F}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==D&&i!==_&&(s=D):(i===D||i===_)&&(s=je)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===D){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this);i&&$t(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===F&&this.setState({status:oe})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[q.findDOMNode(this),l],u=c[0],h=c[1],E=this.getTimeouts(),m=l?E.appear:E.enter;if(!o&&!i||He.disabled){this.safeSetState({status:_},function(){s.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:D},function(){s.props.onEntering(u,h),s.onTransitionEnd(m,function(){s.safeSetState({status:_},function(){s.props.onEntered(u,h)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:q.findDOMNode(this);if(!s||He.disabled){this.safeSetState({status:F},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:je},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:F},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:q.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],h=c[1];this.props.addEndListener(u,h)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===oe)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=xt(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(et.Provider,{value:null},typeof i=="function"?i(o,l):W.cloneElement(W.Children.only(i),l))},t}(W.Component);O.contextType=et;O.propTypes={};function z(){}O.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:z,onEntering:z,onEntered:z,onExit:z,onExiting:z,onExited:z};O.UNMOUNTED=oe;O.EXITED=F;O.ENTERING=D;O.ENTERED=_;O.EXITING=je;function Ut(e){return e.code==="Escape"||e.keyCode===27}function Pt(){const e=a.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}function ve(e){if(!e||typeof e=="function")return null;const{major:t}=Pt();return t>=19?e.props.ref:e.ref}function Ht(e,t,n,r){if(r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function Gt(e){var t=$(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function Vt(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||Ht(e,"transitionend",!0)},t+n),s=me(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function tt(e,t,n,r){n==null&&(n=Gt(e)||0);var o=Vt(e,n,r),s=me(e,"transitionend",t);return function(){o(),s()}}function Ge(e,t){const n=$(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Kt(e,t){const n=Ge(e,"transitionDuration"),r=Ge(e,"transitionDelay"),o=tt(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Xt(e){e.offsetHeight}function zt(e){return e&&"setState"in e?q.findDOMNode(e):e??null}const nt=W.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},h)=>{const E=a.useRef(null),m=qe(E,c),x=b=>{m(zt(b))},v=b=>k=>{b&&E.current&&b(E.current,k)},w=a.useCallback(v(e),[e]),L=a.useCallback(v(t),[t]),R=a.useCallback(v(n),[n]),A=a.useCallback(v(r),[r]),S=a.useCallback(v(o),[o]),T=a.useCallback(v(s),[s]),N=a.useCallback(v(i),[i]);return f.jsx(O,{ref:h,...u,onEnter:w,onEntered:R,onEntering:L,onExit:A,onExited:T,onExiting:S,addEndListener:N,nodeRef:E,children:typeof l=="function"?(b,k)=>l(b,{...k,ref:x}):W.cloneElement(l,{ref:x})})});nt.displayName="TransitionWrapper";const Yt=e=>a.forwardRef((t,n)=>f.jsx("div",{...t,ref:n,className:y(t.className,e)})),qt={[D]:"show",[_]:"show"},Le=a.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=a.useCallback((c,u)=>{Xt(c),r==null||r(c,u)},[r]);return f.jsx(nt,{ref:s,addEndListener:Kt,...i,onEnter:l,childRef:ve(t),children:(c,u)=>a.cloneElement(t,{...u,className:y("fade",e,t.props.className,qt[c],n[c])})})});Le.displayName="Fade";const Zt={"aria-label":Ce.string,onClick:Ce.func,variant:Ce.oneOf(["white"])},Ae=a.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>f.jsx("button",{ref:o,type:"button",className:y("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));Ae.displayName="CloseButton";Ae.propTypes=Zt;function Jt(e){const t=a.useRef(e);return t.current=e,t}function Qt(e){const t=Jt(e);a.useEffect(()=>()=>t.current(),[])}const Ve=e=>!e||typeof e=="function"?e:t=>{e.current=t};function en(e,t){const n=Ve(e),r=Ve(t);return o=>{n&&n(o),r&&r(o)}}function Be(e,t){return a.useMemo(()=>en(e,t),[e,t])}var he;function Ke(e){if((!he&&he!==0||e)&&ge){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),he=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return he}function tn(){return a.useState(null)}function Ne(e){e===void 0&&(e=Ee());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function nn(e){const t=a.useRef(e);return t.current=e,t}function rn(e){const t=nn(e);a.useEffect(()=>()=>t.current(),[])}function on(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Xe=yt("modal-open");class Fe{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return on(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt($(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Xe,""),$(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Xe),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const Oe=(e,t)=>ge?e==null?(t||Ee()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function sn(e,t){const n=De(),[r,o]=a.useState(()=>Oe(e,n==null?void 0:n.document));if(!r){const s=Oe(e);s&&o(s)}return a.useEffect(()=>{},[t,r]),a.useEffect(()=>{const s=Oe(e);s!==r&&o(s)},[e,r]),r}function an({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=a.useRef(null),i=a.useRef(t),l=I(n);a.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=Be(s,ve(e)),u=a.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const ln=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function cn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function un(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:o,onExiting:s,onExited:i,addEndListener:l,children:c}=e,u=cn(e,ln);const h=a.useRef(null),E=Be(h,ve(c)),m=T=>N=>{T&&h.current&&T(h.current,N)},x=a.useCallback(m(t),[t]),v=a.useCallback(m(n),[n]),w=a.useCallback(m(r),[r]),L=a.useCallback(m(o),[o]),R=a.useCallback(m(s),[s]),A=a.useCallback(m(i),[i]),S=a.useCallback(m(l),[l]);return Object.assign({},u,{nodeRef:h},t&&{onEnter:x},n&&{onEntering:v},r&&{onEntered:w},o&&{onExit:L},s&&{onExiting:R},i&&{onExited:A},l&&{addEndListener:S},{children:typeof c=="function"?(T,N)=>c(T,Object.assign({},N,{ref:E})):a.cloneElement(c,{ref:E})})}const dn=["component"];function fn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const pn=a.forwardRef((e,t)=>{let{component:n}=e,r=fn(e,dn);const o=un(r);return f.jsx(n,Object.assign({ref:t},o))});function hn({in:e,onTransition:t}){const n=a.useRef(null),r=a.useRef(!0),o=I(t);return Pe(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function mn({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=a.useState(!t);t&&s&&i(!1);const l=hn({in:!!t,onTransition:u=>{const h=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(h,E=>{throw u.in||i(!0),E})}}),c=Be(l,ve(e));return s&&!t?null:a.cloneElement(e,{ref:c})}function ze(e,t,n){return e?f.jsx(pn,Object.assign({},n,{component:e})):t?f.jsx(mn,Object.assign({},n,{transition:t})):f.jsx(an,Object.assign({},n))}const En=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function gn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}let we;function vn(e){return we||(we=new Fe({ownerDocument:e==null?void 0:e.document})),we}function xn(e){const t=De(),n=e||vn(t),r=a.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:a.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:a.useCallback(o=>{r.current.backdrop=o},[])})}const rt=a.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:h,transition:E,runTransition:m,backdropTransition:x,runBackdropTransition:v,autoFocus:w=!0,enforceFocus:L=!0,restoreFocus:R=!0,restoreFocusOptions:A,renderDialog:S,renderBackdrop:T=p=>f.jsx("div",Object.assign({},p)),manager:N,container:b,onShow:k,onHide:J=()=>{},onExit:xe,onExited:Q,onExiting:se,onEnter:ae,onEntering:ie,onEntered:le}=e,ye=gn(e,En);const M=De(),U=sn(b),g=xn(N),Re=Rt(),ce=Tt(n),[B,P]=a.useState(!n),C=a.useRef(null);a.useImperativeHandle(t,()=>g,[g]),ge&&!ce&&n&&(C.current=Ne(M==null?void 0:M.document)),n&&B&&P(!1);const j=I(()=>{if(g.add(),H.current=me(document,"keydown",be),te.current=me(document,"focus",()=>setTimeout(Te),!0),k&&k(),w){var p,fe;const re=Ne((p=(fe=g.dialog)==null?void 0:fe.ownerDocument)!=null?p:M==null?void 0:M.document);g.dialog&&re&&!$e(g.dialog,re)&&(C.current=re,g.dialog.focus())}}),ee=I(()=>{if(g.remove(),H.current==null||H.current(),te.current==null||te.current(),R){var p;(p=C.current)==null||p.focus==null||p.focus(A),C.current=null}});a.useEffect(()=>{!n||!U||j()},[n,U,j]),a.useEffect(()=>{B&&ee()},[B,ee]),rn(()=>{ee()});const Te=I(()=>{if(!L||!Re()||!g.isTopModal())return;const p=Ne(M==null?void 0:M.document);g.dialog&&p&&!$e(g.dialog,p)&&g.dialog.focus()}),ue=I(p=>{p.target===p.currentTarget&&(u==null||u(p),l===!0&&J())}),be=I(p=>{c&&Ut(p)&&g.isTopModal()&&(h==null||h(p),p.defaultPrevented||J())}),te=a.useRef(),H=a.useRef(),de=(...p)=>{P(!0),Q==null||Q(...p)};if(!U)return null;const G=Object.assign({role:r,ref:g.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},ye,{style:s,className:o,tabIndex:-1});let ne=S?S(G):f.jsx("div",Object.assign({},G,{children:a.cloneElement(i,{role:"document"})}));ne=ze(E,m,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:xe,onExiting:se,onExited:de,onEnter:ae,onEntering:ie,onEntered:le,children:ne});let V=null;return l&&(V=T({ref:g.setBackdropRef,onClick:ue}),V=ze(x,v,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:V})),f.jsx(f.Fragment,{children:q.createPortal(f.jsxs(f.Fragment,{children:[V,ne]}),U)})});rt.displayName="Modal";const yn=Object.assign(rt,{Manager:Fe});function Rn(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Tn(e,t){e.classList?e.classList.add(t):Rn(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Ye(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function bn(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Ye(e.className,t):e.setAttribute("class",Ye(e.className&&e.className.baseVal||"",t))}const Y={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Cn extends Fe{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,$(n,{[t]:`${parseFloat($(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],$(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(Tn(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),X(n,Y.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();bn(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";X(n,Y.FIXED_CONTENT).forEach(s=>this.restore(r,s)),X(n,Y.STICKY_CONTENT).forEach(s=>this.restore(o,s)),X(n,Y.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Se;function Nn(e){return Se||(Se=new Cn(e)),Se}const ot=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-body"),f.jsx(n,{ref:o,className:y(e,t),...r})));ot.displayName="ModalBody";const st=a.createContext({onHide(){}}),Ie=a.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=Z(e,"modal");const h=`${e}-dialog`,E=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return f.jsx("div",{...c,ref:u,className:y(h,t,o&&`${e}-${o}`,r&&`${h}-centered`,l&&`${h}-scrollable`,s&&E),children:f.jsx("div",{className:y(`${e}-content`,n),children:i})})});Ie.displayName="ModalDialog";const at=a.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=Z(t,"modal-footer"),f.jsx(n,{ref:o,className:y(e,t),...r})));at.displayName="ModalFooter";const it=a.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=a.useContext(st),c=ke(()=>{l==null||l.onHide(),r==null||r()});return f.jsxs("div",{ref:i,...s,children:[o,n&&f.jsx(Ae,{"aria-label":e,variant:t,onClick:c})]})});it.displayName="AbstractModalHeader";const lt=a.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=Z(e,"modal-header"),f.jsx(it,{ref:s,...o,className:y(t,e),closeLabel:n,closeButton:r})));lt.displayName="ModalHeader";const On=Yt("h4"),ct=a.forwardRef(({className:e,bsPrefix:t,as:n=On,...r},o)=>(t=Z(t,"modal-title"),f.jsx(n,{ref:o,className:y(e,t),...r})));ct.displayName="ModalTitle";function wn(e){return f.jsx(Le,{...e,timeout:null})}function Sn(e){return f.jsx(Le,{...e,timeout:null})}const ut=a.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=Ie,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":h,show:E=!1,animation:m=!0,backdrop:x=!0,keyboard:v=!0,onEscapeKeyDown:w,onShow:L,onHide:R,container:A,autoFocus:S=!0,enforceFocus:T=!0,restoreFocus:N=!0,restoreFocusOptions:b,onEntered:k,onExit:J,onExiting:xe,onEnter:Q,onEntering:se,onExited:ae,backdropClassName:ie,manager:le,...ye},M)=>{const[U,g]=a.useState({}),[Re,ce]=a.useState(!1),B=a.useRef(!1),P=a.useRef(!1),C=a.useRef(null),[j,ee]=tn(),Te=qe(M,ee),ue=ke(R),be=bt();e=Z(e,"modal");const te=a.useMemo(()=>({onHide:ue}),[ue]);function H(){return le||Nn({isRTL:be})}function de(d){if(!ge)return;const K=H().getScrollbarWidth()>0,We=d.scrollHeight>Ee(d).documentElement.clientHeight;g({paddingRight:K&&!We?Ke():void 0,paddingLeft:!K&&We?Ke():void 0})}const G=ke(()=>{j&&de(j.dialog)});Qt(()=>{Ue(window,"resize",G),C.current==null||C.current()});const ne=()=>{B.current=!0},V=d=>{B.current&&j&&d.target===j.dialog&&(P.current=!0),B.current=!1},p=()=>{ce(!0),C.current=tt(j.dialog,()=>{ce(!1)})},fe=d=>{d.target===d.currentTarget&&p()},re=d=>{if(x==="static"){fe(d);return}if(P.current||d.target!==d.currentTarget){P.current=!1;return}R==null||R()},dt=d=>{v?w==null||w(d):(d.preventDefault(),x==="static"&&p())},ft=(d,K)=>{d&&de(d),Q==null||Q(d,K)},pt=d=>{C.current==null||C.current(),J==null||J(d)},ht=(d,K)=>{se==null||se(d,K),Ct(window,"resize",G)},mt=d=>{d&&(d.style.display=""),ae==null||ae(d),Ue(window,"resize",G)},Et=a.useCallback(d=>f.jsx("div",{...d,className:y(`${e}-backdrop`,ie,!m&&"show")}),[m,ie,e]),_e={...n,...U};_e.display="block";const gt=d=>f.jsx("div",{role:"dialog",...d,style:_e,className:y(t,e,Re&&`${e}-static`,!m&&"show"),onClick:x?re:void 0,onMouseUp:V,"data-bs-theme":l,"aria-label":h,"aria-labelledby":c,"aria-describedby":u,children:f.jsx(i,{...ye,onMouseDown:ne,className:r,contentClassName:o,children:s})});return f.jsx(st.Provider,{value:te,children:f.jsx(yn,{show:E,ref:Te,backdrop:x,container:A,keyboard:!0,autoFocus:S,enforceFocus:T,restoreFocus:N,restoreFocusOptions:b,onEscapeKeyDown:dt,onShow:L,onHide:R,onEnter:ft,onEntering:ht,onEntered:k,onExit:pt,onExiting:xe,onExited:mt,manager:H(),transition:m?wn:void 0,backdropTransition:m?Sn:void 0,renderBackdrop:Et,renderDialog:gt})})});ut.displayName="Modal";const Mn=Object.assign(ut,{Body:ot,Header:lt,Title:ct,Footer:at,Dialog:Ie,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});export{Mn as M}; diff --git a/YakPanel-server/frontend/dist/assets/MonitorPage-BdTGnSW8.js b/YakPanel-server/frontend/dist/assets/MonitorPage-CgJf2F74.js similarity index 94% rename from YakPanel-server/frontend/dist/assets/MonitorPage-BdTGnSW8.js rename to YakPanel-server/frontend/dist/assets/MonitorPage-CgJf2F74.js index ce323aa7..3f62cb55 100644 --- a/YakPanel-server/frontend/dist/assets/MonitorPage-BdTGnSW8.js +++ b/YakPanel-server/frontend/dist/assets/MonitorPage-CgJf2F74.js @@ -1 +1 @@ -import{r,j as s,a as b,G as g,H as v}from"./index-cE9w-Kq7.js";import{A as N}from"./AdminAlert-yrdXFH0e.js";import{A as y}from"./AdminTable-eCi7S__-.js";import{P as o}from"./PageHeader-HdM4gpcn.js";function M(){const[e,d]=r.useState(null),[c,l]=r.useState([]),[t,n]=r.useState(null),[i,p]=r.useState("");return r.useEffect(()=>{const a=()=>{b("/monitor/system").then(d).catch(m=>p(m.message))},h=()=>{g(50).then(m=>l(m.processes)).catch(()=>l([]))},j=()=>{v().then(n).catch(()=>n(null))};a(),h(),j();const u=setInterval(()=>{a(),h(),j()},3e3);return()=>clearInterval(u)},[]),i&&!e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx(N,{children:i})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),i?s.jsx(N,{className:"mb-3",children:i}):null,s.jsx("p",{className:"small text-secondary mb-3",children:"Refreshes every 3 seconds"}),s.jsxs("div",{className:"row g-3 mb-3",children:[s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.cpu_percent}%`,subtitle:"Usage",percent:e.cpu_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-device-sd-card",title:"Memory",value:`${e.memory_used_mb} / ${e.memory_total_mb} MB`,subtitle:`${e.memory_percent}% used`,percent:e.memory_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-database",title:"Disk",value:`${e.disk_used_gb} / ${e.disk_total_gb} GB`,subtitle:`${e.disk_percent}% used`,percent:e.disk_percent})})]}),t?s.jsx("div",{className:"card mb-3",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 mb-3",children:[s.jsx("i",{className:"ti ti-network fs-5","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Network I/O"})]}),s.jsxs("div",{className:"row g-3 small",children:[s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Sent"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_sent_mb," MB"]})]}),s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Received"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_recv_mb," MB"]})]})]})]})}):null,s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"card-header d-flex align-items-center gap-2",children:[s.jsx("i",{className:"ti ti-cpu","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Top Processes (by CPU)"})]}),s.jsx("div",{className:"table-responsive",style:{maxHeight:"20rem"},children:s.jsxs(y,{responsive:!1,children:[s.jsx("thead",{className:"sticky-top bg-body-secondary",children:s.jsxs("tr",{children:[s.jsx("th",{className:"small",children:"PID"}),s.jsx("th",{className:"small",children:"Name"}),s.jsx("th",{className:"small",children:"User"}),s.jsx("th",{className:"small text-end",children:"CPU %"}),s.jsx("th",{className:"small text-end",children:"Mem %"}),s.jsx("th",{className:"small",children:"Status"})]})}),s.jsx("tbody",{children:c.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"text-center text-secondary small py-3",children:"No process data"})}):c.map(a=>s.jsxs("tr",{className:"small",children:[s.jsx("td",{className:"font-monospace",children:a.pid}),s.jsx("td",{className:"text-truncate",style:{maxWidth:120},title:a.name,children:a.name}),s.jsx("td",{children:a.username}),s.jsxs("td",{className:"text-end font-monospace",children:[a.cpu_percent,"%"]}),s.jsxs("td",{className:"text-end font-monospace",children:[a.memory_percent,"%"]}),s.jsx("td",{className:"text-secondary",children:a.status})]},a.pid))})]})})]}),s.jsxs("div",{className:"alert alert-warning small mt-3 mb-0",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 fw-medium mb-1",children:[s.jsx("i",{className:"ti ti-activity","aria-hidden":!0}),"Live monitoring"]}),"System metrics, processes, and network stats are polled every 3 seconds."]})]}):s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx("p",{className:"text-secondary",children:"Loading…"})]})}function x({iconClass:e,title:d,value:c,subtitle:l,percent:t}){const n=t>90?"bg-danger":t>70?"bg-warning":"bg-primary";return s.jsx("div",{className:"card h-100",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-3 mb-3",children:[s.jsx("div",{className:"p-3 rounded bg-primary-subtle text-primary",children:s.jsx("i",{className:`${e} fs-2`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"small text-secondary mb-0",children:d}),s.jsx("p",{className:"h5 mb-0",children:c}),s.jsx("p",{className:"small text-secondary mb-0",children:l})]})]}),s.jsx("div",{className:"progress",style:{height:6},children:s.jsx("div",{className:`progress-bar ${n}`,role:"progressbar",style:{width:`${Math.min(t,100)}%`}})})]})})}export{M as MonitorPage}; +import{r,j as s,a as b,O as g,P as v}from"./index-CRR9sQ49.js";import{A as N}from"./AdminAlert-DW1IRWce.js";import{A as y}from"./AdminTable-BLiLxfnS.js";import{P as o}from"./PageHeader-BcjNf7GG.js";function M(){const[e,d]=r.useState(null),[c,l]=r.useState([]),[t,n]=r.useState(null),[i,p]=r.useState("");return r.useEffect(()=>{const a=()=>{b("/monitor/system").then(d).catch(m=>p(m.message))},h=()=>{g(50).then(m=>l(m.processes)).catch(()=>l([]))},j=()=>{v().then(n).catch(()=>n(null))};a(),h(),j();const u=setInterval(()=>{a(),h(),j()},3e3);return()=>clearInterval(u)},[]),i&&!e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx(N,{children:i})]}):e?s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),i?s.jsx(N,{className:"mb-3",children:i}):null,s.jsx("p",{className:"small text-secondary mb-3",children:"Refreshes every 3 seconds"}),s.jsxs("div",{className:"row g-3 mb-3",children:[s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-cpu",title:"CPU",value:`${e.cpu_percent}%`,subtitle:"Usage",percent:e.cpu_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-device-sd-card",title:"Memory",value:`${e.memory_used_mb} / ${e.memory_total_mb} MB`,subtitle:`${e.memory_percent}% used`,percent:e.memory_percent})}),s.jsx("div",{className:"col-md-4",children:s.jsx(x,{iconClass:"ti ti-database",title:"Disk",value:`${e.disk_used_gb} / ${e.disk_total_gb} GB`,subtitle:`${e.disk_percent}% used`,percent:e.disk_percent})})]}),t?s.jsx("div",{className:"card mb-3",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 mb-3",children:[s.jsx("i",{className:"ti ti-network fs-5","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Network I/O"})]}),s.jsxs("div",{className:"row g-3 small",children:[s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Sent"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_sent_mb," MB"]})]}),s.jsxs("div",{className:"col-6",children:[s.jsx("span",{className:"text-secondary d-block",children:"Received"}),s.jsxs("span",{className:"font-monospace fw-medium",children:[t.bytes_recv_mb," MB"]})]})]})]})}):null,s.jsxs("div",{className:"card",children:[s.jsxs("div",{className:"card-header d-flex align-items-center gap-2",children:[s.jsx("i",{className:"ti ti-cpu","aria-hidden":!0}),s.jsx("span",{className:"fw-medium",children:"Top Processes (by CPU)"})]}),s.jsx("div",{className:"table-responsive",style:{maxHeight:"20rem"},children:s.jsxs(y,{responsive:!1,children:[s.jsx("thead",{className:"sticky-top bg-body-secondary",children:s.jsxs("tr",{children:[s.jsx("th",{className:"small",children:"PID"}),s.jsx("th",{className:"small",children:"Name"}),s.jsx("th",{className:"small",children:"User"}),s.jsx("th",{className:"small text-end",children:"CPU %"}),s.jsx("th",{className:"small text-end",children:"Mem %"}),s.jsx("th",{className:"small",children:"Status"})]})}),s.jsx("tbody",{children:c.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"text-center text-secondary small py-3",children:"No process data"})}):c.map(a=>s.jsxs("tr",{className:"small",children:[s.jsx("td",{className:"font-monospace",children:a.pid}),s.jsx("td",{className:"text-truncate",style:{maxWidth:120},title:a.name,children:a.name}),s.jsx("td",{children:a.username}),s.jsxs("td",{className:"text-end font-monospace",children:[a.cpu_percent,"%"]}),s.jsxs("td",{className:"text-end font-monospace",children:[a.memory_percent,"%"]}),s.jsx("td",{className:"text-secondary",children:a.status})]},a.pid))})]})})]}),s.jsxs("div",{className:"alert alert-warning small mt-3 mb-0",children:[s.jsxs("div",{className:"d-flex align-items-center gap-2 fw-medium mb-1",children:[s.jsx("i",{className:"ti ti-activity","aria-hidden":!0}),"Live monitoring"]}),"System metrics, processes, and network stats are polled every 3 seconds."]})]}):s.jsxs(s.Fragment,{children:[s.jsx(o,{title:"Monitor"}),s.jsx("p",{className:"text-secondary",children:"Loading…"})]})}function x({iconClass:e,title:d,value:c,subtitle:l,percent:t}){const n=t>90?"bg-danger":t>70?"bg-warning":"bg-primary";return s.jsx("div",{className:"card h-100",children:s.jsxs("div",{className:"card-body",children:[s.jsxs("div",{className:"d-flex align-items-center gap-3 mb-3",children:[s.jsx("div",{className:"p-3 rounded bg-primary-subtle text-primary",children:s.jsx("i",{className:`${e} fs-2`,"aria-hidden":!0})}),s.jsxs("div",{children:[s.jsx("p",{className:"small text-secondary mb-0",children:d}),s.jsx("p",{className:"h5 mb-0",children:c}),s.jsx("p",{className:"small text-secondary mb-0",children:l})]})]}),s.jsx("div",{className:"progress",style:{height:6},children:s.jsx("div",{className:`progress-bar ${n}`,role:"progressbar",style:{width:`${Math.min(t,100)}%`}})})]})})}export{M as MonitorPage}; diff --git a/YakPanel-server/frontend/dist/assets/NodePage-BJ5-7-Pe.js b/YakPanel-server/frontend/dist/assets/NodePage-BQzvbSat.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/NodePage-BJ5-7-Pe.js rename to YakPanel-server/frontend/dist/assets/NodePage-BQzvbSat.js index 114a7008..52ca2ecd 100644 --- a/YakPanel-server/frontend/dist/assets/NodePage-BJ5-7-Pe.js +++ b/YakPanel-server/frontend/dist/assets/NodePage-BQzvbSat.js @@ -1 +1 @@ -import{r,j as e,a as c,S as R}from"./index-cE9w-Kq7.js";import{M as h}from"./Modal-CL3xZqxR.js";import{A as B}from"./AdminAlert-yrdXFH0e.js";import{A as u}from"./AdminButton-ByutG8m-.js";import{A as D}from"./AdminTable-eCi7S__-.js";import{E as I}from"./EmptyState-CmnFWkSO.js";import{P as v}from"./PageHeader-HdM4gpcn.js";function O(n){if(!n||n<0)return"—";const m=Math.floor(n/1e3);if(m<60)return`${m}s`;const o=Math.floor(m/60);return o<60?`${o}m`:`${Math.floor(o/60)}h`}function q(n){return n?(n/1024/1024).toFixed(1)+" MB":"—"}function P({show:n}){return n?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function Q(){const[n,m]=r.useState([]),[o,p]=r.useState(null),[k,f]=r.useState(!0),[N,i]=r.useState(""),[d,a]=r.useState(null),[C,x]=r.useState(!1),[j,b]=r.useState(""),[g,y]=r.useState(""),[S,A]=r.useState(!1),l=()=>{f(!0),Promise.all([c("/node/processes"),c("/node/version")]).then(([s,t])=>{m(s.processes||[]),p(t.version||null),i(s.error||t.error||"")}).catch(s=>i(s.message)).finally(()=>f(!1))};r.useEffect(()=>{l()},[]);const M=s=>{a(s),c(`/node/${s}/start`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},E=s=>{a(s),c(`/node/${s}/stop`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},$=s=>{a(s),c(`/node/${s}/restart`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},T=s=>{s.preventDefault(),j.trim()&&(A(!0),R(j.trim(),g.trim()||void 0).then(()=>{x(!1),b(""),y(""),l()}).catch(t=>i(t.message)).finally(()=>A(!1)))},F=(s,t)=>{confirm(`Delete PM2 process "${t}"?`)&&(a(s),c(`/node/${s}`,{method:"DELETE"}).then(l).catch(L=>i(L.message)).finally(()=>a(null)))},w=s=>(s==null?void 0:s.toLowerCase())==="online"||(s==null?void 0:s.toLowerCase())==="launching";return k?e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[o?e.jsxs("span",{className:"small text-secondary me-2",children:["Node: ",o]}):null,e.jsxs(u,{variant:"primary",size:"sm",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Process"]}),e.jsxs(u,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(h,{show:C,onHide:()=>x(!1),centered:!0,children:[e.jsx(h.Header,{closeButton:!0,children:e.jsx(h.Title,{children:"Add PM2 Process"})}),e.jsxs("form",{onSubmit:T,children:[e.jsxs(h.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Script path"}),e.jsx("input",{value:j,onChange:s=>b(s.target.value),placeholder:"/www/wwwroot/app.js",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:g,onChange:s=>y(s.target.value),placeholder:"myapp",className:"form-control"})]})]}),e.jsxs(h.Footer,{children:[e.jsx(u,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(u,{type:"submit",variant:"primary",disabled:S,children:S?"Starting…":"Start"})]})]})]}),N?e.jsx(B,{variant:"warning",className:"mb-3",children:N}):null,e.jsxs("div",{className:"alert alert-secondary small mb-3",children:["PM2 process manager. Install with: ",e.jsx("code",{className:"font-monospace",children:"npm install -g pm2"})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"PID"}),e.jsx("th",{children:"Uptime"}),e.jsx("th",{children:"Memory"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:n.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(I,{title:"No PM2 processes",description:'Click "Add Process" or run pm2 start app.js on the server.'})})}):n.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.name}),e.jsx("td",{children:e.jsx("span",{className:w(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{children:s.pid||"—"}),e.jsx("td",{children:O(s.uptime)}),e.jsx("td",{children:q(s.memory)}),e.jsx("td",{className:"text-end",children:e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[w(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:d===s.id,onClick:()=>$(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:d===s.id,onClick:()=>E(s.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:d===s.id,onClick:()=>M(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-secondary p-1",title:"Delete",disabled:d===s.id,onClick:()=>F(s.id,s.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})})]},s.id))})]})})]})}export{Q as NodePage}; +import{r,j as e,a as c,_ as R}from"./index-CRR9sQ49.js";import{M as h}from"./Modal-B7V4w_St.js";import{A as B}from"./AdminAlert-DW1IRWce.js";import{A as u}from"./AdminButton-Bd2cLTu3.js";import{A as D}from"./AdminTable-BLiLxfnS.js";import{E as I}from"./EmptyState-C61VdEFl.js";import{P as v}from"./PageHeader-BcjNf7GG.js";function O(n){if(!n||n<0)return"—";const m=Math.floor(n/1e3);if(m<60)return`${m}s`;const o=Math.floor(m/60);return o<60?`${o}m`:`${Math.floor(o/60)}h`}function q(n){return n?(n/1024/1024).toFixed(1)+" MB":"—"}function P({show:n}){return n?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function K(){const[n,m]=r.useState([]),[o,p]=r.useState(null),[k,f]=r.useState(!0),[N,i]=r.useState(""),[d,a]=r.useState(null),[C,x]=r.useState(!1),[j,b]=r.useState(""),[g,y]=r.useState(""),[S,A]=r.useState(!1),l=()=>{f(!0),Promise.all([c("/node/processes"),c("/node/version")]).then(([s,t])=>{m(s.processes||[]),p(t.version||null),i(s.error||t.error||"")}).catch(s=>i(s.message)).finally(()=>f(!1))};r.useEffect(()=>{l()},[]);const M=s=>{a(s),c(`/node/${s}/start`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},E=s=>{a(s),c(`/node/${s}/stop`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},$=s=>{a(s),c(`/node/${s}/restart`,{method:"POST"}).then(l).catch(t=>i(t.message)).finally(()=>a(null))},T=s=>{s.preventDefault(),j.trim()&&(A(!0),R(j.trim(),g.trim()||void 0).then(()=>{x(!1),b(""),y(""),l()}).catch(t=>i(t.message)).finally(()=>A(!1)))},F=(s,t)=>{confirm(`Delete PM2 process "${t}"?`)&&(a(s),c(`/node/${s}`,{method:"DELETE"}).then(l).catch(L=>i(L.message)).finally(()=>a(null)))},w=s=>(s==null?void 0:s.toLowerCase())==="online"||(s==null?void 0:s.toLowerCase())==="launching";return k?e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Node.js",actions:e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2",children:[o?e.jsxs("span",{className:"small text-secondary me-2",children:["Node: ",o]}):null,e.jsxs(u,{variant:"primary",size:"sm",onClick:()=>x(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add Process"]}),e.jsxs(u,{variant:"secondary",size:"sm",onClick:l,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})]})}),e.jsxs(h,{show:C,onHide:()=>x(!1),centered:!0,children:[e.jsx(h.Header,{closeButton:!0,children:e.jsx(h.Title,{children:"Add PM2 Process"})}),e.jsxs("form",{onSubmit:T,children:[e.jsxs(h.Body,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Script path"}),e.jsx("input",{value:j,onChange:s=>b(s.target.value),placeholder:"/www/wwwroot/app.js",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Name (optional)"}),e.jsx("input",{value:g,onChange:s=>y(s.target.value),placeholder:"myapp",className:"form-control"})]})]}),e.jsxs(h.Footer,{children:[e.jsx(u,{type:"button",variant:"secondary",onClick:()=>x(!1),children:"Cancel"}),e.jsx(u,{type:"submit",variant:"primary",disabled:S,children:S?"Starting…":"Start"})]})]})]}),N?e.jsx(B,{variant:"warning",className:"mb-3",children:N}):null,e.jsxs("div",{className:"alert alert-secondary small mb-3",children:["PM2 process manager. Install with: ",e.jsx("code",{className:"font-monospace",children:"npm install -g pm2"})]}),e.jsx("div",{className:"card",children:e.jsxs(D,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"PID"}),e.jsx("th",{children:"Uptime"}),e.jsx("th",{children:"Memory"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:n.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-0",children:e.jsx(I,{title:"No PM2 processes",description:'Click "Add Process" or run pm2 start app.js on the server.'})})}):n.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-monospace",children:s.name}),e.jsx("td",{children:e.jsx("span",{className:w(s.status)?"text-success":"text-secondary",children:s.status})}),e.jsx("td",{children:s.pid||"—"}),e.jsx("td",{children:O(s.uptime)}),e.jsx("td",{children:q(s.memory)}),e.jsx("td",{className:"text-end",children:e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[w(s.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:d===s.id,onClick:()=>$(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:d===s.id,onClick:()=>E(s.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:d===s.id,onClick:()=>M(s.id),children:d===s.id?e.jsx(P,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-secondary p-1",title:"Delete",disabled:d===s.id,onClick:()=>F(s.id,s.name),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]})})]},s.id))})]})})]})}export{K as NodePage}; diff --git a/YakPanel-server/frontend/dist/assets/PageHeader-HdM4gpcn.js b/YakPanel-server/frontend/dist/assets/PageHeader-BcjNf7GG.js similarity index 95% rename from YakPanel-server/frontend/dist/assets/PageHeader-HdM4gpcn.js rename to YakPanel-server/frontend/dist/assets/PageHeader-BcjNf7GG.js index da123cb1..3f84f9df 100644 --- a/YakPanel-server/frontend/dist/assets/PageHeader-HdM4gpcn.js +++ b/YakPanel-server/frontend/dist/assets/PageHeader-BcjNf7GG.js @@ -1 +1 @@ -import{an as c,j as e,ao as m}from"./index-cE9w-Kq7.js";const d={"/":"Dashboard","/site":"Website","/ftp":"FTP","/database":"Databases","/docker":"Docker","/control":"Monitor","/firewall":"Security","/files":"Files","/node":"Node","/logs":"Logs","/ssl_domain":"Domains","/xterm":"Terminal","/crontab":"Cron","/soft":"App Store","/config":"Settings","/services":"Services","/plugins":"Plugins","/backup-plans":"Backup Plans","/users":"Users","/login":"Login","/install":"Remote install"};function b(t){return d[t]||"YakPanel"}function p({title:t,breadcrumbs:i,actions:n}){const{pathname:o}=c(),r=t??b(o),s=i??[{label:"Home",path:"/"},{label:r}];return e.jsx("div",{className:"page-header mb-4",children:e.jsxs("div",{className:"row align-items-center",children:[e.jsxs("div",{className:"col-md-6",children:[e.jsx("h3",{className:"page-title",children:r}),e.jsx("nav",{"aria-label":"breadcrumb",children:e.jsx("ol",{className:"breadcrumb mb-0",children:s.map((a,l)=>e.jsx("li",{className:`breadcrumb-item${l===s.length-1?" active":""}`,...l===s.length-1?{"aria-current":"page"}:{},children:a.path&&le.jsx("li",{className:`breadcrumb-item${l===s.length-1?" active":""}`,...l===s.length-1?{"aria-current":"page"}:{},children:a.path&&lR("/plugin/list").then(s=>N(s.plugins||[])).catch(s=>m(s.message));a.useEffect(()=>{c(!0),d().finally(()=>c(!1))},[]);const A=s=>{s.preventDefault();const n=u.trim();n&&(j(!0),i(""),U(n).then(()=>{l(!1),h(""),d()}).catch(S=>i(S.message)).finally(()=>j(!1)))},P=s=>{confirm("Remove this plugin?")&&w(s).then(d).catch(n=>m(n.message))};return v?e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",disabled:!0,children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),o?e.jsx(f,{className:"mb-3",children:o}):null,e.jsxs("div",{className:"alert alert-secondary small mb-4",children:["Built-in extensions and third-party plugins. Add plugins from a JSON manifest URL (must include ",e.jsx("code",{children:"id"}),","," ",e.jsx("code",{children:"name"}),", and optionally ",e.jsx("code",{children:"version"}),", ",e.jsx("code",{children:"desc"}),")."]}),e.jsxs(t,{show:y,onHide:()=>{l(!1),i("")},centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Add Plugin from URL"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[g?e.jsx(f,{className:"mb-3",children:g}):null,e.jsx("label",{className:"form-label",children:"Manifest URL"}),e.jsx("input",{value:u,onChange:s=>h(s.target.value),placeholder:"https://example.com/plugin.json",className:"form-control",required:!0})]}),e.jsxs(t.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{l(!1),i("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"primary",disabled:x,children:x?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"row g-3",children:b.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4",children:e.jsx("div",{className:"card h-100",children:e.jsxs("div",{className:"card-body d-flex gap-3",children:[e.jsx("i",{className:"ti ti-puzzle text-primary fs-2 flex-shrink-0","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-grow-1",children:[e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-1",children:[e.jsx("h3",{className:"h6 mb-0",children:s.name}),s.enabled?e.jsxs("span",{className:"badge bg-success-subtle text-success small",children:[e.jsx("i",{className:"ti ti-check me-1","aria-hidden":!0}),"Enabled"]}):null,s.builtin?null:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-0 ms-auto",title:"Remove",onClick:()=>P(s.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}),e.jsx("p",{className:"small text-secondary mb-1",children:s.desc}),e.jsxs("p",{className:"small text-muted mb-0",children:["v",s.version,s.builtin?" (built-in)":""]})]})]})})},s.id))})]})}export{F as PluginsPage}; diff --git a/YakPanel-server/frontend/dist/assets/PluginsPage-C4H8wPuq.js b/YakPanel-server/frontend/dist/assets/PluginsPage-C4H8wPuq.js new file mode 100644 index 00000000..77afcd3f --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/PluginsPage-C4H8wPuq.js @@ -0,0 +1 @@ +import{r as a,j as e,a as R,$ as U,a0 as w}from"./index-CRR9sQ49.js";import{M as t}from"./Modal-B7V4w_St.js";import{A as f}from"./AdminAlert-DW1IRWce.js";import{A as r}from"./AdminButton-Bd2cLTu3.js";import{P as p}from"./PageHeader-BcjNf7GG.js";function F(){const[b,N]=a.useState([]),[v,c]=a.useState(!0),[o,m]=a.useState(""),[y,l]=a.useState(!1),[u,h]=a.useState(""),[x,j]=a.useState(!1),[g,i]=a.useState(""),d=()=>R("/plugin/list").then(s=>N(s.plugins||[])).catch(s=>m(s.message));a.useEffect(()=>{c(!0),d().finally(()=>c(!1))},[]);const A=s=>{s.preventDefault();const n=u.trim();n&&(j(!0),i(""),U(n).then(()=>{l(!1),h(""),d()}).catch(S=>i(S.message)).finally(()=>j(!1)))},P=s=>{confirm("Remove this plugin?")&&w(s).then(d).catch(n=>m(n.message))};return v?e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",disabled:!0,children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Plugins",actions:e.jsxs(r,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add from URL"]})}),o?e.jsx(f,{className:"mb-3",children:o}):null,e.jsxs("div",{className:"alert alert-secondary small mb-4",children:["Built-in extensions and third-party plugins. Add plugins from a JSON manifest URL (must include ",e.jsx("code",{children:"id"}),","," ",e.jsx("code",{children:"name"}),", and optionally ",e.jsx("code",{children:"version"}),", ",e.jsx("code",{children:"desc"}),")."]}),e.jsxs(t,{show:y,onHide:()=>{l(!1),i("")},centered:!0,children:[e.jsx(t.Header,{closeButton:!0,children:e.jsx(t.Title,{children:"Add Plugin from URL"})}),e.jsxs("form",{onSubmit:A,children:[e.jsxs(t.Body,{children:[g?e.jsx(f,{className:"mb-3",children:g}):null,e.jsx("label",{className:"form-label",children:"Manifest URL"}),e.jsx("input",{value:u,onChange:s=>h(s.target.value),placeholder:"https://example.com/plugin.json",className:"form-control",required:!0})]}),e.jsxs(t.Footer,{children:[e.jsx(r,{type:"button",variant:"secondary",onClick:()=>{l(!1),i("")},children:"Cancel"}),e.jsx(r,{type:"submit",variant:"primary",disabled:x,children:x?"Adding…":"Add"})]})]})]}),e.jsx("div",{className:"row g-3",children:b.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4",children:e.jsx("div",{className:"card h-100",children:e.jsxs("div",{className:"card-body d-flex gap-3",children:[e.jsx("i",{className:"ti ti-puzzle text-primary fs-2 flex-shrink-0","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-grow-1",children:[e.jsxs("div",{className:"d-flex flex-wrap align-items-center gap-2 mb-1",children:[e.jsx("h3",{className:"h6 mb-0",children:s.name}),s.enabled?e.jsxs("span",{className:"badge bg-success-subtle text-success small",children:[e.jsx("i",{className:"ti ti-check me-1","aria-hidden":!0}),"Enabled"]}):null,s.builtin?null:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-0 ms-auto",title:"Remove",onClick:()=>P(s.id),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}),e.jsx("p",{className:"small text-secondary mb-1",children:s.desc}),e.jsxs("p",{className:"small text-muted mb-0",children:["v",s.version,s.builtin?" (built-in)":""]})]})]})})},s.id))})]})}export{F as PluginsPage}; diff --git a/YakPanel-server/frontend/dist/assets/RemoteInstallPage-CH-5kpB6.js b/YakPanel-server/frontend/dist/assets/RemoteInstallPage-C4gVyakl.js similarity index 97% rename from YakPanel-server/frontend/dist/assets/RemoteInstallPage-CH-5kpB6.js rename to YakPanel-server/frontend/dist/assets/RemoteInstallPage-C4gVyakl.js index 04c84f93..6604479f 100644 --- a/YakPanel-server/frontend/dist/assets/RemoteInstallPage-CH-5kpB6.js +++ b/YakPanel-server/frontend/dist/assets/RemoteInstallPage-C4gVyakl.js @@ -1,2 +1,2 @@ -import{r as a,j as e,ao as A}from"./index-cE9w-Kq7.js";import{A as b}from"./AdminAlert-yrdXFH0e.js";import{A as M}from"./AdminButton-ByutG8m-.js";function Y(){const[t,T]=a.useState(null),[d,I]=a.useState(""),[j,L]=a.useState(""),[m,F]=a.useState("22"),[f,O]=a.useState("root"),[n,y]=a.useState("key"),[N,q]=a.useState(""),[g,U]=a.useState(""),[v,S]=a.useState(""),[w,k]=a.useState(""),[h,E]=a.useState([]),[P,u]=a.useState(!1),[H,C]=a.useState(null),[R,_]=a.useState(""),o=a.useRef(null);a.useEffect(()=>{fetch("/api/v1/public-install/config").then(s=>s.ok?s.json():Promise.reject(new Error(`HTTP ${s.status}`))).then(s=>{T(s),k(s.default_install_url||"")}).catch(()=>I("Could not load installer configuration"))},[]),a.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[h]);const p=a.useCallback(s=>{E(c=>[...c.slice(-2e3),s])},[]);async function $(s){if(s.preventDefault(),_(""),E([]),C(null),!(t!=null&&t.enabled))return;const c=w.trim()||t.default_install_url,K=n==="key"?{type:"key",private_key:N,passphrase:g||null}:{type:"password",password:v},B={host:j.trim(),port:parseInt(m,10)||22,username:f.trim(),auth:K,install_url:c===t.default_install_url?null:c};u(!0);try{const l=await fetch("/api/v1/public-install/jobs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!l.ok){const i=await l.json().catch(()=>({}));throw new Error(i.detail||`HTTP ${l.status}`)}const{job_id:W}=await l.json(),J=window.location.protocol==="https:"?"wss:":"ws:",x=new WebSocket(`${J}//${window.location.host}/api/v1/public-install/ws/${W}`);x.onmessage=i=>{try{const r=JSON.parse(i.data);r.type==="line"&&typeof r.text=="string"&&p(r.text),r.type==="done"&&C(typeof r.exit_code=="number"?r.exit_code:-1)}catch{p(String(i.data))}},x.onerror=()=>p("[websocket error]"),x.onclose=()=>u(!1)}catch(l){_(l instanceof Error?l.message:"Request failed"),u(!1)}finally{n==="password"&&S("")}}return!t&&!d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary",children:e.jsx("p",{className:"text-secondary mb-0",children:"Loading…"})}):d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx(b,{children:d})}):t&&!t.enabled?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx("div",{className:"card shadow-sm w-100",style:{maxWidth:520},children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-3",children:"Remote SSH installer disabled"}),e.jsxs("p",{className:"small text-secondary mb-3",children:["Enable it on the API server with environment variable"," ",e.jsx("code",{children:"ENABLE_REMOTE_INSTALLER=true"})," and restart the backend. Prefer SSH keys; exposing this endpoint increases risk."]}),e.jsx("p",{className:"small text-secondary mb-3",children:"One-liner on the target server (as root):"}),e.jsxs("pre",{className:"bg-dark text-success small p-3 rounded mb-3 mb-0 overflow-auto",children:["curl -fsSL ",t.default_install_url," | bash"]}),e.jsx(A,{to:"/login",className:"btn btn-link btn-sm px-0 mt-3",children:"Panel login"})]})})}):e.jsx("div",{className:"min-vh-100 bg-body-secondary py-4 px-3",children:e.jsxs("div",{className:"container",style:{maxWidth:900},children:[e.jsxs(b,{variant:"warning",className:"mb-3",children:[e.jsx("strong",{children:"Security warning:"})," SSH credentials are sent to this panel API and used only for this session (not stored). Prefer ",e.jsx("strong",{children:"SSH private keys"}),". Root password SSH is often disabled on Ubuntu. Non-root users need ",e.jsx("strong",{children:"passwordless sudo"})," (",e.jsx("code",{children:"sudo -n"}),") to run the installer. Allow SSH from this server to the target on port ",m,"."]}),e.jsx("div",{className:"card shadow-sm",children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-2",children:"Remote install (SSH)"}),e.jsxs("p",{className:"small text-secondary mb-4 mb-0",children:["Runs the published ",e.jsx("code",{children:"install.sh"})," on the target via SSH (same as shell one-liner)."]}),e.jsx("hr",{}),e.jsxs("form",{onSubmit:$,className:"mt-3",children:[R?e.jsx(b,{className:"mb-3",children:R}):null,e.jsxs("div",{className:"row g-3 mb-3",children:[e.jsxs("div",{className:"col-md-8",children:[e.jsx("label",{className:"form-label",children:"Host"}),e.jsx("input",{type:"text",value:j,onChange:s=>L(s.target.value),className:"form-control",placeholder:"203.0.113.50",required:!0})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"form-label",children:"SSH port"}),e.jsx("input",{type:"number",value:m,onChange:s=>F(s.target.value),className:"form-control",min:1,max:65535})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH username"}),e.jsx("input",{type:"text",value:f,onChange:s=>O(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("span",{className:"form-label d-block",children:"Authentication"}),e.jsxs("div",{className:"d-flex gap-4",children:[e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-key",checked:n==="key",onChange:()=>y("key")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-key",children:"Private key"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-pw",checked:n==="password",onChange:()=>y("password")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-pw",children:"Password"})]})]})]}),n==="key"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Private key (PEM)"}),e.jsx("textarea",{value:N,onChange:s=>q(s.target.value),rows:6,className:"form-control font-monospace small",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Key passphrase (optional)"}),e.jsx("input",{type:"password",value:g,onChange:s=>U(s.target.value),className:"form-control"})]})]}):e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH password"}),e.jsx("input",{type:"password",value:v,onChange:s=>S(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Install script URL (https only)"}),e.jsx("input",{type:"url",value:w,onChange:s=>k(s.target.value),className:"form-control small"})]}),e.jsx(M,{type:"submit",variant:"primary",className:"w-100",disabled:P||!(t!=null&&t.enabled)||!t,children:P?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status"}),"Running…"]}):"Start remote install"})]})]})}),h.length>0?e.jsx("div",{className:"card bg-dark text-light mt-3",children:e.jsxs("div",{className:"card-body p-3",children:[e.jsx("pre",{ref:o,className:"small font-monospace mb-0 overflow-auto text-wrap",style:{maxHeight:"24rem"},children:h.join(` +import{r as a,j as e,aw as A}from"./index-CRR9sQ49.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as M}from"./AdminButton-Bd2cLTu3.js";function Y(){const[t,T]=a.useState(null),[d,I]=a.useState(""),[j,L]=a.useState(""),[m,F]=a.useState("22"),[f,O]=a.useState("root"),[n,y]=a.useState("key"),[N,q]=a.useState(""),[g,U]=a.useState(""),[v,S]=a.useState(""),[w,k]=a.useState(""),[h,E]=a.useState([]),[P,u]=a.useState(!1),[H,C]=a.useState(null),[R,_]=a.useState(""),o=a.useRef(null);a.useEffect(()=>{fetch("/api/v1/public-install/config").then(s=>s.ok?s.json():Promise.reject(new Error(`HTTP ${s.status}`))).then(s=>{T(s),k(s.default_install_url||"")}).catch(()=>I("Could not load installer configuration"))},[]),a.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[h]);const p=a.useCallback(s=>{E(c=>[...c.slice(-2e3),s])},[]);async function $(s){if(s.preventDefault(),_(""),E([]),C(null),!(t!=null&&t.enabled))return;const c=w.trim()||t.default_install_url,K=n==="key"?{type:"key",private_key:N,passphrase:g||null}:{type:"password",password:v},B={host:j.trim(),port:parseInt(m,10)||22,username:f.trim(),auth:K,install_url:c===t.default_install_url?null:c};u(!0);try{const l=await fetch("/api/v1/public-install/jobs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!l.ok){const i=await l.json().catch(()=>({}));throw new Error(i.detail||`HTTP ${l.status}`)}const{job_id:W}=await l.json(),J=window.location.protocol==="https:"?"wss:":"ws:",x=new WebSocket(`${J}//${window.location.host}/api/v1/public-install/ws/${W}`);x.onmessage=i=>{try{const r=JSON.parse(i.data);r.type==="line"&&typeof r.text=="string"&&p(r.text),r.type==="done"&&C(typeof r.exit_code=="number"?r.exit_code:-1)}catch{p(String(i.data))}},x.onerror=()=>p("[websocket error]"),x.onclose=()=>u(!1)}catch(l){_(l instanceof Error?l.message:"Request failed"),u(!1)}finally{n==="password"&&S("")}}return!t&&!d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary",children:e.jsx("p",{className:"text-secondary mb-0",children:"Loading…"})}):d?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx(b,{children:d})}):t&&!t.enabled?e.jsx("div",{className:"min-vh-100 d-flex align-items-center justify-content-center bg-body-secondary p-3",children:e.jsx("div",{className:"card shadow-sm w-100",style:{maxWidth:520},children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-3",children:"Remote SSH installer disabled"}),e.jsxs("p",{className:"small text-secondary mb-3",children:["Enable it on the API server with environment variable"," ",e.jsx("code",{children:"ENABLE_REMOTE_INSTALLER=true"})," and restart the backend. Prefer SSH keys; exposing this endpoint increases risk."]}),e.jsx("p",{className:"small text-secondary mb-3",children:"One-liner on the target server (as root):"}),e.jsxs("pre",{className:"bg-dark text-success small p-3 rounded mb-3 mb-0 overflow-auto",children:["curl -fsSL ",t.default_install_url," | bash"]}),e.jsx(A,{to:"/login",className:"btn btn-link btn-sm px-0 mt-3",children:"Panel login"})]})})}):e.jsx("div",{className:"min-vh-100 bg-body-secondary py-4 px-3",children:e.jsxs("div",{className:"container",style:{maxWidth:900},children:[e.jsxs(b,{variant:"warning",className:"mb-3",children:[e.jsx("strong",{children:"Security warning:"})," SSH credentials are sent to this panel API and used only for this session (not stored). Prefer ",e.jsx("strong",{children:"SSH private keys"}),". Root password SSH is often disabled on Ubuntu. Non-root users need ",e.jsx("strong",{children:"passwordless sudo"})," (",e.jsx("code",{children:"sudo -n"}),") to run the installer. Allow SSH from this server to the target on port ",m,"."]}),e.jsx("div",{className:"card shadow-sm",children:e.jsxs("div",{className:"card-body p-4",children:[e.jsx("h1",{className:"h4 mb-2",children:"Remote install (SSH)"}),e.jsxs("p",{className:"small text-secondary mb-4 mb-0",children:["Runs the published ",e.jsx("code",{children:"install.sh"})," on the target via SSH (same as shell one-liner)."]}),e.jsx("hr",{}),e.jsxs("form",{onSubmit:$,className:"mt-3",children:[R?e.jsx(b,{className:"mb-3",children:R}):null,e.jsxs("div",{className:"row g-3 mb-3",children:[e.jsxs("div",{className:"col-md-8",children:[e.jsx("label",{className:"form-label",children:"Host"}),e.jsx("input",{type:"text",value:j,onChange:s=>L(s.target.value),className:"form-control",placeholder:"203.0.113.50",required:!0})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"form-label",children:"SSH port"}),e.jsx("input",{type:"number",value:m,onChange:s=>F(s.target.value),className:"form-control",min:1,max:65535})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH username"}),e.jsx("input",{type:"text",value:f,onChange:s=>O(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("span",{className:"form-label d-block",children:"Authentication"}),e.jsxs("div",{className:"d-flex gap-4",children:[e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-key",checked:n==="key",onChange:()=>y("key")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-key",children:"Private key"})]}),e.jsxs("div",{className:"form-check",children:[e.jsx("input",{className:"form-check-input",type:"radio",name:"auth",id:"auth-pw",checked:n==="password",onChange:()=>y("password")}),e.jsx("label",{className:"form-check-label",htmlFor:"auth-pw",children:"Password"})]})]})]}),n==="key"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Private key (PEM)"}),e.jsx("textarea",{value:N,onChange:s=>q(s.target.value),rows:6,className:"form-control font-monospace small",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Key passphrase (optional)"}),e.jsx("input",{type:"password",value:g,onChange:s=>U(s.target.value),className:"form-control"})]})]}):e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"SSH password"}),e.jsx("input",{type:"password",value:v,onChange:s=>S(s.target.value),className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Install script URL (https only)"}),e.jsx("input",{type:"url",value:w,onChange:s=>k(s.target.value),className:"form-control small"})]}),e.jsx(M,{type:"submit",variant:"primary",className:"w-100",disabled:P||!(t!=null&&t.enabled)||!t,children:P?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status"}),"Running…"]}):"Start remote install"})]})]})}),h.length>0?e.jsx("div",{className:"card bg-dark text-light mt-3",children:e.jsxs("div",{className:"card-body p-3",children:[e.jsx("pre",{ref:o,className:"small font-monospace mb-0 overflow-auto text-wrap",style:{maxHeight:"24rem"},children:h.join(` `)}),H!==null?e.jsxs("p",{className:"small border-secondary border-top pt-2 mt-2 mb-0",children:["Exit code: ",e.jsx("strong",{children:H})]}):null]})}):null,e.jsx("p",{className:"text-center small text-secondary mt-3 mb-0",children:e.jsx(A,{to:"/login",children:"Panel login"})})]})})}export{Y as RemoteInstallPage}; diff --git a/YakPanel-server/frontend/dist/assets/ServicesPage-Nd6NZHlM.js b/YakPanel-server/frontend/dist/assets/ServicesPage-DNZuAdmh.js similarity index 91% rename from YakPanel-server/frontend/dist/assets/ServicesPage-Nd6NZHlM.js rename to YakPanel-server/frontend/dist/assets/ServicesPage-DNZuAdmh.js index 11c23cd1..dd2cee77 100644 --- a/YakPanel-server/frontend/dist/assets/ServicesPage-Nd6NZHlM.js +++ b/YakPanel-server/frontend/dist/assets/ServicesPage-DNZuAdmh.js @@ -1 +1 @@ -import{r,j as e,a as l}from"./index-cE9w-Kq7.js";import{A as S}from"./AdminAlert-yrdXFH0e.js";import{A as g}from"./AdminButton-ByutG8m-.js";import{A as y}from"./AdminTable-eCi7S__-.js";import{P as x}from"./PageHeader-HdM4gpcn.js";function u({show:d}){return d?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function R(){const[d,j]=r.useState([]),[p,o]=r.useState(!0),[m,c]=r.useState(""),[n,s]=r.useState(null),i=()=>{o(!0),l("/service/list").then(t=>j(t.services||[])).catch(t=>c(t.message)).finally(()=>o(!1))};r.useEffect(()=>{i()},[]);const b=t=>{s(t),l(`/service/${t}/start`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},f=t=>{s(t),l(`/service/${t}/stop`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},v=t=>{s(t),l(`/service/${t}/restart`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},h=t=>t==="active"||t==="activating";return p?e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services",actions:e.jsxs(g,{variant:"secondary",size:"sm",onClick:i,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})}),m?e.jsx(S,{className:"mb-3",children:m}):null,e.jsx("div",{className:"alert alert-secondary small mb-3",children:"Control system services via systemctl. Requires panel to run with sufficient privileges."}),e.jsx("div",{className:"card",children:e.jsxs(y,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Service"}),e.jsx("th",{children:"Unit"}),e.jsx("th",{children:"Status"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name}),e.jsx("td",{className:"font-monospace small",children:t.unit}),e.jsx("td",{children:e.jsx("span",{className:h(t.status)?"text-success":"text-secondary",children:t.status})}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:h(t.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:!!n,onClick:()=>v(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:!!n,onClick:()=>f(t.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:!!n,onClick:()=>b(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},t.id))})]})})]})}export{R as ServicesPage}; +import{r,j as e,a as l}from"./index-CRR9sQ49.js";import{A as S}from"./AdminAlert-DW1IRWce.js";import{A as g}from"./AdminButton-Bd2cLTu3.js";import{A as y}from"./AdminTable-BLiLxfnS.js";import{P as x}from"./PageHeader-BcjNf7GG.js";function u({show:d}){return d?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null}function R(){const[d,j]=r.useState([]),[p,o]=r.useState(!0),[m,c]=r.useState(""),[n,s]=r.useState(null),i=()=>{o(!0),l("/service/list").then(t=>j(t.services||[])).catch(t=>c(t.message)).finally(()=>o(!1))};r.useEffect(()=>{i()},[]);const b=t=>{s(t),l(`/service/${t}/start`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},f=t=>{s(t),l(`/service/${t}/stop`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},v=t=>{s(t),l(`/service/${t}/restart`,{method:"POST"}).then(i).catch(a=>c(a.message)).finally(()=>s(null))},h=t=>t==="active"||t==="activating";return p?e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Services",actions:e.jsxs(g,{variant:"secondary",size:"sm",onClick:i,children:[e.jsx("i",{className:"ti ti-rotate-clockwise me-1","aria-hidden":!0}),"Refresh"]})}),m?e.jsx(S,{className:"mb-3",children:m}):null,e.jsx("div",{className:"alert alert-secondary small mb-3",children:"Control system services via systemctl. Requires panel to run with sufficient privileges."}),e.jsx("div",{className:"card",children:e.jsxs(y,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Service"}),e.jsx("th",{children:"Unit"}),e.jsx("th",{children:"Status"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:t.name}),e.jsx("td",{className:"font-monospace small",children:t.unit}),e.jsx("td",{children:e.jsx("span",{className:h(t.status)?"text-success":"text-secondary",children:t.status})}),e.jsx("td",{className:"text-end",children:e.jsx("span",{className:"d-inline-flex gap-1 justify-content-end",children:h(t.status)?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-warning p-1",title:"Restart",disabled:!!n,onClick:()=>v(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-rotate-clockwise","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Stop",disabled:!!n,onClick:()=>f(t.id),children:e.jsx("i",{className:"ti ti-square","aria-hidden":!0})})]}):e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-success p-1",title:"Start",disabled:!!n,onClick:()=>b(t.id),children:n===t.id?e.jsx(u,{show:!0}):e.jsx("i",{className:"ti ti-player-play","aria-hidden":!0})})})})]},t.id))})]})})]})}export{R as ServicesPage}; diff --git a/YakPanel-server/frontend/dist/assets/SitePage-BCHU1V0e.js b/YakPanel-server/frontend/dist/assets/SitePage-CeCv6Zaa.js similarity index 97% rename from YakPanel-server/frontend/dist/assets/SitePage-BCHU1V0e.js rename to YakPanel-server/frontend/dist/assets/SitePage-CeCv6Zaa.js index cf41880c..d1cf9baa 100644 --- a/YakPanel-server/frontend/dist/assets/SitePage-BCHU1V0e.js +++ b/YakPanel-server/frontend/dist/assets/SitePage-CeCv6Zaa.js @@ -1 +1 @@ -import{r as l,j as e,a as Ee,c as Ae,s as He,l as G,b as De,d as ie,e as Fe,f as Ge,h as Le,i as Ie,k as qe,u as Me,m as ze,n as $e,o as Ue}from"./index-cE9w-Kq7.js";import{M as a}from"./Modal-CL3xZqxR.js";import{A as k}from"./AdminAlert-yrdXFH0e.js";import{A as ce}from"./AdminButton-ByutG8m-.js";import{A as We}from"./AdminTable-eCi7S__-.js";import{E as Ve}from"./EmptyState-CmnFWkSO.js";import{P as L}from"./PageHeader-HdM4gpcn.js";function et(){const[C,re]=l.useState([]),[oe,I]=l.useState(!0),[b,i]=l.useState(""),[de,j]=l.useState(!1),[q,M]=l.useState(!1),[z,w]=l.useState(""),[r,f]=l.useState(null),[$,B]=l.useState([]),[_,g]=l.useState(!1),[T,N]=l.useState(null),[n,c]=l.useState(null),[U,W]=l.useState(!1),[V,p]=l.useState(""),[K,J]=l.useState(null),[m,P]=l.useState(null),[O,R]=l.useState([]),[E,A]=l.useState(""),[H,D]=l.useState(""),[Q,X]=l.useState(301),[me,Y]=l.useState(!1),[x,h]=l.useState(null),[F,Z]=l.useState(""),[ee,te]=l.useState("main"),[v,o]=l.useState(null),[S,y]=l.useState(!1),u=()=>{I(!0),Ee("/site/list").then(re).catch(t=>i(t.message)).finally(()=>I(!1))};l.useEffect(()=>{u()},[]);const ue=t=>{var ae,ne;t.preventDefault();const s=t.currentTarget,d=s.elements.namedItem("name").value.trim(),le=s.elements.namedItem("domains").value.trim(),we=s.elements.namedItem("path").value.trim(),Be=s.elements.namedItem("ps").value.trim();if(!d||!le){w("Name and domain(s) are required");return}const _e=le.split(/[\s,]+/).filter(Boolean),Te=((ae=s.elements.namedItem("php_version"))==null?void 0:ae.value)||"74",Pe=((ne=s.elements.namedItem("force_https"))==null?void 0:ne.checked)||!1;M(!0),w(""),Ae({name:d,domains:_e,path:we||void 0,ps:Be||void 0,php_version:Te,force_https:Pe}).then(()=>{j(!1),s.reset(),u()}).catch(Re=>w(Re.message)).finally(()=>M(!1))},he=(t,s)=>{confirm(`Delete site "${s}"? This cannot be undone.`)&&Fe(t).then(u).catch(d=>i(d.message))},pe=t=>{f(t),B([]),ie(t).then(s=>B(s.backups)).catch(s=>i(s.message))},xe=()=>{r&&(g(!0),ze(r).then(()=>ie(r).then(t=>B(t.backups))).catch(t=>i(t.message)).finally(()=>g(!1)))},be=t=>{!r||!confirm(`Restore from ${t}? This will overwrite existing files.`)||(g(!0),Ue(r,t).then(()=>f(null)).catch(s=>i(s.message)).finally(()=>g(!1)))},je=t=>{r&&$e(r,t).catch(s=>i(s.message))},fe=t=>{N(t),p(""),De(t).then(s=>c({domains:(s.domains||[]).join(", "),path:s.path||"",ps:s.ps||"",php_version:s.php_version||"74",force_https:!!(s.force_https&&s.force_https!==0)})).catch(s=>p(s.message))},ge=t=>{if(t.preventDefault(),!T||!n)return;const s=n.domains.split(/[\s,]+/).filter(Boolean);if(s.length===0){p("At least one domain is required");return}W(!0),p(""),Me(T,{domains:s,path:n.path||void 0,ps:n.ps||void 0,php_version:n.php_version,force_https:n.force_https}).then(()=>{N(null),c(null),u()}).catch(d=>p(d.message)).finally(()=>W(!1))},se=(t,s)=>{J(t),He(t,s).then(u).catch(d=>i(d.message)).finally(()=>J(null))},Ne=t=>{P(t),A(""),D(""),X(301),G(t).then(R).catch(s=>i(s.message))},ve=t=>{t.preventDefault(),!(!m||!E.trim()||!H.trim())&&(Y(!0),Ie(m,E.trim(),H.trim(),Q).then(()=>G(m).then(R)).then(()=>{A(""),D("")}).catch(s=>i(s.message)).finally(()=>Y(!1)))},Se=t=>{m&&qe(m,t).then(()=>G(m).then(R)).catch(s=>i(s.message))},ye=t=>{t.preventDefault(),!(!x||!F.trim())&&(y(!0),Ge(x,F.trim(),ee.trim()||"main").then(()=>{h(null),o(null),u()}).catch(s=>i(s.message)).finally(()=>y(!1)))},ke=()=>{x&&(y(!0),Le(x).then(()=>{h(null),o(null),u()}).catch(t=>i(t.message)).finally(()=>y(!1)))},Ce=t=>t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/1024/1024).toFixed(1)+" MB";return oe?e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):b&&!C.length?e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website"}),e.jsx(k,{variant:"danger",children:b})]}):e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website",actions:e.jsxs(ce,{onClick:()=>j(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Site"]})}),b?e.jsx(k,{variant:"warning",children:b}):null,e.jsxs(a,{show:de,onHide:()=>j(!1),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Create Site"})}),e.jsxs("form",{onSubmit:ue,children:[e.jsxs(a.Body,{children:[z?e.jsx(k,{variant:"danger",children:z}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Site Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s) (comma or space separated)"}),e.jsx("input",{name:"domains",type:"text",placeholder:"example.com www.example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot/example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{name:"php_version",className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{name:"force_https",type:"checkbox",id:"create_force_https",className:"form-check-input"}),e.jsx("label",{htmlFor:"create_force_https",className:"form-check-label",children:"Force HTTPS (redirect HTTP to HTTPS)"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My website",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>j(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:q,className:"btn btn-primary",children:q?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(We,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Path"}),e.jsx("th",{children:"Domains"}),e.jsx("th",{children:"Type"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:C.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Ve,{title:"No sites yet",description:'Click "Add Site" to create one.'})})}):C.map(t=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:t.name}),e.jsx("td",{className:"align-middle text-muted",children:t.path}),e.jsx("td",{className:"align-middle",children:t.domain_count}),e.jsx("td",{className:"align-middle",children:t.project_type}),e.jsxs("td",{className:"align-middle text-end text-nowrap",children:[t.status===1?e.jsx("button",{type:"button",onClick:()=>se(t.id,!1),disabled:K===t.id,className:"btn btn-sm btn-outline-warning me-1",title:"Stop",children:e.jsx("i",{className:"ti ti-player-stop"})}):e.jsx("button",{type:"button",onClick:()=>se(t.id,!0),disabled:K===t.id,className:"btn btn-sm btn-outline-success me-1",title:"Start",children:e.jsx("i",{className:"ti ti-player-play"})}),e.jsx("button",{type:"button",onClick:()=>{h(t.id),o("clone"),Z(""),te("main")},className:"btn btn-sm btn-outline-success me-1",title:"Git Deploy",children:e.jsx("i",{className:"ti ti-git-branch"})}),e.jsx("button",{type:"button",onClick:()=>Ne(t.id),className:"btn btn-sm btn-outline-secondary me-1",title:"Redirects",children:e.jsx("i",{className:"ti ti-arrows-right-left"})}),e.jsx("button",{type:"button",onClick:()=>fe(t.id),className:"btn btn-sm btn-outline-primary me-1",title:"Edit",children:e.jsx("i",{className:"ti ti-pencil"})}),e.jsx("button",{type:"button",onClick:()=>pe(t.id),className:"btn btn-sm btn-outline-primary me-1",title:"Backup",children:e.jsx("i",{className:"ti ti-archive"})}),e.jsx("button",{type:"button",onClick:()=>he(t.id,t.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},t.id))})]})})}),e.jsxs(a,{show:!!x&&!!v,onHide:()=>{h(null),o(null)},centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Git Deploy"})}),e.jsxs(a.Body,{children:[e.jsxs("div",{className:"btn-group mb-3",role:"group",children:[e.jsx("button",{type:"button",className:`btn btn-sm ${v==="clone"?"btn-success":"btn-outline-secondary"}`,onClick:()=>o("clone"),children:"Clone"}),e.jsx("button",{type:"button",className:`btn btn-sm ${v==="pull"?"btn-success":"btn-outline-secondary"}`,onClick:()=>o("pull"),children:"Pull"})]}),v==="clone"?e.jsxs("form",{onSubmit:ye,children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Repository URL"}),e.jsx("input",{value:F,onChange:t=>Z(t.target.value),placeholder:"https://github.com/user/repo.git",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Branch"}),e.jsx("input",{value:ee,onChange:t=>te(t.target.value),placeholder:"main",className:"form-control"})]}),e.jsx("p",{className:"small text-muted",children:"Site path must be empty for clone."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{h(null),o(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:S,className:"btn btn-success",children:S?"Cloning…":"Clone"})]})]}):e.jsxs("div",{children:[e.jsx("p",{className:"text-muted small",children:"Pull latest changes from the remote repository."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{h(null),o(null)},children:"Cancel"}),e.jsx("button",{type:"button",onClick:ke,disabled:S,className:"btn btn-success",children:S?"Pulling…":"Pull"})]})]})]})]}),e.jsxs(a,{show:m!=null,onHide:()=>P(null),size:"lg",centered:!0,scrollable:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Redirects"})}),e.jsxs(a.Body,{children:[e.jsxs("form",{onSubmit:ve,className:"row g-2 align-items-end mb-3",children:[e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Source"}),e.jsx("input",{value:E,onChange:t=>A(t.target.value),placeholder:"/old-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Target"}),e.jsx("input",{value:H,onChange:t=>D(t.target.value),placeholder:"/new-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-2",children:[e.jsx("label",{className:"form-label small",children:"Code"}),e.jsxs("select",{value:Q,onChange:t=>X(Number(t.target.value)),className:"form-select form-select-sm",children:[e.jsx("option",{value:301,children:"301"}),e.jsx("option",{value:302,children:"302"})]})]}),e.jsx("div",{className:"col-md-2",children:e.jsx("button",{type:"submit",disabled:me,className:"btn btn-primary btn-sm w-100",children:"Add"})})]}),O.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No redirects"}):e.jsx("ul",{className:"list-group list-group-flush",children:O.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center gap-2 small",children:[e.jsx("code",{className:"text-truncate",children:t.source}),e.jsx("span",{className:"text-muted",children:"→"}),e.jsx("code",{className:"text-truncate flex-grow-1",children:t.target}),e.jsx("span",{className:"badge bg-secondary",children:t.code}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-danger p-0",onClick:()=>Se(t.id),children:e.jsx("i",{className:"ti ti-trash"})})]},t.id))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>P(null),children:"Close"})})]}),e.jsxs(a,{show:T!=null&&n!=null,onHide:()=>{N(null),c(null)},centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Edit Site"})}),n?e.jsxs("form",{onSubmit:ge,children:[e.jsxs(a.Body,{children:[V?e.jsx(k,{variant:"danger",children:V}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s)"}),e.jsx("input",{value:n.domains,onChange:t=>c({...n,domains:t.target.value}),type:"text",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{value:n.path,onChange:t=>c({...n,path:t.target.value}),type:"text",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{value:n.php_version,onChange:t=>c({...n,php_version:t.target.value}),className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{type:"checkbox",id:"edit_force_https",className:"form-check-input",checked:n.force_https,onChange:t=>c({...n,force_https:t.target.checked})}),e.jsx("label",{htmlFor:"edit_force_https",className:"form-check-label",children:"Force HTTPS"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{value:n.ps,onChange:t=>c({...n,ps:t.target.value}),type:"text",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{N(null),c(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:U,className:"btn btn-primary",children:U?"Saving…":"Save"})]})]}):null]}),e.jsxs(a,{show:r!=null,onHide:()=>f(null),size:"lg",centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Site Backup"})}),e.jsxs(a.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(ce,{onClick:xe,disabled:_,children:[e.jsx("i",{className:"ti ti-archive me-1"}),_?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small",children:"Existing backups"}),$.length===0?e.jsx("p",{className:"text-muted small",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:$.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small text-truncate flex-grow-1",children:t.filename}),e.jsx("span",{className:"text-muted small",children:Ce(t.size)}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link",onClick:()=>je(t.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-warning",onClick:()=>be(t.filename),disabled:_,children:e.jsx("i",{className:"ti ti-restore"})})]},t.filename))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>f(null),children:"Close"})})]})]})}export{et as SitePage}; +import{r as l,j as e,a as Ee,c as Ae,s as He,l as G,b as De,d as ie,e as Fe,f as Ge,h as Le,i as Ie,k as qe,u as Me,m as ze,n as $e,o as Ue}from"./index-CRR9sQ49.js";import{M as a}from"./Modal-B7V4w_St.js";import{A as k}from"./AdminAlert-DW1IRWce.js";import{A as ce}from"./AdminButton-Bd2cLTu3.js";import{A as We}from"./AdminTable-BLiLxfnS.js";import{E as Ve}from"./EmptyState-C61VdEFl.js";import{P as L}from"./PageHeader-BcjNf7GG.js";function et(){const[C,re]=l.useState([]),[oe,I]=l.useState(!0),[b,i]=l.useState(""),[de,j]=l.useState(!1),[q,M]=l.useState(!1),[z,w]=l.useState(""),[r,f]=l.useState(null),[$,B]=l.useState([]),[_,g]=l.useState(!1),[T,N]=l.useState(null),[n,c]=l.useState(null),[U,W]=l.useState(!1),[V,p]=l.useState(""),[K,J]=l.useState(null),[m,P]=l.useState(null),[O,R]=l.useState([]),[E,A]=l.useState(""),[H,D]=l.useState(""),[Q,X]=l.useState(301),[me,Y]=l.useState(!1),[x,h]=l.useState(null),[F,Z]=l.useState(""),[ee,te]=l.useState("main"),[v,o]=l.useState(null),[S,y]=l.useState(!1),u=()=>{I(!0),Ee("/site/list").then(re).catch(t=>i(t.message)).finally(()=>I(!1))};l.useEffect(()=>{u()},[]);const ue=t=>{var ae,ne;t.preventDefault();const s=t.currentTarget,d=s.elements.namedItem("name").value.trim(),le=s.elements.namedItem("domains").value.trim(),we=s.elements.namedItem("path").value.trim(),Be=s.elements.namedItem("ps").value.trim();if(!d||!le){w("Name and domain(s) are required");return}const _e=le.split(/[\s,]+/).filter(Boolean),Te=((ae=s.elements.namedItem("php_version"))==null?void 0:ae.value)||"74",Pe=((ne=s.elements.namedItem("force_https"))==null?void 0:ne.checked)||!1;M(!0),w(""),Ae({name:d,domains:_e,path:we||void 0,ps:Be||void 0,php_version:Te,force_https:Pe}).then(()=>{j(!1),s.reset(),u()}).catch(Re=>w(Re.message)).finally(()=>M(!1))},he=(t,s)=>{confirm(`Delete site "${s}"? This cannot be undone.`)&&Fe(t).then(u).catch(d=>i(d.message))},pe=t=>{f(t),B([]),ie(t).then(s=>B(s.backups)).catch(s=>i(s.message))},xe=()=>{r&&(g(!0),ze(r).then(()=>ie(r).then(t=>B(t.backups))).catch(t=>i(t.message)).finally(()=>g(!1)))},be=t=>{!r||!confirm(`Restore from ${t}? This will overwrite existing files.`)||(g(!0),Ue(r,t).then(()=>f(null)).catch(s=>i(s.message)).finally(()=>g(!1)))},je=t=>{r&&$e(r,t).catch(s=>i(s.message))},fe=t=>{N(t),p(""),De(t).then(s=>c({domains:(s.domains||[]).join(", "),path:s.path||"",ps:s.ps||"",php_version:s.php_version||"74",force_https:!!(s.force_https&&s.force_https!==0)})).catch(s=>p(s.message))},ge=t=>{if(t.preventDefault(),!T||!n)return;const s=n.domains.split(/[\s,]+/).filter(Boolean);if(s.length===0){p("At least one domain is required");return}W(!0),p(""),Me(T,{domains:s,path:n.path||void 0,ps:n.ps||void 0,php_version:n.php_version,force_https:n.force_https}).then(()=>{N(null),c(null),u()}).catch(d=>p(d.message)).finally(()=>W(!1))},se=(t,s)=>{J(t),He(t,s).then(u).catch(d=>i(d.message)).finally(()=>J(null))},Ne=t=>{P(t),A(""),D(""),X(301),G(t).then(R).catch(s=>i(s.message))},ve=t=>{t.preventDefault(),!(!m||!E.trim()||!H.trim())&&(Y(!0),Ie(m,E.trim(),H.trim(),Q).then(()=>G(m).then(R)).then(()=>{A(""),D("")}).catch(s=>i(s.message)).finally(()=>Y(!1)))},Se=t=>{m&&qe(m,t).then(()=>G(m).then(R)).catch(s=>i(s.message))},ye=t=>{t.preventDefault(),!(!x||!F.trim())&&(y(!0),Ge(x,F.trim(),ee.trim()||"main").then(()=>{h(null),o(null),u()}).catch(s=>i(s.message)).finally(()=>y(!1)))},ke=()=>{x&&(y(!0),Le(x).then(()=>{h(null),o(null),u()}).catch(t=>i(t.message)).finally(()=>y(!1)))},Ce=t=>t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/1024/1024).toFixed(1)+" MB";return oe?e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website"}),e.jsx("div",{className:"text-center py-5 text-muted",children:"Loading…"})]}):b&&!C.length?e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website"}),e.jsx(k,{variant:"danger",children:b})]}):e.jsxs(e.Fragment,{children:[e.jsx(L,{title:"Website",actions:e.jsxs(ce,{onClick:()=>j(!0),children:[e.jsx("i",{className:"ti ti-plus me-1"}),"Add Site"]})}),b?e.jsx(k,{variant:"warning",children:b}):null,e.jsxs(a,{show:de,onHide:()=>j(!1),centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Create Site"})}),e.jsxs("form",{onSubmit:ue,children:[e.jsxs(a.Body,{children:[z?e.jsx(k,{variant:"danger",children:z}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Site Name"}),e.jsx("input",{name:"name",type:"text",placeholder:"example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s) (comma or space separated)"}),e.jsx("input",{name:"domains",type:"text",placeholder:"example.com www.example.com",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{name:"path",type:"text",placeholder:"/www/wwwroot/example.com",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{name:"php_version",className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{name:"force_https",type:"checkbox",id:"create_force_https",className:"form-check-input"}),e.jsx("label",{htmlFor:"create_force_https",className:"form-check-label",children:"Force HTTPS (redirect HTTP to HTTPS)"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{name:"ps",type:"text",placeholder:"My website",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>j(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:q,className:"btn btn-primary",children:q?"Creating…":"Create"})]})]})]}),e.jsx("div",{className:"card shadow-sm border-0",children:e.jsx("div",{className:"card-body p-0",children:e.jsxs(We,{children:[e.jsx("thead",{className:"table-light",children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Path"}),e.jsx("th",{children:"Domains"}),e.jsx("th",{children:"Type"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:C.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-0",children:e.jsx(Ve,{title:"No sites yet",description:'Click "Add Site" to create one.'})})}):C.map(t=>e.jsxs("tr",{children:[e.jsx("td",{className:"align-middle",children:t.name}),e.jsx("td",{className:"align-middle text-muted",children:t.path}),e.jsx("td",{className:"align-middle",children:t.domain_count}),e.jsx("td",{className:"align-middle",children:t.project_type}),e.jsxs("td",{className:"align-middle text-end text-nowrap",children:[t.status===1?e.jsx("button",{type:"button",onClick:()=>se(t.id,!1),disabled:K===t.id,className:"btn btn-sm btn-outline-warning me-1",title:"Stop",children:e.jsx("i",{className:"ti ti-player-stop"})}):e.jsx("button",{type:"button",onClick:()=>se(t.id,!0),disabled:K===t.id,className:"btn btn-sm btn-outline-success me-1",title:"Start",children:e.jsx("i",{className:"ti ti-player-play"})}),e.jsx("button",{type:"button",onClick:()=>{h(t.id),o("clone"),Z(""),te("main")},className:"btn btn-sm btn-outline-success me-1",title:"Git Deploy",children:e.jsx("i",{className:"ti ti-git-branch"})}),e.jsx("button",{type:"button",onClick:()=>Ne(t.id),className:"btn btn-sm btn-outline-secondary me-1",title:"Redirects",children:e.jsx("i",{className:"ti ti-arrows-right-left"})}),e.jsx("button",{type:"button",onClick:()=>fe(t.id),className:"btn btn-sm btn-outline-primary me-1",title:"Edit",children:e.jsx("i",{className:"ti ti-pencil"})}),e.jsx("button",{type:"button",onClick:()=>pe(t.id),className:"btn btn-sm btn-outline-primary me-1",title:"Backup",children:e.jsx("i",{className:"ti ti-archive"})}),e.jsx("button",{type:"button",onClick:()=>he(t.id,t.name),className:"btn btn-sm btn-outline-danger",title:"Delete",children:e.jsx("i",{className:"ti ti-trash"})})]})]},t.id))})]})})}),e.jsxs(a,{show:!!x&&!!v,onHide:()=>{h(null),o(null)},centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Git Deploy"})}),e.jsxs(a.Body,{children:[e.jsxs("div",{className:"btn-group mb-3",role:"group",children:[e.jsx("button",{type:"button",className:`btn btn-sm ${v==="clone"?"btn-success":"btn-outline-secondary"}`,onClick:()=>o("clone"),children:"Clone"}),e.jsx("button",{type:"button",className:`btn btn-sm ${v==="pull"?"btn-success":"btn-outline-secondary"}`,onClick:()=>o("pull"),children:"Pull"})]}),v==="clone"?e.jsxs("form",{onSubmit:ye,children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Repository URL"}),e.jsx("input",{value:F,onChange:t=>Z(t.target.value),placeholder:"https://github.com/user/repo.git",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Branch"}),e.jsx("input",{value:ee,onChange:t=>te(t.target.value),placeholder:"main",className:"form-control"})]}),e.jsx("p",{className:"small text-muted",children:"Site path must be empty for clone."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{h(null),o(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:S,className:"btn btn-success",children:S?"Cloning…":"Clone"})]})]}):e.jsxs("div",{children:[e.jsx("p",{className:"text-muted small",children:"Pull latest changes from the remote repository."}),e.jsxs("div",{className:"d-flex justify-content-end gap-2",children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{h(null),o(null)},children:"Cancel"}),e.jsx("button",{type:"button",onClick:ke,disabled:S,className:"btn btn-success",children:S?"Pulling…":"Pull"})]})]})]})]}),e.jsxs(a,{show:m!=null,onHide:()=>P(null),size:"lg",centered:!0,scrollable:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Redirects"})}),e.jsxs(a.Body,{children:[e.jsxs("form",{onSubmit:ve,className:"row g-2 align-items-end mb-3",children:[e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Source"}),e.jsx("input",{value:E,onChange:t=>A(t.target.value),placeholder:"/old-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-3",children:[e.jsx("label",{className:"form-label small",children:"Target"}),e.jsx("input",{value:H,onChange:t=>D(t.target.value),placeholder:"/new-path",className:"form-control form-control-sm"})]}),e.jsxs("div",{className:"col-md-2",children:[e.jsx("label",{className:"form-label small",children:"Code"}),e.jsxs("select",{value:Q,onChange:t=>X(Number(t.target.value)),className:"form-select form-select-sm",children:[e.jsx("option",{value:301,children:"301"}),e.jsx("option",{value:302,children:"302"})]})]}),e.jsx("div",{className:"col-md-2",children:e.jsx("button",{type:"submit",disabled:me,className:"btn btn-primary btn-sm w-100",children:"Add"})})]}),O.length===0?e.jsx("p",{className:"text-muted small mb-0",children:"No redirects"}):e.jsx("ul",{className:"list-group list-group-flush",children:O.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center gap-2 small",children:[e.jsx("code",{className:"text-truncate",children:t.source}),e.jsx("span",{className:"text-muted",children:"→"}),e.jsx("code",{className:"text-truncate flex-grow-1",children:t.target}),e.jsx("span",{className:"badge bg-secondary",children:t.code}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-danger p-0",onClick:()=>Se(t.id),children:e.jsx("i",{className:"ti ti-trash"})})]},t.id))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>P(null),children:"Close"})})]}),e.jsxs(a,{show:T!=null&&n!=null,onHide:()=>{N(null),c(null)},centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Edit Site"})}),n?e.jsxs("form",{onSubmit:ge,children:[e.jsxs(a.Body,{children:[V?e.jsx(k,{variant:"danger",children:V}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Domain(s)"}),e.jsx("input",{value:n.domains,onChange:t=>c({...n,domains:t.target.value}),type:"text",className:"form-control",required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Path (optional)"}),e.jsx("input",{value:n.path,onChange:t=>c({...n,path:t.target.value}),type:"text",className:"form-control"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"PHP Version"}),e.jsxs("select",{value:n.php_version,onChange:t=>c({...n,php_version:t.target.value}),className:"form-select",children:[e.jsx("option",{value:"74",children:"7.4"}),e.jsx("option",{value:"80",children:"8.0"}),e.jsx("option",{value:"81",children:"8.1"}),e.jsx("option",{value:"82",children:"8.2"})]})]}),e.jsxs("div",{className:"form-check mb-3",children:[e.jsx("input",{type:"checkbox",id:"edit_force_https",className:"form-check-input",checked:n.force_https,onChange:t=>c({...n,force_https:t.target.checked})}),e.jsx("label",{htmlFor:"edit_force_https",className:"form-check-label",children:"Force HTTPS"})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Note (optional)"}),e.jsx("input",{value:n.ps,onChange:t=>c({...n,ps:t.target.value}),type:"text",className:"form-control"})]})]}),e.jsxs(a.Footer,{children:[e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>{N(null),c(null)},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:U,className:"btn btn-primary",children:U?"Saving…":"Save"})]})]}):null]}),e.jsxs(a,{show:r!=null,onHide:()=>f(null),size:"lg",centered:!0,children:[e.jsx(a.Header,{closeButton:!0,children:e.jsx(a.Title,{children:"Site Backup"})}),e.jsxs(a.Body,{children:[e.jsx("div",{className:"mb-3",children:e.jsxs(ce,{onClick:xe,disabled:_,children:[e.jsx("i",{className:"ti ti-archive me-1"}),_?"Creating…":"Create Backup"]})}),e.jsx("h6",{className:"text-muted small",children:"Existing backups"}),$.length===0?e.jsx("p",{className:"text-muted small",children:"No backups yet"}):e.jsx("ul",{className:"list-group list-group-flush",children:$.map(t=>e.jsxs("li",{className:"list-group-item d-flex align-items-center justify-content-between gap-2",children:[e.jsx("code",{className:"small text-truncate flex-grow-1",children:t.filename}),e.jsx("span",{className:"text-muted small",children:Ce(t.size)}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link",onClick:()=>je(t.filename),title:"Download",children:e.jsx("i",{className:"ti ti-download"})}),e.jsx("button",{type:"button",className:"btn btn-sm btn-link text-warning",onClick:()=>be(t.filename),disabled:_,children:e.jsx("i",{className:"ti ti-restore"})})]},t.filename))})]}),e.jsx(a.Footer,{children:e.jsx("button",{type:"button",className:"btn btn-light",onClick:()=>f(null),children:"Close"})})]})]})}export{et as SitePage}; diff --git a/YakPanel-server/frontend/dist/assets/SoftPage-CPYGL35O.js b/YakPanel-server/frontend/dist/assets/SoftPage-B7PtFv7I.js similarity index 93% rename from YakPanel-server/frontend/dist/assets/SoftPage-CPYGL35O.js rename to YakPanel-server/frontend/dist/assets/SoftPage-B7PtFv7I.js index d2d3b80b..937a6a51 100644 --- a/YakPanel-server/frontend/dist/assets/SoftPage-CPYGL35O.js +++ b/YakPanel-server/frontend/dist/assets/SoftPage-B7PtFv7I.js @@ -1 +1 @@ -import{r as t,j as e,a as c}from"./index-cE9w-Kq7.js";import{A as b}from"./AdminAlert-yrdXFH0e.js";import{A as v}from"./AdminButton-ByutG8m-.js";import{P as m}from"./PageHeader-HdM4gpcn.js";function A(){const[x,u]=t.useState([]),[p,d]=t.useState(!0),[o,a]=t.useState(""),[n,l]=t.useState(null),[f,h]=t.useState(""),r=()=>{d(!0),c("/soft/list").then(s=>{u(s.software||[]),h(s.package_manager||"")}).catch(s=>a(s.message)).finally(()=>d(!1))};t.useEffect(()=>{r()},[]);const j=s=>{l(s),a(""),c(`/soft/install/${s}`,{method:"POST"}).then(()=>r()).catch(i=>a(i.message)).finally(()=>l(null))},g=(s,i)=>{confirm(`Uninstall ${i}?`)&&(l(s),a(""),c(`/soft/uninstall/${s}`,{method:"POST"}).then(()=>r()).catch(N=>a(N.message)).finally(()=>l(null)))};return p?e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store"}),e.jsx("div",{className:"d-flex justify-content-center py-5",children:e.jsx("div",{className:"spinner-border text-primary",role:"status",children:e.jsx("span",{className:"visually-hidden",children:"Loading…"})})})]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store",actions:e.jsxs(v,{variant:"secondary",onClick:r,children:[e.jsx("i",{className:"ti ti-refresh me-1"}),"Refresh"]})}),o?e.jsx(b,{variant:"danger",children:o}):null,e.jsxs("div",{className:"alert alert-warning",role:"note",children:["Installs use your server package manager (",f||"unknown","). Panel must run as root (or equivalent). Supported: apt, dnf/yum/microdnf, apk."]}),e.jsx("div",{className:"row g-3",children:x.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4 d-flex",children:e.jsx("div",{className:"card flex-fill shadow-sm",children:e.jsxs("div",{className:"card-body d-flex flex-column",children:[e.jsxs("div",{className:"d-flex align-items-start justify-content-between gap-2 mb-2",children:[e.jsxs("div",{className:"d-flex align-items-start gap-2",children:[e.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded flex-shrink-0",children:e.jsx("i",{className:"ti ti-package fs-5","aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("h5",{className:"card-title mb-1",children:s.name}),e.jsx("p",{className:"text-muted small mb-0",children:s.desc})]})]}),s.installed?e.jsxs("span",{className:"text-success small text-nowrap",children:[e.jsx("i",{className:"ti ti-circle-check me-1"}),s.version||"Installed"]}):e.jsxs("span",{className:"text-muted small text-nowrap",children:[e.jsx("i",{className:"ti ti-x me-1"}),"Not installed"]})]}),e.jsx("div",{className:"mt-auto pt-3",children:s.installed?e.jsxs("button",{type:"button",onClick:()=>g(s.id,s.name),disabled:n===s.id,className:"btn btn-outline-danger btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Uninstall"]}):e.jsxs("button",{type:"button",onClick:()=>j(s.id),disabled:n===s.id,className:"btn btn-primary btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Install"]})})]})})},s.id))})]})}export{A as SoftPage}; +import{r as t,j as e,a as c}from"./index-CRR9sQ49.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as v}from"./AdminButton-Bd2cLTu3.js";import{P as m}from"./PageHeader-BcjNf7GG.js";function A(){const[x,u]=t.useState([]),[p,d]=t.useState(!0),[o,a]=t.useState(""),[n,l]=t.useState(null),[f,h]=t.useState(""),r=()=>{d(!0),c("/soft/list").then(s=>{u(s.software||[]),h(s.package_manager||"")}).catch(s=>a(s.message)).finally(()=>d(!1))};t.useEffect(()=>{r()},[]);const j=s=>{l(s),a(""),c(`/soft/install/${s}`,{method:"POST"}).then(()=>r()).catch(i=>a(i.message)).finally(()=>l(null))},g=(s,i)=>{confirm(`Uninstall ${i}?`)&&(l(s),a(""),c(`/soft/uninstall/${s}`,{method:"POST"}).then(()=>r()).catch(N=>a(N.message)).finally(()=>l(null)))};return p?e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store"}),e.jsx("div",{className:"d-flex justify-content-center py-5",children:e.jsx("div",{className:"spinner-border text-primary",role:"status",children:e.jsx("span",{className:"visually-hidden",children:"Loading…"})})})]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{title:"App Store",actions:e.jsxs(v,{variant:"secondary",onClick:r,children:[e.jsx("i",{className:"ti ti-refresh me-1"}),"Refresh"]})}),o?e.jsx(b,{variant:"danger",children:o}):null,e.jsxs("div",{className:"alert alert-warning",role:"note",children:["Installs use your server package manager (",f||"unknown","). Panel must run as root (or equivalent). Supported: apt, dnf/yum/microdnf, apk."]}),e.jsx("div",{className:"row g-3",children:x.map(s=>e.jsx("div",{className:"col-md-6 col-xl-4 d-flex",children:e.jsx("div",{className:"card flex-fill shadow-sm",children:e.jsxs("div",{className:"card-body d-flex flex-column",children:[e.jsxs("div",{className:"d-flex align-items-start justify-content-between gap-2 mb-2",children:[e.jsxs("div",{className:"d-flex align-items-start gap-2",children:[e.jsx("span",{className:"avatar avatar-md bg-primary-transparent text-primary rounded flex-shrink-0",children:e.jsx("i",{className:"ti ti-package fs-5","aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("h5",{className:"card-title mb-1",children:s.name}),e.jsx("p",{className:"text-muted small mb-0",children:s.desc})]})]}),s.installed?e.jsxs("span",{className:"text-success small text-nowrap",children:[e.jsx("i",{className:"ti ti-circle-check me-1"}),s.version||"Installed"]}):e.jsxs("span",{className:"text-muted small text-nowrap",children:[e.jsx("i",{className:"ti ti-x me-1"}),"Not installed"]})]}),e.jsx("div",{className:"mt-auto pt-3",children:s.installed?e.jsxs("button",{type:"button",onClick:()=>g(s.id,s.name),disabled:n===s.id,className:"btn btn-outline-danger btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Uninstall"]}):e.jsxs("button",{type:"button",onClick:()=>j(s.id),disabled:n===s.id,className:"btn btn-primary btn-sm w-100 d-inline-flex align-items-center justify-content-center gap-2",children:[n===s.id?e.jsx("span",{className:"spinner-border spinner-border-sm",role:"status"}):null,"Install"]})})]})})},s.id))})]})}export{A as SoftPage}; diff --git a/YakPanel-server/frontend/dist/assets/TerminalPage-DeHZkQDH.js b/YakPanel-server/frontend/dist/assets/TerminalPage-CXXB09nH.js similarity index 99% rename from YakPanel-server/frontend/dist/assets/TerminalPage-DeHZkQDH.js rename to YakPanel-server/frontend/dist/assets/TerminalPage-CXXB09nH.js index 593cd4e8..5a280b0b 100644 --- a/YakPanel-server/frontend/dist/assets/TerminalPage-DeHZkQDH.js +++ b/YakPanel-server/frontend/dist/assets/TerminalPage-CXXB09nH.js @@ -1,4 +1,4 @@ -import{r as pe,j as he}from"./index-cE9w-Kq7.js";import{P as be}from"./PageHeader-HdM4gpcn.js";var ge={exports:{}};(function(ie,le){(function(Q,X){ie.exports=X()})(self,()=>(()=>{var Q={4567:function(M,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},_=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),u=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;lthis._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` +import{r as pe,j as he}from"./index-CRR9sQ49.js";import{P as be}from"./PageHeader-BcjNf7GG.js";var ge={exports:{}};(function(ie,le){(function(Q,X){ie.exports=X()})(self,()=>(()=>{var Q={4567:function(M,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},_=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),u=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;lthis._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` `))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new u.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let a=0;a0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===` `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(i)||this._charsToConsume.push(i)}_refreshRows(i,a){this._liveRegionDebouncer.refresh(i,a,this._terminal.rows)}_renderRows(i,a){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=a;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,a){const l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(a===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;ai;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function _(d,f,g,u){d=c(d=o(d),g.decPrivateModes.bracketedPasteMode&&u.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const u=g.getBoundingClientRect(),e=d.clientX-u.left-10,s=d.clientY-u.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,u){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),f,g,u)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,u,e){n(d,f,g),e&&u.rightClickSelect(d),f.value=u.selectionText,f.select()}},7239:(M,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=o(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(M,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,c,_,n){o.addEventListener(c,_,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,_,n))}}}},6465:function(M,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},_=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),f=o(844),g=o(2585);let u=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i{l==null||l.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let a=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(a=this._checkLinkProviderResult(l,e,a)):v.provideLinks(e.y,m=>{var h,p;if(this._isMouseOut)return;const b=m==null?void 0:m.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),a=this._checkLinkProviderResult(l,e,a),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;ie?this._bufferService.cols:v.link.range.end.x;for(let p=m;p<=h;p++){if(t.has(p)){a.splice(l--,1);break}t.add(p)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(e);let l=!1;for(let v=0;vthis._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;vthis._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,a;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((a=this._element)===null||a===void 0||a.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,a,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(i,a),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,a=s.y*this._bufferService.cols+s.x;return t<=a&&a<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,a){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:a}}};r.Linkifier2=u=c([_(0,g.IBufferService)],u)},9042:(M,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(M,r,o){var c=this&&this.__decorate||function(u,e,s,t){var i,a=arguments.length,l=a<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(u,e,s,t);else for(var v=u.length-1;v>=0;v--)(i=u[v])&&(l=(a<3?i(l):a>3?i(e,s,l):i(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l},_=this&&this.__param||function(u,e){return function(s,t){e(s,t,u)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let f=r.OscLinkProvider=class{constructor(u,e,s){this._bufferService=u,this._optionsService=e,this._oscLinkService=s}provideLinks(u,e){var s;const t=this._bufferService.buffer.lines.get(u-1);if(!t)return void e(void 0);const i=[],a=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,p=!1;for(let b=0;ba?a.activate(x,T,y):g(0,T),hover:(x,T)=>{var P;return(P=a==null?void 0:a.hover)===null||P===void 0?void 0:P.call(a,x,T,y)},leave:(x,T)=>{var P;return(P=a==null?void 0:a.leave)===null||P===void 0?void 0:P.call(a,x,T,y)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function g(u,e){if(confirm(`Do you want to navigate to ${e}? diff --git a/YakPanel-server/frontend/dist/assets/UsersPage-D9g-1mf8.js b/YakPanel-server/frontend/dist/assets/UsersPage-D9g-1mf8.js deleted file mode 100644 index f4214117..00000000 --- a/YakPanel-server/frontend/dist/assets/UsersPage-D9g-1mf8.js +++ /dev/null @@ -1 +0,0 @@ -import{r as a,j as e,_,a as I,$ as D,a0 as P,a1 as L}from"./index-cE9w-Kq7.js";import{M as n}from"./Modal-CL3xZqxR.js";import{A as b}from"./AdminAlert-yrdXFH0e.js";import{A as o}from"./AdminButton-ByutG8m-.js";import{A as T}from"./AdminTable-eCi7S__-.js";import{P as g}from"./PageHeader-HdM4gpcn.js";function M(){const[h,v]=a.useState([]),[N,x]=a.useState(!0),[u,d]=a.useState(""),[y,l]=a.useState(!1),[j,p]=a.useState(!1),[f,i]=a.useState(""),[U,A]=a.useState(null),c=()=>{x(!0),_().then(s=>{v(s),I("/auth/me").then(t=>A(t.id))}).catch(s=>d(s.message)).finally(()=>x(!1))};a.useEffect(()=>{c()},[]);const C=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("username").value.trim(),m=t.elements.namedItem("password").value,E=t.elements.namedItem("email").value.trim();if(!r||r.length<2){i("Username must be at least 2 characters");return}if(!m||m.length<6){i("Password must be at least 6 characters");return}p(!0),i(""),L({username:r,password:m,email:E}).then(()=>{l(!1),t.reset(),c()}).catch(k=>i(k.message)).finally(()=>p(!1))},w=(s,t)=>{confirm(`Delete user "${t}"?`)&&P(s).then(c).catch(r=>d(r.message))},S=s=>{D(s).then(c).catch(t=>d(t.message))};return N&&h.length===0?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users",actions:e.jsxs(o,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add User"]})}),u?e.jsx(b,{className:"mb-3",children:u}):null,e.jsx("div",{className:"card",children:e.jsxs(T,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Email"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Role"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:h.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.username}),e.jsx("td",{children:s.email||"—"}),e.jsx("td",{children:e.jsx("span",{className:s.is_active?"text-success":"text-secondary",children:s.is_active?"Active":"Inactive"})}),e.jsx("td",{children:s.is_superuser?"Admin":"User"}),e.jsx("td",{className:"text-end",children:s.id!==U?e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[e.jsx("button",{type:"button",className:`btn btn-link btn-sm p-1 ${s.is_active?"text-warning":"text-success"}`,title:s.is_active?"Deactivate":"Activate",onClick:()=>S(s.id),children:e.jsx("i",{className:s.is_active?"ti ti-user-x":"ti ti-user-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>w(s.id,s.username),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}):null})]},s.id))})]})}),e.jsxs(n,{show:y,onHide:()=>l(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add User"})}),e.jsxs("form",{onSubmit:C,children:[e.jsxs(n.Body,{children:[f?e.jsx(b,{className:"mb-3",children:f}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"newuser",className:"form-control",required:!0,minLength:2})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",placeholder:"••••••••",className:"form-control",required:!0,minLength:6})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (optional)"}),e.jsx("input",{name:"email",type:"email",placeholder:"user@example.com",className:"form-control"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(o,{type:"button",variant:"secondary",onClick:()=>l(!1),children:"Cancel"}),e.jsx(o,{type:"submit",variant:"primary",disabled:j,children:j?"Creating…":"Create"})]})]})]})]})}export{M as UsersPage}; diff --git a/YakPanel-server/frontend/dist/assets/UsersPage-DqvygXkC.js b/YakPanel-server/frontend/dist/assets/UsersPage-DqvygXkC.js new file mode 100644 index 00000000..30918cf9 --- /dev/null +++ b/YakPanel-server/frontend/dist/assets/UsersPage-DqvygXkC.js @@ -0,0 +1 @@ +import{r as a,j as e,a6 as I,a as _,a7 as D,a8 as P,a9 as L}from"./index-CRR9sQ49.js";import{M as n}from"./Modal-B7V4w_St.js";import{A as b}from"./AdminAlert-DW1IRWce.js";import{A as o}from"./AdminButton-Bd2cLTu3.js";import{A as T}from"./AdminTable-BLiLxfnS.js";import{P as g}from"./PageHeader-BcjNf7GG.js";function $(){const[h,v]=a.useState([]),[N,x]=a.useState(!0),[u,d]=a.useState(""),[y,l]=a.useState(!1),[j,p]=a.useState(!1),[f,i]=a.useState(""),[U,A]=a.useState(null),c=()=>{x(!0),I().then(s=>{v(s),_("/auth/me").then(t=>A(t.id))}).catch(s=>d(s.message)).finally(()=>x(!1))};a.useEffect(()=>{c()},[]);const C=s=>{s.preventDefault();const t=s.currentTarget,r=t.elements.namedItem("username").value.trim(),m=t.elements.namedItem("password").value,E=t.elements.namedItem("email").value.trim();if(!r||r.length<2){i("Username must be at least 2 characters");return}if(!m||m.length<6){i("Password must be at least 6 characters");return}p(!0),i(""),L({username:r,password:m,email:E}).then(()=>{l(!1),t.reset(),c()}).catch(k=>i(k.message)).finally(()=>p(!1))},w=(s,t)=>{confirm(`Delete user "${t}"?`)&&P(s).then(c).catch(r=>d(r.message))},S=s=>{D(s).then(c).catch(t=>d(t.message))};return N&&h.length===0?e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users"}),e.jsx("p",{className:"text-secondary",children:"Loading…"})]}):e.jsxs(e.Fragment,{children:[e.jsx(g,{title:"Users",actions:e.jsxs(o,{variant:"primary",onClick:()=>l(!0),children:[e.jsx("i",{className:"ti ti-plus me-1","aria-hidden":!0}),"Add User"]})}),u?e.jsx(b,{className:"mb-3",children:u}):null,e.jsx("div",{className:"card",children:e.jsxs(T,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Username"}),e.jsx("th",{children:"Email"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Role"}),e.jsx("th",{className:"text-end",children:"Actions"})]})}),e.jsx("tbody",{children:h.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.username}),e.jsx("td",{children:s.email||"—"}),e.jsx("td",{children:e.jsx("span",{className:s.is_active?"text-success":"text-secondary",children:s.is_active?"Active":"Inactive"})}),e.jsx("td",{children:s.is_superuser?"Admin":"User"}),e.jsx("td",{className:"text-end",children:s.id!==U?e.jsxs("span",{className:"d-inline-flex gap-1 justify-content-end",children:[e.jsx("button",{type:"button",className:`btn btn-link btn-sm p-1 ${s.is_active?"text-warning":"text-success"}`,title:s.is_active?"Deactivate":"Activate",onClick:()=>S(s.id),children:e.jsx("i",{className:s.is_active?"ti ti-user-x":"ti ti-user-check","aria-hidden":!0})}),e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-danger p-1",title:"Delete",onClick:()=>w(s.id,s.username),children:e.jsx("i",{className:"ti ti-trash","aria-hidden":!0})})]}):null})]},s.id))})]})}),e.jsxs(n,{show:y,onHide:()=>l(!1),centered:!0,children:[e.jsx(n.Header,{closeButton:!0,children:e.jsx(n.Title,{children:"Add User"})}),e.jsxs("form",{onSubmit:C,children:[e.jsxs(n.Body,{children:[f?e.jsx(b,{className:"mb-3",children:f}):null,e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Username"}),e.jsx("input",{name:"username",type:"text",placeholder:"newuser",className:"form-control",required:!0,minLength:2})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Password"}),e.jsx("input",{name:"password",type:"password",placeholder:"••••••••",className:"form-control",required:!0,minLength:6})]}),e.jsxs("div",{className:"mb-0",children:[e.jsx("label",{className:"form-label",children:"Email (optional)"}),e.jsx("input",{name:"email",type:"email",placeholder:"user@example.com",className:"form-control"})]})]}),e.jsxs(n.Footer,{children:[e.jsx(o,{type:"button",variant:"secondary",onClick:()=>l(!1),children:"Cancel"}),e.jsx(o,{type:"submit",variant:"primary",disabled:j,children:j?"Creating…":"Create"})]})]})]})]})}export{$ as UsersPage}; diff --git a/YakPanel-server/frontend/dist/assets/index-cE9w-Kq7.js b/YakPanel-server/frontend/dist/assets/index-CRR9sQ49.js similarity index 89% rename from YakPanel-server/frontend/dist/assets/index-cE9w-Kq7.js rename to YakPanel-server/frontend/dist/assets/index-CRR9sQ49.js index c336af74..b17d707f 100644 --- a/YakPanel-server/frontend/dist/assets/index-cE9w-Kq7.js +++ b/YakPanel-server/frontend/dist/assets/index-CRR9sQ49.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-B3SRQ3PP.js","assets/AdminAlert-yrdXFH0e.js","assets/AdminCard-BvdkSQBp.js","assets/PageHeader-HdM4gpcn.js","assets/SitePage-BCHU1V0e.js","assets/Modal-CL3xZqxR.js","assets/AdminButton-ByutG8m-.js","assets/AdminTable-eCi7S__-.js","assets/EmptyState-CmnFWkSO.js","assets/FilesPage-B-ZILwyi.js","assets/FtpPage-CR_nYo9X.js","assets/DatabasePage-CuN032AR.js","assets/TerminalPage-DeHZkQDH.js","assets/TerminalPage-LcAfv9l9.css","assets/MonitorPage-BdTGnSW8.js","assets/CrontabPage-DeEqYskK.js","assets/ConfigPage-BIvuvwCK.js","assets/LogsPage-B9d2xgc8.js","assets/FirewallPage-DfITVzrM.js","assets/DomainsPage-CMAJOz1U.js","assets/DockerPage-CbiMbPMF.js","assets/NodePage-BJ5-7-Pe.js","assets/SoftPage-CPYGL35O.js","assets/ServicesPage-Nd6NZHlM.js","assets/PluginsPage-B0GLsKVW.js","assets/BackupPlansPage-CbIqdsVx.js","assets/UsersPage-D9g-1mf8.js","assets/RemoteInstallPage-CH-5kpB6.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-CukNUmp0.js","assets/AdminAlert-DW1IRWce.js","assets/AdminCard-DNA70pGd.js","assets/PageHeader-BcjNf7GG.js","assets/SitePage-CeCv6Zaa.js","assets/Modal-B7V4w_St.js","assets/AdminButton-Bd2cLTu3.js","assets/AdminTable-BLiLxfnS.js","assets/EmptyState-C61VdEFl.js","assets/FilesPage-DLgTKzsa.js","assets/FtpPage-DG8coQcY.js","assets/DatabasePage-sZfqfvMQ.js","assets/TerminalPage-CXXB09nH.js","assets/TerminalPage-LcAfv9l9.css","assets/MonitorPage-CgJf2F74.js","assets/CrontabPage-BfaMKQc8.js","assets/ConfigPage-eLTvRUp2.js","assets/LogsPage-B1uIfI5z.js","assets/FirewallPage-Bu-mOiN9.js","assets/DomainsPage-DVTACiDJ.js","assets/DockerPage-D1AIK8Rv.js","assets/NodePage-BQzvbSat.js","assets/SoftPage-B7PtFv7I.js","assets/ServicesPage-DNZuAdmh.js","assets/PluginsPage-C4H8wPuq.js","assets/BackupPlansPage-CgzFMegr.js","assets/UsersPage-DqvygXkC.js","assets/RemoteInstallPage-C4gVyakl.js"])))=>i.map(i=>d[i]); function s0(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var l0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rh={exports:{}},El={},Ih={exports:{}},oe={};/** * @license React * react.production.min.js @@ -7,7 +7,7 @@ function s0(e,t){for(var n=0;n>>1,de=M[T];if(0>>1;Ti(Oe,V))zei(Ne,Oe)?(M[T]=Ne,M[ze]=V,T=ze):(M[T]=Oe,M[Ue]=V,T=Ue);else if(zei(Ne,V))M[T]=Ne,M[ze]=V,T=ze;else break e}}return Y}function i(M,Y){var V=M.sortIndex-Y.sortIndex;return V!==0?V:M.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],d=[],h=1,g=null,_=3,S=!1,C=!1,O=!1,P=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var Y=n(d);Y!==null;){if(Y.callback===null)r(d);else if(Y.startTime<=M)r(d),Y.sortIndex=Y.expirationTime,t(c,Y);else break;Y=n(d)}}function b(M){if(O=!1,w(M),!C)if(n(c)!==null)C=!0,ke(N);else{var Y=n(d);Y!==null&&$e(b,Y.startTime-M)}}function N(M,Y){C=!1,O&&(O=!1,y($),$=-1),S=!0;var V=_;try{for(w(Y),g=n(c);g!==null&&(!(g.expirationTime>Y)||M&&!Q());){var T=g.callback;if(typeof T=="function"){g.callback=null,_=g.priorityLevel;var de=T(g.expirationTime<=Y);Y=e.unstable_now(),typeof de=="function"?g.callback=de:g===n(c)&&r(c),w(Y)}else r(c);g=n(c)}if(g!==null)var Ct=!0;else{var Ue=n(d);Ue!==null&&$e(b,Ue.startTime-Y),Ct=!1}return Ct}finally{g=null,_=V,S=!1}}var A=!1,D=null,$=-1,H=5,F=-1;function Q(){return!(e.unstable_now()-FM||125T?(M.sortIndex=V,t(d,M),n(c)===null&&M===n(d)&&(O?(y($),$=-1):O=!0,$e(b,V-T))):(M.sortIndex=de,t(c,M),C||S||(C=!0,ke(N))),M},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(M){var Y=_;return function(){var V=_;_=Y;try{return M.apply(this,arguments)}finally{_=V}}}})(Xh);Yh.exports=Xh;var T0=Yh.exports;/** + */(function(e){function t(M,X){var V=M.length;M.push(X);e:for(;0>>1,de=M[T];if(0>>1;Ti(Oe,V))zei(Ne,Oe)?(M[T]=Ne,M[ze]=V,T=ze):(M[T]=Oe,M[Ue]=V,T=Ue);else if(zei(Ne,V))M[T]=Ne,M[ze]=V,T=ze;else break e}}return X}function i(M,X){var V=M.sortIndex-X.sortIndex;return V!==0?V:M.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],d=[],h=1,g=null,_=3,S=!1,C=!1,O=!1,P=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var X=n(d);X!==null;){if(X.callback===null)r(d);else if(X.startTime<=M)r(d),X.sortIndex=X.expirationTime,t(c,X);else break;X=n(d)}}function b(M){if(O=!1,w(M),!C)if(n(c)!==null)C=!0,ke(N);else{var X=n(d);X!==null&&$e(b,X.startTime-M)}}function N(M,X){C=!1,O&&(O=!1,y($),$=-1),S=!0;var V=_;try{for(w(X),g=n(c);g!==null&&(!(g.expirationTime>X)||M&&!Y());){var T=g.callback;if(typeof T=="function"){g.callback=null,_=g.priorityLevel;var de=T(g.expirationTime<=X);X=e.unstable_now(),typeof de=="function"?g.callback=de:g===n(c)&&r(c),w(X)}else r(c);g=n(c)}if(g!==null)var Ct=!0;else{var Ue=n(d);Ue!==null&&$e(b,Ue.startTime-X),Ct=!1}return Ct}finally{g=null,_=V,S=!1}}var A=!1,D=null,$=-1,H=5,F=-1;function Y(){return!(e.unstable_now()-FM||125T?(M.sortIndex=V,t(d,M),n(c)===null&&M===n(d)&&(O?(y($),$=-1):O=!0,$e(b,V-T))):(M.sortIndex=de,t(c,M),C||S||(C=!0,ke(N))),M},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(M){var X=_;return function(){var V=_;_=X;try{return M.apply(this,arguments)}finally{_=V}}}})(Xh);Yh.exports=Xh;var T0=Yh.exports;/** * @license React * react-dom.production.min.js * @@ -31,14 +31,14 @@ function s0(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=Object.prototype.hasOwnProperty,L0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qd={},Zd={};function A0(e){return uu.call(Zd,e)?!0:uu.call(qd,e)?!1:L0.test(e)?Zd[e]=!0:(qd[e]=!0,!1)}function D0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $0(e,t,n,r){if(t===null||typeof t>"u"||D0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var mc=/[\-:]([a-z])/g;function gc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function vc(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uu=Object.prototype.hasOwnProperty,L0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qd={},Zd={};function A0(e){return uu.call(Zd,e)?!0:uu.call(qd,e)?!1:L0.test(e)?Zd[e]=!0:(qd[e]=!0,!1)}function D0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $0(e,t,n,r){if(t===null||typeof t>"u"||D0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var mc=/[\-:]([a-z])/g;function gc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mc,gc);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function vc(e,t,n,r){var i=Ye.hasOwnProperty(t)?Ye[t]:null;(i!==null?i.type!==0:r||!(2u||i[l]!==o[u]){var c=` -`+i[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=u);break}}}finally{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eo(e):""}function R0(e){switch(e.tag){case 5:return eo(e.type);case 16:return eo("Lazy");case 13:return eo("Suspense");case 19:return eo("SuspenseList");case 0:case 2:case 15:return e=La(e.type,!1),e;case 11:return e=La(e.type.render,!1),e;case 1:return e=La(e.type,!0),e;default:return""}}function pu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ei:return"Fragment";case Zr:return"Portal";case cu:return"Profiler";case yc:return"StrictMode";case fu:return"Suspense";case du:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qh:return(e.displayName||"Context")+".Consumer";case Jh:return(e._context.displayName||"Context")+".Provider";case wc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _c:return t=e.displayName||null,t!==null?t:pu(e.type)||"Memo";case An:t=e._payload,e=e._init;try{return pu(e(t))}catch{}}return null}function I0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pu(t);case 8:return t===yc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function em(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M0(e){var t=em(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){e._valueTracker||(e._valueTracker=M0(e))}function tm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=em(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hu(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Gn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nm(e,t){t=t.checked,t!=null&&vc(e,"checked",t,!1)}function mu(e,t){nm(e,t);var n=Gn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gu(e,t.type,n):t.hasOwnProperty("defaultValue")&&gu(e,t.type,Gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function np(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gu(e,t,n){(t!=="number"||Gs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var to=Array.isArray;function fi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ws.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var io={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},z0=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){z0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function sm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function lm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=sm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var F0=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wu(e,t){if(t){if(F0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function _u(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function xc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Su=null,di=null,pi=null;function op(e){if(e=Bo(e)){if(typeof Su!="function")throw Error(R(280));var t=e.stateNode;t&&(t=jl(t),Su(e.stateNode,e.type,t))}}function am(e){di?pi?pi.push(e):pi=[e]:di=e}function um(){if(di){var e=di,t=pi;if(pi=di=null,op(e),t)for(e=0;e>>=0,e===0?32:31-(J0(e)/q0|0)|0}var _s=64,xs=4194304;function no(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function el(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~i;u!==0?r=no(u):(o&=l,o!==0&&(r=no(o)))}else l=n&~i,l!==0?r=no(l):o!==0&&(r=no(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=n}function n_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=so),hp=" ",mp=!1;function jm(e,t){switch(e){case"keyup":return T_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function L_(e,t){switch(e){case"compositionend":return Tm(t);case"keypress":return t.which!==32?null:(mp=!0,hp);case"textInput":return e=t.data,e===hp&&mp?null:e;default:return null}}function A_(e,t){if(ti)return e==="compositionend"||!jc&&jm(e,t)?(e=Pm(),Fs=bc=In=null,ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wp(n)}}function Dm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $m(){for(var e=window,t=Gs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gs(e.document)}return t}function Tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function U_(e){var t=$m(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dm(n.ownerDocument.documentElement,n)){if(r!==null&&Tc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_p(n,o);var l=_p(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ni=null,Ou=null,ao=null,ju=!1;function xp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ju||ni==null||ni!==Gs(r)||(r=ni,"selectionStart"in r&&Tc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ao&&Eo(ao,r)||(ao=r,r=rl(Ou,"onSelect"),0oi||(e.current=$u[oi],$u[oi]=null,oi--)}function ve(e,t){oi++,$u[oi]=e.current,e.current=t}var Jn={},qe=er(Jn),ut=er(!1),br=Jn;function yi(e,t){var n=e.type.contextTypes;if(!n)return Jn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ct(e){return e=e.childContextTypes,e!=null}function ol(){_e(ut),_e(qe)}function Op(e,t,n){if(qe.current!==Jn)throw Error(R(168));ve(qe,t),ve(ut,n)}function Vm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(R(108,I0(e)||"Unknown",i));return Pe({},n,r)}function sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jn,br=qe.current,ve(qe,e),ve(ut,ut.current),!0}function jp(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Vm(e,t,br),r.__reactInternalMemoizedMergedChildContext=e,_e(ut),_e(qe),ve(qe,e)):_e(ut),ve(ut,n)}var mn=null,Tl=!1,Ka=!1;function Hm(e){mn===null?mn=[e]:mn.push(e)}function ex(e){Tl=!0,Hm(e)}function tr(){if(!Ka&&mn!==null){Ka=!0;var e=0,t=fe;try{var n=mn;for(fe=1;e>=l,i-=l,gn=1<<32-Yt(t)+i|n<$?(H=D,D=null):H=D.sibling;var F=_(y,D,w[$],b);if(F===null){D===null&&(D=H);break}e&&D&&F.alternate===null&&t(y,D),v=o(F,v,$),A===null?N=F:A.sibling=F,A=F,D=H}if($===w.length)return n(y,D),Se&&yr(y,$),N;if(D===null){for(;$$?(H=D,D=null):H=D.sibling;var Q=_(y,D,F.value,b);if(Q===null){D===null&&(D=H);break}e&&D&&Q.alternate===null&&t(y,D),v=o(Q,v,$),A===null?N=Q:A.sibling=Q,A=Q,D=H}if(F.done)return n(y,D),Se&&yr(y,$),N;if(D===null){for(;!F.done;$++,F=w.next())F=g(y,F.value,b),F!==null&&(v=o(F,v,$),A===null?N=F:A.sibling=F,A=F);return Se&&yr(y,$),N}for(D=r(y,D);!F.done;$++,F=w.next())F=S(D,y,$,F.value,b),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?$:F.key),v=o(F,v,$),A===null?N=F:A.sibling=F,A=F);return e&&D.forEach(function(ee){return t(y,ee)}),Se&&yr(y,$),N}function P(y,v,w,b){if(typeof w=="object"&&w!==null&&w.type===ei&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case vs:e:{for(var N=w.key,A=v;A!==null;){if(A.key===N){if(N=w.type,N===ei){if(A.tag===7){n(y,A.sibling),v=i(A,w.props.children),v.return=y,y=v;break e}}else if(A.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===An&&Lp(N)===A.type){n(y,A.sibling),v=i(A,w.props),v.ref=Gi(y,A,w),v.return=y,y=v;break e}n(y,A);break}else t(y,A);A=A.sibling}w.type===ei?(v=Er(w.props.children,y.mode,b,w.key),v.return=y,y=v):(b=Ys(w.type,w.key,w.props,null,y.mode,b),b.ref=Gi(y,v,w),b.return=y,y=b)}return l(y);case Zr:e:{for(A=w.key;v!==null;){if(v.key===A)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=i(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=eu(w,y.mode,b),v.return=y,y=v}return l(y);case An:return A=w._init,P(y,v,A(w._payload),b)}if(to(w))return C(y,v,w,b);if(Hi(w))return O(y,v,w,b);Os(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,w),v.return=y,y=v):(n(y,v),v=Za(w,y.mode,b),v.return=y,y=v),l(y)):n(y,v)}return P}var _i=Xm(!0),Gm=Xm(!1),ul=er(null),cl=null,ai=null,Dc=null;function $c(){Dc=ai=cl=null}function Rc(e){var t=ul.current;_e(ul),e._currentValue=t}function Mu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function mi(e,t){cl=e,Dc=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function Rt(e){var t=e._currentValue;if(Dc!==e)if(e={context:e,memoizedValue:t,next:null},ai===null){if(cl===null)throw Error(R(308));ai=e,cl.dependencies={lanes:0,firstContext:e}}else ai=ai.next=e;return t}var xr=null;function Ic(e){xr===null?xr=[e]:xr.push(e)}function Jm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ic(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sn(e,r)}function Sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dn=!1;function Mc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sn(e,n)}return i=r.interleaved,i===null?(t.next=t,Ic(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sn(e,n)}function Us(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kc(e,n)}}function Ap(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fl(e,t,n,r){var i=e.updateQueue;Dn=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var c=u,d=c.next;c.next=null,l===null?o=d:l.next=d,l=c;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==l&&(u===null?h.firstBaseUpdate=d:u.next=d,h.lastBaseUpdate=c))}if(o!==null){var g=i.baseState;l=0,h=d=c=null,u=o;do{var _=u.lane,S=u.eventTime;if((r&_)===_){h!==null&&(h=h.next={eventTime:S,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var C=e,O=u;switch(_=t,S=n,O.tag){case 1:if(C=O.payload,typeof C=="function"){g=C.call(S,g,_);break e}g=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=O.payload,_=typeof C=="function"?C.call(S,g,_):C,_==null)break e;g=Pe({},g,_);break e;case 2:Dn=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,_=i.effects,_===null?i.effects=[u]:_.push(u))}else S={eventTime:S,lane:_,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(d=h=S,c=g):h=h.next=S,l|=_;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;_=u,u=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);if(h===null&&(c=g),i.baseState=c,i.firstBaseUpdate=d,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);jr|=l,e.lanes=l,e.memoizedState=g}}function Dp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ya.transition;Ya.transition={};try{e(!1),t()}finally{fe=n,Ya.transition=r}}function mg(){return It().memoizedState}function ix(e,t,n){var r=Kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gg(e))vg(t,n);else if(n=Jm(e,t,n,r),n!==null){var i=it();Xt(n,e,r,i),yg(n,t,r)}}function ox(e,t,n){var r=Kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gg(e))vg(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,u=o(l,n);if(i.hasEagerState=!0,i.eagerState=u,Gt(u,l)){var c=t.interleaved;c===null?(i.next=i,Ic(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Jm(e,t,i,r),n!==null&&(i=it(),Xt(n,e,r,i),yg(n,t,r))}}function gg(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function vg(e,t){uo=pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kc(e,n)}}var hl={readContext:Rt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},sx={readContext:Rt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Rp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vs(4194308,4,cg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vs(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ix.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:$p,useDebugValue:Kc,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=$p(!1),t=e[0];return e=rx.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ce,i=nn();if(Se){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),He===null)throw Error(R(349));Or&30||ng(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Rp(ig.bind(null,r,o,e),[e]),r.flags|=2048,Lo(9,rg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=nn(),t=He.identifierPrefix;if(Se){var n=vn,r=gn;n=(r&~(1<<32-Yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=To++,0")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=u);break}}}finally{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eo(e):""}function R0(e){switch(e.tag){case 5:return eo(e.type);case 16:return eo("Lazy");case 13:return eo("Suspense");case 19:return eo("SuspenseList");case 0:case 2:case 15:return e=La(e.type,!1),e;case 11:return e=La(e.type.render,!1),e;case 1:return e=La(e.type,!0),e;default:return""}}function pu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ei:return"Fragment";case Zr:return"Portal";case cu:return"Profiler";case yc:return"StrictMode";case fu:return"Suspense";case du:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qh:return(e.displayName||"Context")+".Consumer";case Gh:return(e._context.displayName||"Context")+".Provider";case wc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _c:return t=e.displayName||null,t!==null?t:pu(e.type)||"Memo";case An:t=e._payload,e=e._init;try{return pu(e(t))}catch{}}return null}function I0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pu(t);case 8:return t===yc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function em(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M0(e){var t=em(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){e._valueTracker||(e._valueTracker=M0(e))}function tm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=em(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Js(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hu(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nm(e,t){t=t.checked,t!=null&&vc(e,"checked",t,!1)}function mu(e,t){nm(e,t);var n=Jn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gu(e,t.type,n):t.hasOwnProperty("defaultValue")&&gu(e,t.type,Jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function np(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gu(e,t,n){(t!=="number"||Js(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var to=Array.isArray;function fi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ws.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var io={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},z0=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){z0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function sm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function lm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=sm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var F0=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wu(e,t){if(t){if(F0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function _u(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function xc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Su=null,di=null,pi=null;function op(e){if(e=Bo(e)){if(typeof Su!="function")throw Error(R(280));var t=e.stateNode;t&&(t=jl(t),Su(e.stateNode,e.type,t))}}function am(e){di?pi?pi.push(e):pi=[e]:di=e}function um(){if(di){var e=di,t=pi;if(pi=di=null,op(e),t)for(e=0;e>>=0,e===0?32:31-(G0(e)/q0|0)|0}var _s=64,xs=4194304;function no(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function el(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~i;u!==0?r=no(u):(o&=l,o!==0&&(r=no(o)))}else l=n&~i,l!==0?r=no(l):o!==0&&(r=no(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=n}function n_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=so),hp=" ",mp=!1;function jm(e,t){switch(e){case"keyup":return T_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function L_(e,t){switch(e){case"compositionend":return Tm(t);case"keypress":return t.which!==32?null:(mp=!0,hp);case"textInput":return e=t.data,e===hp&&mp?null:e;default:return null}}function A_(e,t){if(ti)return e==="compositionend"||!jc&&jm(e,t)?(e=Pm(),Fs=bc=In=null,ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wp(n)}}function Dm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $m(){for(var e=window,t=Js();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Js(e.document)}return t}function Tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function U_(e){var t=$m(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dm(n.ownerDocument.documentElement,n)){if(r!==null&&Tc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_p(n,o);var l=_p(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ni=null,Ou=null,ao=null,ju=!1;function xp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ju||ni==null||ni!==Js(r)||(r=ni,"selectionStart"in r&&Tc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ao&&Eo(ao,r)||(ao=r,r=rl(Ou,"onSelect"),0oi||(e.current=$u[oi],$u[oi]=null,oi--)}function ve(e,t){oi++,$u[oi]=e.current,e.current=t}var Gn={},qe=er(Gn),ut=er(!1),br=Gn;function yi(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ct(e){return e=e.childContextTypes,e!=null}function ol(){_e(ut),_e(qe)}function Op(e,t,n){if(qe.current!==Gn)throw Error(R(168));ve(qe,t),ve(ut,n)}function Vm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(R(108,I0(e)||"Unknown",i));return Pe({},n,r)}function sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,br=qe.current,ve(qe,e),ve(ut,ut.current),!0}function jp(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Vm(e,t,br),r.__reactInternalMemoizedMergedChildContext=e,_e(ut),_e(qe),ve(qe,e)):_e(ut),ve(ut,n)}var mn=null,Tl=!1,Ka=!1;function Hm(e){mn===null?mn=[e]:mn.push(e)}function ex(e){Tl=!0,Hm(e)}function tr(){if(!Ka&&mn!==null){Ka=!0;var e=0,t=fe;try{var n=mn;for(fe=1;e>=l,i-=l,gn=1<<32-Yt(t)+i|n<$?(H=D,D=null):H=D.sibling;var F=_(y,D,w[$],b);if(F===null){D===null&&(D=H);break}e&&D&&F.alternate===null&&t(y,D),v=o(F,v,$),A===null?N=F:A.sibling=F,A=F,D=H}if($===w.length)return n(y,D),Se&&yr(y,$),N;if(D===null){for(;$$?(H=D,D=null):H=D.sibling;var Y=_(y,D,F.value,b);if(Y===null){D===null&&(D=H);break}e&&D&&Y.alternate===null&&t(y,D),v=o(Y,v,$),A===null?N=Y:A.sibling=Y,A=Y,D=H}if(F.done)return n(y,D),Se&&yr(y,$),N;if(D===null){for(;!F.done;$++,F=w.next())F=g(y,F.value,b),F!==null&&(v=o(F,v,$),A===null?N=F:A.sibling=F,A=F);return Se&&yr(y,$),N}for(D=r(y,D);!F.done;$++,F=w.next())F=S(D,y,$,F.value,b),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?$:F.key),v=o(F,v,$),A===null?N=F:A.sibling=F,A=F);return e&&D.forEach(function(ee){return t(y,ee)}),Se&&yr(y,$),N}function P(y,v,w,b){if(typeof w=="object"&&w!==null&&w.type===ei&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case vs:e:{for(var N=w.key,A=v;A!==null;){if(A.key===N){if(N=w.type,N===ei){if(A.tag===7){n(y,A.sibling),v=i(A,w.props.children),v.return=y,y=v;break e}}else if(A.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===An&&Lp(N)===A.type){n(y,A.sibling),v=i(A,w.props),v.ref=Ji(y,A,w),v.return=y,y=v;break e}n(y,A);break}else t(y,A);A=A.sibling}w.type===ei?(v=Er(w.props.children,y.mode,b,w.key),v.return=y,y=v):(b=Ys(w.type,w.key,w.props,null,y.mode,b),b.ref=Ji(y,v,w),b.return=y,y=b)}return l(y);case Zr:e:{for(A=w.key;v!==null;){if(v.key===A)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=i(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=eu(w,y.mode,b),v.return=y,y=v}return l(y);case An:return A=w._init,P(y,v,A(w._payload),b)}if(to(w))return C(y,v,w,b);if(Hi(w))return O(y,v,w,b);Os(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,w),v.return=y,y=v):(n(y,v),v=Za(w,y.mode,b),v.return=y,y=v),l(y)):n(y,v)}return P}var _i=Xm(!0),Jm=Xm(!1),ul=er(null),cl=null,ai=null,Dc=null;function $c(){Dc=ai=cl=null}function Rc(e){var t=ul.current;_e(ul),e._currentValue=t}function Mu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function mi(e,t){cl=e,Dc=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function Rt(e){var t=e._currentValue;if(Dc!==e)if(e={context:e,memoizedValue:t,next:null},ai===null){if(cl===null)throw Error(R(308));ai=e,cl.dependencies={lanes:0,firstContext:e}}else ai=ai.next=e;return t}var xr=null;function Ic(e){xr===null?xr=[e]:xr.push(e)}function Gm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ic(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sn(e,r)}function Sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dn=!1;function Mc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sn(e,n)}return i=r.interleaved,i===null?(t.next=t,Ic(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sn(e,n)}function Us(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kc(e,n)}}function Ap(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fl(e,t,n,r){var i=e.updateQueue;Dn=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var c=u,d=c.next;c.next=null,l===null?o=d:l.next=d,l=c;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==l&&(u===null?h.firstBaseUpdate=d:u.next=d,h.lastBaseUpdate=c))}if(o!==null){var g=i.baseState;l=0,h=d=c=null,u=o;do{var _=u.lane,S=u.eventTime;if((r&_)===_){h!==null&&(h=h.next={eventTime:S,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var C=e,O=u;switch(_=t,S=n,O.tag){case 1:if(C=O.payload,typeof C=="function"){g=C.call(S,g,_);break e}g=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=O.payload,_=typeof C=="function"?C.call(S,g,_):C,_==null)break e;g=Pe({},g,_);break e;case 2:Dn=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,_=i.effects,_===null?i.effects=[u]:_.push(u))}else S={eventTime:S,lane:_,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(d=h=S,c=g):h=h.next=S,l|=_;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;_=u,u=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);if(h===null&&(c=g),i.baseState=c,i.firstBaseUpdate=d,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);jr|=l,e.lanes=l,e.memoizedState=g}}function Dp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ya.transition;Ya.transition={};try{e(!1),t()}finally{fe=n,Ya.transition=r}}function mg(){return It().memoizedState}function ix(e,t,n){var r=Kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gg(e))vg(t,n);else if(n=Gm(e,t,n,r),n!==null){var i=it();Xt(n,e,r,i),yg(n,t,r)}}function ox(e,t,n){var r=Kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gg(e))vg(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,u=o(l,n);if(i.hasEagerState=!0,i.eagerState=u,Jt(u,l)){var c=t.interleaved;c===null?(i.next=i,Ic(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Gm(e,t,i,r),n!==null&&(i=it(),Xt(n,e,r,i),yg(n,t,r))}}function gg(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function vg(e,t){uo=pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,kc(e,n)}}var hl={readContext:Rt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},sx={readContext:Rt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Rp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vs(4194308,4,cg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vs(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ix.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:$p,useDebugValue:Kc,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=$p(!1),t=e[0];return e=rx.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ce,i=nn();if(Se){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),He===null)throw Error(R(349));Or&30||ng(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Rp(ig.bind(null,r,o,e),[e]),r.flags|=2048,Lo(9,rg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=nn(),t=He.identifierPrefix;if(Se){var n=vn,r=gn;n=(r&~(1<<32-Yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=To++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[rn]=t,e[Po]=r,Og(e,t,!1,!1),t.stateNode=e;e:{switch(l=_u(n,r),n){case"dialog":ye("cancel",e),ye("close",e),i=r;break;case"iframe":case"object":case"embed":ye("load",e),i=r;break;case"video":case"audio":for(i=0;iki&&(t.flags|=128,r=!0,Ji(o,!1),t.lanes=4194304)}else{if(!r)if(e=dl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ji(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Se)return Ge(t),null}else 2*Ae()-o.renderingStartTime>ki&&n!==1073741824&&(t.flags|=128,r=!0,Ji(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ae(),t.sibling=null,n=Ee.current,ve(Ee,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return qc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yt&1073741824&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function hx(e,t){switch(Lc(t),t.tag){case 1:return ct(t.type)&&ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(),_e(ut),_e(qe),Bc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fc(t),null;case 13:if(_e(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Ee),null;case 4:return xi(),null;case 10:return Rc(t.type._context),null;case 22:case 23:return qc(),null;case 24:return null;default:return null}}var Ts=!1,Je=!1,mx=typeof WeakSet=="function"?WeakSet:Set,U=null;function ui(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function Qu(e,t,n){try{n()}catch(r){Te(e,t,r)}}var Qp=!1;function gx(e,t){if(Tu=tl,e=$m(),Tc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,u=-1,c=-1,d=0,h=0,g=e,_=null;t:for(;;){for(var S;g!==n||i!==0&&g.nodeType!==3||(u=l+i),g!==o||r!==0&&g.nodeType!==3||(c=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(S=g.firstChild)!==null;)_=g,g=S;for(;;){if(g===e)break t;if(_===n&&++d===i&&(u=l),_===o&&++h===r&&(c=l),(S=g.nextSibling)!==null)break;g=_,_=g.parentNode}g=S}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nu={focusedElem:e,selectionRange:n},tl=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var O=C.memoizedProps,P=C.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?O:Ht(t.type,O),P);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(b){Te(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return C=Qp,Qp=!1,C}function co(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Qu(t,n,o)}i=i.next}while(i!==r)}}function Al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ng(e){var t=e.alternate;t!==null&&(e.alternate=null,Ng(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[Po],delete t[Du],delete t[q_],delete t[Z_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Lg(e){return e.tag===5||e.tag===3||e.tag===4}function Yp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=il));else if(r!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function Gu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gu(e,t,n),e=e.sibling;e!==null;)Gu(e,t,n),e=e.sibling}var Ke=null,Kt=!1;function Ln(e,t,n){for(n=n.child;n!==null;)Ag(e,t,n),n=n.sibling}function Ag(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Cl,n)}catch{}switch(n.tag){case 5:Je||ui(n,t);case 6:var r=Ke,i=Kt;Ke=null,Ln(e,t,n),Ke=r,Kt=i,Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?Ha(e.parentNode,n):e.nodeType===1&&Ha(e,n),So(e)):Ha(Ke,n.stateNode));break;case 4:r=Ke,i=Kt,Ke=n.stateNode.containerInfo,Kt=!0,Ln(e,t,n),Ke=r,Kt=i;break;case 0:case 11:case 14:case 15:if(!Je&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Qu(n,t,l),i=i.next}while(i!==r)}Ln(e,t,n);break;case 1:if(!Je&&(ui(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Te(n,t,u)}Ln(e,t,n);break;case 21:Ln(e,t,n);break;case 22:n.mode&1?(Je=(r=Je)||n.memoizedState!==null,Ln(e,t,n),Je=r):Ln(e,t,n);break;default:Ln(e,t,n)}}function Xp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mx),t.forEach(function(r){var i=Cx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yx(r/1960))-r,10e?16:e,Mn===null)var r=!1;else{if(e=Mn,Mn=null,vl=0,le&6)throw Error(R(331));var i=le;for(le|=4,U=e.current;U!==null;){var o=U,l=o.child;if(U.flags&16){var u=o.deletions;if(u!==null){for(var c=0;cAe()-Gc?kr(e,0):Xc|=n),ft(e,t)}function Bg(e,t){t===0&&(e.mode&1?(t=xs,xs<<=1,!(xs&130023424)&&(xs=4194304)):t=1);var n=it();e=Sn(e,t),e!==null&&(zo(e,t,n),ft(e,n))}function Ex(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bg(e,n)}function Cx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),Bg(e,n)}var Ug;Ug=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)at=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return at=!1,dx(e,t,n);at=!!(e.flags&131072)}else at=!1,Se&&t.flags&1048576&&Km(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=yi(t,qe.current);mi(t,n),i=Wc(null,t,r,e,i,n);var o=Vc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(r)?(o=!0,sl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Mc(t),i.updater=Ll,t.stateNode=i,i._reactInternals=t,Fu(t,r,e,n),t=Wu(null,t,r,!0,o,n)):(t.tag=0,Se&&o&&Nc(t),rt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Px(r),e=Ht(r,e),i){case 0:t=Uu(null,t,r,e,n);break e;case 1:t=Vp(null,t,r,e,n);break e;case 11:t=Up(null,t,r,e,n);break e;case 14:t=Wp(null,t,r,Ht(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Uu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Vp(e,t,r,i,n);case 3:e:{if(Cg(t),e===null)throw Error(R(387));r=t.pendingProps,o=t.memoizedState,i=o.element,qm(e,t),fl(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Si(Error(R(423)),t),t=Hp(e,t,r,n,i);break e}else if(r!==i){i=Si(Error(R(424)),t),t=Hp(e,t,r,n,i);break e}else for(wt=Wn(t.stateNode.containerInfo.firstChild),_t=t,Se=!0,Qt=null,n=Gm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wi(),r===i){t=kn(e,t,n);break e}rt(e,t,r,n)}t=t.child}return t;case 5:return Zm(t),e===null&&Iu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Lu(r,i)?l=null:o!==null&&Lu(r,o)&&(t.flags|=32),Eg(e,t),rt(e,t,l,n),t.child;case 6:return e===null&&Iu(t),null;case 13:return bg(e,t,n);case 4:return zc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_i(t,null,r,n):rt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Up(e,t,r,i,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,ve(ul,r._currentValue),r._currentValue=l,o!==null)if(Gt(o.value,l)){if(o.children===i.children&&!ut.current){t=kn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){l=o.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=yn(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?c.next=c:(c.next=h.next,h.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Mu(o.return,n,t),u.lanes|=n;break}c=c.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(R(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Mu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}rt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,mi(t,n),i=Rt(i),r=r(i),t.flags|=1,rt(e,t,r,n),t.child;case 14:return r=t.type,i=Ht(r,t.pendingProps),i=Ht(r.type,i),Wp(e,t,r,i,n);case 15:return Sg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Hs(e,t),t.tag=1,ct(r)?(e=!0,sl(t)):e=!1,mi(t,n),wg(t,r,i),Fu(t,r,i,n),Wu(null,t,r,!0,e,n);case 19:return Pg(e,t,n);case 22:return kg(e,t,n)}throw Error(R(156,t.tag))};function Wg(e,t){return gm(e,t)}function bx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,r){return new bx(e,t,n,r)}function ef(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Px(e){if(typeof e=="function")return ef(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wc)return 11;if(e===_c)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ys(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")ef(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ei:return Er(n.children,i,o,t);case yc:l=8,i|=8;break;case cu:return e=Dt(12,n,t,i|2),e.elementType=cu,e.lanes=o,e;case fu:return e=Dt(13,n,t,i),e.elementType=fu,e.lanes=o,e;case du:return e=Dt(19,n,t,i),e.elementType=du,e.lanes=o,e;case Zh:return $l(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jh:l=10;break e;case qh:l=9;break e;case wc:l=11;break e;case _c:l=14;break e;case An:l=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Dt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Er(e,t,n,r){return e=Dt(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Dt(22,e,r,t),e.elementType=Zh,e.lanes=n,e.stateNode={isHidden:!1},e}function Za(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ox(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Da(0),this.expirationTimes=Da(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function tf(e,t,n,r,i,o,l,u,c){return e=new Ox(e,t,n,u,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Dt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mc(o),e}function jx(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qg)}catch(e){console.error(e)}}Qg(),Qh.exports=kt;var Yg=Qh.exports;const AE=kl(Yg);var rh=Yg;au.createRoot=rh.createRoot,au.hydrateRoot=rh.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Ga(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ux=typeof WeakMap=="function"?WeakMap:Map;function _g(e,t,n){n=yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gl||(gl=!0,Gu=r),Bu(e,t)},n}function xg(e,t,n){n=yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Bu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Bu(e,t),typeof r!="function"&&(Hn===null?Hn=new Set([this]):Hn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function zp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ux;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kx.bind(null,e,t,n),t.then(e,e))}function Fp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Bp(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yn(-1,1),t.tag=2,Vn(n,t,1))),n.lanes|=1),e)}var cx=Cn.ReactCurrentOwner,at=!1;function rt(e,t,n,r){t.child=e===null?Jm(t,null,n,r):_i(t,e.child,n,r)}function Up(e,t,n,r,i){n=n.render;var o=t.ref;return mi(t,i),r=Wc(e,t,n,r,o,i),n=Vc(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kn(e,t,i)):(Se&&n&&Nc(t),t.flags|=1,rt(e,t,r,i),t.child)}function Wp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!ef(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Sg(e,t,o,r,i)):(e=Ys(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Eo,n(l,r)&&e.ref===t.ref)return kn(e,t,i)}return t.flags|=1,e=Qn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Sg(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Eo(o,r)&&e.ref===t.ref)if(at=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(at=!0);else return t.lanes=e.lanes,kn(e,t,i)}return Uu(e,t,n,r,i)}function kg(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(ci,yt),yt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ve(ci,yt),yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ve(ci,yt),yt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ve(ci,yt),yt|=r;return rt(e,t,i,n),t.child}function Eg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uu(e,t,n,r,i){var o=ct(n)?br:qe.current;return o=yi(t,o),mi(t,i),n=Wc(e,t,n,r,o,i),r=Vc(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kn(e,t,i)):(Se&&r&&Nc(t),t.flags|=1,rt(e,t,n,i),t.child)}function Vp(e,t,n,r,i){if(ct(n)){var o=!0;sl(t)}else o=!1;if(mi(t,i),t.stateNode===null)Hs(e,t),wg(t,n,r),Fu(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,u=t.memoizedProps;l.props=u;var c=l.context,d=n.contextType;typeof d=="object"&&d!==null?d=Rt(d):(d=ct(n)?br:qe.current,d=yi(t,d));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function";g||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==r||c!==d)&&Mp(t,l,r,d),Dn=!1;var _=t.memoizedState;l.state=_,fl(t,r,l,i),c=t.memoizedState,u!==r||_!==c||ut.current||Dn?(typeof h=="function"&&(zu(t,n,h,r),c=t.memoizedState),(u=Dn||Ip(t,n,u,r,_,c,d))?(g||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),l.props=r,l.state=c,l.context=d,r=u):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,qm(e,t),u=t.memoizedProps,d=t.type===t.elementType?u:Ht(t.type,u),l.props=d,g=t.pendingProps,_=l.context,c=n.contextType,typeof c=="object"&&c!==null?c=Rt(c):(c=ct(n)?br:qe.current,c=yi(t,c));var S=n.getDerivedStateFromProps;(h=typeof S=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(u!==g||_!==c)&&Mp(t,l,r,c),Dn=!1,_=t.memoizedState,l.state=_,fl(t,r,l,i);var C=t.memoizedState;u!==g||_!==C||ut.current||Dn?(typeof S=="function"&&(zu(t,n,S,r),C=t.memoizedState),(d=Dn||Ip(t,n,d,r,_,C,c)||!1)?(h||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,C,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,C,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=C),l.props=r,l.state=C,l.context=c,r=d):(typeof l.componentDidUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),r=!1)}return Wu(e,t,n,r,o,i)}function Wu(e,t,n,r,i,o){Eg(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&jp(t,n,!1),kn(e,t,o);r=t.stateNode,cx.current=t;var u=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=_i(t,e.child,null,o),t.child=_i(t,null,u,o)):rt(e,t,u,o),t.memoizedState=r.state,i&&jp(t,n,!0),t.child}function Cg(e){var t=e.stateNode;t.pendingContext?Op(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Op(e,t.context,!1),zc(e,t.containerInfo)}function Hp(e,t,n,r,i){return wi(),Ac(i),t.flags|=256,rt(e,t,n,r),t.child}var Vu={dehydrated:null,treeContext:null,retryLane:0};function Hu(e){return{baseLanes:e,cachePool:null,transitions:null}}function bg(e,t,n){var r=t.pendingProps,i=Ee.current,o=!1,l=(t.flags&128)!==0,u;if((u=l)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ve(Ee,i&1),e===null)return Iu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=$l(l,r,0,null),e=Er(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Hu(n),t.memoizedState=Vu,e):Qc(t,l));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return fx(e,t,l,r,u,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,u=i.sibling;var c={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Qn(i,c),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?o=Qn(u,o):(o=Er(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Hu(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Vu,r}return o=e.child,e=o.sibling,r=Qn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Qc(e,t){return t=$l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function js(e,t,n,r){return r!==null&&Ac(r),_i(t,e.child,null,n),e=Qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fx(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=Ga(Error(R(422))),js(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$l({mode:"visible",children:r.children},i,0,null),o=Er(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&_i(t,e.child,null,l),t.child.memoizedState=Hu(l),t.memoizedState=Vu,o);if(!(t.mode&1))return js(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(R(419)),r=Ga(o,r,void 0),js(e,t,l,r)}if(u=(l&e.childLanes)!==0,at||u){if(r=He,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Sn(e,i),Xt(r,e,i,-1))}return Zc(),r=Ga(Error(R(421))),js(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Ex.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,wt=Wn(i.nextSibling),_t=t,Se=!0,Qt=null,e!==null&&(Lt[At++]=gn,Lt[At++]=vn,Lt[At++]=Pr,gn=e.id,vn=e.overflow,Pr=t),t=Qc(t,r.children),t.flags|=4096,t)}function Kp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mu(e.return,t,n)}function qa(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Pg(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(rt(e,t,r.children,n),r=Ee.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kp(e,n,t);else if(e.tag===19)Kp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ve(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&dl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),qa(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&dl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}qa(t,!0,n,null,o);break;case"together":qa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dx(e,t,n){switch(t.tag){case 3:Cg(t),wi();break;case 5:Zm(t);break;case 1:ct(t.type)&&sl(t);break;case 4:zc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ve(ul,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ve(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?bg(e,t,n):(ve(Ee,Ee.current&1),e=kn(e,t,n),e!==null?e.sibling:null);ve(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ve(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,kg(e,t,n)}return kn(e,t,n)}var Og,Ku,jg,Tg;Og=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ku=function(){};jg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Sr(sn.current);var o=null;switch(n){case"input":i=hu(e,i),r=hu(e,r),o=[];break;case"select":i=Pe({},i,{value:void 0}),r=Pe({},r,{value:void 0}),o=[];break;case"textarea":i=vu(e,i),r=vu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=il)}wu(n,r);var l;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var u=i[d];for(l in u)u.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(vo.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var c=r[d];if(u=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&c!==u&&(c!=null||u!=null))if(d==="style")if(u){for(l in u)!u.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in c)c.hasOwnProperty(l)&&u[l]!==c[l]&&(n||(n={}),n[l]=c[l])}else n||(o||(o=[]),o.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,u=u?u.__html:void 0,c!=null&&u!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(vo.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&ye("scroll",e),o||u===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};Tg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Gi(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function px(e,t,n){var r=t.pendingProps;switch(Lc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return ct(t.type)&&ol(),Je(t),null;case 3:return r=t.stateNode,xi(),_e(ut),_e(qe),Bc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ps(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qt!==null&&(ec(Qt),Qt=null))),Ku(e,t),Je(t),null;case 5:Fc(t);var i=Sr(jo.current);if(n=t.type,e!==null&&t.stateNode!=null)jg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return Je(t),null}if(e=Sr(sn.current),Ps(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[rn]=t,r[Po]=o,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[rn]=t,e[Po]=r,Og(e,t,!1,!1),t.stateNode=e;e:{switch(l=_u(n,r),n){case"dialog":ye("cancel",e),ye("close",e),i=r;break;case"iframe":case"object":case"embed":ye("load",e),i=r;break;case"video":case"audio":for(i=0;iki&&(t.flags|=128,r=!0,Gi(o,!1),t.lanes=4194304)}else{if(!r)if(e=dl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Se)return Je(t),null}else 2*Ae()-o.renderingStartTime>ki&&n!==1073741824&&(t.flags|=128,r=!0,Gi(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ae(),t.sibling=null,n=Ee.current,ve(Ee,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return qc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function hx(e,t){switch(Lc(t),t.tag){case 1:return ct(t.type)&&ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(),_e(ut),_e(qe),Bc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fc(t),null;case 13:if(_e(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Ee),null;case 4:return xi(),null;case 10:return Rc(t.type._context),null;case 22:case 23:return qc(),null;case 24:return null;default:return null}}var Ts=!1,Ge=!1,mx=typeof WeakSet=="function"?WeakSet:Set,U=null;function ui(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function Qu(e,t,n){try{n()}catch(r){Te(e,t,r)}}var Qp=!1;function gx(e,t){if(Tu=tl,e=$m(),Tc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,u=-1,c=-1,d=0,h=0,g=e,_=null;t:for(;;){for(var S;g!==n||i!==0&&g.nodeType!==3||(u=l+i),g!==o||r!==0&&g.nodeType!==3||(c=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(S=g.firstChild)!==null;)_=g,g=S;for(;;){if(g===e)break t;if(_===n&&++d===i&&(u=l),_===o&&++h===r&&(c=l),(S=g.nextSibling)!==null)break;g=_,_=g.parentNode}g=S}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nu={focusedElem:e,selectionRange:n},tl=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var O=C.memoizedProps,P=C.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?O:Ht(t.type,O),P);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(b){Te(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return C=Qp,Qp=!1,C}function co(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Qu(t,n,o)}i=i.next}while(i!==r)}}function Al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ng(e){var t=e.alternate;t!==null&&(e.alternate=null,Ng(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[Po],delete t[Du],delete t[q_],delete t[Z_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Lg(e){return e.tag===5||e.tag===3||e.tag===4}function Yp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=il));else if(r!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function Ju(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}var Ke=null,Kt=!1;function Ln(e,t,n){for(n=n.child;n!==null;)Ag(e,t,n),n=n.sibling}function Ag(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Cl,n)}catch{}switch(n.tag){case 5:Ge||ui(n,t);case 6:var r=Ke,i=Kt;Ke=null,Ln(e,t,n),Ke=r,Kt=i,Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Kt?(e=Ke,n=n.stateNode,e.nodeType===8?Ha(e.parentNode,n):e.nodeType===1&&Ha(e,n),So(e)):Ha(Ke,n.stateNode));break;case 4:r=Ke,i=Kt,Ke=n.stateNode.containerInfo,Kt=!0,Ln(e,t,n),Ke=r,Kt=i;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Qu(n,t,l),i=i.next}while(i!==r)}Ln(e,t,n);break;case 1:if(!Ge&&(ui(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Te(n,t,u)}Ln(e,t,n);break;case 21:Ln(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,Ln(e,t,n),Ge=r):Ln(e,t,n);break;default:Ln(e,t,n)}}function Xp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mx),t.forEach(function(r){var i=Cx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yx(r/1960))-r,10e?16:e,Mn===null)var r=!1;else{if(e=Mn,Mn=null,vl=0,le&6)throw Error(R(331));var i=le;for(le|=4,U=e.current;U!==null;){var o=U,l=o.child;if(U.flags&16){var u=o.deletions;if(u!==null){for(var c=0;cAe()-Jc?kr(e,0):Xc|=n),ft(e,t)}function Bg(e,t){t===0&&(e.mode&1?(t=xs,xs<<=1,!(xs&130023424)&&(xs=4194304)):t=1);var n=it();e=Sn(e,t),e!==null&&(zo(e,t,n),ft(e,n))}function Ex(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bg(e,n)}function Cx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),Bg(e,n)}var Ug;Ug=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ut.current)at=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return at=!1,dx(e,t,n);at=!!(e.flags&131072)}else at=!1,Se&&t.flags&1048576&&Km(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=yi(t,qe.current);mi(t,n),i=Wc(null,t,r,e,i,n);var o=Vc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(r)?(o=!0,sl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Mc(t),i.updater=Ll,t.stateNode=i,i._reactInternals=t,Fu(t,r,e,n),t=Wu(null,t,r,!0,o,n)):(t.tag=0,Se&&o&&Nc(t),rt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Px(r),e=Ht(r,e),i){case 0:t=Uu(null,t,r,e,n);break e;case 1:t=Vp(null,t,r,e,n);break e;case 11:t=Up(null,t,r,e,n);break e;case 14:t=Wp(null,t,r,Ht(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Uu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Vp(e,t,r,i,n);case 3:e:{if(Cg(t),e===null)throw Error(R(387));r=t.pendingProps,o=t.memoizedState,i=o.element,qm(e,t),fl(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Si(Error(R(423)),t),t=Hp(e,t,r,n,i);break e}else if(r!==i){i=Si(Error(R(424)),t),t=Hp(e,t,r,n,i);break e}else for(wt=Wn(t.stateNode.containerInfo.firstChild),_t=t,Se=!0,Qt=null,n=Jm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wi(),r===i){t=kn(e,t,n);break e}rt(e,t,r,n)}t=t.child}return t;case 5:return Zm(t),e===null&&Iu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Lu(r,i)?l=null:o!==null&&Lu(r,o)&&(t.flags|=32),Eg(e,t),rt(e,t,l,n),t.child;case 6:return e===null&&Iu(t),null;case 13:return bg(e,t,n);case 4:return zc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_i(t,null,r,n):rt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Up(e,t,r,i,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,ve(ul,r._currentValue),r._currentValue=l,o!==null)if(Jt(o.value,l)){if(o.children===i.children&&!ut.current){t=kn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){l=o.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=yn(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?c.next=c:(c.next=h.next,h.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Mu(o.return,n,t),u.lanes|=n;break}c=c.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(R(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Mu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}rt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,mi(t,n),i=Rt(i),r=r(i),t.flags|=1,rt(e,t,r,n),t.child;case 14:return r=t.type,i=Ht(r,t.pendingProps),i=Ht(r.type,i),Wp(e,t,r,i,n);case 15:return Sg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ht(r,i),Hs(e,t),t.tag=1,ct(r)?(e=!0,sl(t)):e=!1,mi(t,n),wg(t,r,i),Fu(t,r,i,n),Wu(null,t,r,!0,e,n);case 19:return Pg(e,t,n);case 22:return kg(e,t,n)}throw Error(R(156,t.tag))};function Wg(e,t){return gm(e,t)}function bx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,r){return new bx(e,t,n,r)}function ef(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Px(e){if(typeof e=="function")return ef(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wc)return 11;if(e===_c)return 14}return 2}function Qn(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ys(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")ef(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ei:return Er(n.children,i,o,t);case yc:l=8,i|=8;break;case cu:return e=Dt(12,n,t,i|2),e.elementType=cu,e.lanes=o,e;case fu:return e=Dt(13,n,t,i),e.elementType=fu,e.lanes=o,e;case du:return e=Dt(19,n,t,i),e.elementType=du,e.lanes=o,e;case Zh:return $l(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Gh:l=10;break e;case qh:l=9;break e;case wc:l=11;break e;case _c:l=14;break e;case An:l=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Dt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Er(e,t,n,r){return e=Dt(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Dt(22,e,r,t),e.elementType=Zh,e.lanes=n,e.stateNode={isHidden:!1},e}function Za(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ox(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Da(0),this.expirationTimes=Da(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function tf(e,t,n,r,i,o,l,u,c){return e=new Ox(e,t,n,u,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Dt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mc(o),e}function jx(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qg)}catch(e){console.error(e)}}Qg(),Qh.exports=kt;var Yg=Qh.exports;const AE=kl(Yg);var rh=Yg;au.createRoot=rh.createRoot,au.hydrateRoot=rh.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. @@ -47,7 +47,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function sf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $x(){return Math.random().toString(36).substr(2,8)}function oh(e,t){return{usr:e.state,key:e.key,idx:t}}function tc(e,t,n,r){return n===void 0&&(n=null),Do({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Li(t):t,{state:n,key:t&&t.key||r||$x()})}function _l(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Li(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Rx(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u=zn.Pop,c=null,d=h();d==null&&(d=0,l.replaceState(Do({},l.state,{idx:d}),""));function h(){return(l.state||{idx:null}).idx}function g(){u=zn.Pop;let P=h(),y=P==null?null:P-d;d=P,c&&c({action:u,location:O.location,delta:y})}function _(P,y){u=zn.Push;let v=tc(O.location,P,y);d=h()+1;let w=oh(v,d),b=O.createHref(v);try{l.pushState(w,"",b)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(b)}o&&c&&c({action:u,location:O.location,delta:1})}function S(P,y){u=zn.Replace;let v=tc(O.location,P,y);d=h();let w=oh(v,d),b=O.createHref(v);l.replaceState(w,"",b),o&&c&&c({action:u,location:O.location,delta:0})}function C(P){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof P=="string"?P:_l(P);return v=v.replace(/ $/,"%20"),be(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let O={get action(){return u},get location(){return e(i,l)},listen(P){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(ih,g),c=P,()=>{i.removeEventListener(ih,g),c=null}},createHref(P){return t(i,P)},createURL:C,encodeLocation(P){let y=C(P);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:_,replace:S,go(P){return l.go(P)}};return O}var sh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sh||(sh={}));function Ix(e,t,n){return n===void 0&&(n="/"),Mx(e,t,n)}function Mx(e,t,n,r){let i=typeof t=="string"?Li(t):t,o=Ei(i.pathname||"/",n);if(o==null)return null;let l=Xg(e);zx(l);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};c.relativePath.startsWith("/")&&(be(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=Yn([r,c.relativePath]),h=n.concat(c);o.children&&o.children.length>0&&(be(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Xg(o.children,t,h,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Kx(d,o.index),routesMeta:h})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,l);else for(let c of Gg(o.path))i(o,l,c)}),t}function Gg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Gg(r.join("/")),u=[];return u.push(...l.map(c=>c===""?o:[o,c].join("/"))),i&&u.push(...l),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function zx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Qx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Fx=/^:[\w-]+$/,Bx=3,Ux=2,Wx=1,Vx=10,Hx=-2,lh=e=>e==="*";function Kx(e,t){let n=e.split("/"),r=n.length;return n.some(lh)&&(r+=Hx),t&&(r+=Ux),n.filter(i=>!lh(i)).reduce((i,o)=>i+(Fx.test(o)?Bx:o===""?Wx:Vx),r)}function Qx(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Yx(e,t,n){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u{let{paramName:_,isOptional:S}=h;if(_==="*"){let O=u[g]||"";l=o.slice(0,o.length-O.length).replace(/(.)\/+$/,"$1")}const C=u[g];return S&&!C?d[_]=void 0:d[_]=(C||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function Xx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),sf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Gx(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return sf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ei(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Jx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qx=e=>Jx.test(e);function Zx(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Li(e):e,o;if(n)if(qx(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),sf(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?o=ah(n.substring(1),"/"):o=ah(n,t)}else o=t;return{pathname:o,search:nS(r),hash:rS(i)}}function ah(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function tu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function eS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function lf(e,t){let n=eS(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function af(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Li(e):(i=Do({},e),be(!i.pathname||!i.pathname.includes("?"),tu("?","pathname","search",i)),be(!i.pathname||!i.pathname.includes("#"),tu("#","pathname","hash",i)),be(!i.search||!i.search.includes("#"),tu("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let _=l.split("/");for(;_[0]==="..";)_.shift(),g-=1;i.pathname=_.join("/")}u=g>=0?t[g]:"/"}let c=Zx(i,u),d=l&&l!=="/"&&l.endsWith("/"),h=(o||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}const Yn=e=>e.join("/").replace(/\/\/+/g,"/"),tS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function iS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Jg=["post","put","patch","delete"];new Set(Jg);const oS=["get",...Jg];new Set(oS);/** + */function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function sf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $x(){return Math.random().toString(36).substr(2,8)}function oh(e,t){return{usr:e.state,key:e.key,idx:t}}function tc(e,t,n,r){return n===void 0&&(n=null),Do({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Li(t):t,{state:n,key:t&&t.key||r||$x()})}function _l(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Li(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Rx(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u=zn.Pop,c=null,d=h();d==null&&(d=0,l.replaceState(Do({},l.state,{idx:d}),""));function h(){return(l.state||{idx:null}).idx}function g(){u=zn.Pop;let P=h(),y=P==null?null:P-d;d=P,c&&c({action:u,location:O.location,delta:y})}function _(P,y){u=zn.Push;let v=tc(O.location,P,y);d=h()+1;let w=oh(v,d),b=O.createHref(v);try{l.pushState(w,"",b)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(b)}o&&c&&c({action:u,location:O.location,delta:1})}function S(P,y){u=zn.Replace;let v=tc(O.location,P,y);d=h();let w=oh(v,d),b=O.createHref(v);l.replaceState(w,"",b),o&&c&&c({action:u,location:O.location,delta:0})}function C(P){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof P=="string"?P:_l(P);return v=v.replace(/ $/,"%20"),be(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let O={get action(){return u},get location(){return e(i,l)},listen(P){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(ih,g),c=P,()=>{i.removeEventListener(ih,g),c=null}},createHref(P){return t(i,P)},createURL:C,encodeLocation(P){let y=C(P);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:_,replace:S,go(P){return l.go(P)}};return O}var sh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sh||(sh={}));function Ix(e,t,n){return n===void 0&&(n="/"),Mx(e,t,n)}function Mx(e,t,n,r){let i=typeof t=="string"?Li(t):t,o=Ei(i.pathname||"/",n);if(o==null)return null;let l=Xg(e);zx(l);let u=null;for(let c=0;u==null&&c{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};c.relativePath.startsWith("/")&&(be(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=Yn([r,c.relativePath]),h=n.concat(c);o.children&&o.children.length>0&&(be(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Xg(o.children,t,h,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Kx(d,o.index),routesMeta:h})};return e.forEach((o,l)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,l);else for(let c of Jg(o.path))i(o,l,c)}),t}function Jg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Jg(r.join("/")),u=[];return u.push(...l.map(c=>c===""?o:[o,c].join("/"))),i&&u.push(...l),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function zx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Qx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Fx=/^:[\w-]+$/,Bx=3,Ux=2,Wx=1,Vx=10,Hx=-2,lh=e=>e==="*";function Kx(e,t){let n=e.split("/"),r=n.length;return n.some(lh)&&(r+=Hx),t&&(r+=Ux),n.filter(i=>!lh(i)).reduce((i,o)=>i+(Fx.test(o)?Bx:o===""?Wx:Vx),r)}function Qx(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Yx(e,t,n){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u{let{paramName:_,isOptional:S}=h;if(_==="*"){let O=u[g]||"";l=o.slice(0,o.length-O.length).replace(/(.)\/+$/,"$1")}const C=u[g];return S&&!C?d[_]=void 0:d[_]=(C||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function Xx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),sf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Jx(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return sf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ei(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Gx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qx=e=>Gx.test(e);function Zx(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Li(e):e,o;if(n)if(qx(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),sf(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?o=ah(n.substring(1),"/"):o=ah(n,t)}else o=t;return{pathname:o,search:nS(r),hash:rS(i)}}function ah(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function tu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function eS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function lf(e,t){let n=eS(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function af(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Li(e):(i=Do({},e),be(!i.pathname||!i.pathname.includes("?"),tu("?","pathname","search",i)),be(!i.pathname||!i.pathname.includes("#"),tu("#","pathname","hash",i)),be(!i.search||!i.search.includes("#"),tu("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let _=l.split("/");for(;_[0]==="..";)_.shift(),g-=1;i.pathname=_.join("/")}u=g>=0?t[g]:"/"}let c=Zx(i,u),d=l&&l!=="/"&&l.endsWith("/"),h=(o||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}const Yn=e=>e.join("/").replace(/\/\/+/g,"/"),tS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function iS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Gg=["post","put","patch","delete"];new Set(Gg);const oS=["get",...Gg];new Set(oS);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. @@ -65,12 +65,12 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function PS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OS(e,t){return e.button===0&&(!t||t==="_self")&&!PS(e)}const jS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],TS=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],NS="6";try{window.__reactRouterVersion=NS}catch{}const LS=x.createContext({isTransitioning:!1}),AS="startTransition",ch=k0[AS];function DS(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=Dx({window:i,v5Compat:!0}));let l=o.current,[u,c]=x.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},h=x.useCallback(g=>{d&&ch?ch(()=>c(g)):c(g)},[c,d]);return x.useLayoutEffect(()=>l.listen(h),[l,h]),x.useEffect(()=>kS(r),[r]),x.createElement(CS,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const $S=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",RS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sv=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:l,state:u,target:c,to:d,preventScrollReset:h,viewTransition:g}=t,_=ov(t,jS),{basename:S}=x.useContext(bn),C,O=!1;if(typeof d=="string"&&RS.test(d)&&(C=d,$S))try{let w=new URL(window.location.href),b=d.startsWith("//")?new URL(w.protocol+d):new URL(d),N=Ei(b.pathname,S);b.origin===w.origin&&N!=null?d=N+b.search+b.hash:O=!0}catch{}let P=sS(d,{relative:i}),y=MS(d,{replace:l,state:u,target:c,preventScrollReset:h,relative:i,viewTransition:g});function v(w){r&&r(w),w.defaultPrevented||y(w)}return x.createElement("a",xl({},_,{href:C||P,onClick:O||o?r:v,ref:n,target:c}))}),As=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:l=!1,style:u,to:c,viewTransition:d,children:h}=t,g=ov(t,TS),_=Wl(c,{relative:g.relative}),S=Di(),C=x.useContext(qg),{navigator:O,basename:P}=x.useContext(bn),y=C!=null&&zS(_)&&d===!0,v=O.encodeLocation?O.encodeLocation(_).pathname:_.pathname,w=S.pathname,b=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(w=w.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&P&&(b=Ei(b,P)||b);const N=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let A=w===v||!l&&w.startsWith(v)&&w.charAt(N)==="/",D=b!=null&&(b===v||!l&&b.startsWith(v)&&b.charAt(v.length)==="/"),$={isActive:A,isPending:D,isTransitioning:y},H=A?r:void 0,F;typeof o=="function"?F=o($):F=[o,A?"active":null,D?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let Q=typeof u=="function"?u($):u;return x.createElement(sv,xl({},g,{"aria-current":H,className:F,ref:n,style:Q,to:c,viewTransition:d}),typeof h=="function"?h($):h)});var ic;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ic||(ic={}));var fh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fh||(fh={}));function IS(e){let t=x.useContext(Fl);return t||be(!1),t}function MS(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:l,viewTransition:u}=t===void 0?{}:t,c=Ul(),d=Di(),h=Wl(e,{relative:l});return x.useCallback(g=>{if(OS(g,n)){g.preventDefault();let _=r!==void 0?r:_l(d)===_l(h);c(e,{replace:_,state:i,preventScrollReset:o,relative:l,viewTransition:u})}},[d,c,h,r,i,n,e,o,l,u])}function zS(e,t){t===void 0&&(t={});let n=x.useContext(LS);n==null&&be(!1);let{basename:r}=IS(ic.useViewTransitionState),i=Wl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Ei(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ei(n.nextLocation.pathname,r)||n.nextLocation.pathname;return nc(i.pathname,l)!=null||nc(i.pathname,o)!=null}var FS={exports:{}};/*! + */function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function PS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OS(e,t){return e.button===0&&(!t||t==="_self")&&!PS(e)}const jS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],TS=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],NS="6";try{window.__reactRouterVersion=NS}catch{}const LS=x.createContext({isTransitioning:!1}),AS="startTransition",ch=k0[AS];function DS(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=Dx({window:i,v5Compat:!0}));let l=o.current,[u,c]=x.useState({action:l.action,location:l.location}),{v7_startTransition:d}=r||{},h=x.useCallback(g=>{d&&ch?ch(()=>c(g)):c(g)},[c,d]);return x.useLayoutEffect(()=>l.listen(h),[l,h]),x.useEffect(()=>kS(r),[r]),x.createElement(CS,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const $S=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",RS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sv=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:l,state:u,target:c,to:d,preventScrollReset:h,viewTransition:g}=t,_=ov(t,jS),{basename:S}=x.useContext(bn),C,O=!1;if(typeof d=="string"&&RS.test(d)&&(C=d,$S))try{let w=new URL(window.location.href),b=d.startsWith("//")?new URL(w.protocol+d):new URL(d),N=Ei(b.pathname,S);b.origin===w.origin&&N!=null?d=N+b.search+b.hash:O=!0}catch{}let P=sS(d,{relative:i}),y=MS(d,{replace:l,state:u,target:c,preventScrollReset:h,relative:i,viewTransition:g});function v(w){r&&r(w),w.defaultPrevented||y(w)}return x.createElement("a",xl({},_,{href:C||P,onClick:O||o?r:v,ref:n,target:c}))}),As=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:l=!1,style:u,to:c,viewTransition:d,children:h}=t,g=ov(t,TS),_=Wl(c,{relative:g.relative}),S=Di(),C=x.useContext(qg),{navigator:O,basename:P}=x.useContext(bn),y=C!=null&&zS(_)&&d===!0,v=O.encodeLocation?O.encodeLocation(_).pathname:_.pathname,w=S.pathname,b=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(w=w.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&P&&(b=Ei(b,P)||b);const N=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let A=w===v||!l&&w.startsWith(v)&&w.charAt(N)==="/",D=b!=null&&(b===v||!l&&b.startsWith(v)&&b.charAt(v.length)==="/"),$={isActive:A,isPending:D,isTransitioning:y},H=A?r:void 0,F;typeof o=="function"?F=o($):F=[o,A?"active":null,D?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let Y=typeof u=="function"?u($):u;return x.createElement(sv,xl({},g,{"aria-current":H,className:F,ref:n,style:Y,to:c,viewTransition:d}),typeof h=="function"?h($):h)});var ic;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ic||(ic={}));var fh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fh||(fh={}));function IS(e){let t=x.useContext(Fl);return t||be(!1),t}function MS(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:l,viewTransition:u}=t===void 0?{}:t,c=Ul(),d=Di(),h=Wl(e,{relative:l});return x.useCallback(g=>{if(OS(g,n)){g.preventDefault();let _=r!==void 0?r:_l(d)===_l(h);c(e,{replace:_,state:i,preventScrollReset:o,relative:l,viewTransition:u})}},[d,c,h,r,i,n,e,o,l,u])}function zS(e,t){t===void 0&&(t={});let n=x.useContext(LS);n==null&&be(!1);let{basename:r}=IS(ic.useViewTransitionState),i=Wl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Ei(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ei(n.nextLocation.pathname,r)||n.nextLocation.pathname;return nc(i.pathname,l)!=null||nc(i.pathname,o)!=null}var FS={exports:{}};/*! * Bootstrap v5.3.8 (https://getbootstrap.com/) * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */(function(e,t){(function(n,r){e.exports=r()})(l0,function(){const n=new Map,r={set(f,s,a){n.has(f)||n.set(f,new Map);const p=n.get(f);p.has(s)||p.size===0?p.set(s,a):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(f,s)=>n.has(f)&&n.get(f).get(s)||null,remove(f,s){if(!n.has(f))return;const a=n.get(f);a.delete(s),a.size===0&&n.delete(f)}},i="transitionend",o=f=>(f&&window.CSS&&window.CSS.escape&&(f=f.replace(/#([^\s"#']+)/g,(s,a)=>`#${CSS.escape(a)}`)),f),l=f=>f==null?`${f}`:Object.prototype.toString.call(f).match(/\s([a-z]+)/i)[1].toLowerCase(),u=f=>{f.dispatchEvent(new Event(i))},c=f=>!(!f||typeof f!="object")&&(f.jquery!==void 0&&(f=f[0]),f.nodeType!==void 0),d=f=>c(f)?f.jquery?f[0]:f:typeof f=="string"&&f.length>0?document.querySelector(o(f)):null,h=f=>{if(!c(f)||f.getClientRects().length===0)return!1;const s=getComputedStyle(f).getPropertyValue("visibility")==="visible",a=f.closest("details:not([open])");if(!a)return s;if(a!==f){const p=f.closest("summary");if(p&&p.parentNode!==a||p===null)return!1}return s},g=f=>!f||f.nodeType!==Node.ELEMENT_NODE||!!f.classList.contains("disabled")||(f.disabled!==void 0?f.disabled:f.hasAttribute("disabled")&&f.getAttribute("disabled")!=="false"),_=f=>{if(!document.documentElement.attachShadow)return null;if(typeof f.getRootNode=="function"){const s=f.getRootNode();return s instanceof ShadowRoot?s:null}return f instanceof ShadowRoot?f:f.parentNode?_(f.parentNode):null},S=()=>{},C=f=>{f.offsetHeight},O=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,P=[],y=()=>document.documentElement.dir==="rtl",v=f=>{var s;s=()=>{const a=O();if(a){const p=f.NAME,k=a.fn[p];a.fn[p]=f.jQueryInterface,a.fn[p].Constructor=f,a.fn[p].noConflict=()=>(a.fn[p]=k,f.jQueryInterface)}},document.readyState==="loading"?(P.length||document.addEventListener("DOMContentLoaded",()=>{for(const a of P)a()}),P.push(s)):s()},w=(f,s=[],a=f)=>typeof f=="function"?f.call(...s):a,b=(f,s,a=!0)=>{if(!a)return void w(f);const p=(j=>{if(!j)return 0;let{transitionDuration:L,transitionDelay:I}=window.getComputedStyle(j);const B=Number.parseFloat(L),W=Number.parseFloat(I);return B||W?(L=L.split(",")[0],I=I.split(",")[0],1e3*(Number.parseFloat(L)+Number.parseFloat(I))):0})(s)+5;let k=!1;const E=({target:j})=>{j===s&&(k=!0,s.removeEventListener(i,E),w(f))};s.addEventListener(i,E),setTimeout(()=>{k||u(s)},p)},N=(f,s,a,p)=>{const k=f.length;let E=f.indexOf(s);return E===-1?!a&&p?f[k-1]:f[0]:(E+=a?1:-1,p&&(E=(E+k)%k),f[Math.max(0,Math.min(E,k-1))])},A=/[^.]*(?=\..*)\.|.*/,D=/\..*/,$=/::\d+$/,H={};let F=1;const Q={mouseenter:"mouseover",mouseleave:"mouseout"},ee=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ne(f,s){return s&&`${s}::${F++}`||f.uidEvent||F++}function xe(f){const s=ne(f);return f.uidEvent=s,H[s]=H[s]||{},H[s]}function De(f,s,a=null){return Object.values(f).find(p=>p.callable===s&&p.delegationSelector===a)}function ke(f,s,a){const p=typeof s=="string",k=p?a:s||a;let E=V(f);return ee.has(E)||(E=f),[p,k,E]}function $e(f,s,a,p,k){if(typeof s!="string"||!f)return;let[E,j,L]=ke(s,a,p);s in Q&&(j=(q=>function(J){if(!J.relatedTarget||J.relatedTarget!==J.delegateTarget&&!J.delegateTarget.contains(J.relatedTarget))return q.call(this,J)})(j));const I=xe(f),B=I[L]||(I[L]={}),W=De(B,j,E?a:null);if(W)return void(W.oneOff=W.oneOff&&k);const z=ne(j,s.replace(A,"")),te=E?function(X,q,J){return function Z(pe){const ge=X.querySelectorAll(q);for(let{target:ie}=pe;ie&&ie!==this;ie=ie.parentNode)for(const ae of ge)if(ae===ie)return de(pe,{delegateTarget:ie}),Z.oneOff&&T.off(X,pe.type,q,J),J.apply(ie,[pe])}}(f,a,j):function(X,q){return function J(Z){return de(Z,{delegateTarget:X}),J.oneOff&&T.off(X,Z.type,q),q.apply(X,[Z])}}(f,j);te.delegationSelector=E?a:null,te.callable=j,te.oneOff=k,te.uidEvent=z,B[z]=te,f.addEventListener(L,te,E)}function M(f,s,a,p,k){const E=De(s[a],p,k);E&&(f.removeEventListener(a,E,!!k),delete s[a][E.uidEvent])}function Y(f,s,a,p){const k=s[a]||{};for(const[E,j]of Object.entries(k))E.includes(p)&&M(f,s,a,j.callable,j.delegationSelector)}function V(f){return f=f.replace(D,""),Q[f]||f}const T={on(f,s,a,p){$e(f,s,a,p,!1)},one(f,s,a,p){$e(f,s,a,p,!0)},off(f,s,a,p){if(typeof s!="string"||!f)return;const[k,E,j]=ke(s,a,p),L=j!==s,I=xe(f),B=I[j]||{},W=s.startsWith(".");if(E===void 0){if(W)for(const z of Object.keys(I))Y(f,I,z,s.slice(1));for(const[z,te]of Object.entries(B)){const X=z.replace($,"");L&&!s.includes(X)||M(f,I,j,te.callable,te.delegationSelector)}}else{if(!Object.keys(B).length)return;M(f,I,j,E,k?a:null)}},trigger(f,s,a){if(typeof s!="string"||!f)return null;const p=O();let k=null,E=!0,j=!0,L=!1;s!==V(s)&&p&&(k=p.Event(s,a),p(f).trigger(k),E=!k.isPropagationStopped(),j=!k.isImmediatePropagationStopped(),L=k.isDefaultPrevented());const I=de(new Event(s,{bubbles:E,cancelable:!0}),a);return L&&I.preventDefault(),j&&f.dispatchEvent(I),I.defaultPrevented&&k&&k.preventDefault(),I}};function de(f,s={}){for(const[a,p]of Object.entries(s))try{f[a]=p}catch{Object.defineProperty(f,a,{configurable:!0,get:()=>p})}return f}function Ct(f){if(f==="true")return!0;if(f==="false")return!1;if(f===Number(f).toString())return Number(f);if(f===""||f==="null")return null;if(typeof f!="string")return f;try{return JSON.parse(decodeURIComponent(f))}catch{return f}}function Ue(f){return f.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}const Oe={setDataAttribute(f,s,a){f.setAttribute(`data-bs-${Ue(s)}`,a)},removeDataAttribute(f,s){f.removeAttribute(`data-bs-${Ue(s)}`)},getDataAttributes(f){if(!f)return{};const s={},a=Object.keys(f.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of a){let k=p.replace(/^bs/,"");k=k.charAt(0).toLowerCase()+k.slice(1),s[k]=Ct(f.dataset[p])}return s},getDataAttribute:(f,s)=>Ct(f.getAttribute(`data-bs-${Ue(s)}`))};class ze{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(s){return s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s}_mergeConfigObj(s,a){const p=c(a)?Oe.getDataAttribute(a,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...c(a)?Oe.getDataAttributes(a):{},...typeof s=="object"?s:{}}}_typeCheckConfig(s,a=this.constructor.DefaultType){for(const[p,k]of Object.entries(a)){const E=s[p],j=c(E)?"element":l(E);if(!new RegExp(k).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${p}" provided type "${j}" but expected type "${k}".`)}}}class Ne extends ze{constructor(s,a){super(),(s=d(s))&&(this._element=s,this._config=this._getConfig(a),r.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.remove(this._element,this.constructor.DATA_KEY),T.off(this._element,this.constructor.EVENT_KEY);for(const s of Object.getOwnPropertyNames(this))this[s]=null}_queueCallback(s,a,p=!0){b(s,a,p)}_getConfig(s){return s=this._mergeConfigObj(s,this._element),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}static getInstance(s){return r.get(d(s),this.DATA_KEY)}static getOrCreateInstance(s,a={}){return this.getInstance(s)||new this(s,typeof a=="object"?a:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(s){return`${s}${this.EVENT_KEY}`}}const Ft=f=>{let s=f.getAttribute("data-bs-target");if(!s||s==="#"){let a=f.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a=`#${a.split("#")[1]}`),s=a&&a!=="#"?a.trim():null}return s?s.split(",").map(a=>o(a)).join(","):null},K={find:(f,s=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(s,f)),findOne:(f,s=document.documentElement)=>Element.prototype.querySelector.call(s,f),children:(f,s)=>[].concat(...f.children).filter(a=>a.matches(s)),parents(f,s){const a=[];let p=f.parentNode.closest(s);for(;p;)a.push(p),p=p.parentNode.closest(s);return a},prev(f,s){let a=f.previousElementSibling;for(;a;){if(a.matches(s))return[a];a=a.previousElementSibling}return[]},next(f,s){let a=f.nextElementSibling;for(;a;){if(a.matches(s))return[a];a=a.nextElementSibling}return[]},focusableChildren(f){const s=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(a=>`${a}:not([tabindex^="-"])`).join(",");return this.find(s,f).filter(a=>!g(a)&&h(a))},getSelectorFromElement(f){const s=Ft(f);return s&&K.findOne(s)?s:null},getElementFromSelector(f){const s=Ft(f);return s?K.findOne(s):null},getMultipleElementsFromSelector(f){const s=Ft(f);return s?K.find(s):[]}},Dr=(f,s="hide")=>{const a=`click.dismiss${f.EVENT_KEY}`,p=f.NAME;T.on(document,a,`[data-bs-dismiss="${p}"]`,function(k){if(["A","AREA"].includes(this.tagName)&&k.preventDefault(),g(this))return;const E=K.getElementFromSelector(this)||this.closest(`.${p}`);f.getOrCreateInstance(E)[s]()})},$r=".bs.alert",Kl=`close${$r}`,Ko=`closed${$r}`;class or extends Ne{static get NAME(){return"alert"}close(){if(T.trigger(this._element,Kl).defaultPrevented)return;this._element.classList.remove("show");const s=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,s)}_destroyElement(){this._element.remove(),T.trigger(this._element,Ko),this.dispose()}static jQueryInterface(s){return this.each(function(){const a=or.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}Dr(or,"close"),v(or);const Qo='[data-bs-toggle="button"]';class On extends Ne{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(s){return this.each(function(){const a=On.getOrCreateInstance(this);s==="toggle"&&a[s]()})}}T.on(document,"click.bs.button.data-api",Qo,f=>{f.preventDefault();const s=f.target.closest(Qo);On.getOrCreateInstance(s).toggle()}),v(On);const un=".bs.swipe",Ql=`touchstart${un}`,Yl=`touchmove${un}`,cn=`touchend${un}`,Rr=`pointerdown${un}`,Yo=`pointerup${un}`,Xo={endCallback:null,leftCallback:null,rightCallback:null},$i={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class sr extends ze{constructor(s,a){super(),this._element=s,s&&sr.isSupported()&&(this._config=this._getConfig(a),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Xo}static get DefaultType(){return $i}static get NAME(){return"swipe"}dispose(){T.off(this._element,un)}_start(s){this._supportPointerEvents?this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX):this._deltaX=s.touches[0].clientX}_end(s){this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX-this._deltaX),this._handleSwipe(),w(this._config.endCallback)}_move(s){this._deltaX=s.touches&&s.touches.length>1?0:s.touches[0].clientX-this._deltaX}_handleSwipe(){const s=Math.abs(this._deltaX);if(s<=40)return;const a=s/this._deltaX;this._deltaX=0,a&&w(a>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,Rr,s=>this._start(s)),T.on(this._element,Yo,s=>this._end(s)),this._element.classList.add("pointer-event")):(T.on(this._element,Ql,s=>this._start(s)),T.on(this._element,Yl,s=>this._move(s)),T.on(this._element,cn,s=>this._end(s)))}_eventIsPointerPenTouch(s){return this._supportPointerEvents&&(s.pointerType==="pen"||s.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Bt=".bs.carousel",Ri=".data-api",Go="ArrowLeft",Gv="ArrowRight",Ii="next",Ir="prev",Mr="left",Jo="right",Jv=`slide${Bt}`,Xl=`slid${Bt}`,qv=`keydown${Bt}`,Zv=`mouseenter${Bt}`,ey=`mouseleave${Bt}`,ty=`dragstart${Bt}`,ny=`load${Bt}${Ri}`,ry=`click${Bt}${Ri}`,_f="carousel",qo="active",xf=".active",Sf=".carousel-item",iy=xf+Sf,oy={[Go]:Jo,[Gv]:Mr},sy={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ly={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class zr extends Ne{constructor(s,a){super(s,a),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===_f&&this.cycle()}static get Default(){return sy}static get DefaultType(){return ly}static get NAME(){return"carousel"}next(){this._slide(Ii)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Ir)}pause(){this._isSliding&&u(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?T.one(this._element,Xl,()=>this.cycle()):this.cycle())}to(s){const a=this._getItems();if(s>a.length-1||s<0)return;if(this._isSliding)return void T.one(this._element,Xl,()=>this.to(s));const p=this._getItemIndex(this._getActive());if(p===s)return;const k=s>p?Ii:Ir;this._slide(k,a[s])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(s){return s.defaultInterval=s.interval,s}_addEventListeners(){this._config.keyboard&&T.on(this._element,qv,s=>this._keydown(s)),this._config.pause==="hover"&&(T.on(this._element,Zv,()=>this.pause()),T.on(this._element,ey,()=>this._maybeEnableCycle())),this._config.touch&&sr.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const a of K.find(".carousel-item img",this._element))T.on(a,ty,p=>p.preventDefault());const s={leftCallback:()=>this._slide(this._directionToOrder(Mr)),rightCallback:()=>this._slide(this._directionToOrder(Jo)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new sr(this._element,s)}_keydown(s){if(/input|textarea/i.test(s.target.tagName))return;const a=oy[s.key];a&&(s.preventDefault(),this._slide(this._directionToOrder(a)))}_getItemIndex(s){return this._getItems().indexOf(s)}_setActiveIndicatorElement(s){if(!this._indicatorsElement)return;const a=K.findOne(xf,this._indicatorsElement);a.classList.remove(qo),a.removeAttribute("aria-current");const p=K.findOne(`[data-bs-slide-to="${s}"]`,this._indicatorsElement);p&&(p.classList.add(qo),p.setAttribute("aria-current","true"))}_updateInterval(){const s=this._activeElement||this._getActive();if(!s)return;const a=Number.parseInt(s.getAttribute("data-bs-interval"),10);this._config.interval=a||this._config.defaultInterval}_slide(s,a=null){if(this._isSliding)return;const p=this._getActive(),k=s===Ii,E=a||N(this._getItems(),p,k,this._config.wrap);if(E===p)return;const j=this._getItemIndex(E),L=z=>T.trigger(this._element,z,{relatedTarget:E,direction:this._orderToDirection(s),from:this._getItemIndex(p),to:j});if(L(Jv).defaultPrevented||!p||!E)return;const I=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(j),this._activeElement=E;const B=k?"carousel-item-start":"carousel-item-end",W=k?"carousel-item-next":"carousel-item-prev";E.classList.add(W),C(E),p.classList.add(B),E.classList.add(B),this._queueCallback(()=>{E.classList.remove(B,W),E.classList.add(qo),p.classList.remove(qo,W,B),this._isSliding=!1,L(Xl)},p,this._isAnimated()),I&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(iy,this._element)}_getItems(){return K.find(Sf,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(s){return y()?s===Mr?Ir:Ii:s===Mr?Ii:Ir}_orderToDirection(s){return y()?s===Ir?Mr:Jo:s===Ir?Jo:Mr}static jQueryInterface(s){return this.each(function(){const a=zr.getOrCreateInstance(this,s);if(typeof s!="number"){if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}}else a.to(s)})}}T.on(document,ry,"[data-bs-slide], [data-bs-slide-to]",function(f){const s=K.getElementFromSelector(this);if(!s||!s.classList.contains(_f))return;f.preventDefault();const a=zr.getOrCreateInstance(s),p=this.getAttribute("data-bs-slide-to");return p?(a.to(p),void a._maybeEnableCycle()):Oe.getDataAttribute(this,"slide")==="next"?(a.next(),void a._maybeEnableCycle()):(a.prev(),void a._maybeEnableCycle())}),T.on(window,ny,()=>{const f=K.find('[data-bs-ride="carousel"]');for(const s of f)zr.getOrCreateInstance(s)}),v(zr);const Mi=".bs.collapse",ay=`show${Mi}`,uy=`shown${Mi}`,cy=`hide${Mi}`,fy=`hidden${Mi}`,dy=`click${Mi}.data-api`,Gl="show",Fr="collapse",Zo="collapsing",py=`:scope .${Fr} .${Fr}`,Jl='[data-bs-toggle="collapse"]',hy={parent:null,toggle:!0},my={parent:"(null|element)",toggle:"boolean"};class Br extends Ne{constructor(s,a){super(s,a),this._isTransitioning=!1,this._triggerArray=[];const p=K.find(Jl);for(const k of p){const E=K.getSelectorFromElement(k),j=K.find(E).filter(L=>L===this._element);E!==null&&j.length&&this._triggerArray.push(k)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return hy}static get DefaultType(){return my}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let s=[];if(this._config.parent&&(s=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(k=>k!==this._element).map(k=>Br.getOrCreateInstance(k,{toggle:!1}))),s.length&&s[0]._isTransitioning||T.trigger(this._element,ay).defaultPrevented)return;for(const k of s)k.hide();const a=this._getDimension();this._element.classList.remove(Fr),this._element.classList.add(Zo),this._element.style[a]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${a[0].toUpperCase()+a.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Zo),this._element.classList.add(Fr,Gl),this._element.style[a]="",T.trigger(this._element,uy)},this._element,!0),this._element.style[a]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,cy).defaultPrevented)return;const s=this._getDimension();this._element.style[s]=`${this._element.getBoundingClientRect()[s]}px`,C(this._element),this._element.classList.add(Zo),this._element.classList.remove(Fr,Gl);for(const a of this._triggerArray){const p=K.getElementFromSelector(a);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([a],!1)}this._isTransitioning=!0,this._element.style[s]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Zo),this._element.classList.add(Fr),T.trigger(this._element,fy)},this._element,!0)}_isShown(s=this._element){return s.classList.contains(Gl)}_configAfterMerge(s){return s.toggle=!!s.toggle,s.parent=d(s.parent),s}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const s=this._getFirstLevelChildren(Jl);for(const a of s){const p=K.getElementFromSelector(a);p&&this._addAriaAndCollapsedClass([a],this._isShown(p))}}_getFirstLevelChildren(s){const a=K.find(py,this._config.parent);return K.find(s,this._config.parent).filter(p=>!a.includes(p))}_addAriaAndCollapsedClass(s,a){if(s.length)for(const p of s)p.classList.toggle("collapsed",!a),p.setAttribute("aria-expanded",a)}static jQueryInterface(s){const a={};return typeof s=="string"&&/show|hide/.test(s)&&(a.toggle=!1),this.each(function(){const p=Br.getOrCreateInstance(this,a);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s]()}})}}T.on(document,dy,Jl,function(f){(f.target.tagName==="A"||f.delegateTarget&&f.delegateTarget.tagName==="A")&&f.preventDefault();for(const s of K.getMultipleElementsFromSelector(this))Br.getOrCreateInstance(s,{toggle:!1}).toggle()}),v(Br);var Ze="top",ht="bottom",mt="right",et="left",es="auto",Ur=[Ze,ht,mt,et],lr="start",Wr="end",kf="clippingParents",ql="viewport",Vr="popper",Ef="reference",Zl=Ur.reduce(function(f,s){return f.concat([s+"-"+lr,s+"-"+Wr])},[]),ea=[].concat(Ur,[es]).reduce(function(f,s){return f.concat([s,s+"-"+lr,s+"-"+Wr])},[]),Cf="beforeRead",bf="read",Pf="afterRead",Of="beforeMain",jf="main",Tf="afterMain",Nf="beforeWrite",Lf="write",Af="afterWrite",Df=[Cf,bf,Pf,Of,jf,Tf,Nf,Lf,Af];function Jt(f){return f?(f.nodeName||"").toLowerCase():null}function gt(f){if(f==null)return window;if(f.toString()!=="[object Window]"){var s=f.ownerDocument;return s&&s.defaultView||window}return f}function ar(f){return f instanceof gt(f).Element||f instanceof Element}function bt(f){return f instanceof gt(f).HTMLElement||f instanceof HTMLElement}function ta(f){return typeof ShadowRoot<"u"&&(f instanceof gt(f).ShadowRoot||f instanceof ShadowRoot)}const na={name:"applyStyles",enabled:!0,phase:"write",fn:function(f){var s=f.state;Object.keys(s.elements).forEach(function(a){var p=s.styles[a]||{},k=s.attributes[a]||{},E=s.elements[a];bt(E)&&Jt(E)&&(Object.assign(E.style,p),Object.keys(k).forEach(function(j){var L=k[j];L===!1?E.removeAttribute(j):E.setAttribute(j,L===!0?"":L)}))})},effect:function(f){var s=f.state,a={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,a.popper),s.styles=a,s.elements.arrow&&Object.assign(s.elements.arrow.style,a.arrow),function(){Object.keys(s.elements).forEach(function(p){var k=s.elements[p],E=s.attributes[p]||{},j=Object.keys(s.styles.hasOwnProperty(p)?s.styles[p]:a[p]).reduce(function(L,I){return L[I]="",L},{});bt(k)&&Jt(k)&&(Object.assign(k.style,j),Object.keys(E).forEach(function(L){k.removeAttribute(L)}))})}},requires:["computeStyles"]};function qt(f){return f.split("-")[0]}var ur=Math.max,ts=Math.min,Hr=Math.round;function ra(){var f=navigator.userAgentData;return f!=null&&f.brands&&Array.isArray(f.brands)?f.brands.map(function(s){return s.brand+"/"+s.version}).join(" "):navigator.userAgent}function $f(){return!/^((?!chrome|android).)*safari/i.test(ra())}function Kr(f,s,a){s===void 0&&(s=!1),a===void 0&&(a=!1);var p=f.getBoundingClientRect(),k=1,E=1;s&&bt(f)&&(k=f.offsetWidth>0&&Hr(p.width)/f.offsetWidth||1,E=f.offsetHeight>0&&Hr(p.height)/f.offsetHeight||1);var j=(ar(f)?gt(f):window).visualViewport,L=!$f()&&a,I=(p.left+(L&&j?j.offsetLeft:0))/k,B=(p.top+(L&&j?j.offsetTop:0))/E,W=p.width/k,z=p.height/E;return{width:W,height:z,top:B,right:I+W,bottom:B+z,left:I,x:I,y:B}}function ia(f){var s=Kr(f),a=f.offsetWidth,p=f.offsetHeight;return Math.abs(s.width-a)<=1&&(a=s.width),Math.abs(s.height-p)<=1&&(p=s.height),{x:f.offsetLeft,y:f.offsetTop,width:a,height:p}}function Rf(f,s){var a=s.getRootNode&&s.getRootNode();if(f.contains(s))return!0;if(a&&ta(a)){var p=s;do{if(p&&f.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function fn(f){return gt(f).getComputedStyle(f)}function gy(f){return["table","td","th"].indexOf(Jt(f))>=0}function jn(f){return((ar(f)?f.ownerDocument:f.document)||window.document).documentElement}function ns(f){return Jt(f)==="html"?f:f.assignedSlot||f.parentNode||(ta(f)?f.host:null)||jn(f)}function If(f){return bt(f)&&fn(f).position!=="fixed"?f.offsetParent:null}function zi(f){for(var s=gt(f),a=If(f);a&&gy(a)&&fn(a).position==="static";)a=If(a);return a&&(Jt(a)==="html"||Jt(a)==="body"&&fn(a).position==="static")?s:a||function(p){var k=/firefox/i.test(ra());if(/Trident/i.test(ra())&&bt(p)&&fn(p).position==="fixed")return null;var E=ns(p);for(ta(E)&&(E=E.host);bt(E)&&["html","body"].indexOf(Jt(E))<0;){var j=fn(E);if(j.transform!=="none"||j.perspective!=="none"||j.contain==="paint"||["transform","perspective"].indexOf(j.willChange)!==-1||k&&j.willChange==="filter"||k&&j.filter&&j.filter!=="none")return E;E=E.parentNode}return null}(f)||s}function oa(f){return["top","bottom"].indexOf(f)>=0?"x":"y"}function Fi(f,s,a){return ur(f,ts(s,a))}function Mf(f){return Object.assign({},{top:0,right:0,bottom:0,left:0},f)}function zf(f,s){return s.reduce(function(a,p){return a[p]=f,a},{})}const Ff={name:"arrow",enabled:!0,phase:"main",fn:function(f){var s,a=f.state,p=f.name,k=f.options,E=a.elements.arrow,j=a.modifiersData.popperOffsets,L=qt(a.placement),I=oa(L),B=[et,mt].indexOf(L)>=0?"height":"width";if(E&&j){var W=function(he,ce){return Mf(typeof(he=typeof he=="function"?he(Object.assign({},ce.rects,{placement:ce.placement})):he)!="number"?he:zf(he,Ur))}(k.padding,a),z=ia(E),te=I==="y"?Ze:et,X=I==="y"?ht:mt,q=a.rects.reference[B]+a.rects.reference[I]-j[I]-a.rects.popper[B],J=j[I]-a.rects.reference[I],Z=zi(E),pe=Z?I==="y"?Z.clientHeight||0:Z.clientWidth||0:0,ge=q/2-J/2,ie=W[te],ae=pe-z[B]-W[X],re=pe/2-z[B]/2+ge,se=Fi(ie,re,ae),ue=I;a.modifiersData[p]=((s={})[ue]=se,s.centerOffset=se-re,s)}},effect:function(f){var s=f.state,a=f.options.element,p=a===void 0?"[data-popper-arrow]":a;p!=null&&(typeof p!="string"||(p=s.elements.popper.querySelector(p)))&&Rf(s.elements.popper,p)&&(s.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qr(f){return f.split("-")[1]}var vy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bf(f){var s,a=f.popper,p=f.popperRect,k=f.placement,E=f.variation,j=f.offsets,L=f.position,I=f.gpuAcceleration,B=f.adaptive,W=f.roundOffsets,z=f.isFixed,te=j.x,X=te===void 0?0:te,q=j.y,J=q===void 0?0:q,Z=typeof W=="function"?W({x:X,y:J}):{x:X,y:J};X=Z.x,J=Z.y;var pe=j.hasOwnProperty("x"),ge=j.hasOwnProperty("y"),ie=et,ae=Ze,re=window;if(B){var se=zi(a),ue="clientHeight",he="clientWidth";se===gt(a)&&fn(se=jn(a)).position!=="static"&&L==="absolute"&&(ue="scrollHeight",he="scrollWidth"),(k===Ze||(k===et||k===mt)&&E===Wr)&&(ae=ht,J-=(z&&se===re&&re.visualViewport?re.visualViewport.height:se[ue])-p.height,J*=I?1:-1),k!==et&&(k!==Ze&&k!==ht||E!==Wr)||(ie=mt,X-=(z&&se===re&&re.visualViewport?re.visualViewport.width:se[he])-p.width,X*=I?1:-1)}var ce,Le=Object.assign({position:L},B&&vy),vt=W===!0?function(Wt,tt){var Ot=Wt.x,jt=Wt.y,je=tt.devicePixelRatio||1;return{x:Hr(Ot*je)/je||0,y:Hr(jt*je)/je||0}}({x:X,y:J},gt(a)):{x:X,y:J};return X=vt.x,J=vt.y,I?Object.assign({},Le,((ce={})[ae]=ge?"0":"",ce[ie]=pe?"0":"",ce.transform=(re.devicePixelRatio||1)<=1?"translate("+X+"px, "+J+"px)":"translate3d("+X+"px, "+J+"px, 0)",ce)):Object.assign({},Le,((s={})[ae]=ge?J+"px":"",s[ie]=pe?X+"px":"",s.transform="",s))}const sa={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(f){var s=f.state,a=f.options,p=a.gpuAcceleration,k=p===void 0||p,E=a.adaptive,j=E===void 0||E,L=a.roundOffsets,I=L===void 0||L,B={placement:qt(s.placement),variation:Qr(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:k,isFixed:s.options.strategy==="fixed"};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Bf(Object.assign({},B,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:j,roundOffsets:I})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Bf(Object.assign({},B,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:I})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})},data:{}};var rs={passive:!0};const la={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(f){var s=f.state,a=f.instance,p=f.options,k=p.scroll,E=k===void 0||k,j=p.resize,L=j===void 0||j,I=gt(s.elements.popper),B=[].concat(s.scrollParents.reference,s.scrollParents.popper);return E&&B.forEach(function(W){W.addEventListener("scroll",a.update,rs)}),L&&I.addEventListener("resize",a.update,rs),function(){E&&B.forEach(function(W){W.removeEventListener("scroll",a.update,rs)}),L&&I.removeEventListener("resize",a.update,rs)}},data:{}};var yy={left:"right",right:"left",bottom:"top",top:"bottom"};function is(f){return f.replace(/left|right|bottom|top/g,function(s){return yy[s]})}var wy={start:"end",end:"start"};function Uf(f){return f.replace(/start|end/g,function(s){return wy[s]})}function aa(f){var s=gt(f);return{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function ua(f){return Kr(jn(f)).left+aa(f).scrollLeft}function ca(f){var s=fn(f),a=s.overflow,p=s.overflowX,k=s.overflowY;return/auto|scroll|overlay|hidden/.test(a+k+p)}function Wf(f){return["html","body","#document"].indexOf(Jt(f))>=0?f.ownerDocument.body:bt(f)&&ca(f)?f:Wf(ns(f))}function Bi(f,s){var a;s===void 0&&(s=[]);var p=Wf(f),k=p===((a=f.ownerDocument)==null?void 0:a.body),E=gt(p),j=k?[E].concat(E.visualViewport||[],ca(p)?p:[]):p,L=s.concat(j);return k?L:L.concat(Bi(ns(j)))}function fa(f){return Object.assign({},f,{left:f.x,top:f.y,right:f.x+f.width,bottom:f.y+f.height})}function Vf(f,s,a){return s===ql?fa(function(p,k){var E=gt(p),j=jn(p),L=E.visualViewport,I=j.clientWidth,B=j.clientHeight,W=0,z=0;if(L){I=L.width,B=L.height;var te=$f();(te||!te&&k==="fixed")&&(W=L.offsetLeft,z=L.offsetTop)}return{width:I,height:B,x:W+ua(p),y:z}}(f,a)):ar(s)?function(p,k){var E=Kr(p,!1,k==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(s,a):fa(function(p){var k,E=jn(p),j=aa(p),L=(k=p.ownerDocument)==null?void 0:k.body,I=ur(E.scrollWidth,E.clientWidth,L?L.scrollWidth:0,L?L.clientWidth:0),B=ur(E.scrollHeight,E.clientHeight,L?L.scrollHeight:0,L?L.clientHeight:0),W=-j.scrollLeft+ua(p),z=-j.scrollTop;return fn(L||E).direction==="rtl"&&(W+=ur(E.clientWidth,L?L.clientWidth:0)-I),{width:I,height:B,x:W,y:z}}(jn(f)))}function Hf(f){var s,a=f.reference,p=f.element,k=f.placement,E=k?qt(k):null,j=k?Qr(k):null,L=a.x+a.width/2-p.width/2,I=a.y+a.height/2-p.height/2;switch(E){case Ze:s={x:L,y:a.y-p.height};break;case ht:s={x:L,y:a.y+a.height};break;case mt:s={x:a.x+a.width,y:I};break;case et:s={x:a.x-p.width,y:I};break;default:s={x:a.x,y:a.y}}var B=E?oa(E):null;if(B!=null){var W=B==="y"?"height":"width";switch(j){case lr:s[B]=s[B]-(a[W]/2-p[W]/2);break;case Wr:s[B]=s[B]+(a[W]/2-p[W]/2)}}return s}function Yr(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=p===void 0?f.placement:p,E=a.strategy,j=E===void 0?f.strategy:E,L=a.boundary,I=L===void 0?kf:L,B=a.rootBoundary,W=B===void 0?ql:B,z=a.elementContext,te=z===void 0?Vr:z,X=a.altBoundary,q=X!==void 0&&X,J=a.padding,Z=J===void 0?0:J,pe=Mf(typeof Z!="number"?Z:zf(Z,Ur)),ge=te===Vr?Ef:Vr,ie=f.rects.popper,ae=f.elements[q?ge:te],re=function(tt,Ot,jt,je){var Zt=Ot==="clippingParents"?function(me){var nt=Bi(ns(me)),Tt=["absolute","fixed"].indexOf(fn(me).position)>=0&&bt(me)?zi(me):me;return ar(Tt)?nt.filter(function(Nn){return ar(Nn)&&Rf(Nn,Tt)&&Jt(Nn)!=="body"}):[]}(tt):[].concat(Ot),en=[].concat(Zt,[jt]),Jr=en[0],We=en.reduce(function(me,nt){var Tt=Vf(tt,nt,je);return me.top=ur(Tt.top,me.top),me.right=ts(Tt.right,me.right),me.bottom=ts(Tt.bottom,me.bottom),me.left=ur(Tt.left,me.left),me},Vf(tt,Jr,je));return We.width=We.right-We.left,We.height=We.bottom-We.top,We.x=We.left,We.y=We.top,We}(ar(ae)?ae:ae.contextElement||jn(f.elements.popper),I,W,j),se=Kr(f.elements.reference),ue=Hf({reference:se,element:ie,placement:k}),he=fa(Object.assign({},ie,ue)),ce=te===Vr?he:se,Le={top:re.top-ce.top+pe.top,bottom:ce.bottom-re.bottom+pe.bottom,left:re.left-ce.left+pe.left,right:ce.right-re.right+pe.right},vt=f.modifiersData.offset;if(te===Vr&&vt){var Wt=vt[k];Object.keys(Le).forEach(function(tt){var Ot=[mt,ht].indexOf(tt)>=0?1:-1,jt=[Ze,ht].indexOf(tt)>=0?"y":"x";Le[tt]+=Wt[jt]*Ot})}return Le}function _y(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=a.boundary,E=a.rootBoundary,j=a.padding,L=a.flipVariations,I=a.allowedAutoPlacements,B=I===void 0?ea:I,W=Qr(p),z=W?L?Zl:Zl.filter(function(q){return Qr(q)===W}):Ur,te=z.filter(function(q){return B.indexOf(q)>=0});te.length===0&&(te=z);var X=te.reduce(function(q,J){return q[J]=Yr(f,{placement:J,boundary:k,rootBoundary:E,padding:j})[qt(J)],q},{});return Object.keys(X).sort(function(q,J){return X[q]-X[J]})}const Kf={name:"flip",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name;if(!s.modifiersData[p]._skip){for(var k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j===void 0||j,I=a.fallbackPlacements,B=a.padding,W=a.boundary,z=a.rootBoundary,te=a.altBoundary,X=a.flipVariations,q=X===void 0||X,J=a.allowedAutoPlacements,Z=s.options.placement,pe=qt(Z),ge=I||(pe!==Z&&q?function(me){if(qt(me)===es)return[];var nt=is(me);return[Uf(me),nt,Uf(nt)]}(Z):[is(Z)]),ie=[Z].concat(ge).reduce(function(me,nt){return me.concat(qt(nt)===es?_y(s,{placement:nt,boundary:W,rootBoundary:z,padding:B,flipVariations:q,allowedAutoPlacements:J}):nt)},[]),ae=s.rects.reference,re=s.rects.popper,se=new Map,ue=!0,he=ie[0],ce=0;ce=0,Ot=tt?"width":"height",jt=Yr(s,{placement:Le,boundary:W,rootBoundary:z,altBoundary:te,padding:B}),je=tt?Wt?mt:et:Wt?ht:Ze;ae[Ot]>re[Ot]&&(je=is(je));var Zt=is(je),en=[];if(E&&en.push(jt[vt]<=0),L&&en.push(jt[je]<=0,jt[Zt]<=0),en.every(function(me){return me})){he=Le,ue=!1;break}se.set(Le,en)}if(ue)for(var Jr=function(me){var nt=ie.find(function(Tt){var Nn=se.get(Tt);if(Nn)return Nn.slice(0,me).every(function(ps){return ps})});if(nt)return he=nt,"break"},We=q?3:1;We>0&&Jr(We)!=="break";We--);s.placement!==he&&(s.modifiersData[p]._skip=!0,s.placement=he,s.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Qf(f,s,a){return a===void 0&&(a={x:0,y:0}),{top:f.top-s.height-a.y,right:f.right-s.width+a.x,bottom:f.bottom-s.height+a.y,left:f.left-s.width-a.x}}function Yf(f){return[Ze,mt,ht,et].some(function(s){return f[s]>=0})}const Xf={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(f){var s=f.state,a=f.name,p=s.rects.reference,k=s.rects.popper,E=s.modifiersData.preventOverflow,j=Yr(s,{elementContext:"reference"}),L=Yr(s,{altBoundary:!0}),I=Qf(j,p),B=Qf(L,k,E),W=Yf(I),z=Yf(B);s.modifiersData[a]={referenceClippingOffsets:I,popperEscapeOffsets:B,isReferenceHidden:W,hasPopperEscaped:z},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":W,"data-popper-escaped":z})}},Gf={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.offset,E=k===void 0?[0,0]:k,j=ea.reduce(function(W,z){return W[z]=function(te,X,q){var J=qt(te),Z=[et,Ze].indexOf(J)>=0?-1:1,pe=typeof q=="function"?q(Object.assign({},X,{placement:te})):q,ge=pe[0],ie=pe[1];return ge=ge||0,ie=(ie||0)*Z,[et,mt].indexOf(J)>=0?{x:ie,y:ge}:{x:ge,y:ie}}(z,s.rects,E),W},{}),L=j[s.placement],I=L.x,B=L.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=I,s.modifiersData.popperOffsets.y+=B),s.modifiersData[p]=j}},da={name:"popperOffsets",enabled:!0,phase:"read",fn:function(f){var s=f.state,a=f.name;s.modifiersData[a]=Hf({reference:s.rects.reference,element:s.rects.popper,placement:s.placement})},data:{}},Jf={name:"preventOverflow",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j!==void 0&&j,I=a.boundary,B=a.rootBoundary,W=a.altBoundary,z=a.padding,te=a.tether,X=te===void 0||te,q=a.tetherOffset,J=q===void 0?0:q,Z=Yr(s,{boundary:I,rootBoundary:B,padding:z,altBoundary:W}),pe=qt(s.placement),ge=Qr(s.placement),ie=!ge,ae=oa(pe),re=ae==="x"?"y":"x",se=s.modifiersData.popperOffsets,ue=s.rects.reference,he=s.rects.popper,ce=typeof J=="function"?J(Object.assign({},s.rects,{placement:s.placement})):J,Le=typeof ce=="number"?{mainAxis:ce,altAxis:ce}:Object.assign({mainAxis:0,altAxis:0},ce),vt=s.modifiersData.offset?s.modifiersData.offset[s.placement]:null,Wt={x:0,y:0};if(se){if(E){var tt,Ot=ae==="y"?Ze:et,jt=ae==="y"?ht:mt,je=ae==="y"?"height":"width",Zt=se[ae],en=Zt+Z[Ot],Jr=Zt-Z[jt],We=X?-he[je]/2:0,me=ge===lr?ue[je]:he[je],nt=ge===lr?-he[je]:-ue[je],Tt=s.elements.arrow,Nn=X&&Tt?ia(Tt):{width:0,height:0},ps=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Id=ps[Ot],Md=ps[jt],hs=Fi(0,ue[je],Nn[je]),qw=ie?ue[je]/2-We-hs-Id-Le.mainAxis:me-hs-Id-Le.mainAxis,Zw=ie?-ue[je]/2+We+hs+Md+Le.mainAxis:nt+hs+Md+Le.mainAxis,ba=s.elements.arrow&&zi(s.elements.arrow),e0=ba?ae==="y"?ba.clientTop||0:ba.clientLeft||0:0,zd=(tt=vt==null?void 0:vt[ae])!=null?tt:0,t0=Zt+Zw-zd,Fd=Fi(X?ts(en,Zt+qw-zd-e0):en,Zt,X?ur(Jr,t0):Jr);se[ae]=Fd,Wt[ae]=Fd-Zt}if(L){var Bd,n0=ae==="x"?Ze:et,r0=ae==="x"?ht:mt,vr=se[re],ms=re==="y"?"height":"width",Ud=vr+Z[n0],Wd=vr-Z[r0],Pa=[Ze,et].indexOf(pe)!==-1,Vd=(Bd=vt==null?void 0:vt[re])!=null?Bd:0,Hd=Pa?Ud:vr-ue[ms]-he[ms]-Vd+Le.altAxis,Kd=Pa?vr+ue[ms]+he[ms]-Vd-Le.altAxis:Wd,Qd=X&&Pa?function(i0,o0,Oa){var Yd=Fi(i0,o0,Oa);return Yd>Oa?Oa:Yd}(Hd,vr,Kd):Fi(X?Hd:Ud,vr,X?Kd:Wd);se[re]=Qd,Wt[re]=Qd-vr}s.modifiersData[p]=Wt}},requiresIfExists:["offset"]};function xy(f,s,a){a===void 0&&(a=!1);var p,k,E=bt(s),j=bt(s)&&function(z){var te=z.getBoundingClientRect(),X=Hr(te.width)/z.offsetWidth||1,q=Hr(te.height)/z.offsetHeight||1;return X!==1||q!==1}(s),L=jn(s),I=Kr(f,j,a),B={scrollLeft:0,scrollTop:0},W={x:0,y:0};return(E||!E&&!a)&&((Jt(s)!=="body"||ca(L))&&(B=(p=s)!==gt(p)&&bt(p)?{scrollLeft:(k=p).scrollLeft,scrollTop:k.scrollTop}:aa(p)),bt(s)?((W=Kr(s,!0)).x+=s.clientLeft,W.y+=s.clientTop):L&&(W.x=ua(L))),{x:I.left+B.scrollLeft-W.x,y:I.top+B.scrollTop-W.y,width:I.width,height:I.height}}function Sy(f){var s=new Map,a=new Set,p=[];function k(E){a.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(j){if(!a.has(j)){var L=s.get(j);L&&k(L)}}),p.push(E)}return f.forEach(function(E){s.set(E.name,E)}),f.forEach(function(E){a.has(E.name)||k(E)}),p}var qf={placement:"bottom",modifiers:[],strategy:"absolute"};function Zf(){for(var f=arguments.length,s=new Array(f),a=0;aNumber.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_getPopperConfig(){const s={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Oe.setDataAttribute(this._menu,"popper","static"),s.modifiers=[{name:"applyStyles",enabled:!1}]),{...s,...w(this._config.popperConfig,[void 0,s])}}_selectMenuItem({key:s,target:a}){const p=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(k=>h(k));p.length&&N(p,a,s===nd,!p.includes(a)).focus()}static jQueryInterface(s){return this.each(function(){const a=Ut.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}static clearMenus(s){if(s.button===2||s.type==="keyup"&&s.key!=="Tab")return;const a=K.find(Ny);for(const p of a){const k=Ut.getInstance(p);if(!k||k._config.autoClose===!1)continue;const E=s.composedPath(),j=E.includes(k._menu);if(E.includes(k._element)||k._config.autoClose==="inside"&&!j||k._config.autoClose==="outside"&&j||k._menu.contains(s.target)&&(s.type==="keyup"&&s.key==="Tab"||/input|select|option|textarea|form/i.test(s.target.tagName)))continue;const L={relatedTarget:k._element};s.type==="click"&&(L.clickEvent=s),k._completeHide(L)}}static dataApiKeydownHandler(s){const a=/input|textarea/i.test(s.target.tagName),p=s.key==="Escape",k=[Cy,nd].includes(s.key);if(!k&&!p||a&&!p)return;s.preventDefault();const E=this.matches(fr)?this:K.prev(this,fr)[0]||K.next(this,fr)[0]||K.findOne(fr,s.delegateTarget.parentNode),j=Ut.getOrCreateInstance(E);if(k)return s.stopPropagation(),j.show(),void j._selectMenuItem(s);j._isShown()&&(s.stopPropagation(),j.hide(),E.focus())}}T.on(document,id,fr,Ut.dataApiKeydownHandler),T.on(document,id,ss,Ut.dataApiKeydownHandler),T.on(document,rd,Ut.clearMenus),T.on(document,Ty,Ut.clearMenus),T.on(document,rd,fr,function(f){f.preventDefault(),Ut.getOrCreateInstance(this).toggle()}),v(Ut);const od="backdrop",sd="show",ld=`mousedown.bs.${od}`,Fy={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},By={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ad extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isAppended=!1,this._element=null}static get Default(){return Fy}static get DefaultType(){return By}static get NAME(){return od}show(s){if(!this._config.isVisible)return void w(s);this._append();const a=this._getElement();this._config.isAnimated&&C(a),a.classList.add(sd),this._emulateAnimation(()=>{w(s)})}hide(s){this._config.isVisible?(this._getElement().classList.remove(sd),this._emulateAnimation(()=>{this.dispose(),w(s)})):w(s)}dispose(){this._isAppended&&(T.off(this._element,ld),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const s=document.createElement("div");s.className=this._config.className,this._config.isAnimated&&s.classList.add("fade"),this._element=s}return this._element}_configAfterMerge(s){return s.rootElement=d(s.rootElement),s}_append(){if(this._isAppended)return;const s=this._getElement();this._config.rootElement.append(s),T.on(s,ld,()=>{w(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(s){b(s,this._getElement(),this._config.isAnimated)}}const ls=".bs.focustrap",Uy=`focusin${ls}`,Wy=`keydown.tab${ls}`,ud="backward",Vy={autofocus:!0,trapElement:null},Hy={autofocus:"boolean",trapElement:"element"};class cd extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Vy}static get DefaultType(){return Hy}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,ls),T.on(document,Uy,s=>this._handleFocusin(s)),T.on(document,Wy,s=>this._handleKeydown(s)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,ls))}_handleFocusin(s){const{trapElement:a}=this._config;if(s.target===document||s.target===a||a.contains(s.target))return;const p=K.focusableChildren(a);p.length===0?a.focus():this._lastTabNavDirection===ud?p[p.length-1].focus():p[0].focus()}_handleKeydown(s){s.key==="Tab"&&(this._lastTabNavDirection=s.shiftKey?ud:"forward")}}const fd=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dd=".sticky-top",as="padding-right",pd="margin-right";class ma{constructor(){this._element=document.body}getWidth(){const s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}hide(){const s=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,as,a=>a+s),this._setElementAttributes(fd,as,a=>a+s),this._setElementAttributes(dd,pd,a=>a-s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,as),this._resetElementAttributes(fd,as),this._resetElementAttributes(dd,pd)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(s,a,p){const k=this.getWidth();this._applyManipulationCallback(s,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+k)return;this._saveInitialAttribute(E,a);const j=window.getComputedStyle(E).getPropertyValue(a);E.style.setProperty(a,`${p(Number.parseFloat(j))}px`)})}_saveInitialAttribute(s,a){const p=s.style.getPropertyValue(a);p&&Oe.setDataAttribute(s,a,p)}_resetElementAttributes(s,a){this._applyManipulationCallback(s,p=>{const k=Oe.getDataAttribute(p,a);k!==null?(Oe.removeDataAttribute(p,a),p.style.setProperty(a,k)):p.style.removeProperty(a)})}_applyManipulationCallback(s,a){if(c(s))a(s);else for(const p of K.find(s,this._element))a(p)}}const Pt=".bs.modal",Ky=`hide${Pt}`,Qy=`hidePrevented${Pt}`,hd=`hidden${Pt}`,md=`show${Pt}`,Yy=`shown${Pt}`,Xy=`resize${Pt}`,Gy=`click.dismiss${Pt}`,Jy=`mousedown.dismiss${Pt}`,qy=`keydown.dismiss${Pt}`,Zy=`click${Pt}.data-api`,gd="modal-open",vd="show",ga="modal-static",ew={backdrop:!0,focus:!0,keyboard:!0},tw={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class dr extends Ne{constructor(s,a){super(s,a),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ma,this._addEventListeners()}static get Default(){return ew}static get DefaultType(){return tw}static get NAME(){return"modal"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||this._isTransitioning||T.trigger(this._element,md,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(gd),this._adjustDialog(),this._backdrop.show(()=>this._showElement(s)))}hide(){this._isShown&&!this._isTransitioning&&(T.trigger(this._element,Ky).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(vd),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){T.off(window,Pt),T.off(this._dialog,Pt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ad({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new cd({trapElement:this._element})}_showElement(s){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const a=K.findOne(".modal-body",this._dialog);a&&(a.scrollTop=0),C(this._element),this._element.classList.add(vd),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,Yy,{relatedTarget:s})},this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,qy,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),T.on(window,Xy,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,Jy,s=>{T.one(this._element,Gy,a=>{this._element===s.target&&this._element===a.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(gd),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,hd)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(T.trigger(this._element,Qy).defaultPrevented)return;const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._element.style.overflowY;a==="hidden"||this._element.classList.contains(ga)||(s||(this._element.style.overflowY="hidden"),this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.remove(ga),this._queueCallback(()=>{this._element.style.overflowY=a},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._scrollBar.getWidth(),p=a>0;if(p&&!s){const k=y()?"paddingLeft":"paddingRight";this._element.style[k]=`${a}px`}if(!p&&s){const k=y()?"paddingRight":"paddingLeft";this._element.style[k]=`${a}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(s,a){return this.each(function(){const p=dr.getOrCreateInstance(this,s);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s](a)}})}}T.on(document,Zy,'[data-bs-toggle="modal"]',function(f){const s=K.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&f.preventDefault(),T.one(s,md,p=>{p.defaultPrevented||T.one(s,hd,()=>{h(this)&&this.focus()})});const a=K.findOne(".modal.show");a&&dr.getInstance(a).hide(),dr.getOrCreateInstance(s).toggle(this)}),Dr(dr),v(dr);const dn=".bs.offcanvas",yd=".data-api",nw=`load${dn}${yd}`,wd="show",_d="showing",xd="hiding",Sd=".offcanvas.show",rw=`show${dn}`,iw=`shown${dn}`,ow=`hide${dn}`,kd=`hidePrevented${dn}`,Ed=`hidden${dn}`,sw=`resize${dn}`,lw=`click${dn}${yd}`,aw=`keydown.dismiss${dn}`,uw={backdrop:!0,keyboard:!0,scroll:!1},cw={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class pn extends Ne{constructor(s,a){super(s,a),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return uw}static get DefaultType(){return cw}static get NAME(){return"offcanvas"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||T.trigger(this._element,rw,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new ma().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_d),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(wd),this._element.classList.remove(_d),T.trigger(this._element,iw,{relatedTarget:s})},this._element,!0))}hide(){this._isShown&&(T.trigger(this._element,ow).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(xd),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(wd,xd),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ma().reset(),T.trigger(this._element,Ed)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const s=!!this._config.backdrop;return new ad({className:"offcanvas-backdrop",isVisible:s,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:s?()=>{this._config.backdrop!=="static"?this.hide():T.trigger(this._element,kd)}:null})}_initializeFocusTrap(){return new cd({trapElement:this._element})}_addEventListeners(){T.on(this._element,aw,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():T.trigger(this._element,kd))})}static jQueryInterface(s){return this.each(function(){const a=pn.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}T.on(document,lw,'[data-bs-toggle="offcanvas"]',function(f){const s=K.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this))return;T.one(s,Ed,()=>{h(this)&&this.focus()});const a=K.findOne(Sd);a&&a!==s&&pn.getInstance(a).hide(),pn.getOrCreateInstance(s).toggle(this)}),T.on(window,nw,()=>{for(const f of K.find(Sd))pn.getOrCreateInstance(f).show()}),T.on(window,sw,()=>{for(const f of K.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(f).position!=="fixed"&&pn.getOrCreateInstance(f).hide()}),Dr(pn),v(pn);const Cd={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},fw=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),dw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,pw=(f,s)=>{const a=f.nodeName.toLowerCase();return s.includes(a)?!fw.has(a)||!!dw.test(f.nodeValue):s.filter(p=>p instanceof RegExp).some(p=>p.test(a))},hw={allowList:Cd,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},mw={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},gw={entry:"(string|element|function|null)",selector:"(string|element)"};class vw extends ze{constructor(s){super(),this._config=this._getConfig(s)}static get Default(){return hw}static get DefaultType(){return mw}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(s=>this._resolvePossibleFunction(s)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(s){return this._checkContent(s),this._config.content={...this._config.content,...s},this}toHtml(){const s=document.createElement("div");s.innerHTML=this._maybeSanitize(this._config.template);for(const[k,E]of Object.entries(this._config.content))this._setContent(s,E,k);const a=s.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&a.classList.add(...p.split(" ")),a}_typeCheckConfig(s){super._typeCheckConfig(s),this._checkContent(s.content)}_checkContent(s){for(const[a,p]of Object.entries(s))super._typeCheckConfig({selector:a,entry:p},gw)}_setContent(s,a,p){const k=K.findOne(p,s);k&&((a=this._resolvePossibleFunction(a))?c(a)?this._putElementInTemplate(d(a),k):this._config.html?k.innerHTML=this._maybeSanitize(a):k.textContent=a:k.remove())}_maybeSanitize(s){return this._config.sanitize?function(a,p,k){if(!a.length)return a;if(k&&typeof k=="function")return k(a);const E=new window.DOMParser().parseFromString(a,"text/html"),j=[].concat(...E.body.querySelectorAll("*"));for(const L of j){const I=L.nodeName.toLowerCase();if(!Object.keys(p).includes(I)){L.remove();continue}const B=[].concat(...L.attributes),W=[].concat(p["*"]||[],p[I]||[]);for(const z of B)pw(z,W)||L.removeAttribute(z.nodeName)}return E.body.innerHTML}(s,this._config.allowList,this._config.sanitizeFn):s}_resolvePossibleFunction(s){return w(s,[void 0,this])}_putElementInTemplate(s,a){if(this._config.html)return a.innerHTML="",void a.append(s);a.textContent=s.textContent}}const yw=new Set(["sanitize","allowList","sanitizeFn"]),va="fade",us="show",ww=".tooltip-inner",bd=".modal",Pd="hide.bs.modal",Ui="hover",ya="focus",wa="click",_w={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},xw={allowList:Cd,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Sw={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class pr extends Ne{constructor(s,a){if(ed===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(s,a),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return xw}static get DefaultType(){return Sw}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(bd),Pd,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const s=T.trigger(this._element,this.constructor.eventName("show")),a=(_(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(s.defaultPrevented||!a)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:k}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(k.append(p),T.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(us),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))T.on(E,"mouseover",S);this._queueCallback(()=>{T.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!T.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(us),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))T.off(s,"mouseover",S);this._activeTrigger[wa]=!1,this._activeTrigger[ya]=!1,this._activeTrigger[Ui]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(s){const a=this._getTemplateFactory(s).toHtml();if(!a)return null;a.classList.remove(va,us),a.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(k=>{do k+=Math.floor(1e6*Math.random());while(document.getElementById(k));return k})(this.constructor.NAME).toString();return a.setAttribute("id",p),this._isAnimated()&&a.classList.add(va),a}setContent(s){this._newContent=s,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(s){return this._templateFactory?this._templateFactory.changeContent(s):this._templateFactory=new vw({...this._config,content:s,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ww]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(s){return this.constructor.getOrCreateInstance(s.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(va)}_isShown(){return this.tip&&this.tip.classList.contains(us)}_createPopper(s){const a=w(this._config.placement,[this,s,this._element]),p=_w[a.toUpperCase()];return pa(this._element,s,this._getPopperConfig(p))}_getOffset(){const{offset:s}=this._config;return typeof s=="string"?s.split(",").map(a=>Number.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_resolvePossibleFunction(s){return w(s,[this._element,this._element])}_getPopperConfig(s){const a={placement:s,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...a,...w(this._config.popperConfig,[void 0,a])}}_setListeners(){const s=this._config.trigger.split(" ");for(const a of s)if(a==="click")T.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{const k=this._initializeOnDelegatedTarget(p);k._activeTrigger[wa]=!(k._isShown()&&k._activeTrigger[wa]),k.toggle()});else if(a!=="manual"){const p=a===Ui?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),k=a===Ui?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");T.on(this._element,p,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusin"?ya:Ui]=!0,j._enter()}),T.on(this._element,k,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusout"?ya:Ui]=j._element.contains(E.relatedTarget),j._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(bd),Pd,this._hideModalHandler)}_fixTitle(){const s=this._element.getAttribute("title");s&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",s),this._element.setAttribute("data-bs-original-title",s),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(s,a){clearTimeout(this._timeout),this._timeout=setTimeout(s,a)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(s){const a=Oe.getDataAttributes(this._element);for(const p of Object.keys(a))yw.has(p)&&delete a[p];return s={...a,...typeof s=="object"&&s?s:{}},s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s.container=s.container===!1?document.body:d(s.container),typeof s.delay=="number"&&(s.delay={show:s.delay,hide:s.delay}),typeof s.title=="number"&&(s.title=s.title.toString()),typeof s.content=="number"&&(s.content=s.content.toString()),s}_getDelegateConfig(){const s={};for(const[a,p]of Object.entries(this._config))this.constructor.Default[a]!==p&&(s[a]=p);return s.selector=!1,s.trigger="manual",s}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(s){return this.each(function(){const a=pr.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(pr);const kw=".popover-header",Ew=".popover-body",Cw={...pr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},bw={...pr.DefaultType,content:"(null|string|element|function)"};class cs extends pr{static get Default(){return Cw}static get DefaultType(){return bw}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[kw]:this._getTitle(),[Ew]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(s){return this.each(function(){const a=cs.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(cs);const _a=".bs.scrollspy",Pw=`activate${_a}`,Od=`click${_a}`,Ow=`load${_a}.data-api`,Gr="active",xa="[href]",jd=".nav-link",jw=`${jd}, .nav-item > ${jd}, .list-group-item`,Tw={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Nw={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Wi extends Ne{constructor(s,a){super(s,a),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tw}static get DefaultType(){return Nw}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const s of this._observableSections.values())this._observer.observe(s)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(s){return s.target=d(s.target)||document.body,s.rootMargin=s.offset?`${s.offset}px 0px -30%`:s.rootMargin,typeof s.threshold=="string"&&(s.threshold=s.threshold.split(",").map(a=>Number.parseFloat(a))),s}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(T.off(this._config.target,Od),T.on(this._config.target,Od,xa,s=>{const a=this._observableSections.get(s.target.hash);if(a){s.preventDefault();const p=this._rootElement||window,k=a.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:k,behavior:"smooth"});p.scrollTop=k}}))}_getNewObserver(){const s={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(a=>this._observerCallback(a),s)}_observerCallback(s){const a=j=>this._targetLinks.get(`#${j.target.id}`),p=j=>{this._previousScrollData.visibleEntryTop=j.target.offsetTop,this._process(a(j))},k=(this._rootElement||document.documentElement).scrollTop,E=k>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=k;for(const j of s){if(!j.isIntersecting){this._activeTarget=null,this._clearActiveClass(a(j));continue}const L=j.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&L){if(p(j),!k)return}else E||L||p(j)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const s=K.find(xa,this._config.target);for(const a of s){if(!a.hash||g(a))continue;const p=K.findOne(decodeURI(a.hash),this._element);h(p)&&(this._targetLinks.set(decodeURI(a.hash),a),this._observableSections.set(a.hash,p))}}_process(s){this._activeTarget!==s&&(this._clearActiveClass(this._config.target),this._activeTarget=s,s.classList.add(Gr),this._activateParents(s),T.trigger(this._element,Pw,{relatedTarget:s}))}_activateParents(s){if(s.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",s.closest(".dropdown")).classList.add(Gr);else for(const a of K.parents(s,".nav, .list-group"))for(const p of K.prev(a,jw))p.classList.add(Gr)}_clearActiveClass(s){s.classList.remove(Gr);const a=K.find(`${xa}.${Gr}`,s);for(const p of a)p.classList.remove(Gr)}static jQueryInterface(s){return this.each(function(){const a=Wi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(window,Ow,()=>{for(const f of K.find('[data-bs-spy="scroll"]'))Wi.getOrCreateInstance(f)}),v(Wi);const hr=".bs.tab",Lw=`hide${hr}`,Aw=`hidden${hr}`,Dw=`show${hr}`,$w=`shown${hr}`,Rw=`click${hr}`,Iw=`keydown${hr}`,Mw=`load${hr}`,zw="ArrowLeft",Td="ArrowRight",Fw="ArrowUp",Nd="ArrowDown",Sa="Home",Ld="End",mr="active",Ad="fade",ka="show",Dd=".dropdown-toggle",Ea=`:not(${Dd})`,$d='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ca=`.nav-link${Ea}, .list-group-item${Ea}, [role="tab"]${Ea}, ${$d}`,Bw=`.${mr}[data-bs-toggle="tab"], .${mr}[data-bs-toggle="pill"], .${mr}[data-bs-toggle="list"]`;class gr extends Ne{constructor(s){super(s),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,Iw,a=>this._keydown(a)))}static get NAME(){return"tab"}show(){const s=this._element;if(this._elemIsActive(s))return;const a=this._getActiveElem(),p=a?T.trigger(a,Lw,{relatedTarget:s}):null;T.trigger(s,Dw,{relatedTarget:a}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(a,s),this._activate(s,a))}_activate(s,a){s&&(s.classList.add(mr),this._activate(K.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.removeAttribute("tabindex"),s.setAttribute("aria-selected",!0),this._toggleDropDown(s,!0),T.trigger(s,$w,{relatedTarget:a})):s.classList.add(ka)},s,s.classList.contains(Ad)))}_deactivate(s,a){s&&(s.classList.remove(mr),s.blur(),this._deactivate(K.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.setAttribute("aria-selected",!1),s.setAttribute("tabindex","-1"),this._toggleDropDown(s,!1),T.trigger(s,Aw,{relatedTarget:a})):s.classList.remove(ka)},s,s.classList.contains(Ad)))}_keydown(s){if(![zw,Td,Fw,Nd,Sa,Ld].includes(s.key))return;s.stopPropagation(),s.preventDefault();const a=this._getChildren().filter(k=>!g(k));let p;if([Sa,Ld].includes(s.key))p=a[s.key===Sa?0:a.length-1];else{const k=[Td,Nd].includes(s.key);p=N(a,s.target,k,!0)}p&&(p.focus({preventScroll:!0}),gr.getOrCreateInstance(p).show())}_getChildren(){return K.find(Ca,this._parent)}_getActiveElem(){return this._getChildren().find(s=>this._elemIsActive(s))||null}_setInitialAttributes(s,a){this._setAttributeIfNotExists(s,"role","tablist");for(const p of a)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(s){s=this._getInnerElement(s);const a=this._elemIsActive(s),p=this._getOuterElement(s);s.setAttribute("aria-selected",a),p!==s&&this._setAttributeIfNotExists(p,"role","presentation"),a||s.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(s,"role","tab"),this._setInitialAttributesOnTargetPanel(s)}_setInitialAttributesOnTargetPanel(s){const a=K.getElementFromSelector(s);a&&(this._setAttributeIfNotExists(a,"role","tabpanel"),s.id&&this._setAttributeIfNotExists(a,"aria-labelledby",`${s.id}`))}_toggleDropDown(s,a){const p=this._getOuterElement(s);if(!p.classList.contains("dropdown"))return;const k=(E,j)=>{const L=K.findOne(E,p);L&&L.classList.toggle(j,a)};k(Dd,mr),k(".dropdown-menu",ka),p.setAttribute("aria-expanded",a)}_setAttributeIfNotExists(s,a,p){s.hasAttribute(a)||s.setAttribute(a,p)}_elemIsActive(s){return s.classList.contains(mr)}_getInnerElement(s){return s.matches(Ca)?s:K.findOne(Ca,s)}_getOuterElement(s){return s.closest(".nav-item, .list-group-item")||s}static jQueryInterface(s){return this.each(function(){const a=gr.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(document,Rw,$d,function(f){["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this)||gr.getOrCreateInstance(this).show()}),T.on(window,Mw,()=>{for(const f of K.find(Bw))gr.getOrCreateInstance(f)}),v(gr);const Tn=".bs.toast",Uw=`mouseover${Tn}`,Ww=`mouseout${Tn}`,Vw=`focusin${Tn}`,Hw=`focusout${Tn}`,Kw=`hide${Tn}`,Qw=`hidden${Tn}`,Yw=`show${Tn}`,Xw=`shown${Tn}`,Rd="hide",fs="show",ds="showing",Gw={animation:"boolean",autohide:"boolean",delay:"number"},Jw={animation:!0,autohide:!0,delay:5e3};class Vi extends Ne{constructor(s,a){super(s,a),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Jw}static get DefaultType(){return Gw}static get NAME(){return"toast"}show(){T.trigger(this._element,Yw).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Rd),C(this._element),this._element.classList.add(fs,ds),this._queueCallback(()=>{this._element.classList.remove(ds),T.trigger(this._element,Xw),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(T.trigger(this._element,Kw).defaultPrevented||(this._element.classList.add(ds),this._queueCallback(()=>{this._element.classList.add(Rd),this._element.classList.remove(ds,fs),T.trigger(this._element,Qw)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(fs),super.dispose()}isShown(){return this._element.classList.contains(fs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(s,a){switch(s.type){case"mouseover":case"mouseout":this._hasMouseInteraction=a;break;case"focusin":case"focusout":this._hasKeyboardInteraction=a}if(a)return void this._clearTimeout();const p=s.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){T.on(this._element,Uw,s=>this._onInteraction(s,!0)),T.on(this._element,Ww,s=>this._onInteraction(s,!1)),T.on(this._element,Vw,s=>this._onInteraction(s,!0)),T.on(this._element,Hw,s=>this._onInteraction(s,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(s){return this.each(function(){const a=Vi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s](this)}})}}return Dr(Vi),v(Vi),{Alert:or,Button:On,Carousel:zr,Collapse:Br,Dropdown:Ut,Modal:dr,Offcanvas:pn,Popover:cs,ScrollSpy:Wi,Tab:gr,Toast:Vi,Tooltip:pr}})})(FS);const BS="modulepreload",US=function(e){return"/"+e},dh={},Me=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=US(c),c in dh)return;dh[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":BS,d||(g.as="script"),g.crossOrigin="",g.href=c,u&&g.setAttribute("nonce",u),document.head.appendChild(g),d)return new Promise((_,S)=>{g.addEventListener("load",_),g.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return i.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})},lv=x.createContext(null),ph="theme",hh="color",av="sidebarTheme",uv="sidebarBg";function WS(){const e=localStorage.getItem(av);return e==="light"||e==="dark"||e==="blue"||e==="green"?e:"light"}function VS(){const e=localStorage.getItem(uv);return e==="sidebarbgnone"||e==="sidebarbg1"||e==="sidebarbg2"||e==="sidebarbg3"||e==="sidebarbg4"?e:"sidebarbgnone"}function HS(e,t,n,r){const i=document.documentElement;i.setAttribute("data-theme",e),i.setAttribute("data-sidebar",n),i.setAttribute("data-color",t),i.setAttribute("data-sidebar-bg",r)}function KS({children:e}){const[t,n]=x.useState(()=>{const P=localStorage.getItem(ph);return P==="dark"||P==="light"?P:localStorage.getItem("darkMode")==="enabled"?"dark":"light"}),[r,i]=x.useState(()=>{const P=localStorage.getItem(hh);return P==="red"||P==="yellow"||P==="blue"||P==="green"?P:"red"}),[o,l]=x.useState(WS),[u,c]=x.useState(VS);x.useEffect(()=>{HS(t,r,o,u),localStorage.setItem(ph,t),localStorage.setItem(hh,r),localStorage.setItem(av,o),localStorage.setItem(uv,u),t==="dark"?localStorage.setItem("darkMode","enabled"):localStorage.removeItem("darkMode")},[t,r,o,u]);const d=x.useCallback(P=>n(P),[]),h=x.useCallback(P=>i(P),[]),g=x.useCallback(P=>l(P),[]),_=x.useCallback(P=>c(P),[]),S=x.useCallback(()=>{n(P=>P==="light"?"dark":"light")},[]),C=x.useCallback(()=>{n("light"),i("red"),l("light"),c("sidebarbgnone"),localStorage.removeItem("darkMode")},[]),O=x.useMemo(()=>({theme:t,accent:r,sidebarTheme:o,sidebarBg:u,setAccent:h,setSidebarTheme:g,setSidebarBg:_,toggleTheme:S,setTheme:d,resetTheme:C}),[t,r,o,u,h,g,_,S,d,C]);return m.jsx(lv.Provider,{value:O,children:e})}function cv(){const e=x.useContext(lv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}var fv={exports:{}};/*! + */(function(e,t){(function(n,r){e.exports=r()})(l0,function(){const n=new Map,r={set(f,s,a){n.has(f)||n.set(f,new Map);const p=n.get(f);p.has(s)||p.size===0?p.set(s,a):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(p.keys())[0]}.`)},get:(f,s)=>n.has(f)&&n.get(f).get(s)||null,remove(f,s){if(!n.has(f))return;const a=n.get(f);a.delete(s),a.size===0&&n.delete(f)}},i="transitionend",o=f=>(f&&window.CSS&&window.CSS.escape&&(f=f.replace(/#([^\s"#']+)/g,(s,a)=>`#${CSS.escape(a)}`)),f),l=f=>f==null?`${f}`:Object.prototype.toString.call(f).match(/\s([a-z]+)/i)[1].toLowerCase(),u=f=>{f.dispatchEvent(new Event(i))},c=f=>!(!f||typeof f!="object")&&(f.jquery!==void 0&&(f=f[0]),f.nodeType!==void 0),d=f=>c(f)?f.jquery?f[0]:f:typeof f=="string"&&f.length>0?document.querySelector(o(f)):null,h=f=>{if(!c(f)||f.getClientRects().length===0)return!1;const s=getComputedStyle(f).getPropertyValue("visibility")==="visible",a=f.closest("details:not([open])");if(!a)return s;if(a!==f){const p=f.closest("summary");if(p&&p.parentNode!==a||p===null)return!1}return s},g=f=>!f||f.nodeType!==Node.ELEMENT_NODE||!!f.classList.contains("disabled")||(f.disabled!==void 0?f.disabled:f.hasAttribute("disabled")&&f.getAttribute("disabled")!=="false"),_=f=>{if(!document.documentElement.attachShadow)return null;if(typeof f.getRootNode=="function"){const s=f.getRootNode();return s instanceof ShadowRoot?s:null}return f instanceof ShadowRoot?f:f.parentNode?_(f.parentNode):null},S=()=>{},C=f=>{f.offsetHeight},O=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,P=[],y=()=>document.documentElement.dir==="rtl",v=f=>{var s;s=()=>{const a=O();if(a){const p=f.NAME,k=a.fn[p];a.fn[p]=f.jQueryInterface,a.fn[p].Constructor=f,a.fn[p].noConflict=()=>(a.fn[p]=k,f.jQueryInterface)}},document.readyState==="loading"?(P.length||document.addEventListener("DOMContentLoaded",()=>{for(const a of P)a()}),P.push(s)):s()},w=(f,s=[],a=f)=>typeof f=="function"?f.call(...s):a,b=(f,s,a=!0)=>{if(!a)return void w(f);const p=(j=>{if(!j)return 0;let{transitionDuration:L,transitionDelay:I}=window.getComputedStyle(j);const B=Number.parseFloat(L),W=Number.parseFloat(I);return B||W?(L=L.split(",")[0],I=I.split(",")[0],1e3*(Number.parseFloat(L)+Number.parseFloat(I))):0})(s)+5;let k=!1;const E=({target:j})=>{j===s&&(k=!0,s.removeEventListener(i,E),w(f))};s.addEventListener(i,E),setTimeout(()=>{k||u(s)},p)},N=(f,s,a,p)=>{const k=f.length;let E=f.indexOf(s);return E===-1?!a&&p?f[k-1]:f[0]:(E+=a?1:-1,p&&(E=(E+k)%k),f[Math.max(0,Math.min(E,k-1))])},A=/[^.]*(?=\..*)\.|.*/,D=/\..*/,$=/::\d+$/,H={};let F=1;const Y={mouseenter:"mouseover",mouseleave:"mouseout"},ee=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ne(f,s){return s&&`${s}::${F++}`||f.uidEvent||F++}function xe(f){const s=ne(f);return f.uidEvent=s,H[s]=H[s]||{},H[s]}function De(f,s,a=null){return Object.values(f).find(p=>p.callable===s&&p.delegationSelector===a)}function ke(f,s,a){const p=typeof s=="string",k=p?a:s||a;let E=V(f);return ee.has(E)||(E=f),[p,k,E]}function $e(f,s,a,p,k){if(typeof s!="string"||!f)return;let[E,j,L]=ke(s,a,p);s in Y&&(j=(q=>function(G){if(!G.relatedTarget||G.relatedTarget!==G.delegateTarget&&!G.delegateTarget.contains(G.relatedTarget))return q.call(this,G)})(j));const I=xe(f),B=I[L]||(I[L]={}),W=De(B,j,E?a:null);if(W)return void(W.oneOff=W.oneOff&&k);const z=ne(j,s.replace(A,"")),te=E?function(J,q,G){return function Z(pe){const ge=J.querySelectorAll(q);for(let{target:ie}=pe;ie&&ie!==this;ie=ie.parentNode)for(const ae of ge)if(ae===ie)return de(pe,{delegateTarget:ie}),Z.oneOff&&T.off(J,pe.type,q,G),G.apply(ie,[pe])}}(f,a,j):function(J,q){return function G(Z){return de(Z,{delegateTarget:J}),G.oneOff&&T.off(J,Z.type,q),q.apply(J,[Z])}}(f,j);te.delegationSelector=E?a:null,te.callable=j,te.oneOff=k,te.uidEvent=z,B[z]=te,f.addEventListener(L,te,E)}function M(f,s,a,p,k){const E=De(s[a],p,k);E&&(f.removeEventListener(a,E,!!k),delete s[a][E.uidEvent])}function X(f,s,a,p){const k=s[a]||{};for(const[E,j]of Object.entries(k))E.includes(p)&&M(f,s,a,j.callable,j.delegationSelector)}function V(f){return f=f.replace(D,""),Y[f]||f}const T={on(f,s,a,p){$e(f,s,a,p,!1)},one(f,s,a,p){$e(f,s,a,p,!0)},off(f,s,a,p){if(typeof s!="string"||!f)return;const[k,E,j]=ke(s,a,p),L=j!==s,I=xe(f),B=I[j]||{},W=s.startsWith(".");if(E===void 0){if(W)for(const z of Object.keys(I))X(f,I,z,s.slice(1));for(const[z,te]of Object.entries(B)){const J=z.replace($,"");L&&!s.includes(J)||M(f,I,j,te.callable,te.delegationSelector)}}else{if(!Object.keys(B).length)return;M(f,I,j,E,k?a:null)}},trigger(f,s,a){if(typeof s!="string"||!f)return null;const p=O();let k=null,E=!0,j=!0,L=!1;s!==V(s)&&p&&(k=p.Event(s,a),p(f).trigger(k),E=!k.isPropagationStopped(),j=!k.isImmediatePropagationStopped(),L=k.isDefaultPrevented());const I=de(new Event(s,{bubbles:E,cancelable:!0}),a);return L&&I.preventDefault(),j&&f.dispatchEvent(I),I.defaultPrevented&&k&&k.preventDefault(),I}};function de(f,s={}){for(const[a,p]of Object.entries(s))try{f[a]=p}catch{Object.defineProperty(f,a,{configurable:!0,get:()=>p})}return f}function Ct(f){if(f==="true")return!0;if(f==="false")return!1;if(f===Number(f).toString())return Number(f);if(f===""||f==="null")return null;if(typeof f!="string")return f;try{return JSON.parse(decodeURIComponent(f))}catch{return f}}function Ue(f){return f.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}const Oe={setDataAttribute(f,s,a){f.setAttribute(`data-bs-${Ue(s)}`,a)},removeDataAttribute(f,s){f.removeAttribute(`data-bs-${Ue(s)}`)},getDataAttributes(f){if(!f)return{};const s={},a=Object.keys(f.dataset).filter(p=>p.startsWith("bs")&&!p.startsWith("bsConfig"));for(const p of a){let k=p.replace(/^bs/,"");k=k.charAt(0).toLowerCase()+k.slice(1),s[k]=Ct(f.dataset[p])}return s},getDataAttribute:(f,s)=>Ct(f.getAttribute(`data-bs-${Ue(s)}`))};class ze{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(s){return s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s}_mergeConfigObj(s,a){const p=c(a)?Oe.getDataAttribute(a,"config"):{};return{...this.constructor.Default,...typeof p=="object"?p:{},...c(a)?Oe.getDataAttributes(a):{},...typeof s=="object"?s:{}}}_typeCheckConfig(s,a=this.constructor.DefaultType){for(const[p,k]of Object.entries(a)){const E=s[p],j=c(E)?"element":l(E);if(!new RegExp(k).test(j))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${p}" provided type "${j}" but expected type "${k}".`)}}}class Ne extends ze{constructor(s,a){super(),(s=d(s))&&(this._element=s,this._config=this._getConfig(a),r.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.remove(this._element,this.constructor.DATA_KEY),T.off(this._element,this.constructor.EVENT_KEY);for(const s of Object.getOwnPropertyNames(this))this[s]=null}_queueCallback(s,a,p=!0){b(s,a,p)}_getConfig(s){return s=this._mergeConfigObj(s,this._element),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}static getInstance(s){return r.get(d(s),this.DATA_KEY)}static getOrCreateInstance(s,a={}){return this.getInstance(s)||new this(s,typeof a=="object"?a:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(s){return`${s}${this.EVENT_KEY}`}}const Ft=f=>{let s=f.getAttribute("data-bs-target");if(!s||s==="#"){let a=f.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a=`#${a.split("#")[1]}`),s=a&&a!=="#"?a.trim():null}return s?s.split(",").map(a=>o(a)).join(","):null},K={find:(f,s=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(s,f)),findOne:(f,s=document.documentElement)=>Element.prototype.querySelector.call(s,f),children:(f,s)=>[].concat(...f.children).filter(a=>a.matches(s)),parents(f,s){const a=[];let p=f.parentNode.closest(s);for(;p;)a.push(p),p=p.parentNode.closest(s);return a},prev(f,s){let a=f.previousElementSibling;for(;a;){if(a.matches(s))return[a];a=a.previousElementSibling}return[]},next(f,s){let a=f.nextElementSibling;for(;a;){if(a.matches(s))return[a];a=a.nextElementSibling}return[]},focusableChildren(f){const s=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(a=>`${a}:not([tabindex^="-"])`).join(",");return this.find(s,f).filter(a=>!g(a)&&h(a))},getSelectorFromElement(f){const s=Ft(f);return s&&K.findOne(s)?s:null},getElementFromSelector(f){const s=Ft(f);return s?K.findOne(s):null},getMultipleElementsFromSelector(f){const s=Ft(f);return s?K.find(s):[]}},Dr=(f,s="hide")=>{const a=`click.dismiss${f.EVENT_KEY}`,p=f.NAME;T.on(document,a,`[data-bs-dismiss="${p}"]`,function(k){if(["A","AREA"].includes(this.tagName)&&k.preventDefault(),g(this))return;const E=K.getElementFromSelector(this)||this.closest(`.${p}`);f.getOrCreateInstance(E)[s]()})},$r=".bs.alert",Kl=`close${$r}`,Ko=`closed${$r}`;class or extends Ne{static get NAME(){return"alert"}close(){if(T.trigger(this._element,Kl).defaultPrevented)return;this._element.classList.remove("show");const s=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,s)}_destroyElement(){this._element.remove(),T.trigger(this._element,Ko),this.dispose()}static jQueryInterface(s){return this.each(function(){const a=or.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}Dr(or,"close"),v(or);const Qo='[data-bs-toggle="button"]';class On extends Ne{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(s){return this.each(function(){const a=On.getOrCreateInstance(this);s==="toggle"&&a[s]()})}}T.on(document,"click.bs.button.data-api",Qo,f=>{f.preventDefault();const s=f.target.closest(Qo);On.getOrCreateInstance(s).toggle()}),v(On);const un=".bs.swipe",Ql=`touchstart${un}`,Yl=`touchmove${un}`,cn=`touchend${un}`,Rr=`pointerdown${un}`,Yo=`pointerup${un}`,Xo={endCallback:null,leftCallback:null,rightCallback:null},$i={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class sr extends ze{constructor(s,a){super(),this._element=s,s&&sr.isSupported()&&(this._config=this._getConfig(a),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Xo}static get DefaultType(){return $i}static get NAME(){return"swipe"}dispose(){T.off(this._element,un)}_start(s){this._supportPointerEvents?this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX):this._deltaX=s.touches[0].clientX}_end(s){this._eventIsPointerPenTouch(s)&&(this._deltaX=s.clientX-this._deltaX),this._handleSwipe(),w(this._config.endCallback)}_move(s){this._deltaX=s.touches&&s.touches.length>1?0:s.touches[0].clientX-this._deltaX}_handleSwipe(){const s=Math.abs(this._deltaX);if(s<=40)return;const a=s/this._deltaX;this._deltaX=0,a&&w(a>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,Rr,s=>this._start(s)),T.on(this._element,Yo,s=>this._end(s)),this._element.classList.add("pointer-event")):(T.on(this._element,Ql,s=>this._start(s)),T.on(this._element,Yl,s=>this._move(s)),T.on(this._element,cn,s=>this._end(s)))}_eventIsPointerPenTouch(s){return this._supportPointerEvents&&(s.pointerType==="pen"||s.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Bt=".bs.carousel",Ri=".data-api",Jo="ArrowLeft",Jv="ArrowRight",Ii="next",Ir="prev",Mr="left",Go="right",Gv=`slide${Bt}`,Xl=`slid${Bt}`,qv=`keydown${Bt}`,Zv=`mouseenter${Bt}`,ey=`mouseleave${Bt}`,ty=`dragstart${Bt}`,ny=`load${Bt}${Ri}`,ry=`click${Bt}${Ri}`,_f="carousel",qo="active",xf=".active",Sf=".carousel-item",iy=xf+Sf,oy={[Jo]:Go,[Jv]:Mr},sy={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ly={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class zr extends Ne{constructor(s,a){super(s,a),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===_f&&this.cycle()}static get Default(){return sy}static get DefaultType(){return ly}static get NAME(){return"carousel"}next(){this._slide(Ii)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Ir)}pause(){this._isSliding&&u(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?T.one(this._element,Xl,()=>this.cycle()):this.cycle())}to(s){const a=this._getItems();if(s>a.length-1||s<0)return;if(this._isSliding)return void T.one(this._element,Xl,()=>this.to(s));const p=this._getItemIndex(this._getActive());if(p===s)return;const k=s>p?Ii:Ir;this._slide(k,a[s])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(s){return s.defaultInterval=s.interval,s}_addEventListeners(){this._config.keyboard&&T.on(this._element,qv,s=>this._keydown(s)),this._config.pause==="hover"&&(T.on(this._element,Zv,()=>this.pause()),T.on(this._element,ey,()=>this._maybeEnableCycle())),this._config.touch&&sr.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const a of K.find(".carousel-item img",this._element))T.on(a,ty,p=>p.preventDefault());const s={leftCallback:()=>this._slide(this._directionToOrder(Mr)),rightCallback:()=>this._slide(this._directionToOrder(Go)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new sr(this._element,s)}_keydown(s){if(/input|textarea/i.test(s.target.tagName))return;const a=oy[s.key];a&&(s.preventDefault(),this._slide(this._directionToOrder(a)))}_getItemIndex(s){return this._getItems().indexOf(s)}_setActiveIndicatorElement(s){if(!this._indicatorsElement)return;const a=K.findOne(xf,this._indicatorsElement);a.classList.remove(qo),a.removeAttribute("aria-current");const p=K.findOne(`[data-bs-slide-to="${s}"]`,this._indicatorsElement);p&&(p.classList.add(qo),p.setAttribute("aria-current","true"))}_updateInterval(){const s=this._activeElement||this._getActive();if(!s)return;const a=Number.parseInt(s.getAttribute("data-bs-interval"),10);this._config.interval=a||this._config.defaultInterval}_slide(s,a=null){if(this._isSliding)return;const p=this._getActive(),k=s===Ii,E=a||N(this._getItems(),p,k,this._config.wrap);if(E===p)return;const j=this._getItemIndex(E),L=z=>T.trigger(this._element,z,{relatedTarget:E,direction:this._orderToDirection(s),from:this._getItemIndex(p),to:j});if(L(Gv).defaultPrevented||!p||!E)return;const I=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(j),this._activeElement=E;const B=k?"carousel-item-start":"carousel-item-end",W=k?"carousel-item-next":"carousel-item-prev";E.classList.add(W),C(E),p.classList.add(B),E.classList.add(B),this._queueCallback(()=>{E.classList.remove(B,W),E.classList.add(qo),p.classList.remove(qo,W,B),this._isSliding=!1,L(Xl)},p,this._isAnimated()),I&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(iy,this._element)}_getItems(){return K.find(Sf,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(s){return y()?s===Mr?Ir:Ii:s===Mr?Ii:Ir}_orderToDirection(s){return y()?s===Ir?Mr:Go:s===Ir?Go:Mr}static jQueryInterface(s){return this.each(function(){const a=zr.getOrCreateInstance(this,s);if(typeof s!="number"){if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}}else a.to(s)})}}T.on(document,ry,"[data-bs-slide], [data-bs-slide-to]",function(f){const s=K.getElementFromSelector(this);if(!s||!s.classList.contains(_f))return;f.preventDefault();const a=zr.getOrCreateInstance(s),p=this.getAttribute("data-bs-slide-to");return p?(a.to(p),void a._maybeEnableCycle()):Oe.getDataAttribute(this,"slide")==="next"?(a.next(),void a._maybeEnableCycle()):(a.prev(),void a._maybeEnableCycle())}),T.on(window,ny,()=>{const f=K.find('[data-bs-ride="carousel"]');for(const s of f)zr.getOrCreateInstance(s)}),v(zr);const Mi=".bs.collapse",ay=`show${Mi}`,uy=`shown${Mi}`,cy=`hide${Mi}`,fy=`hidden${Mi}`,dy=`click${Mi}.data-api`,Jl="show",Fr="collapse",Zo="collapsing",py=`:scope .${Fr} .${Fr}`,Gl='[data-bs-toggle="collapse"]',hy={parent:null,toggle:!0},my={parent:"(null|element)",toggle:"boolean"};class Br extends Ne{constructor(s,a){super(s,a),this._isTransitioning=!1,this._triggerArray=[];const p=K.find(Gl);for(const k of p){const E=K.getSelectorFromElement(k),j=K.find(E).filter(L=>L===this._element);E!==null&&j.length&&this._triggerArray.push(k)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return hy}static get DefaultType(){return my}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let s=[];if(this._config.parent&&(s=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(k=>k!==this._element).map(k=>Br.getOrCreateInstance(k,{toggle:!1}))),s.length&&s[0]._isTransitioning||T.trigger(this._element,ay).defaultPrevented)return;for(const k of s)k.hide();const a=this._getDimension();this._element.classList.remove(Fr),this._element.classList.add(Zo),this._element.style[a]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const p=`scroll${a[0].toUpperCase()+a.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Zo),this._element.classList.add(Fr,Jl),this._element.style[a]="",T.trigger(this._element,uy)},this._element,!0),this._element.style[a]=`${this._element[p]}px`}hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,cy).defaultPrevented)return;const s=this._getDimension();this._element.style[s]=`${this._element.getBoundingClientRect()[s]}px`,C(this._element),this._element.classList.add(Zo),this._element.classList.remove(Fr,Jl);for(const a of this._triggerArray){const p=K.getElementFromSelector(a);p&&!this._isShown(p)&&this._addAriaAndCollapsedClass([a],!1)}this._isTransitioning=!0,this._element.style[s]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Zo),this._element.classList.add(Fr),T.trigger(this._element,fy)},this._element,!0)}_isShown(s=this._element){return s.classList.contains(Jl)}_configAfterMerge(s){return s.toggle=!!s.toggle,s.parent=d(s.parent),s}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const s=this._getFirstLevelChildren(Gl);for(const a of s){const p=K.getElementFromSelector(a);p&&this._addAriaAndCollapsedClass([a],this._isShown(p))}}_getFirstLevelChildren(s){const a=K.find(py,this._config.parent);return K.find(s,this._config.parent).filter(p=>!a.includes(p))}_addAriaAndCollapsedClass(s,a){if(s.length)for(const p of s)p.classList.toggle("collapsed",!a),p.setAttribute("aria-expanded",a)}static jQueryInterface(s){const a={};return typeof s=="string"&&/show|hide/.test(s)&&(a.toggle=!1),this.each(function(){const p=Br.getOrCreateInstance(this,a);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s]()}})}}T.on(document,dy,Gl,function(f){(f.target.tagName==="A"||f.delegateTarget&&f.delegateTarget.tagName==="A")&&f.preventDefault();for(const s of K.getMultipleElementsFromSelector(this))Br.getOrCreateInstance(s,{toggle:!1}).toggle()}),v(Br);var Ze="top",ht="bottom",mt="right",et="left",es="auto",Ur=[Ze,ht,mt,et],lr="start",Wr="end",kf="clippingParents",ql="viewport",Vr="popper",Ef="reference",Zl=Ur.reduce(function(f,s){return f.concat([s+"-"+lr,s+"-"+Wr])},[]),ea=[].concat(Ur,[es]).reduce(function(f,s){return f.concat([s,s+"-"+lr,s+"-"+Wr])},[]),Cf="beforeRead",bf="read",Pf="afterRead",Of="beforeMain",jf="main",Tf="afterMain",Nf="beforeWrite",Lf="write",Af="afterWrite",Df=[Cf,bf,Pf,Of,jf,Tf,Nf,Lf,Af];function Gt(f){return f?(f.nodeName||"").toLowerCase():null}function gt(f){if(f==null)return window;if(f.toString()!=="[object Window]"){var s=f.ownerDocument;return s&&s.defaultView||window}return f}function ar(f){return f instanceof gt(f).Element||f instanceof Element}function bt(f){return f instanceof gt(f).HTMLElement||f instanceof HTMLElement}function ta(f){return typeof ShadowRoot<"u"&&(f instanceof gt(f).ShadowRoot||f instanceof ShadowRoot)}const na={name:"applyStyles",enabled:!0,phase:"write",fn:function(f){var s=f.state;Object.keys(s.elements).forEach(function(a){var p=s.styles[a]||{},k=s.attributes[a]||{},E=s.elements[a];bt(E)&&Gt(E)&&(Object.assign(E.style,p),Object.keys(k).forEach(function(j){var L=k[j];L===!1?E.removeAttribute(j):E.setAttribute(j,L===!0?"":L)}))})},effect:function(f){var s=f.state,a={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,a.popper),s.styles=a,s.elements.arrow&&Object.assign(s.elements.arrow.style,a.arrow),function(){Object.keys(s.elements).forEach(function(p){var k=s.elements[p],E=s.attributes[p]||{},j=Object.keys(s.styles.hasOwnProperty(p)?s.styles[p]:a[p]).reduce(function(L,I){return L[I]="",L},{});bt(k)&&Gt(k)&&(Object.assign(k.style,j),Object.keys(E).forEach(function(L){k.removeAttribute(L)}))})}},requires:["computeStyles"]};function qt(f){return f.split("-")[0]}var ur=Math.max,ts=Math.min,Hr=Math.round;function ra(){var f=navigator.userAgentData;return f!=null&&f.brands&&Array.isArray(f.brands)?f.brands.map(function(s){return s.brand+"/"+s.version}).join(" "):navigator.userAgent}function $f(){return!/^((?!chrome|android).)*safari/i.test(ra())}function Kr(f,s,a){s===void 0&&(s=!1),a===void 0&&(a=!1);var p=f.getBoundingClientRect(),k=1,E=1;s&&bt(f)&&(k=f.offsetWidth>0&&Hr(p.width)/f.offsetWidth||1,E=f.offsetHeight>0&&Hr(p.height)/f.offsetHeight||1);var j=(ar(f)?gt(f):window).visualViewport,L=!$f()&&a,I=(p.left+(L&&j?j.offsetLeft:0))/k,B=(p.top+(L&&j?j.offsetTop:0))/E,W=p.width/k,z=p.height/E;return{width:W,height:z,top:B,right:I+W,bottom:B+z,left:I,x:I,y:B}}function ia(f){var s=Kr(f),a=f.offsetWidth,p=f.offsetHeight;return Math.abs(s.width-a)<=1&&(a=s.width),Math.abs(s.height-p)<=1&&(p=s.height),{x:f.offsetLeft,y:f.offsetTop,width:a,height:p}}function Rf(f,s){var a=s.getRootNode&&s.getRootNode();if(f.contains(s))return!0;if(a&&ta(a)){var p=s;do{if(p&&f.isSameNode(p))return!0;p=p.parentNode||p.host}while(p)}return!1}function fn(f){return gt(f).getComputedStyle(f)}function gy(f){return["table","td","th"].indexOf(Gt(f))>=0}function jn(f){return((ar(f)?f.ownerDocument:f.document)||window.document).documentElement}function ns(f){return Gt(f)==="html"?f:f.assignedSlot||f.parentNode||(ta(f)?f.host:null)||jn(f)}function If(f){return bt(f)&&fn(f).position!=="fixed"?f.offsetParent:null}function zi(f){for(var s=gt(f),a=If(f);a&&gy(a)&&fn(a).position==="static";)a=If(a);return a&&(Gt(a)==="html"||Gt(a)==="body"&&fn(a).position==="static")?s:a||function(p){var k=/firefox/i.test(ra());if(/Trident/i.test(ra())&&bt(p)&&fn(p).position==="fixed")return null;var E=ns(p);for(ta(E)&&(E=E.host);bt(E)&&["html","body"].indexOf(Gt(E))<0;){var j=fn(E);if(j.transform!=="none"||j.perspective!=="none"||j.contain==="paint"||["transform","perspective"].indexOf(j.willChange)!==-1||k&&j.willChange==="filter"||k&&j.filter&&j.filter!=="none")return E;E=E.parentNode}return null}(f)||s}function oa(f){return["top","bottom"].indexOf(f)>=0?"x":"y"}function Fi(f,s,a){return ur(f,ts(s,a))}function Mf(f){return Object.assign({},{top:0,right:0,bottom:0,left:0},f)}function zf(f,s){return s.reduce(function(a,p){return a[p]=f,a},{})}const Ff={name:"arrow",enabled:!0,phase:"main",fn:function(f){var s,a=f.state,p=f.name,k=f.options,E=a.elements.arrow,j=a.modifiersData.popperOffsets,L=qt(a.placement),I=oa(L),B=[et,mt].indexOf(L)>=0?"height":"width";if(E&&j){var W=function(he,ce){return Mf(typeof(he=typeof he=="function"?he(Object.assign({},ce.rects,{placement:ce.placement})):he)!="number"?he:zf(he,Ur))}(k.padding,a),z=ia(E),te=I==="y"?Ze:et,J=I==="y"?ht:mt,q=a.rects.reference[B]+a.rects.reference[I]-j[I]-a.rects.popper[B],G=j[I]-a.rects.reference[I],Z=zi(E),pe=Z?I==="y"?Z.clientHeight||0:Z.clientWidth||0:0,ge=q/2-G/2,ie=W[te],ae=pe-z[B]-W[J],re=pe/2-z[B]/2+ge,se=Fi(ie,re,ae),ue=I;a.modifiersData[p]=((s={})[ue]=se,s.centerOffset=se-re,s)}},effect:function(f){var s=f.state,a=f.options.element,p=a===void 0?"[data-popper-arrow]":a;p!=null&&(typeof p!="string"||(p=s.elements.popper.querySelector(p)))&&Rf(s.elements.popper,p)&&(s.elements.arrow=p)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qr(f){return f.split("-")[1]}var vy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bf(f){var s,a=f.popper,p=f.popperRect,k=f.placement,E=f.variation,j=f.offsets,L=f.position,I=f.gpuAcceleration,B=f.adaptive,W=f.roundOffsets,z=f.isFixed,te=j.x,J=te===void 0?0:te,q=j.y,G=q===void 0?0:q,Z=typeof W=="function"?W({x:J,y:G}):{x:J,y:G};J=Z.x,G=Z.y;var pe=j.hasOwnProperty("x"),ge=j.hasOwnProperty("y"),ie=et,ae=Ze,re=window;if(B){var se=zi(a),ue="clientHeight",he="clientWidth";se===gt(a)&&fn(se=jn(a)).position!=="static"&&L==="absolute"&&(ue="scrollHeight",he="scrollWidth"),(k===Ze||(k===et||k===mt)&&E===Wr)&&(ae=ht,G-=(z&&se===re&&re.visualViewport?re.visualViewport.height:se[ue])-p.height,G*=I?1:-1),k!==et&&(k!==Ze&&k!==ht||E!==Wr)||(ie=mt,J-=(z&&se===re&&re.visualViewport?re.visualViewport.width:se[he])-p.width,J*=I?1:-1)}var ce,Le=Object.assign({position:L},B&&vy),vt=W===!0?function(Wt,tt){var Ot=Wt.x,jt=Wt.y,je=tt.devicePixelRatio||1;return{x:Hr(Ot*je)/je||0,y:Hr(jt*je)/je||0}}({x:J,y:G},gt(a)):{x:J,y:G};return J=vt.x,G=vt.y,I?Object.assign({},Le,((ce={})[ae]=ge?"0":"",ce[ie]=pe?"0":"",ce.transform=(re.devicePixelRatio||1)<=1?"translate("+J+"px, "+G+"px)":"translate3d("+J+"px, "+G+"px, 0)",ce)):Object.assign({},Le,((s={})[ae]=ge?G+"px":"",s[ie]=pe?J+"px":"",s.transform="",s))}const sa={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(f){var s=f.state,a=f.options,p=a.gpuAcceleration,k=p===void 0||p,E=a.adaptive,j=E===void 0||E,L=a.roundOffsets,I=L===void 0||L,B={placement:qt(s.placement),variation:Qr(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:k,isFixed:s.options.strategy==="fixed"};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Bf(Object.assign({},B,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:j,roundOffsets:I})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Bf(Object.assign({},B,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:I})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})},data:{}};var rs={passive:!0};const la={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(f){var s=f.state,a=f.instance,p=f.options,k=p.scroll,E=k===void 0||k,j=p.resize,L=j===void 0||j,I=gt(s.elements.popper),B=[].concat(s.scrollParents.reference,s.scrollParents.popper);return E&&B.forEach(function(W){W.addEventListener("scroll",a.update,rs)}),L&&I.addEventListener("resize",a.update,rs),function(){E&&B.forEach(function(W){W.removeEventListener("scroll",a.update,rs)}),L&&I.removeEventListener("resize",a.update,rs)}},data:{}};var yy={left:"right",right:"left",bottom:"top",top:"bottom"};function is(f){return f.replace(/left|right|bottom|top/g,function(s){return yy[s]})}var wy={start:"end",end:"start"};function Uf(f){return f.replace(/start|end/g,function(s){return wy[s]})}function aa(f){var s=gt(f);return{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function ua(f){return Kr(jn(f)).left+aa(f).scrollLeft}function ca(f){var s=fn(f),a=s.overflow,p=s.overflowX,k=s.overflowY;return/auto|scroll|overlay|hidden/.test(a+k+p)}function Wf(f){return["html","body","#document"].indexOf(Gt(f))>=0?f.ownerDocument.body:bt(f)&&ca(f)?f:Wf(ns(f))}function Bi(f,s){var a;s===void 0&&(s=[]);var p=Wf(f),k=p===((a=f.ownerDocument)==null?void 0:a.body),E=gt(p),j=k?[E].concat(E.visualViewport||[],ca(p)?p:[]):p,L=s.concat(j);return k?L:L.concat(Bi(ns(j)))}function fa(f){return Object.assign({},f,{left:f.x,top:f.y,right:f.x+f.width,bottom:f.y+f.height})}function Vf(f,s,a){return s===ql?fa(function(p,k){var E=gt(p),j=jn(p),L=E.visualViewport,I=j.clientWidth,B=j.clientHeight,W=0,z=0;if(L){I=L.width,B=L.height;var te=$f();(te||!te&&k==="fixed")&&(W=L.offsetLeft,z=L.offsetTop)}return{width:I,height:B,x:W+ua(p),y:z}}(f,a)):ar(s)?function(p,k){var E=Kr(p,!1,k==="fixed");return E.top=E.top+p.clientTop,E.left=E.left+p.clientLeft,E.bottom=E.top+p.clientHeight,E.right=E.left+p.clientWidth,E.width=p.clientWidth,E.height=p.clientHeight,E.x=E.left,E.y=E.top,E}(s,a):fa(function(p){var k,E=jn(p),j=aa(p),L=(k=p.ownerDocument)==null?void 0:k.body,I=ur(E.scrollWidth,E.clientWidth,L?L.scrollWidth:0,L?L.clientWidth:0),B=ur(E.scrollHeight,E.clientHeight,L?L.scrollHeight:0,L?L.clientHeight:0),W=-j.scrollLeft+ua(p),z=-j.scrollTop;return fn(L||E).direction==="rtl"&&(W+=ur(E.clientWidth,L?L.clientWidth:0)-I),{width:I,height:B,x:W,y:z}}(jn(f)))}function Hf(f){var s,a=f.reference,p=f.element,k=f.placement,E=k?qt(k):null,j=k?Qr(k):null,L=a.x+a.width/2-p.width/2,I=a.y+a.height/2-p.height/2;switch(E){case Ze:s={x:L,y:a.y-p.height};break;case ht:s={x:L,y:a.y+a.height};break;case mt:s={x:a.x+a.width,y:I};break;case et:s={x:a.x-p.width,y:I};break;default:s={x:a.x,y:a.y}}var B=E?oa(E):null;if(B!=null){var W=B==="y"?"height":"width";switch(j){case lr:s[B]=s[B]-(a[W]/2-p[W]/2);break;case Wr:s[B]=s[B]+(a[W]/2-p[W]/2)}}return s}function Yr(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=p===void 0?f.placement:p,E=a.strategy,j=E===void 0?f.strategy:E,L=a.boundary,I=L===void 0?kf:L,B=a.rootBoundary,W=B===void 0?ql:B,z=a.elementContext,te=z===void 0?Vr:z,J=a.altBoundary,q=J!==void 0&&J,G=a.padding,Z=G===void 0?0:G,pe=Mf(typeof Z!="number"?Z:zf(Z,Ur)),ge=te===Vr?Ef:Vr,ie=f.rects.popper,ae=f.elements[q?ge:te],re=function(tt,Ot,jt,je){var Zt=Ot==="clippingParents"?function(me){var nt=Bi(ns(me)),Tt=["absolute","fixed"].indexOf(fn(me).position)>=0&&bt(me)?zi(me):me;return ar(Tt)?nt.filter(function(Nn){return ar(Nn)&&Rf(Nn,Tt)&&Gt(Nn)!=="body"}):[]}(tt):[].concat(Ot),en=[].concat(Zt,[jt]),Gr=en[0],We=en.reduce(function(me,nt){var Tt=Vf(tt,nt,je);return me.top=ur(Tt.top,me.top),me.right=ts(Tt.right,me.right),me.bottom=ts(Tt.bottom,me.bottom),me.left=ur(Tt.left,me.left),me},Vf(tt,Gr,je));return We.width=We.right-We.left,We.height=We.bottom-We.top,We.x=We.left,We.y=We.top,We}(ar(ae)?ae:ae.contextElement||jn(f.elements.popper),I,W,j),se=Kr(f.elements.reference),ue=Hf({reference:se,element:ie,placement:k}),he=fa(Object.assign({},ie,ue)),ce=te===Vr?he:se,Le={top:re.top-ce.top+pe.top,bottom:ce.bottom-re.bottom+pe.bottom,left:re.left-ce.left+pe.left,right:ce.right-re.right+pe.right},vt=f.modifiersData.offset;if(te===Vr&&vt){var Wt=vt[k];Object.keys(Le).forEach(function(tt){var Ot=[mt,ht].indexOf(tt)>=0?1:-1,jt=[Ze,ht].indexOf(tt)>=0?"y":"x";Le[tt]+=Wt[jt]*Ot})}return Le}function _y(f,s){s===void 0&&(s={});var a=s,p=a.placement,k=a.boundary,E=a.rootBoundary,j=a.padding,L=a.flipVariations,I=a.allowedAutoPlacements,B=I===void 0?ea:I,W=Qr(p),z=W?L?Zl:Zl.filter(function(q){return Qr(q)===W}):Ur,te=z.filter(function(q){return B.indexOf(q)>=0});te.length===0&&(te=z);var J=te.reduce(function(q,G){return q[G]=Yr(f,{placement:G,boundary:k,rootBoundary:E,padding:j})[qt(G)],q},{});return Object.keys(J).sort(function(q,G){return J[q]-J[G]})}const Kf={name:"flip",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name;if(!s.modifiersData[p]._skip){for(var k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j===void 0||j,I=a.fallbackPlacements,B=a.padding,W=a.boundary,z=a.rootBoundary,te=a.altBoundary,J=a.flipVariations,q=J===void 0||J,G=a.allowedAutoPlacements,Z=s.options.placement,pe=qt(Z),ge=I||(pe!==Z&&q?function(me){if(qt(me)===es)return[];var nt=is(me);return[Uf(me),nt,Uf(nt)]}(Z):[is(Z)]),ie=[Z].concat(ge).reduce(function(me,nt){return me.concat(qt(nt)===es?_y(s,{placement:nt,boundary:W,rootBoundary:z,padding:B,flipVariations:q,allowedAutoPlacements:G}):nt)},[]),ae=s.rects.reference,re=s.rects.popper,se=new Map,ue=!0,he=ie[0],ce=0;ce=0,Ot=tt?"width":"height",jt=Yr(s,{placement:Le,boundary:W,rootBoundary:z,altBoundary:te,padding:B}),je=tt?Wt?mt:et:Wt?ht:Ze;ae[Ot]>re[Ot]&&(je=is(je));var Zt=is(je),en=[];if(E&&en.push(jt[vt]<=0),L&&en.push(jt[je]<=0,jt[Zt]<=0),en.every(function(me){return me})){he=Le,ue=!1;break}se.set(Le,en)}if(ue)for(var Gr=function(me){var nt=ie.find(function(Tt){var Nn=se.get(Tt);if(Nn)return Nn.slice(0,me).every(function(ps){return ps})});if(nt)return he=nt,"break"},We=q?3:1;We>0&&Gr(We)!=="break";We--);s.placement!==he&&(s.modifiersData[p]._skip=!0,s.placement=he,s.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Qf(f,s,a){return a===void 0&&(a={x:0,y:0}),{top:f.top-s.height-a.y,right:f.right-s.width+a.x,bottom:f.bottom-s.height+a.y,left:f.left-s.width-a.x}}function Yf(f){return[Ze,mt,ht,et].some(function(s){return f[s]>=0})}const Xf={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(f){var s=f.state,a=f.name,p=s.rects.reference,k=s.rects.popper,E=s.modifiersData.preventOverflow,j=Yr(s,{elementContext:"reference"}),L=Yr(s,{altBoundary:!0}),I=Qf(j,p),B=Qf(L,k,E),W=Yf(I),z=Yf(B);s.modifiersData[a]={referenceClippingOffsets:I,popperEscapeOffsets:B,isReferenceHidden:W,hasPopperEscaped:z},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":W,"data-popper-escaped":z})}},Jf={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.offset,E=k===void 0?[0,0]:k,j=ea.reduce(function(W,z){return W[z]=function(te,J,q){var G=qt(te),Z=[et,Ze].indexOf(G)>=0?-1:1,pe=typeof q=="function"?q(Object.assign({},J,{placement:te})):q,ge=pe[0],ie=pe[1];return ge=ge||0,ie=(ie||0)*Z,[et,mt].indexOf(G)>=0?{x:ie,y:ge}:{x:ge,y:ie}}(z,s.rects,E),W},{}),L=j[s.placement],I=L.x,B=L.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=I,s.modifiersData.popperOffsets.y+=B),s.modifiersData[p]=j}},da={name:"popperOffsets",enabled:!0,phase:"read",fn:function(f){var s=f.state,a=f.name;s.modifiersData[a]=Hf({reference:s.rects.reference,element:s.rects.popper,placement:s.placement})},data:{}},Gf={name:"preventOverflow",enabled:!0,phase:"main",fn:function(f){var s=f.state,a=f.options,p=f.name,k=a.mainAxis,E=k===void 0||k,j=a.altAxis,L=j!==void 0&&j,I=a.boundary,B=a.rootBoundary,W=a.altBoundary,z=a.padding,te=a.tether,J=te===void 0||te,q=a.tetherOffset,G=q===void 0?0:q,Z=Yr(s,{boundary:I,rootBoundary:B,padding:z,altBoundary:W}),pe=qt(s.placement),ge=Qr(s.placement),ie=!ge,ae=oa(pe),re=ae==="x"?"y":"x",se=s.modifiersData.popperOffsets,ue=s.rects.reference,he=s.rects.popper,ce=typeof G=="function"?G(Object.assign({},s.rects,{placement:s.placement})):G,Le=typeof ce=="number"?{mainAxis:ce,altAxis:ce}:Object.assign({mainAxis:0,altAxis:0},ce),vt=s.modifiersData.offset?s.modifiersData.offset[s.placement]:null,Wt={x:0,y:0};if(se){if(E){var tt,Ot=ae==="y"?Ze:et,jt=ae==="y"?ht:mt,je=ae==="y"?"height":"width",Zt=se[ae],en=Zt+Z[Ot],Gr=Zt-Z[jt],We=J?-he[je]/2:0,me=ge===lr?ue[je]:he[je],nt=ge===lr?-he[je]:-ue[je],Tt=s.elements.arrow,Nn=J&&Tt?ia(Tt):{width:0,height:0},ps=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Id=ps[Ot],Md=ps[jt],hs=Fi(0,ue[je],Nn[je]),qw=ie?ue[je]/2-We-hs-Id-Le.mainAxis:me-hs-Id-Le.mainAxis,Zw=ie?-ue[je]/2+We+hs+Md+Le.mainAxis:nt+hs+Md+Le.mainAxis,ba=s.elements.arrow&&zi(s.elements.arrow),e0=ba?ae==="y"?ba.clientTop||0:ba.clientLeft||0:0,zd=(tt=vt==null?void 0:vt[ae])!=null?tt:0,t0=Zt+Zw-zd,Fd=Fi(J?ts(en,Zt+qw-zd-e0):en,Zt,J?ur(Gr,t0):Gr);se[ae]=Fd,Wt[ae]=Fd-Zt}if(L){var Bd,n0=ae==="x"?Ze:et,r0=ae==="x"?ht:mt,vr=se[re],ms=re==="y"?"height":"width",Ud=vr+Z[n0],Wd=vr-Z[r0],Pa=[Ze,et].indexOf(pe)!==-1,Vd=(Bd=vt==null?void 0:vt[re])!=null?Bd:0,Hd=Pa?Ud:vr-ue[ms]-he[ms]-Vd+Le.altAxis,Kd=Pa?vr+ue[ms]+he[ms]-Vd-Le.altAxis:Wd,Qd=J&&Pa?function(i0,o0,Oa){var Yd=Fi(i0,o0,Oa);return Yd>Oa?Oa:Yd}(Hd,vr,Kd):Fi(J?Hd:Ud,vr,J?Kd:Wd);se[re]=Qd,Wt[re]=Qd-vr}s.modifiersData[p]=Wt}},requiresIfExists:["offset"]};function xy(f,s,a){a===void 0&&(a=!1);var p,k,E=bt(s),j=bt(s)&&function(z){var te=z.getBoundingClientRect(),J=Hr(te.width)/z.offsetWidth||1,q=Hr(te.height)/z.offsetHeight||1;return J!==1||q!==1}(s),L=jn(s),I=Kr(f,j,a),B={scrollLeft:0,scrollTop:0},W={x:0,y:0};return(E||!E&&!a)&&((Gt(s)!=="body"||ca(L))&&(B=(p=s)!==gt(p)&&bt(p)?{scrollLeft:(k=p).scrollLeft,scrollTop:k.scrollTop}:aa(p)),bt(s)?((W=Kr(s,!0)).x+=s.clientLeft,W.y+=s.clientTop):L&&(W.x=ua(L))),{x:I.left+B.scrollLeft-W.x,y:I.top+B.scrollTop-W.y,width:I.width,height:I.height}}function Sy(f){var s=new Map,a=new Set,p=[];function k(E){a.add(E.name),[].concat(E.requires||[],E.requiresIfExists||[]).forEach(function(j){if(!a.has(j)){var L=s.get(j);L&&k(L)}}),p.push(E)}return f.forEach(function(E){s.set(E.name,E)}),f.forEach(function(E){a.has(E.name)||k(E)}),p}var qf={placement:"bottom",modifiers:[],strategy:"absolute"};function Zf(){for(var f=arguments.length,s=new Array(f),a=0;aNumber.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_getPopperConfig(){const s={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Oe.setDataAttribute(this._menu,"popper","static"),s.modifiers=[{name:"applyStyles",enabled:!1}]),{...s,...w(this._config.popperConfig,[void 0,s])}}_selectMenuItem({key:s,target:a}){const p=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(k=>h(k));p.length&&N(p,a,s===nd,!p.includes(a)).focus()}static jQueryInterface(s){return this.each(function(){const a=Ut.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}static clearMenus(s){if(s.button===2||s.type==="keyup"&&s.key!=="Tab")return;const a=K.find(Ny);for(const p of a){const k=Ut.getInstance(p);if(!k||k._config.autoClose===!1)continue;const E=s.composedPath(),j=E.includes(k._menu);if(E.includes(k._element)||k._config.autoClose==="inside"&&!j||k._config.autoClose==="outside"&&j||k._menu.contains(s.target)&&(s.type==="keyup"&&s.key==="Tab"||/input|select|option|textarea|form/i.test(s.target.tagName)))continue;const L={relatedTarget:k._element};s.type==="click"&&(L.clickEvent=s),k._completeHide(L)}}static dataApiKeydownHandler(s){const a=/input|textarea/i.test(s.target.tagName),p=s.key==="Escape",k=[Cy,nd].includes(s.key);if(!k&&!p||a&&!p)return;s.preventDefault();const E=this.matches(fr)?this:K.prev(this,fr)[0]||K.next(this,fr)[0]||K.findOne(fr,s.delegateTarget.parentNode),j=Ut.getOrCreateInstance(E);if(k)return s.stopPropagation(),j.show(),void j._selectMenuItem(s);j._isShown()&&(s.stopPropagation(),j.hide(),E.focus())}}T.on(document,id,fr,Ut.dataApiKeydownHandler),T.on(document,id,ss,Ut.dataApiKeydownHandler),T.on(document,rd,Ut.clearMenus),T.on(document,Ty,Ut.clearMenus),T.on(document,rd,fr,function(f){f.preventDefault(),Ut.getOrCreateInstance(this).toggle()}),v(Ut);const od="backdrop",sd="show",ld=`mousedown.bs.${od}`,Fy={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},By={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ad extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isAppended=!1,this._element=null}static get Default(){return Fy}static get DefaultType(){return By}static get NAME(){return od}show(s){if(!this._config.isVisible)return void w(s);this._append();const a=this._getElement();this._config.isAnimated&&C(a),a.classList.add(sd),this._emulateAnimation(()=>{w(s)})}hide(s){this._config.isVisible?(this._getElement().classList.remove(sd),this._emulateAnimation(()=>{this.dispose(),w(s)})):w(s)}dispose(){this._isAppended&&(T.off(this._element,ld),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const s=document.createElement("div");s.className=this._config.className,this._config.isAnimated&&s.classList.add("fade"),this._element=s}return this._element}_configAfterMerge(s){return s.rootElement=d(s.rootElement),s}_append(){if(this._isAppended)return;const s=this._getElement();this._config.rootElement.append(s),T.on(s,ld,()=>{w(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(s){b(s,this._getElement(),this._config.isAnimated)}}const ls=".bs.focustrap",Uy=`focusin${ls}`,Wy=`keydown.tab${ls}`,ud="backward",Vy={autofocus:!0,trapElement:null},Hy={autofocus:"boolean",trapElement:"element"};class cd extends ze{constructor(s){super(),this._config=this._getConfig(s),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Vy}static get DefaultType(){return Hy}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,ls),T.on(document,Uy,s=>this._handleFocusin(s)),T.on(document,Wy,s=>this._handleKeydown(s)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,ls))}_handleFocusin(s){const{trapElement:a}=this._config;if(s.target===document||s.target===a||a.contains(s.target))return;const p=K.focusableChildren(a);p.length===0?a.focus():this._lastTabNavDirection===ud?p[p.length-1].focus():p[0].focus()}_handleKeydown(s){s.key==="Tab"&&(this._lastTabNavDirection=s.shiftKey?ud:"forward")}}const fd=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dd=".sticky-top",as="padding-right",pd="margin-right";class ma{constructor(){this._element=document.body}getWidth(){const s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}hide(){const s=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,as,a=>a+s),this._setElementAttributes(fd,as,a=>a+s),this._setElementAttributes(dd,pd,a=>a-s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,as),this._resetElementAttributes(fd,as),this._resetElementAttributes(dd,pd)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(s,a,p){const k=this.getWidth();this._applyManipulationCallback(s,E=>{if(E!==this._element&&window.innerWidth>E.clientWidth+k)return;this._saveInitialAttribute(E,a);const j=window.getComputedStyle(E).getPropertyValue(a);E.style.setProperty(a,`${p(Number.parseFloat(j))}px`)})}_saveInitialAttribute(s,a){const p=s.style.getPropertyValue(a);p&&Oe.setDataAttribute(s,a,p)}_resetElementAttributes(s,a){this._applyManipulationCallback(s,p=>{const k=Oe.getDataAttribute(p,a);k!==null?(Oe.removeDataAttribute(p,a),p.style.setProperty(a,k)):p.style.removeProperty(a)})}_applyManipulationCallback(s,a){if(c(s))a(s);else for(const p of K.find(s,this._element))a(p)}}const Pt=".bs.modal",Ky=`hide${Pt}`,Qy=`hidePrevented${Pt}`,hd=`hidden${Pt}`,md=`show${Pt}`,Yy=`shown${Pt}`,Xy=`resize${Pt}`,Jy=`click.dismiss${Pt}`,Gy=`mousedown.dismiss${Pt}`,qy=`keydown.dismiss${Pt}`,Zy=`click${Pt}.data-api`,gd="modal-open",vd="show",ga="modal-static",ew={backdrop:!0,focus:!0,keyboard:!0},tw={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class dr extends Ne{constructor(s,a){super(s,a),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ma,this._addEventListeners()}static get Default(){return ew}static get DefaultType(){return tw}static get NAME(){return"modal"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||this._isTransitioning||T.trigger(this._element,md,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(gd),this._adjustDialog(),this._backdrop.show(()=>this._showElement(s)))}hide(){this._isShown&&!this._isTransitioning&&(T.trigger(this._element,Ky).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(vd),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){T.off(window,Pt),T.off(this._dialog,Pt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ad({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new cd({trapElement:this._element})}_showElement(s){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const a=K.findOne(".modal-body",this._dialog);a&&(a.scrollTop=0),C(this._element),this._element.classList.add(vd),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,Yy,{relatedTarget:s})},this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,qy,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),T.on(window,Xy,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,Gy,s=>{T.one(this._element,Jy,a=>{this._element===s.target&&this._element===a.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(gd),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,hd)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(T.trigger(this._element,Qy).defaultPrevented)return;const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._element.style.overflowY;a==="hidden"||this._element.classList.contains(ga)||(s||(this._element.style.overflowY="hidden"),this._element.classList.add(ga),this._queueCallback(()=>{this._element.classList.remove(ga),this._queueCallback(()=>{this._element.style.overflowY=a},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const s=this._element.scrollHeight>document.documentElement.clientHeight,a=this._scrollBar.getWidth(),p=a>0;if(p&&!s){const k=y()?"paddingLeft":"paddingRight";this._element.style[k]=`${a}px`}if(!p&&s){const k=y()?"paddingRight":"paddingLeft";this._element.style[k]=`${a}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(s,a){return this.each(function(){const p=dr.getOrCreateInstance(this,s);if(typeof s=="string"){if(p[s]===void 0)throw new TypeError(`No method named "${s}"`);p[s](a)}})}}T.on(document,Zy,'[data-bs-toggle="modal"]',function(f){const s=K.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&f.preventDefault(),T.one(s,md,p=>{p.defaultPrevented||T.one(s,hd,()=>{h(this)&&this.focus()})});const a=K.findOne(".modal.show");a&&dr.getInstance(a).hide(),dr.getOrCreateInstance(s).toggle(this)}),Dr(dr),v(dr);const dn=".bs.offcanvas",yd=".data-api",nw=`load${dn}${yd}`,wd="show",_d="showing",xd="hiding",Sd=".offcanvas.show",rw=`show${dn}`,iw=`shown${dn}`,ow=`hide${dn}`,kd=`hidePrevented${dn}`,Ed=`hidden${dn}`,sw=`resize${dn}`,lw=`click${dn}${yd}`,aw=`keydown.dismiss${dn}`,uw={backdrop:!0,keyboard:!0,scroll:!1},cw={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class pn extends Ne{constructor(s,a){super(s,a),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return uw}static get DefaultType(){return cw}static get NAME(){return"offcanvas"}toggle(s){return this._isShown?this.hide():this.show(s)}show(s){this._isShown||T.trigger(this._element,rw,{relatedTarget:s}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new ma().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_d),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(wd),this._element.classList.remove(_d),T.trigger(this._element,iw,{relatedTarget:s})},this._element,!0))}hide(){this._isShown&&(T.trigger(this._element,ow).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(xd),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(wd,xd),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ma().reset(),T.trigger(this._element,Ed)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const s=!!this._config.backdrop;return new ad({className:"offcanvas-backdrop",isVisible:s,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:s?()=>{this._config.backdrop!=="static"?this.hide():T.trigger(this._element,kd)}:null})}_initializeFocusTrap(){return new cd({trapElement:this._element})}_addEventListeners(){T.on(this._element,aw,s=>{s.key==="Escape"&&(this._config.keyboard?this.hide():T.trigger(this._element,kd))})}static jQueryInterface(s){return this.each(function(){const a=pn.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s](this)}})}}T.on(document,lw,'[data-bs-toggle="offcanvas"]',function(f){const s=K.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this))return;T.one(s,Ed,()=>{h(this)&&this.focus()});const a=K.findOne(Sd);a&&a!==s&&pn.getInstance(a).hide(),pn.getOrCreateInstance(s).toggle(this)}),T.on(window,nw,()=>{for(const f of K.find(Sd))pn.getOrCreateInstance(f).show()}),T.on(window,sw,()=>{for(const f of K.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(f).position!=="fixed"&&pn.getOrCreateInstance(f).hide()}),Dr(pn),v(pn);const Cd={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},fw=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),dw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,pw=(f,s)=>{const a=f.nodeName.toLowerCase();return s.includes(a)?!fw.has(a)||!!dw.test(f.nodeValue):s.filter(p=>p instanceof RegExp).some(p=>p.test(a))},hw={allowList:Cd,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},mw={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},gw={entry:"(string|element|function|null)",selector:"(string|element)"};class vw extends ze{constructor(s){super(),this._config=this._getConfig(s)}static get Default(){return hw}static get DefaultType(){return mw}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(s=>this._resolvePossibleFunction(s)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(s){return this._checkContent(s),this._config.content={...this._config.content,...s},this}toHtml(){const s=document.createElement("div");s.innerHTML=this._maybeSanitize(this._config.template);for(const[k,E]of Object.entries(this._config.content))this._setContent(s,E,k);const a=s.children[0],p=this._resolvePossibleFunction(this._config.extraClass);return p&&a.classList.add(...p.split(" ")),a}_typeCheckConfig(s){super._typeCheckConfig(s),this._checkContent(s.content)}_checkContent(s){for(const[a,p]of Object.entries(s))super._typeCheckConfig({selector:a,entry:p},gw)}_setContent(s,a,p){const k=K.findOne(p,s);k&&((a=this._resolvePossibleFunction(a))?c(a)?this._putElementInTemplate(d(a),k):this._config.html?k.innerHTML=this._maybeSanitize(a):k.textContent=a:k.remove())}_maybeSanitize(s){return this._config.sanitize?function(a,p,k){if(!a.length)return a;if(k&&typeof k=="function")return k(a);const E=new window.DOMParser().parseFromString(a,"text/html"),j=[].concat(...E.body.querySelectorAll("*"));for(const L of j){const I=L.nodeName.toLowerCase();if(!Object.keys(p).includes(I)){L.remove();continue}const B=[].concat(...L.attributes),W=[].concat(p["*"]||[],p[I]||[]);for(const z of B)pw(z,W)||L.removeAttribute(z.nodeName)}return E.body.innerHTML}(s,this._config.allowList,this._config.sanitizeFn):s}_resolvePossibleFunction(s){return w(s,[void 0,this])}_putElementInTemplate(s,a){if(this._config.html)return a.innerHTML="",void a.append(s);a.textContent=s.textContent}}const yw=new Set(["sanitize","allowList","sanitizeFn"]),va="fade",us="show",ww=".tooltip-inner",bd=".modal",Pd="hide.bs.modal",Ui="hover",ya="focus",wa="click",_w={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},xw={allowList:Cd,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Sw={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class pr extends Ne{constructor(s,a){if(ed===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(s,a),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return xw}static get DefaultType(){return Sw}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(bd),Pd,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const s=T.trigger(this._element,this.constructor.eventName("show")),a=(_(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(s.defaultPrevented||!a)return;this._disposePopper();const p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));const{container:k}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(k.append(p),T.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(p),p.classList.add(us),"ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))T.on(E,"mouseover",S);this._queueCallback(()=>{T.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!T.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(us),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))T.off(s,"mouseover",S);this._activeTrigger[wa]=!1,this._activeTrigger[ya]=!1,this._activeTrigger[Ui]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(s){const a=this._getTemplateFactory(s).toHtml();if(!a)return null;a.classList.remove(va,us),a.classList.add(`bs-${this.constructor.NAME}-auto`);const p=(k=>{do k+=Math.floor(1e6*Math.random());while(document.getElementById(k));return k})(this.constructor.NAME).toString();return a.setAttribute("id",p),this._isAnimated()&&a.classList.add(va),a}setContent(s){this._newContent=s,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(s){return this._templateFactory?this._templateFactory.changeContent(s):this._templateFactory=new vw({...this._config,content:s,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ww]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(s){return this.constructor.getOrCreateInstance(s.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(va)}_isShown(){return this.tip&&this.tip.classList.contains(us)}_createPopper(s){const a=w(this._config.placement,[this,s,this._element]),p=_w[a.toUpperCase()];return pa(this._element,s,this._getPopperConfig(p))}_getOffset(){const{offset:s}=this._config;return typeof s=="string"?s.split(",").map(a=>Number.parseInt(a,10)):typeof s=="function"?a=>s(a,this._element):s}_resolvePossibleFunction(s){return w(s,[this._element,this._element])}_getPopperConfig(s){const a={placement:s,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:p=>{this._getTipElement().setAttribute("data-popper-placement",p.state.placement)}}]};return{...a,...w(this._config.popperConfig,[void 0,a])}}_setListeners(){const s=this._config.trigger.split(" ");for(const a of s)if(a==="click")T.on(this._element,this.constructor.eventName("click"),this._config.selector,p=>{const k=this._initializeOnDelegatedTarget(p);k._activeTrigger[wa]=!(k._isShown()&&k._activeTrigger[wa]),k.toggle()});else if(a!=="manual"){const p=a===Ui?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),k=a===Ui?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");T.on(this._element,p,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusin"?ya:Ui]=!0,j._enter()}),T.on(this._element,k,this._config.selector,E=>{const j=this._initializeOnDelegatedTarget(E);j._activeTrigger[E.type==="focusout"?ya:Ui]=j._element.contains(E.relatedTarget),j._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(bd),Pd,this._hideModalHandler)}_fixTitle(){const s=this._element.getAttribute("title");s&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",s),this._element.setAttribute("data-bs-original-title",s),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(s,a){clearTimeout(this._timeout),this._timeout=setTimeout(s,a)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(s){const a=Oe.getDataAttributes(this._element);for(const p of Object.keys(a))yw.has(p)&&delete a[p];return s={...a,...typeof s=="object"&&s?s:{}},s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s.container=s.container===!1?document.body:d(s.container),typeof s.delay=="number"&&(s.delay={show:s.delay,hide:s.delay}),typeof s.title=="number"&&(s.title=s.title.toString()),typeof s.content=="number"&&(s.content=s.content.toString()),s}_getDelegateConfig(){const s={};for(const[a,p]of Object.entries(this._config))this.constructor.Default[a]!==p&&(s[a]=p);return s.selector=!1,s.trigger="manual",s}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(s){return this.each(function(){const a=pr.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(pr);const kw=".popover-header",Ew=".popover-body",Cw={...pr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},bw={...pr.DefaultType,content:"(null|string|element|function)"};class cs extends pr{static get Default(){return Cw}static get DefaultType(){return bw}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[kw]:this._getTitle(),[Ew]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(s){return this.each(function(){const a=cs.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s]()}})}}v(cs);const _a=".bs.scrollspy",Pw=`activate${_a}`,Od=`click${_a}`,Ow=`load${_a}.data-api`,Jr="active",xa="[href]",jd=".nav-link",jw=`${jd}, .nav-item > ${jd}, .list-group-item`,Tw={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Nw={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Wi extends Ne{constructor(s,a){super(s,a),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Tw}static get DefaultType(){return Nw}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const s of this._observableSections.values())this._observer.observe(s)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(s){return s.target=d(s.target)||document.body,s.rootMargin=s.offset?`${s.offset}px 0px -30%`:s.rootMargin,typeof s.threshold=="string"&&(s.threshold=s.threshold.split(",").map(a=>Number.parseFloat(a))),s}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(T.off(this._config.target,Od),T.on(this._config.target,Od,xa,s=>{const a=this._observableSections.get(s.target.hash);if(a){s.preventDefault();const p=this._rootElement||window,k=a.offsetTop-this._element.offsetTop;if(p.scrollTo)return void p.scrollTo({top:k,behavior:"smooth"});p.scrollTop=k}}))}_getNewObserver(){const s={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(a=>this._observerCallback(a),s)}_observerCallback(s){const a=j=>this._targetLinks.get(`#${j.target.id}`),p=j=>{this._previousScrollData.visibleEntryTop=j.target.offsetTop,this._process(a(j))},k=(this._rootElement||document.documentElement).scrollTop,E=k>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=k;for(const j of s){if(!j.isIntersecting){this._activeTarget=null,this._clearActiveClass(a(j));continue}const L=j.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(E&&L){if(p(j),!k)return}else E||L||p(j)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const s=K.find(xa,this._config.target);for(const a of s){if(!a.hash||g(a))continue;const p=K.findOne(decodeURI(a.hash),this._element);h(p)&&(this._targetLinks.set(decodeURI(a.hash),a),this._observableSections.set(a.hash,p))}}_process(s){this._activeTarget!==s&&(this._clearActiveClass(this._config.target),this._activeTarget=s,s.classList.add(Jr),this._activateParents(s),T.trigger(this._element,Pw,{relatedTarget:s}))}_activateParents(s){if(s.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",s.closest(".dropdown")).classList.add(Jr);else for(const a of K.parents(s,".nav, .list-group"))for(const p of K.prev(a,jw))p.classList.add(Jr)}_clearActiveClass(s){s.classList.remove(Jr);const a=K.find(`${xa}.${Jr}`,s);for(const p of a)p.classList.remove(Jr)}static jQueryInterface(s){return this.each(function(){const a=Wi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(window,Ow,()=>{for(const f of K.find('[data-bs-spy="scroll"]'))Wi.getOrCreateInstance(f)}),v(Wi);const hr=".bs.tab",Lw=`hide${hr}`,Aw=`hidden${hr}`,Dw=`show${hr}`,$w=`shown${hr}`,Rw=`click${hr}`,Iw=`keydown${hr}`,Mw=`load${hr}`,zw="ArrowLeft",Td="ArrowRight",Fw="ArrowUp",Nd="ArrowDown",Sa="Home",Ld="End",mr="active",Ad="fade",ka="show",Dd=".dropdown-toggle",Ea=`:not(${Dd})`,$d='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ca=`.nav-link${Ea}, .list-group-item${Ea}, [role="tab"]${Ea}, ${$d}`,Bw=`.${mr}[data-bs-toggle="tab"], .${mr}[data-bs-toggle="pill"], .${mr}[data-bs-toggle="list"]`;class gr extends Ne{constructor(s){super(s),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,Iw,a=>this._keydown(a)))}static get NAME(){return"tab"}show(){const s=this._element;if(this._elemIsActive(s))return;const a=this._getActiveElem(),p=a?T.trigger(a,Lw,{relatedTarget:s}):null;T.trigger(s,Dw,{relatedTarget:a}).defaultPrevented||p&&p.defaultPrevented||(this._deactivate(a,s),this._activate(s,a))}_activate(s,a){s&&(s.classList.add(mr),this._activate(K.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.removeAttribute("tabindex"),s.setAttribute("aria-selected",!0),this._toggleDropDown(s,!0),T.trigger(s,$w,{relatedTarget:a})):s.classList.add(ka)},s,s.classList.contains(Ad)))}_deactivate(s,a){s&&(s.classList.remove(mr),s.blur(),this._deactivate(K.getElementFromSelector(s)),this._queueCallback(()=>{s.getAttribute("role")==="tab"?(s.setAttribute("aria-selected",!1),s.setAttribute("tabindex","-1"),this._toggleDropDown(s,!1),T.trigger(s,Aw,{relatedTarget:a})):s.classList.remove(ka)},s,s.classList.contains(Ad)))}_keydown(s){if(![zw,Td,Fw,Nd,Sa,Ld].includes(s.key))return;s.stopPropagation(),s.preventDefault();const a=this._getChildren().filter(k=>!g(k));let p;if([Sa,Ld].includes(s.key))p=a[s.key===Sa?0:a.length-1];else{const k=[Td,Nd].includes(s.key);p=N(a,s.target,k,!0)}p&&(p.focus({preventScroll:!0}),gr.getOrCreateInstance(p).show())}_getChildren(){return K.find(Ca,this._parent)}_getActiveElem(){return this._getChildren().find(s=>this._elemIsActive(s))||null}_setInitialAttributes(s,a){this._setAttributeIfNotExists(s,"role","tablist");for(const p of a)this._setInitialAttributesOnChild(p)}_setInitialAttributesOnChild(s){s=this._getInnerElement(s);const a=this._elemIsActive(s),p=this._getOuterElement(s);s.setAttribute("aria-selected",a),p!==s&&this._setAttributeIfNotExists(p,"role","presentation"),a||s.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(s,"role","tab"),this._setInitialAttributesOnTargetPanel(s)}_setInitialAttributesOnTargetPanel(s){const a=K.getElementFromSelector(s);a&&(this._setAttributeIfNotExists(a,"role","tabpanel"),s.id&&this._setAttributeIfNotExists(a,"aria-labelledby",`${s.id}`))}_toggleDropDown(s,a){const p=this._getOuterElement(s);if(!p.classList.contains("dropdown"))return;const k=(E,j)=>{const L=K.findOne(E,p);L&&L.classList.toggle(j,a)};k(Dd,mr),k(".dropdown-menu",ka),p.setAttribute("aria-expanded",a)}_setAttributeIfNotExists(s,a,p){s.hasAttribute(a)||s.setAttribute(a,p)}_elemIsActive(s){return s.classList.contains(mr)}_getInnerElement(s){return s.matches(Ca)?s:K.findOne(Ca,s)}_getOuterElement(s){return s.closest(".nav-item, .list-group-item")||s}static jQueryInterface(s){return this.each(function(){const a=gr.getOrCreateInstance(this);if(typeof s=="string"){if(a[s]===void 0||s.startsWith("_")||s==="constructor")throw new TypeError(`No method named "${s}"`);a[s]()}})}}T.on(document,Rw,$d,function(f){["A","AREA"].includes(this.tagName)&&f.preventDefault(),g(this)||gr.getOrCreateInstance(this).show()}),T.on(window,Mw,()=>{for(const f of K.find(Bw))gr.getOrCreateInstance(f)}),v(gr);const Tn=".bs.toast",Uw=`mouseover${Tn}`,Ww=`mouseout${Tn}`,Vw=`focusin${Tn}`,Hw=`focusout${Tn}`,Kw=`hide${Tn}`,Qw=`hidden${Tn}`,Yw=`show${Tn}`,Xw=`shown${Tn}`,Rd="hide",fs="show",ds="showing",Jw={animation:"boolean",autohide:"boolean",delay:"number"},Gw={animation:!0,autohide:!0,delay:5e3};class Vi extends Ne{constructor(s,a){super(s,a),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Gw}static get DefaultType(){return Jw}static get NAME(){return"toast"}show(){T.trigger(this._element,Yw).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Rd),C(this._element),this._element.classList.add(fs,ds),this._queueCallback(()=>{this._element.classList.remove(ds),T.trigger(this._element,Xw),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(T.trigger(this._element,Kw).defaultPrevented||(this._element.classList.add(ds),this._queueCallback(()=>{this._element.classList.add(Rd),this._element.classList.remove(ds,fs),T.trigger(this._element,Qw)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(fs),super.dispose()}isShown(){return this._element.classList.contains(fs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(s,a){switch(s.type){case"mouseover":case"mouseout":this._hasMouseInteraction=a;break;case"focusin":case"focusout":this._hasKeyboardInteraction=a}if(a)return void this._clearTimeout();const p=s.relatedTarget;this._element===p||this._element.contains(p)||this._maybeScheduleHide()}_setListeners(){T.on(this._element,Uw,s=>this._onInteraction(s,!0)),T.on(this._element,Ww,s=>this._onInteraction(s,!1)),T.on(this._element,Vw,s=>this._onInteraction(s,!0)),T.on(this._element,Hw,s=>this._onInteraction(s,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(s){return this.each(function(){const a=Vi.getOrCreateInstance(this,s);if(typeof s=="string"){if(a[s]===void 0)throw new TypeError(`No method named "${s}"`);a[s](this)}})}}return Dr(Vi),v(Vi),{Alert:or,Button:On,Carousel:zr,Collapse:Br,Dropdown:Ut,Modal:dr,Offcanvas:pn,Popover:cs,ScrollSpy:Wi,Tab:gr,Toast:Vi,Tooltip:pr}})})(FS);const BS="modulepreload",US=function(e){return"/"+e},dh={},Me=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=US(c),c in dh)return;dh[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":BS,d||(g.as="script"),g.crossOrigin="",g.href=c,u&&g.setAttribute("nonce",u),document.head.appendChild(g),d)return new Promise((_,S)=>{g.addEventListener("load",_),g.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return i.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})},lv=x.createContext(null),ph="theme",hh="color",av="sidebarTheme",uv="sidebarBg";function WS(){const e=localStorage.getItem(av);return e==="light"||e==="dark"||e==="blue"||e==="green"?e:"light"}function VS(){const e=localStorage.getItem(uv);return e==="sidebarbgnone"||e==="sidebarbg1"||e==="sidebarbg2"||e==="sidebarbg3"||e==="sidebarbg4"?e:"sidebarbgnone"}function HS(e,t,n,r){const i=document.documentElement;i.setAttribute("data-theme",e),i.setAttribute("data-sidebar",n),i.setAttribute("data-color",t),i.setAttribute("data-sidebar-bg",r)}function KS({children:e}){const[t,n]=x.useState(()=>{const P=localStorage.getItem(ph);return P==="dark"||P==="light"?P:localStorage.getItem("darkMode")==="enabled"?"dark":"light"}),[r,i]=x.useState(()=>{const P=localStorage.getItem(hh);return P==="red"||P==="yellow"||P==="blue"||P==="green"?P:"red"}),[o,l]=x.useState(WS),[u,c]=x.useState(VS);x.useEffect(()=>{HS(t,r,o,u),localStorage.setItem(ph,t),localStorage.setItem(hh,r),localStorage.setItem(av,o),localStorage.setItem(uv,u),t==="dark"?localStorage.setItem("darkMode","enabled"):localStorage.removeItem("darkMode")},[t,r,o,u]);const d=x.useCallback(P=>n(P),[]),h=x.useCallback(P=>i(P),[]),g=x.useCallback(P=>l(P),[]),_=x.useCallback(P=>c(P),[]),S=x.useCallback(()=>{n(P=>P==="light"?"dark":"light")},[]),C=x.useCallback(()=>{n("light"),i("red"),l("light"),c("sidebarbgnone"),localStorage.removeItem("darkMode")},[]),O=x.useMemo(()=>({theme:t,accent:r,sidebarTheme:o,sidebarBg:u,setAccent:h,setSidebarTheme:g,setSidebarBg:_,toggleTheme:S,setTheme:d,resetTheme:C}),[t,r,o,u,h,g,_,S,d,C]);return m.jsx(lv.Provider,{value:O,children:e})}function cv(){const e=x.useContext(lv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}var fv={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",l=0;l{const[d,...h]=c;let g=n==null?void 0:n(d,...h);return o(d),g},[n])]}function GS(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e}),t.current}function JS(){const[,e]=x.useReducer(t=>t+1,0);return e}function qS(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t}function Xn(e){const t=qS(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function ZS(e,t,n,r=!1){const i=Xn(n);x.useEffect(()=>{const o=typeof e=="function"?e():e;return o.addEventListener(t,i,r),()=>o.removeEventListener(t,i,r)},[e])}const Vl=x.createContext(null);function e1(){return x.useState(null)}var gh=Object.prototype.hasOwnProperty;function vh(e,t,n){for(n of e.keys())if(ho(n,t))return n}function ho(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ho(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=vh(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=vh(t,i),!i)||!ho(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(gh.call(e,n)&&++r&&!gh.call(t,n)||!(n in t)||!ho(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function t1(){const e=x.useRef(!0),t=x.useRef(()=>e.current);return x.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function n1(e){const t=t1();return[e[0],x.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var dt="top",Mt="bottom",zt="right",pt="left",uf="auto",Wo=[dt,Mt,zt,pt],Ci="start",Ro="end",r1="clippingParents",hv="viewport",Zi="popper",i1="reference",yh=Wo.reduce(function(e,t){return e.concat([t+"-"+Ci,t+"-"+Ro])},[]),mv=[].concat(Wo,[uf]).reduce(function(e,t){return e.concat([t,t+"-"+Ci,t+"-"+Ro])},[]),o1="beforeRead",s1="read",l1="afterRead",a1="beforeMain",u1="main",c1="afterMain",f1="beforeWrite",d1="write",p1="afterWrite",h1=[o1,s1,l1,a1,u1,c1,f1,d1,p1];function ln(e){return e.split("-")[0]}function St(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Nr(e){var t=St(e).Element;return e instanceof t||e instanceof Element}function an(e){var t=St(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function cf(e){if(typeof ShadowRoot>"u")return!1;var t=St(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Cr=Math.max,Sl=Math.min,bi=Math.round;function lc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function gv(){return!/^((?!chrome|android).)*safari/i.test(lc())}function Pi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&an(e)&&(i=e.offsetWidth>0&&bi(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&bi(r.height)/e.offsetHeight||1);var l=Nr(e)?St(e):window,u=l.visualViewport,c=!gv()&&n,d=(r.left+(c&&u?u.offsetLeft:0))/i,h=(r.top+(c&&u?u.offsetTop:0))/o,g=r.width/i,_=r.height/o;return{width:g,height:_,top:h,right:d+g,bottom:h+_,left:d,x:d,y:h}}function ff(e){var t=Pi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function vv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&cf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(e){return e?(e.nodeName||"").toLowerCase():null}function En(e){return St(e).getComputedStyle(e)}function m1(e){return["table","td","th"].indexOf(qn(e))>=0}function rr(e){return((Nr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hl(e){return qn(e)==="html"?e:e.assignedSlot||e.parentNode||(cf(e)?e.host:null)||rr(e)}function wh(e){return!an(e)||En(e).position==="fixed"?null:e.offsetParent}function g1(e){var t=/firefox/i.test(lc()),n=/Trident/i.test(lc());if(n&&an(e)){var r=En(e);if(r.position==="fixed")return null}var i=Hl(e);for(cf(i)&&(i=i.host);an(i)&&["html","body"].indexOf(qn(i))<0;){var o=En(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Vo(e){for(var t=St(e),n=wh(e);n&&m1(n)&&En(n).position==="static";)n=wh(n);return n&&(qn(n)==="html"||qn(n)==="body"&&En(n).position==="static")?t:n||g1(e)||t}function df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function mo(e,t,n){return Cr(e,Sl(t,n))}function v1(e,t,n){var r=mo(e,t,n);return r>n?n:r}function yv(){return{top:0,right:0,bottom:0,left:0}}function wv(e){return Object.assign({},yv(),e)}function _v(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var y1=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,wv(typeof t!="number"?t:_v(t,Wo))};function w1(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,l=n.modifiersData.popperOffsets,u=ln(n.placement),c=df(u),d=[pt,zt].indexOf(u)>=0,h=d?"height":"width";if(!(!o||!l)){var g=y1(i.padding,n),_=ff(o),S=c==="y"?dt:pt,C=c==="y"?Mt:zt,O=n.rects.reference[h]+n.rects.reference[c]-l[c]-n.rects.popper[h],P=l[c]-n.rects.reference[c],y=Vo(o),v=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,w=O/2-P/2,b=g[S],N=v-_[h]-g[C],A=v/2-_[h]/2+w,D=mo(b,A,N),$=c;n.modifiersData[r]=(t={},t[$]=D,t.centerOffset=D-A,t)}}function _1(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||vv(t.elements.popper,i)&&(t.elements.arrow=i))}const x1={name:"arrow",enabled:!0,phase:"main",fn:w1,effect:_1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Oi(e){return e.split("-")[1]}var S1={top:"auto",right:"auto",bottom:"auto",left:"auto"};function k1(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:bi(n*i)/i||0,y:bi(r*i)/i||0}}function _h(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,l=e.offsets,u=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,g=e.isFixed,_=l.x,S=_===void 0?0:_,C=l.y,O=C===void 0?0:C,P=typeof h=="function"?h({x:S,y:O}):{x:S,y:O};S=P.x,O=P.y;var y=l.hasOwnProperty("x"),v=l.hasOwnProperty("y"),w=pt,b=dt,N=window;if(d){var A=Vo(n),D="clientHeight",$="clientWidth";if(A===St(n)&&(A=rr(n),En(A).position!=="static"&&u==="absolute"&&(D="scrollHeight",$="scrollWidth")),A=A,i===dt||(i===pt||i===zt)&&o===Ro){b=Mt;var H=g&&A===N&&N.visualViewport?N.visualViewport.height:A[D];O-=H-r.height,O*=c?1:-1}if(i===pt||(i===dt||i===Mt)&&o===Ro){w=zt;var F=g&&A===N&&N.visualViewport?N.visualViewport.width:A[$];S-=F-r.width,S*=c?1:-1}}var Q=Object.assign({position:u},d&&S1),ee=h===!0?k1({x:S,y:O},St(n)):{x:S,y:O};if(S=ee.x,O=ee.y,c){var ne;return Object.assign({},Q,(ne={},ne[b]=v?"0":"",ne[w]=y?"0":"",ne.transform=(N.devicePixelRatio||1)<=1?"translate("+S+"px, "+O+"px)":"translate3d("+S+"px, "+O+"px, 0)",ne))}return Object.assign({},Q,(t={},t[b]=v?O+"px":"",t[w]=y?S+"px":"",t.transform="",t))}function E1(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,l=o===void 0?!0:o,u=n.roundOffsets,c=u===void 0?!0:u,d={placement:ln(t.placement),variation:Oi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_h(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_h(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const C1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:E1,data:{}};var Ds={passive:!0};function b1(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,l=r.resize,u=l===void 0?!0:l,c=St(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Ds)}),u&&c.addEventListener("resize",n.update,Ds),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Ds)}),u&&c.removeEventListener("resize",n.update,Ds)}}const P1={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:b1,data:{}};var O1={left:"right",right:"left",bottom:"top",top:"bottom"};function Xs(e){return e.replace(/left|right|bottom|top/g,function(t){return O1[t]})}var j1={start:"end",end:"start"};function xh(e){return e.replace(/start|end/g,function(t){return j1[t]})}function pf(e){var t=St(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function hf(e){return Pi(rr(e)).left+pf(e).scrollLeft}function T1(e,t){var n=St(e),r=rr(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,u=0,c=0;if(i){o=i.width,l=i.height;var d=gv();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:l,x:u+hf(e),y:c}}function N1(e){var t,n=rr(e),r=pf(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Cr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=Cr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+hf(e),c=-r.scrollTop;return En(i||n).direction==="rtl"&&(u+=Cr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:l,x:u,y:c}}function mf(e){var t=En(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function xv(e){return["html","body","#document"].indexOf(qn(e))>=0?e.ownerDocument.body:an(e)&&mf(e)?e:xv(Hl(e))}function go(e,t){var n;t===void 0&&(t=[]);var r=xv(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=St(r),l=i?[o].concat(o.visualViewport||[],mf(r)?r:[]):r,u=t.concat(l);return i?u:u.concat(go(Hl(l)))}function ac(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function L1(e,t){var n=Pi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Sh(e,t,n){return t===hv?ac(T1(e,n)):Nr(t)?L1(t,n):ac(N1(rr(e)))}function A1(e){var t=go(Hl(e)),n=["absolute","fixed"].indexOf(En(e).position)>=0,r=n&&an(e)?Vo(e):e;return Nr(r)?t.filter(function(i){return Nr(i)&&vv(i,r)&&qn(i)!=="body"}):[]}function D1(e,t,n,r){var i=t==="clippingParents"?A1(e):[].concat(t),o=[].concat(i,[n]),l=o[0],u=o.reduce(function(c,d){var h=Sh(e,d,r);return c.top=Cr(h.top,c.top),c.right=Sl(h.right,c.right),c.bottom=Sl(h.bottom,c.bottom),c.left=Cr(h.left,c.left),c},Sh(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Sv(e){var t=e.reference,n=e.element,r=e.placement,i=r?ln(r):null,o=r?Oi(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,c;switch(i){case dt:c={x:l,y:t.y-n.height};break;case Mt:c={x:l,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:u};break;case pt:c={x:t.x-n.width,y:u};break;default:c={x:t.x,y:t.y}}var d=i?df(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Ci:c[d]=c[d]-(t[h]/2-n[h]/2);break;case Ro:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function Io(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,l=o===void 0?e.strategy:o,u=n.boundary,c=u===void 0?r1:u,d=n.rootBoundary,h=d===void 0?hv:d,g=n.elementContext,_=g===void 0?Zi:g,S=n.altBoundary,C=S===void 0?!1:S,O=n.padding,P=O===void 0?0:O,y=wv(typeof P!="number"?P:_v(P,Wo)),v=_===Zi?i1:Zi,w=e.rects.popper,b=e.elements[C?v:_],N=D1(Nr(b)?b:b.contextElement||rr(e.elements.popper),c,h,l),A=Pi(e.elements.reference),D=Sv({reference:A,element:w,placement:i}),$=ac(Object.assign({},w,D)),H=_===Zi?$:A,F={top:N.top-H.top+y.top,bottom:H.bottom-N.bottom+y.bottom,left:N.left-H.left+y.left,right:H.right-N.right+y.right},Q=e.modifiersData.offset;if(_===Zi&&Q){var ee=Q[i];Object.keys(F).forEach(function(ne){var xe=[zt,Mt].indexOf(ne)>=0?1:-1,De=[dt,Mt].indexOf(ne)>=0?"y":"x";F[ne]+=ee[De]*xe})}return F}function $1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,l=n.padding,u=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?mv:c,h=Oi(r),g=h?u?yh:yh.filter(function(C){return Oi(C)===h}):Wo,_=g.filter(function(C){return d.indexOf(C)>=0});_.length===0&&(_=g);var S=_.reduce(function(C,O){return C[O]=Io(e,{placement:O,boundary:i,rootBoundary:o,padding:l})[ln(O)],C},{});return Object.keys(S).sort(function(C,O){return S[C]-S[O]})}function R1(e){if(ln(e)===uf)return[];var t=Xs(e);return[xh(e),t,xh(t)]}function I1(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!0:l,c=n.fallbackPlacements,d=n.padding,h=n.boundary,g=n.rootBoundary,_=n.altBoundary,S=n.flipVariations,C=S===void 0?!0:S,O=n.allowedAutoPlacements,P=t.options.placement,y=ln(P),v=y===P,w=c||(v||!C?[Xs(P)]:R1(P)),b=[P].concat(w).reduce(function(Ue,Oe){return Ue.concat(ln(Oe)===uf?$1(t,{placement:Oe,boundary:h,rootBoundary:g,padding:d,flipVariations:C,allowedAutoPlacements:O}):Oe)},[]),N=t.rects.reference,A=t.rects.popper,D=new Map,$=!0,H=b[0],F=0;F=0,De=xe?"width":"height",ke=Io(t,{placement:Q,boundary:h,rootBoundary:g,altBoundary:_,padding:d}),$e=xe?ne?zt:pt:ne?Mt:dt;N[De]>A[De]&&($e=Xs($e));var M=Xs($e),Y=[];if(o&&Y.push(ke[ee]<=0),u&&Y.push(ke[$e]<=0,ke[M]<=0),Y.every(function(Ue){return Ue})){H=Q,$=!1;break}D.set(Q,Y)}if($)for(var V=C?3:1,T=function(Oe){var ze=b.find(function(Ne){var Ft=D.get(Ne);if(Ft)return Ft.slice(0,Oe).every(function(K){return K})});if(ze)return H=ze,"break"},de=V;de>0;de--){var Ct=T(de);if(Ct==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const M1={name:"flip",enabled:!0,phase:"main",fn:I1,requiresIfExists:["offset"],data:{_skip:!1}};function kh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Eh(e){return[dt,zt,Mt,pt].some(function(t){return e[t]>=0})}function z1(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,l=Io(t,{elementContext:"reference"}),u=Io(t,{altBoundary:!0}),c=kh(l,r),d=kh(u,i,o),h=Eh(c),g=Eh(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const F1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:z1};function B1(e,t,n){var r=ln(e),i=[pt,dt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=o[0],u=o[1];return l=l||0,u=(u||0)*i,[pt,zt].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function U1(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,l=mv.reduce(function(h,g){return h[g]=B1(g,t.rects,o),h},{}),u=l[t.placement],c=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=l}const W1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:U1};function V1(e){var t=e.state,n=e.name;t.modifiersData[n]=Sv({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const H1={name:"popperOffsets",enabled:!0,phase:"read",fn:V1,data:{}};function K1(e){return e==="x"?"y":"x"}function Q1(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!1:l,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,g=n.padding,_=n.tether,S=_===void 0?!0:_,C=n.tetherOffset,O=C===void 0?0:C,P=Io(t,{boundary:c,rootBoundary:d,padding:g,altBoundary:h}),y=ln(t.placement),v=Oi(t.placement),w=!v,b=df(y),N=K1(b),A=t.modifiersData.popperOffsets,D=t.rects.reference,$=t.rects.popper,H=typeof O=="function"?O(Object.assign({},t.rects,{placement:t.placement})):O,F=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(A){if(o){var ne,xe=b==="y"?dt:pt,De=b==="y"?Mt:zt,ke=b==="y"?"height":"width",$e=A[b],M=$e+P[xe],Y=$e-P[De],V=S?-$[ke]/2:0,T=v===Ci?D[ke]:$[ke],de=v===Ci?-$[ke]:-D[ke],Ct=t.elements.arrow,Ue=S&&Ct?ff(Ct):{width:0,height:0},Oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yv(),ze=Oe[xe],Ne=Oe[De],Ft=mo(0,D[ke],Ue[ke]),K=w?D[ke]/2-V-Ft-ze-F.mainAxis:T-Ft-ze-F.mainAxis,Dr=w?-D[ke]/2+V+Ft+Ne+F.mainAxis:de+Ft+Ne+F.mainAxis,$r=t.elements.arrow&&Vo(t.elements.arrow),Kl=$r?b==="y"?$r.clientTop||0:$r.clientLeft||0:0,Ko=(ne=Q==null?void 0:Q[b])!=null?ne:0,or=$e+K-Ko-Kl,Qo=$e+Dr-Ko,On=mo(S?Sl(M,or):M,$e,S?Cr(Y,Qo):Y);A[b]=On,ee[b]=On-$e}if(u){var un,Ql=b==="x"?dt:pt,Yl=b==="x"?Mt:zt,cn=A[N],Rr=N==="y"?"height":"width",Yo=cn+P[Ql],Xo=cn-P[Yl],$i=[dt,pt].indexOf(y)!==-1,sr=(un=Q==null?void 0:Q[N])!=null?un:0,Bt=$i?Yo:cn-D[Rr]-$[Rr]-sr+F.altAxis,Ri=$i?cn+D[Rr]+$[Rr]-sr-F.altAxis:Xo,Go=S&&$i?v1(Bt,cn,Ri):mo(S?Bt:Yo,cn,S?Ri:Xo);A[N]=Go,ee[N]=Go-cn}t.modifiersData[r]=ee}}const Y1={name:"preventOverflow",enabled:!0,phase:"main",fn:Q1,requiresIfExists:["offset"]};function X1(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function G1(e){return e===St(e)||!an(e)?pf(e):X1(e)}function J1(e){var t=e.getBoundingClientRect(),n=bi(t.width)/e.offsetWidth||1,r=bi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function q1(e,t,n){n===void 0&&(n=!1);var r=an(t),i=an(t)&&J1(t),o=rr(t),l=Pi(e,i,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((qn(t)!=="body"||mf(o))&&(u=G1(t)),an(t)?(c=Pi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=hf(o))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function Z1(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var l=[].concat(o.requires||[],o.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var c=t.get(u);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ek(e){var t=Z1(e);return h1.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function tk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function nk(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ch={placement:"bottom",modifiers:[],strategy:"absolute"};function bh(){for(var e=arguments.length,t=new Array(e),n=0;n=0)continue;n[r]=e[r]}return n}const lk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},ak={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(i=>i.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,i=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&i==="tooltip"&&"setAttribute"in r){const o=r.getAttribute("aria-describedby");if(o&&o.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",o?`${o},${n.id}`:n.id)}}},uk=[];function ck(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:o="absolute",modifiers:l=uk}=n,u=sk(n,ok);const c=x.useRef(l),d=x.useRef(),h=x.useCallback(()=>{var P;(P=d.current)==null||P.update()},[]),g=x.useCallback(()=>{var P;(P=d.current)==null||P.forceUpdate()},[]),[_,S]=n1(x.useState({placement:i,update:h,forceUpdate:g,attributes:{},styles:{popper:{},arrow:{}}})),C=x.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:P})=>{const y={},v={};Object.keys(P.elements).forEach(w=>{y[w]=P.styles[w],v[w]=P.attributes[w]}),S({state:P,styles:y,attributes:v,update:h,forceUpdate:g,placement:P.placement})}}),[h,g,S]),O=x.useMemo(()=>(ho(c.current,l)||(c.current=l),c.current),[l]);return x.useEffect(()=>{!d.current||!r||d.current.setOptions({placement:i,strategy:o,modifiers:[...O,C,lk]})},[o,i,C,r,O]),x.useEffect(()=>{if(!(!r||e==null||t==null))return d.current=ik(e,t,Object.assign({},u,{placement:i,strategy:o,modifiers:[...O,ak,C]})),()=>{d.current!=null&&(d.current.destroy(),d.current=void 0,S(P=>Object.assign({},P,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),_}function Ph(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function fk(e,t,n,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function $s(e,t,n,r){return pv(e,t,n,r),function(){fk(e,t,n,r)}}function dk(e){return e&&e.ownerDocument||document}var pk=function(){},hk=pk;const mk=kl(hk),Oh=()=>{};function gk(e){return e.button===0}function vk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const ru=e=>e&&("current"in e?e.current:e),jh={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function yk(e,t=Oh,{disabled:n,clickTrigger:r="click"}={}){const i=x.useRef(!1),o=x.useRef(!1),l=x.useCallback(d=>{const h=ru(e);mk(!!h,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!h||vk(d)||!gk(d)||!!Ph(h,d.target)||o.current,o.current=!1},[e]),u=Xn(d=>{const h=ru(e);h&&Ph(h,d.target)?o.current=!0:o.current=!1}),c=Xn(d=>{i.current||t(d)});x.useEffect(()=>{var d,h;if(n||e==null)return;const g=dk(ru(e)),_=g.defaultView||window;let S=(d=_.event)!=null?d:(h=_.parent)==null?void 0:h.event,C=null;jh[r]&&(C=$s(g,jh[r],u,!0));const O=$s(g,r,l,!0),P=$s(g,r,v=>{if(v===S){S=void 0;return}c(v)});let y=[];return"ontouchstart"in g.documentElement&&(y=[].slice.call(g.body.children).map(v=>$s(v,"mousemove",Oh))),()=>{C==null||C(),O(),P(),y.forEach(v=>v())}},[e,n,r,l,u,c])}function wk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function _k(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function xk({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:o,containerPadding:l,arrowElement:u,popperConfig:c={}}){var d,h,g,_,S;const C=wk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:o?"fixed":c.strategy,modifiers:_k(Object.assign({},C,{eventListeners:{enabled:t,options:(d=C.eventListeners)==null?void 0:d.options},preventOverflow:Object.assign({},C.preventOverflow,{options:l?Object.assign({padding:l},(h=C.preventOverflow)==null?void 0:h.options):(g=C.preventOverflow)==null?void 0:g.options}),offset:{options:Object.assign({offset:i},(_=C.offset)==null?void 0:_.options)},arrow:Object.assign({},C.arrow,{enabled:!!u,options:Object.assign({},(S=C.arrow)==null?void 0:S.options,{element:u})}),flip:Object.assign({enabled:!!r},C.flip)}))})}const Sk=["children","usePopper"];function kk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Ek=()=>{};function kv(e={}){const t=x.useContext(Vl),[n,r]=e1(),i=x.useRef(!1),{flip:o,offset:l,rootCloseEvent:u,fixed:c=!1,placement:d,popperConfig:h={},enableEventListeners:g=!0,usePopper:_=!!t}=e,S=(t==null?void 0:t.show)==null?!!e.show:t.show;S&&!i.current&&(i.current=!0);const C=A=>{t==null||t.toggle(!1,A)},{placement:O,setMenu:P,menuElement:y,toggleElement:v}=t||{},w=ck(v,y,xk({placement:d||O||"bottom-start",enabled:_,enableEvents:g??S,offset:l,flip:o,fixed:c,arrowElement:n,popperConfig:h})),b=Object.assign({ref:P||Ek,"aria-labelledby":v==null?void 0:v.id},w.attributes.popper,{style:w.styles.popper}),N={show:S,placement:O,hasShown:i.current,toggle:t==null?void 0:t.toggle,popper:_?w:null,arrowProps:_?Object.assign({ref:r},w.attributes.arrow,{style:w.styles.arrow}):{}};return yk(y,C,{clickTrigger:u,disabled:!S}),[b,N]}function Ev(e){let{children:t,usePopper:n=!0}=e,r=kk(e,Sk);const[i,o]=kv(Object.assign({},r,{usePopper:n}));return m.jsx(m.Fragment,{children:t(i,o)})}Ev.displayName="DropdownMenu";const Cv={prefix:String(Math.round(Math.random()*1e10)),current:0},bv=wn.createContext(Cv),Ck=wn.createContext(!1);let iu=new WeakMap;function bk(e=!1){let t=x.useContext(bv),n=x.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=iu.get(o);l==null?iu.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==l.state&&(t.current=l.id,iu.delete(o))}n.current=++t.current}return n.current}function Pk(e){let t=x.useContext(bv),n=bk(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Ok(e){let t=wn.useId(),[n]=x.useState(Ak()),r=n?"react-aria":`react-aria${Cv.prefix}`;return e||`${r}-${t}`}const jk=typeof wn.useId=="function"?Ok:Pk;function Tk(){return!1}function Nk(){return!0}function Lk(e){return()=>{}}function Ak(){return typeof wn.useSyncExternalStore=="function"?wn.useSyncExternalStore(Lk,Tk,Nk):x.useContext(Ck)}const Pv=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Th=()=>{};function Ov(){const e=jk(),{show:t=!1,toggle:n=Th,setToggle:r,menuElement:i}=x.useContext(Vl)||{},o=x.useCallback(u=>{n(!t,u)},[t,n]),l={id:e,ref:r||Th,onClick:o,"aria-expanded":!!t};return i&&Pv(i)&&(l["aria-haspopup"]=!0),[l,{show:t,toggle:n}]}function jv({children:e}){const[t,n]=Ov();return m.jsx(m.Fragment,{children:e(t,n)})}jv.displayName="DropdownToggle";const uc=x.createContext(null),Nh=(e,t=null)=>e!=null?String(e):t||null,Tv=x.createContext(null);Tv.displayName="NavContext";const Dk=["as","disabled"];function $k(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rk(e){return!e||e.trim()==="#"}function gf({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:l,tabIndex:u=0,type:c}){e||(n!=null||r!=null||i!=null?e="a":e="button");const d={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},d];const h=_=>{if((t||e==="a"&&Rk(n))&&_.preventDefault(),t){_.stopPropagation();return}l==null||l(_)},g=_=>{_.key===" "&&(_.preventDefault(),h(_))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:u,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:h,onKeyDown:g},d]}const Nv=x.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=$k(e,Dk);const[o,{tagName:l}]=gf(Object.assign({tagName:n,disabled:r},i));return m.jsx(l,Object.assign({},i,o,{ref:t}))});Nv.displayName="Button";const Ik="data-rr-ui-";function Lv(e){return`${Ik}${e}`}const Mk=["eventKey","disabled","onClick","active","as"];function zk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Av({key:e,href:t,active:n,disabled:r,onClick:i}){const o=x.useContext(uc),l=x.useContext(Tv),{activeKey:u}=l||{},c=Nh(e,t),d=n==null&&e!=null?Nh(u)===c:n;return[{onClick:Xn(g=>{r||(i==null||i(g),o&&!g.isPropagationStopped()&&o(c,g))}),"aria-disabled":r||void 0,"aria-selected":d,[Lv("dropdown-item")]:""},{isActive:d}]}const Dv=x.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:o,as:l=Nv}=e,u=zk(e,Mk);const[c]=Av({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,Object.assign({},u,{ref:t},c))});Dv.displayName="DropdownItem";const $v=x.createContext(dv?window:void 0);$v.Provider;function Fk(){return x.useContext($v)}function Lh(){const e=JS(),t=x.useRef(null),n=x.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Ho({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${Lv("dropdown-item")}]`,focusFirstItemOnShow:o,placement:l="bottom-start",children:u}){const c=Fk(),[d,h]=XS(t,e,r),[g,_]=Lh(),S=g.current,[C,O]=Lh(),P=C.current,y=GS(d),v=x.useRef(null),w=x.useRef(!1),b=x.useContext(uc),N=x.useCallback((Q,ee,ne=ee==null?void 0:ee.type)=>{h(Q,{originalEvent:ee,source:ne})},[h]),A=Xn((Q,ee)=>{n==null||n(Q,ee),N(!1,ee,"select"),ee.isPropagationStopped()||b==null||b(Q,ee)}),D=x.useMemo(()=>({toggle:N,placement:l,show:d,menuElement:S,toggleElement:P,setMenu:_,setToggle:O}),[N,l,d,S,P,_,O]);S&&y&&!d&&(w.current=S.contains(S.ownerDocument.activeElement));const $=Xn(()=>{P&&P.focus&&P.focus()}),H=Xn(()=>{const Q=v.current;let ee=o;if(ee==null&&(ee=g.current&&Pv(g.current)?"keyboard":!1),ee===!1||ee==="keyboard"&&!/^key.+$/.test(Q))return;const ne=mh(g.current,i)[0];ne&&ne.focus&&ne.focus()});x.useEffect(()=>{d?H():w.current&&(w.current=!1,$())},[d,w,$,H]),x.useEffect(()=>{v.current=null});const F=(Q,ee)=>{if(!g.current)return null;const ne=mh(g.current,i);let xe=ne.indexOf(Q)+ee;return xe=Math.max(0,Math.min(xe,ne.length)),ne[xe]};return ZS(x.useCallback(()=>c.document,[c]),"keydown",Q=>{var ee,ne;const{key:xe}=Q,De=Q.target,ke=(ee=g.current)==null?void 0:ee.contains(De),$e=(ne=C.current)==null?void 0:ne.contains(De);if(/input|textarea/i.test(De.tagName)&&(xe===" "||xe!=="Escape"&&ke||xe==="Escape"&&De.type==="search")||!ke&&!$e||xe==="Tab"&&(!g.current||!d))return;v.current=Q.type;const Y={originalEvent:Q,source:Q.type};switch(xe){case"ArrowUp":{const V=F(De,-1);V&&V.focus&&V.focus(),Q.preventDefault();return}case"ArrowDown":if(Q.preventDefault(),!d)h(!0,Y);else{const V=F(De,1);V&&V.focus&&V.focus()}return;case"Tab":pv(De.ownerDocument,"keyup",V=>{var T;(V.key==="Tab"&&!V.target||!((T=g.current)!=null&&T.contains(V.target)))&&h(!1,Y)},{once:!0});break;case"Escape":xe==="Escape"&&(Q.preventDefault(),Q.stopPropagation()),h(!1,Y);break}}),m.jsx(uc.Provider,{value:A,children:m.jsx(Vl.Provider,{value:D,children:u})})}Ho.displayName="Dropdown";Ho.Menu=Ev;Ho.Toggle=jv;Ho.Item=Dv;function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?h-1:0),_=1;_{t.current=e},[e]),t}function Qk(e){const t=Kk(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const vf=x.createContext({});vf.displayName="DropdownContext";const Yk=["xxl","xl","lg","md","sm","xs"],Xk="xs",yf=x.createContext({prefixes:{},breakpoints:Yk,minBreakpoint:Xk}),{Consumer:DE,Provider:$E}=yf;function ir(e,t){const{prefixes:n}=x.useContext(yf);return e||n[t]||t}function Gk(){const{dir:e}=x.useContext(yf);return e==="rtl"}const Rv=x.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...i},o)=>(t=ir(t,"dropdown-divider"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Rv.displayName="DropdownDivider";const Iv=x.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...i},o)=>(t=ir(t,"dropdown-header"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Iv.displayName="DropdownHeader";const Jk=["onKeyDown"];function qk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zk(e){return!e||e.trim()==="#"}const Mv=x.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=qk(e,Jk);const[i]=gf(Object.assign({tagName:"a"},r)),o=Xn(l=>{i.onKeyDown(l),n==null||n(l)});return Zk(r.href)||r.role==="button"?m.jsx("a",Object.assign({ref:t},r,i,{onKeyDown:o})):m.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Mv.displayName="Anchor";const zv=x.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:i,active:o,as:l=Mv,...u},c)=>{const d=ir(e,"dropdown-item"),[h,g]=Av({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,{...u,...h,ref:c,className:nr(t,d,g.isActive&&"active",r&&"disabled")})});zv.displayName="DropdownItem";const Fv=x.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},i)=>(t=ir(t,"dropdown-item-text"),m.jsx(n,{ref:i,className:nr(e,t),...r})));Fv.displayName="DropdownItemText";const eE=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",tE=typeof document<"u",nE=tE||eE?x.useLayoutEffect:x.useEffect,Dh=e=>!e||typeof e=="function"?e:t=>{e.current=t};function rE(e,t){const n=Dh(e),r=Dh(t);return i=>{n&&n(i),r&&r(i)}}function Bv(e,t){return x.useMemo(()=>rE(e,t),[e,t])}const wf=x.createContext(null);wf.displayName="InputGroupContext";const Uv=x.createContext(null);Uv.displayName="NavbarContext";function Wv(e,t){return e}function Vv(e,t,n){const r=n?"top-end":"top-start",i=n?"top-start":"top-end",o=n?"bottom-end":"bottom-start",l=n?"bottom-start":"bottom-end",u=n?"right-start":"left-start",c=n?"right-end":"left-end",d=n?"left-start":"right-start",h=n?"left-end":"right-end";let g=e?l:o;return t==="up"?g=e?i:r:t==="end"?g=e?h:d:t==="start"?g=e?c:u:t==="down-centered"?g="bottom":t==="up-centered"&&(g="top"),g}const Hv=x.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:i=!0,show:o,renderOnMount:l,as:u="div",popperConfig:c,variant:d,...h},g)=>{let _=!1;const S=x.useContext(Uv),C=ir(e,"dropdown-menu"),{align:O,drop:P,isRTL:y}=x.useContext(vf);n=n||O;const v=x.useContext(wf),w=[];if(n)if(typeof n=="object"){const Q=Object.keys(n);if(Q.length){const ee=Q[0],ne=n[ee];_=ne==="start",w.push(`${C}-${ee}-${ne}`)}}else n==="end"&&(_=!0);const b=Vv(_,P,y),[N,{hasShown:A,popper:D,show:$,toggle:H}]=kv({flip:i,rootCloseEvent:r,show:o,usePopper:!S&&w.length===0,offset:[0,2],popperConfig:c,placement:b});if(N.ref=Bv(Wv(g),N.ref),nE(()=>{$&&(D==null||D.update())},[$]),!A&&!l&&!v)return null;typeof u!="string"&&(N.show=$,N.close=()=>H==null?void 0:H(!1),N.align=n);let F=h.style;return D!=null&&D.placement&&(F={...h.style,...N.style},h["x-placement"]=D.placement),m.jsx(u,{...h,...N,style:F,...(w.length||S)&&{"data-bs-popper":"static"},className:nr(t,C,$&&"show",_&&`${C}-end`,d&&`${C}-${d}`,...w)})});Hv.displayName="DropdownMenu";const Kv=x.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:l,...u},c)=>{const d=ir(t,"btn"),[h,{tagName:g}]=gf({tagName:e,disabled:o,...u}),_=g;return m.jsx(_,{...h,...u,ref:c,disabled:o,className:nr(l,d,i&&"active",n&&`${d}-${n}`,r&&`${d}-${r}`,u.href&&o&&"disabled")})});Kv.displayName="Button";const Qv=x.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:i=Kv,...o},l)=>{const u=ir(e,"dropdown-toggle"),c=x.useContext(Vl);r!==void 0&&(o.bsPrefix=r);const[d]=Ov();return d.ref=Bv(d.ref,Wv(l)),m.jsx(i,{className:nr(n,u,t&&`${u}-split`,(c==null?void 0:c.show)&&"show"),...d,...o})});Qv.displayName="DropdownToggle";const Yv=x.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:i,className:o,align:l="start",onSelect:u,onToggle:c,focusFirstItemOnShow:d,as:h="div",navbar:g,autoClose:_=!0,...S}=Hk(e,{show:"onToggle"}),C=x.useContext(wf),O=ir(n,"dropdown"),P=Gk(),y=D=>_===!1?D==="click":_==="inside"?D!=="rootClose":_==="outside"?D!=="select":!0,v=Qk((D,$)=>{var H;!((H=$.originalEvent)==null||(H=H.target)==null)&&H.classList.contains("dropdown-toggle")&&$.source==="mousedown"||($.originalEvent.currentTarget===document&&($.source!=="keydown"||$.originalEvent.key==="Escape")&&($.source="rootClose"),y($.source)&&(c==null||c(D,$)))}),b=Vv(l==="end",r,P),N=x.useMemo(()=>({align:l,drop:r,isRTL:P}),[l,r,P]),A={down:O,"down-centered":`${O}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return m.jsx(vf.Provider,{value:N,children:m.jsx(Ho,{placement:b,show:i,onSelect:u,onToggle:v,focusFirstItemOnShow:d,itemSelector:`.${O}-item:not(.disabled):not(:disabled)`,children:C?S.children:m.jsx(h,{...S,ref:t,className:nr(o,i&&"show",A[r])})})})});Yv.displayName="Dropdown";const Nt=Object.assign(Yv,{Toggle:Qv,Menu:Hv,Item:zv,ItemText:Fv,Divider:Rv,Header:Iv}),iE=[{title:"Home",href:"/",id:"menuHome",sort:1,iconClass:"ti ti-layout-dashboard"},{title:"Website",href:"/site",id:"menuSite",sort:2,iconClass:"ti ti-world"},{title:"FTP",href:"/ftp",id:"menuFtp",sort:3,iconClass:"ti ti-folder-share"},{title:"Databases",href:"/database",id:"menuDatabase",sort:4,iconClass:"ti ti-database"},{title:"Docker",href:"/docker",id:"menuDocker",sort:5,iconClass:"ti ti-brand-docker"},{title:"Monitor",href:"/control",id:"menuControl",sort:6,iconClass:"ti ti-heart-rate-monitor"},{title:"Security",href:"/firewall",id:"menuFirewall",sort:7,iconClass:"ti ti-shield-lock"},{title:"Files",href:"/files",id:"menuFiles",sort:8,iconClass:"ti ti-folders"},{title:"Node",href:"/node",id:"menuNode",sort:9,iconClass:"ti ti-brand-nodejs"},{title:"Logs",href:"/logs",id:"menuLogs",sort:10,iconClass:"ti ti-file-text"},{title:"Domains",href:"/ssl_domain",id:"menuDomains",sort:11,iconClass:"ti ti-world-www"},{title:"Terminal",href:"/xterm",id:"menuXterm",sort:12,iconClass:"ti ti-terminal-2"},{title:"Cron",href:"/crontab",id:"menuCrontab",sort:13,iconClass:"ti ti-clock"},{title:"App Store",href:"/soft",id:"menuSoft",sort:14,iconClass:"ti ti-package"},{title:"Services",href:"/services",id:"menuServices",sort:15,iconClass:"ti ti-server"},{title:"Plugins",href:"/plugins",id:"menuPlugins",sort:16,iconClass:"ti ti-puzzle"},{title:"Backup Plans",href:"/backup-plans",id:"menuBackupPlans",sort:17,iconClass:"ti ti-archive"},{title:"Users",href:"/users",id:"menuUsers",sort:18,iconClass:"ti ti-users"},{title:"Settings",href:"/config",id:"menuConfig",sort:19,iconClass:"ti ti-settings"},{title:"Log out",href:"/logout",id:"menuLogout",sort:20,iconClass:"ti ti-logout"}],Rs=e=>`/theme/img/theme/theme-${e}.svg`;function oE(){const{theme:e,accent:t,sidebarTheme:n,sidebarBg:r,setTheme:i,setAccent:o,setSidebarTheme:l,setSidebarBg:u,resetTheme:c}=cv(),[d,h]=x.useState(!1),g=x.useId(),_=x.useCallback(()=>h(!1),[]);return x.useEffect(()=>{if(!d)return;const S=C=>{C.key==="Escape"&&_()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[d,_]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"sidebar-contact",children:m.jsx("button",{type:"button",className:"toggle-theme border-0 bg-transparent p-0","aria-expanded":d,"aria-controls":"yakpanel-theme-panel","aria-label":d?"Close theme settings":"Open theme customizer",onClick:()=>h(S=>!S),children:m.jsx("i",{className:`fa fa-cog ${d?"fa-spin":""}`,"aria-hidden":!0})})}),m.jsxs("div",{id:"yakpanel-theme-panel",className:`sidebar-themesettings ${d?"open":""}`,role:"dialog","aria-modal":"true","aria-labelledby":g,children:[m.jsxs("div",{className:"themesettings-header",children:[m.jsx("h4",{id:g,children:"Theme Customizer"}),m.jsx("button",{type:"button",className:"btn btn-link p-0 text-body","aria-label":"Close",onClick:_,children:m.jsx("i",{className:"ti ti-x","aria-hidden":!0})})]}),m.jsxs("div",{className:"themesettings-inner",children:[m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Layout"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"light",checked:e==="light",onChange:()=>i("light"),id:"yak-lightTheme",label:"Light",imgSrc:Rs("01")})}),m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"dark",checked:e==="dark",onChange:()=>i("dark"),id:"yak-darkTheme",label:"Dark",imgSrc:Rs("02")})})]})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Colors"}),m.jsx("div",{className:"theme-colorsset",children:m.jsx("ul",{className:"mb-0",children:[{v:"red",id:"yak-redColor"},{v:"yellow",id:"yak-yellowColor"},{v:"blue",id:"yak-blueColor"},{v:"green",id:"yak-greenColor"}].map(({v:S,id:C})=>m.jsx("li",{children:m.jsxs("div",{className:"input-themeselects",children:[m.jsx("input",{type:"radio",name:"yak-accent",id:C,value:S,checked:t===S,onChange:()=>o(S)}),m.jsx("label",{htmlFor:C,className:`${S}-clr`,title:S,children:m.jsx("span",{className:"visually-hidden",children:S})})]})},S))})})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Sidebar"}),m.jsx("div",{className:"row g-2",children:[{v:"light",n:"03",label:"Light"},{v:"dark",n:"04",label:"Dark"},{v:"blue",n:"05",label:"Blue"},{v:"green",n:"06",label:"Green"}].map(({v:S,n:C,label:O})=>m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-sidebar-style",value:S,checked:n===S,onChange:()=>l(S),id:`yak-sidebar-${S}`,label:O,imgSrc:Rs(C)})},S))})]}),m.jsxs("div",{className:"themesettings-content m-0 border-0",children:[m.jsx("h6",{children:"Sidebar background"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:"yak-sidebarBgNone",value:"sidebarbgnone",checked:r==="sidebarbgnone",onChange:()=>u("sidebarbgnone")}),m.jsx("label",{htmlFor:"yak-sidebarBgNone",className:"d-flex align-items-center justify-content-center bg-body-secondary rounded",style:{minHeight:72},children:m.jsx("span",{className:"small text-muted",children:"Default"})})]})}),[{v:"sidebarbg1",n:"07"},{v:"sidebarbg2",n:"08"},{v:"sidebarbg3",n:"09"},{v:"sidebarbg4",n:"10"}].map(({v:S,n:C})=>m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:`yak-${S}`,value:S,checked:r===S,onChange:()=>u(S)}),m.jsxs("label",{htmlFor:`yak-${S}`,children:[m.jsx("img",{src:Rs(C),alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsxs("span",{children:["Bg ",C.slice(-1)]}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})},S))]})]})]}),m.jsx("div",{className:"themesettings-footer",children:m.jsxs("ul",{className:"mb-0",children:[m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-cancel close-theme btn-light border w-100",onClick:_,children:"Cancel"})}),m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-reset btn-primary w-100",onClick:()=>{c()},children:"Reset"})})]})})]})]})}function ou({name:e,value:t,checked:n,onChange:r,id:i,label:o,imgSrc:l}){return m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:e,id:i,value:t,checked:n,onChange:r}),m.jsxs("label",{htmlFor:i,children:[m.jsx("img",{src:l,alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsx("span",{children:o}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})}const $h="yakpanel_mini_sidebar";function sE(){const e=Ul(),{theme:t,toggleTheme:n}=cv(),[r,i]=x.useState(!1),[o,l]=x.useState(()=>localStorage.getItem($h)==="1");x.useEffect(()=>{localStorage.setItem($h,o?"1":"0")},[o]),x.useEffect(()=>{o?document.body.classList.add("mini-sidebar"):document.body.classList.remove("mini-sidebar")},[o]);const u=()=>i(!1);return m.jsxs("div",{className:`main-wrapper ${r?"slide-nav":""}`,children:[m.jsxs("div",{className:"header",children:[m.jsxs("div",{className:`header-left ${o?"":"active"}`,children:[m.jsxs(As,{to:"/",className:"logo logo-normal",onClick:u,children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel"}),m.jsx("img",{src:"/theme/img/white-logo.png",className:"white-logo",alt:""})]}),m.jsx(As,{to:"/",className:"logo logo-small",onClick:u,children:m.jsx("img",{src:"/theme/img/logo-small.png",alt:""})}),m.jsx("button",{type:"button",id:"toggle_btn",className:o?"":"active","aria-label":o?"Expand sidebar":"Collapse sidebar",onClick:()=>l(!o),children:m.jsx("i",{className:"ti ti-arrow-bar-to-left"})})]}),m.jsx("button",{type:"button",id:"mobile_btn",className:"mobile_btn d-md-none btn btn-link p-0 border-0","aria-label":"Open menu",onClick:()=>i(!r),children:m.jsxs("span",{className:"bar-icon",children:[m.jsx("span",{}),m.jsx("span",{}),m.jsx("span",{})]})}),m.jsx("div",{className:"header-user",children:m.jsxs("ul",{className:"nav user-menu",children:[m.jsx("li",{className:"nav-item nav-search-inputs me-auto d-none d-md-block",children:m.jsx("div",{className:"top-nav-search",children:m.jsx("form",{className:"dropdown",onSubmit:c=>c.preventDefault(),children:m.jsxs("div",{className:"searchinputs",children:[m.jsx("input",{type:"search",className:"form-control",placeholder:"Search","aria-label":"Search"}),m.jsx("div",{className:"search-addon",children:m.jsx("button",{type:"submit",className:"btn btn-link p-0","aria-label":"Submit search",children:m.jsx("i",{className:"ti ti-command"})})})]})})})}),m.jsx("li",{className:"nav-item",children:m.jsxs("button",{type:"button",className:"btn btn-link nav-link dark-mode-toggle p-0",id:"dark-mode-toggle","aria-label":"Toggle theme",onClick:n,children:[m.jsx("i",{className:`ti ti-sun light-mode ${t==="light"?"active":""}`}),m.jsx("i",{className:`ti ti-moon dark-mode ${t==="dark"?"active":""}`})]})}),m.jsx("li",{className:"nav-item dropdown has-arrow main-drop",children:m.jsxs(Nt,{align:"end",children:[m.jsxs(Nt.Toggle,{as:"a",className:"btn btn-link nav-link user-link p-0 d-flex align-items-center text-decoration-none",children:[m.jsx("span",{className:"user-img",children:m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",alt:"",className:"rounded-circle",width:32,height:32})}),m.jsxs("span",{className:"user-content d-none d-md-inline text-start ms-2",children:[m.jsx("span",{className:"user-name d-block fw-medium",children:"Admin"}),m.jsx("span",{className:"user-role text-muted small",children:"Panel"})]})]}),m.jsxs(Nt.Menu,{className:"dropdown-menu-end",children:[m.jsxs(Nt.Item,{onClick:()=>e("/users"),children:[m.jsx("i",{className:"ti ti-users me-2"}),"Users"]}),m.jsxs(Nt.Item,{onClick:()=>e("/config"),children:[m.jsx("i",{className:"ti ti-settings me-2"}),"Settings"]}),m.jsx(Nt.Divider,{}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]})}),m.jsx("div",{className:"dropdown mobile-user-menu d-md-none",children:m.jsxs(Nt,{children:[m.jsx(Nt.Toggle,{as:"a",className:"nav-link dropdown-toggle",children:m.jsx("i",{className:"ti ti-dots-vertical"})}),m.jsxs(Nt.Menu,{children:[m.jsxs(Nt.Item,{onClick:()=>{e("/"),u()},children:[m.jsx("i",{className:"ti ti-layout-dashboard me-2"}),"Dashboard"]}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]}),m.jsx("div",{className:"sidebar",id:"sidebar",children:m.jsx("div",{className:"sidebar-inner slimscroll",children:m.jsxs("div",{id:"sidebar-menu",className:"sidebar-menu",children:[m.jsx("ul",{children:m.jsx("li",{className:"clinicdropdown",children:m.jsxs(As,{to:"/users",onClick:u,children:[m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",className:"img-fluid rounded-circle",alt:"",width:40,height:40}),m.jsxs("div",{className:"user-names",children:[m.jsx("h5",{children:"Admin"}),m.jsx("h6",{children:"YakPanel"})]})]})})}),m.jsx("ul",{children:m.jsxs("li",{children:[m.jsx("h6",{className:"submenu-hdr",children:"Main"}),m.jsx("ul",{children:iE.filter(c=>c.id!=="menuLogout").map(c=>m.jsx("li",{children:m.jsxs(As,{to:c.href,onClick:u,className:({isActive:d})=>d?"active":void 0,children:[m.jsx("i",{className:c.iconClass}),m.jsx("span",{children:c.title})]})},c.id))})]})}),m.jsx("ul",{children:m.jsx("li",{children:m.jsxs("button",{type:"button",className:"btn btn-link text-start w-100 text-decoration-none text-body py-2 border-0",onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})})})]})})}),m.jsx("div",{className:"page-wrapper",children:m.jsx("div",{className:"content",children:m.jsx(ES,{})})}),r?m.jsx("button",{type:"button",className:"position-fixed top-0 start-0 w-100 h-100 bg-dark bg-opacity-25 border-0 p-0 d-md-none",style:{zIndex:1040},"aria-label":"Close menu",onClick:u}):null,m.jsx(oE,{})]})}const Xv="/api/v1";function lE(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>t&&typeof t=="object"&&"msg"in t?String(t.msg):JSON.stringify(t)).join("; ")}async function G(e,t={}){const n=localStorage.getItem("token"),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(`${Xv}${e}`,{...t,headers:r});if(i.status===401)throw localStorage.removeItem("token"),window.location.href="/login",new Error("Unauthorized");if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||o.message||`HTTP ${i.status}`)}return i.json()}async function aE(e,t){const n=new URLSearchParams;n.set("username",e),n.set("password",t);const r=await fetch(`${Xv}/auth/login`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});if(!r.ok){const o=await r.json().catch(()=>null),u=(o?lE(o.detail):void 0)||(o&&typeof o.message=="string"?o.message:void 0)||`Login failed (${r.status})`;throw new Error(u)}const i=await r.json();return localStorage.setItem("token",i.access_token),i}async function RE(e){return G("/site/create",{method:"POST",body:JSON.stringify(e)})}async function IE(e){return G(`/site/${e}`)}async function ME(e,t){return G(`/site/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function zE(e){return G(`/site/${e}/redirects`)}async function FE(e,t,n,r=301){return G(`/site/${e}/redirects`,{method:"POST",body:JSON.stringify({source:t,target:n,code:r})})}async function BE(e,t,n="main"){return G(`/site/${e}/git/clone`,{method:"POST",body:JSON.stringify({url:t,branch:n})})}async function UE(e){return G(`/site/${e}/git/pull`,{method:"POST"})}async function WE(e,t){return G(`/site/${e}/redirects/${t}`,{method:"DELETE"})}async function VE(e,t){return G(`/site/${e}/status`,{method:"POST",body:JSON.stringify({status:t?1:0})})}async function HE(){return G("/firewall/apply",{method:"POST"})}async function KE(e){return G(`/site/${e}`,{method:"DELETE"})}async function QE(e){return G(`/site/${e}/backup`,{method:"POST"})}async function YE(e){return G(`/site/${e}/backups`)}async function XE(e,t){return G(`/site/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function GE(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/site/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function JE(e){return G(`/files/list?path=${encodeURIComponent(e)}`)}async function qE(e,t){const n=new FormData;n.append("path",e),n.append("file",t);const r=localStorage.getItem("token"),i=await fetch("/api/v1/files/upload",{method:"POST",headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||"Upload failed")}return i.json()}async function ZE(e){return G(`/files/read?path=${encodeURIComponent(e)}`)}async function eC(e,t){return G("/files/write",{method:"POST",body:JSON.stringify({path:e,content:t})})}async function tC(e,t){return G("/files/mkdir",{method:"POST",body:JSON.stringify({path:e,name:t})})}async function nC(e,t,n){return G("/files/rename",{method:"POST",body:JSON.stringify({path:e,old_name:t,new_name:n})})}async function rC(e,t,n){return G("/files/delete",{method:"POST",body:JSON.stringify({path:e,name:t,is_dir:n})})}async function iC(e){const t=localStorage.getItem("token"),n=await fetch(`/api/v1/files/download?path=${encodeURIComponent(e)}`,{headers:t?{Authorization:`Bearer ${t}`}:{}});if(!n.ok)throw new Error("Download failed");const r=await n.blob(),i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=e.split("/").pop()||"download",o.click(),URL.revokeObjectURL(i)}async function oC(e){return G(`/logs/list?path=${encodeURIComponent(e)}`)}async function sC(e,t=1e3){return G(`/logs/read?path=${encodeURIComponent(e)}&tail=${t}`)}async function lC(e,t){return G("/node/add",{method:"POST",body:JSON.stringify({script:e,name:t||""})})}async function aC(){return G("/docker/containers")}async function uC(){return G("/docker/images")}async function cC(e){return G(`/docker/pull?image=${encodeURIComponent(e)}`,{method:"POST"})}async function fC(e,t,n,r){return G("/docker/run",{method:"POST",body:JSON.stringify({image:e,name:t||"",ports:n||"",cmd:""})})}async function dC(e){return G(`/database/${e}/backup`,{method:"POST"})}async function pC(e){return G(`/database/${e}/backups`)}async function hC(e,t){return G(`/database/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function mC(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/database/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function gC(){return G("/config/test-email",{method:"POST"})}async function vC(){return G("/user/list")}async function yC(e){return G("/user/create",{method:"POST",body:JSON.stringify(e)})}async function wC(e){return G(`/user/${e}`,{method:"DELETE"})}async function _C(e){return G(`/user/${e}/toggle-active`,{method:"PUT"})}async function xC(e,t){return G("/auth/change-password",{method:"POST",body:JSON.stringify({old_password:e,new_password:t})})}async function SC(e,t){return G(`/ftp/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function kC(e,t){return G(`/database/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function EC(){return G("/dashboard/stats")}async function CC(){return G("/crontab/apply",{method:"POST"})}async function bC(e=50){return G(`/monitor/processes?limit=${e}`)}async function PC(e){return G("/plugin/add-from-url",{method:"POST",body:JSON.stringify({url:e})})}async function OC(e){return G(`/plugin/${encodeURIComponent(e)}`,{method:"DELETE"})}async function jC(){return G("/monitor/network")}async function TC(){return G("/backup/plans")}async function NC(e){return G("/backup/plans",{method:"POST",body:JSON.stringify(e)})}async function LC(e,t){return G(`/backup/plans/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function AC(e){return G(`/backup/plans/${e}`,{method:"DELETE"})}async function DC(){return G("/backup/run-scheduled",{method:"POST"})}function uE(){const[e,t]=x.useState(""),[n,r]=x.useState(""),[i,o]=x.useState(""),[l,u]=x.useState(!1),c=Ul();async function d(h){h.preventDefault(),o(""),u(!0);try{await aE(e,n),c("/")}catch(g){o(g instanceof Error?g.message:"Login failed")}finally{u(!1)}}return m.jsx("div",{className:"account-content position-relative min-vh-100 d-flex align-items-center justify-content-center p-4",children:m.jsx("div",{className:"card shadow-lg border-0",style:{maxWidth:420,width:"100%"},children:m.jsxs("div",{className:"card-body p-4 p-md-5",children:[m.jsxs("div",{className:"text-center mb-4",children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel",className:"mb-3",height:40}),m.jsx("h4",{className:"fw-bold",children:"YakPanel"}),m.jsx("p",{className:"text-muted small mb-0",children:"Sign in to continue"})]}),m.jsxs("form",{onSubmit:d,children:[i?m.jsx("div",{className:"alert alert-danger",role:"alert",children:i}):null,m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Username"}),m.jsx("input",{type:"text",value:e,onChange:h=>t(h.target.value),className:"form-control",required:!0,autoComplete:"username"})]}),m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Password"}),m.jsx("input",{type:"password",value:n,onChange:h=>r(h.target.value),className:"form-control",required:!0,autoComplete:"current-password"})]}),m.jsx("button",{type:"submit",disabled:l,className:"btn btn-primary w-100 py-2",children:l?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":!0}),"Signing in…"]}):"Login"})]}),m.jsx("p",{className:"text-center text-muted small mt-3 mb-0",children:"Default: admin / admin"}),m.jsx("p",{className:"text-center small mt-2 mb-0",children:m.jsx(sv,{to:"/install",children:"Remote SSH install (optional)"})})]})})})}function su({className:e=""}){return m.jsx("div",{className:`placeholder-glow ${e}`.trim(),children:m.jsx("span",{className:"placeholder col-12 rounded",style:{height:"1rem"}})})}function lu(){return m.jsx("div",{className:"card",children:m.jsxs("div",{className:"card-body",children:[m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"w-75"})]})})}const cE=x.lazy(()=>Me(()=>import("./DashboardPage-B3SRQ3PP.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardPage}))),fE=x.lazy(()=>Me(()=>import("./SitePage-BCHU1V0e.js"),__vite__mapDeps([4,5,1,6,7,8,3])).then(e=>({default:e.SitePage}))),dE=x.lazy(()=>Me(()=>import("./FilesPage-B-ZILwyi.js"),__vite__mapDeps([9,5,1,6,7,8,3])).then(e=>({default:e.FilesPage}))),pE=x.lazy(()=>Me(()=>import("./FtpPage-CR_nYo9X.js"),__vite__mapDeps([10,5,1,6,7,8,3])).then(e=>({default:e.FtpPage}))),hE=x.lazy(()=>Me(()=>import("./DatabasePage-CuN032AR.js"),__vite__mapDeps([11,5,1,6,7,8,3])).then(e=>({default:e.DatabasePage}))),mE=x.lazy(()=>Me(()=>import("./TerminalPage-DeHZkQDH.js"),__vite__mapDeps([12,3,13])).then(e=>({default:e.TerminalPage}))),gE=x.lazy(()=>Me(()=>import("./MonitorPage-BdTGnSW8.js"),__vite__mapDeps([14,1,7,3])).then(e=>({default:e.MonitorPage}))),vE=x.lazy(()=>Me(()=>import("./CrontabPage-DeEqYskK.js"),__vite__mapDeps([15,5,1,6,7,8,3])).then(e=>({default:e.CrontabPage}))),yE=x.lazy(()=>Me(()=>import("./ConfigPage-BIvuvwCK.js"),__vite__mapDeps([16,1,6,2,3])).then(e=>({default:e.ConfigPage}))),wE=x.lazy(()=>Me(()=>import("./LogsPage-B9d2xgc8.js"),__vite__mapDeps([17,1,6,3])).then(e=>({default:e.LogsPage}))),_E=x.lazy(()=>Me(()=>import("./FirewallPage-DfITVzrM.js"),__vite__mapDeps([18,5,1,6,7,8,3])).then(e=>({default:e.FirewallPage}))),xE=x.lazy(()=>Me(()=>import("./DomainsPage-CMAJOz1U.js"),__vite__mapDeps([19,5,1,6,3])).then(e=>({default:e.DomainsPage}))),SE=x.lazy(()=>Me(()=>import("./DockerPage-CbiMbPMF.js"),__vite__mapDeps([20,5,1,6,7,8,3])).then(e=>({default:e.DockerPage}))),kE=x.lazy(()=>Me(()=>import("./NodePage-BJ5-7-Pe.js"),__vite__mapDeps([21,5,1,6,7,8,3])).then(e=>({default:e.NodePage}))),EE=x.lazy(()=>Me(()=>import("./SoftPage-CPYGL35O.js"),__vite__mapDeps([22,1,6,3])).then(e=>({default:e.SoftPage}))),CE=x.lazy(()=>Me(()=>import("./ServicesPage-Nd6NZHlM.js"),__vite__mapDeps([23,1,6,7,3])).then(e=>({default:e.ServicesPage}))),bE=x.lazy(()=>Me(()=>import("./PluginsPage-B0GLsKVW.js"),__vite__mapDeps([24,5,1,6,3])).then(e=>({default:e.PluginsPage}))),PE=x.lazy(()=>Me(()=>import("./BackupPlansPage-CbIqdsVx.js"),__vite__mapDeps([25,5,1,6,7,8,3])).then(e=>({default:e.BackupPlansPage}))),OE=x.lazy(()=>Me(()=>import("./UsersPage-D9g-1mf8.js"),__vite__mapDeps([26,5,1,6,7,3])).then(e=>({default:e.UsersPage}))),jE=x.lazy(()=>Me(()=>import("./RemoteInstallPage-CH-5kpB6.js"),__vite__mapDeps([27,1,6])).then(e=>({default:e.RemoteInstallPage})));function Re(){return m.jsxs("div",{className:"row g-3",children:[m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})})]})}function TE({children:e}){return localStorage.getItem("token")?m.jsx(m.Fragment,{children:e}):m.jsx(iv,{to:"/login",replace:!0})}function NE(){return m.jsx(KS,{children:m.jsxs(bS,{children:[m.jsx(we,{path:"/login",element:m.jsx(uE,{})}),m.jsx(we,{path:"/install",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(jE,{})})}),m.jsxs(we,{path:"/",element:m.jsx(TE,{children:m.jsx(sE,{})}),children:[m.jsx(we,{index:!0,element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(cE,{})})}),m.jsx(we,{path:"site",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(fE,{})})}),m.jsx(we,{path:"ftp",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(pE,{})})}),m.jsx(we,{path:"database",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(hE,{})})}),m.jsx(we,{path:"docker",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(SE,{})})}),m.jsx(we,{path:"control",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(gE,{})})}),m.jsx(we,{path:"firewall",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(_E,{})})}),m.jsx(we,{path:"files",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(dE,{})})}),m.jsx(we,{path:"node",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(kE,{})})}),m.jsx(we,{path:"logs",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(wE,{})})}),m.jsx(we,{path:"ssl_domain",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(xE,{})})}),m.jsx(we,{path:"xterm",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(mE,{})})}),m.jsx(we,{path:"crontab",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(vE,{})})}),m.jsx(we,{path:"soft",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(EE,{})})}),m.jsx(we,{path:"config",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(yE,{})})}),m.jsx(we,{path:"services",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(CE,{})})}),m.jsx(we,{path:"plugins",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(bE,{})})}),m.jsx(we,{path:"backup-plans",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(PE,{})})}),m.jsx(we,{path:"users",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(OE,{})})})]}),m.jsx(we,{path:"/logout",element:m.jsx(LE,{})}),m.jsx(we,{path:"*",element:m.jsx(iv,{to:"/",replace:!0})})]})})}function LE(){return localStorage.removeItem("token"),window.location.href="/login",null}au.createRoot(document.getElementById("root")).render(m.jsx(wn.StrictMode,{children:m.jsx(DS,{children:m.jsx(NE,{})})}));export{_C as $,SC as A,pC as B,dC as C,mC as D,hC as E,kC as F,bC as G,jC as H,CC as I,gC as J,xC as K,sC as L,oC as M,HE as N,aC as O,uC as P,cC as Q,fC as R,lC as S,PC as T,OC as U,TC as V,DC as W,AC as X,LC as Y,NC as Z,vC as _,G as a,wC as a0,yC as a1,kl as a2,dk as a3,wn as a4,AE as a5,Bk as a6,$s as a7,Bv as a8,nr as a9,dv as aa,Lv as ab,Fk as ac,Xn as ad,t1 as ae,GS as af,Ph as ag,mh as ah,ir as ai,Qk as aj,Gk as ak,fk as al,pv as am,Di as an,sv as ao,IE as b,RE as c,YE as d,KE as e,BE as f,EC as g,UE as h,FE as i,m as j,WE as k,zE as l,QE as m,GE as n,XE as o,JE as p,qE as q,x as r,VE as s,tC as t,ME as u,nC as v,eC as w,ZE as x,iC as y,rC as z}; +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",l=0;l{const[d,...h]=c;let g=n==null?void 0:n(d,...h);return o(d),g},[n])]}function JS(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e}),t.current}function GS(){const[,e]=x.useReducer(t=>t+1,0);return e}function qS(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t}function Xn(e){const t=qS(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function ZS(e,t,n,r=!1){const i=Xn(n);x.useEffect(()=>{const o=typeof e=="function"?e():e;return o.addEventListener(t,i,r),()=>o.removeEventListener(t,i,r)},[e])}const Vl=x.createContext(null);function e1(){return x.useState(null)}var gh=Object.prototype.hasOwnProperty;function vh(e,t,n){for(n of e.keys())if(ho(n,t))return n}function ho(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ho(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=vh(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=vh(t,i),!i)||!ho(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(gh.call(e,n)&&++r&&!gh.call(t,n)||!(n in t)||!ho(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function t1(){const e=x.useRef(!0),t=x.useRef(()=>e.current);return x.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function n1(e){const t=t1();return[e[0],x.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var dt="top",Mt="bottom",zt="right",pt="left",uf="auto",Wo=[dt,Mt,zt,pt],Ci="start",Ro="end",r1="clippingParents",hv="viewport",Zi="popper",i1="reference",yh=Wo.reduce(function(e,t){return e.concat([t+"-"+Ci,t+"-"+Ro])},[]),mv=[].concat(Wo,[uf]).reduce(function(e,t){return e.concat([t,t+"-"+Ci,t+"-"+Ro])},[]),o1="beforeRead",s1="read",l1="afterRead",a1="beforeMain",u1="main",c1="afterMain",f1="beforeWrite",d1="write",p1="afterWrite",h1=[o1,s1,l1,a1,u1,c1,f1,d1,p1];function ln(e){return e.split("-")[0]}function St(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Nr(e){var t=St(e).Element;return e instanceof t||e instanceof Element}function an(e){var t=St(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function cf(e){if(typeof ShadowRoot>"u")return!1;var t=St(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Cr=Math.max,Sl=Math.min,bi=Math.round;function lc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function gv(){return!/^((?!chrome|android).)*safari/i.test(lc())}function Pi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&an(e)&&(i=e.offsetWidth>0&&bi(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&bi(r.height)/e.offsetHeight||1);var l=Nr(e)?St(e):window,u=l.visualViewport,c=!gv()&&n,d=(r.left+(c&&u?u.offsetLeft:0))/i,h=(r.top+(c&&u?u.offsetTop:0))/o,g=r.width/i,_=r.height/o;return{width:g,height:_,top:h,right:d+g,bottom:h+_,left:d,x:d,y:h}}function ff(e){var t=Pi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function vv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&cf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qn(e){return e?(e.nodeName||"").toLowerCase():null}function En(e){return St(e).getComputedStyle(e)}function m1(e){return["table","td","th"].indexOf(qn(e))>=0}function rr(e){return((Nr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hl(e){return qn(e)==="html"?e:e.assignedSlot||e.parentNode||(cf(e)?e.host:null)||rr(e)}function wh(e){return!an(e)||En(e).position==="fixed"?null:e.offsetParent}function g1(e){var t=/firefox/i.test(lc()),n=/Trident/i.test(lc());if(n&&an(e)){var r=En(e);if(r.position==="fixed")return null}var i=Hl(e);for(cf(i)&&(i=i.host);an(i)&&["html","body"].indexOf(qn(i))<0;){var o=En(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Vo(e){for(var t=St(e),n=wh(e);n&&m1(n)&&En(n).position==="static";)n=wh(n);return n&&(qn(n)==="html"||qn(n)==="body"&&En(n).position==="static")?t:n||g1(e)||t}function df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function mo(e,t,n){return Cr(e,Sl(t,n))}function v1(e,t,n){var r=mo(e,t,n);return r>n?n:r}function yv(){return{top:0,right:0,bottom:0,left:0}}function wv(e){return Object.assign({},yv(),e)}function _v(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var y1=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,wv(typeof t!="number"?t:_v(t,Wo))};function w1(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,l=n.modifiersData.popperOffsets,u=ln(n.placement),c=df(u),d=[pt,zt].indexOf(u)>=0,h=d?"height":"width";if(!(!o||!l)){var g=y1(i.padding,n),_=ff(o),S=c==="y"?dt:pt,C=c==="y"?Mt:zt,O=n.rects.reference[h]+n.rects.reference[c]-l[c]-n.rects.popper[h],P=l[c]-n.rects.reference[c],y=Vo(o),v=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,w=O/2-P/2,b=g[S],N=v-_[h]-g[C],A=v/2-_[h]/2+w,D=mo(b,A,N),$=c;n.modifiersData[r]=(t={},t[$]=D,t.centerOffset=D-A,t)}}function _1(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||vv(t.elements.popper,i)&&(t.elements.arrow=i))}const x1={name:"arrow",enabled:!0,phase:"main",fn:w1,effect:_1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Oi(e){return e.split("-")[1]}var S1={top:"auto",right:"auto",bottom:"auto",left:"auto"};function k1(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:bi(n*i)/i||0,y:bi(r*i)/i||0}}function _h(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,l=e.offsets,u=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,g=e.isFixed,_=l.x,S=_===void 0?0:_,C=l.y,O=C===void 0?0:C,P=typeof h=="function"?h({x:S,y:O}):{x:S,y:O};S=P.x,O=P.y;var y=l.hasOwnProperty("x"),v=l.hasOwnProperty("y"),w=pt,b=dt,N=window;if(d){var A=Vo(n),D="clientHeight",$="clientWidth";if(A===St(n)&&(A=rr(n),En(A).position!=="static"&&u==="absolute"&&(D="scrollHeight",$="scrollWidth")),A=A,i===dt||(i===pt||i===zt)&&o===Ro){b=Mt;var H=g&&A===N&&N.visualViewport?N.visualViewport.height:A[D];O-=H-r.height,O*=c?1:-1}if(i===pt||(i===dt||i===Mt)&&o===Ro){w=zt;var F=g&&A===N&&N.visualViewport?N.visualViewport.width:A[$];S-=F-r.width,S*=c?1:-1}}var Y=Object.assign({position:u},d&&S1),ee=h===!0?k1({x:S,y:O},St(n)):{x:S,y:O};if(S=ee.x,O=ee.y,c){var ne;return Object.assign({},Y,(ne={},ne[b]=v?"0":"",ne[w]=y?"0":"",ne.transform=(N.devicePixelRatio||1)<=1?"translate("+S+"px, "+O+"px)":"translate3d("+S+"px, "+O+"px, 0)",ne))}return Object.assign({},Y,(t={},t[b]=v?O+"px":"",t[w]=y?S+"px":"",t.transform="",t))}function E1(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,l=o===void 0?!0:o,u=n.roundOffsets,c=u===void 0?!0:u,d={placement:ln(t.placement),variation:Oi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_h(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_h(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const C1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:E1,data:{}};var Ds={passive:!0};function b1(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,l=r.resize,u=l===void 0?!0:l,c=St(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Ds)}),u&&c.addEventListener("resize",n.update,Ds),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Ds)}),u&&c.removeEventListener("resize",n.update,Ds)}}const P1={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:b1,data:{}};var O1={left:"right",right:"left",bottom:"top",top:"bottom"};function Xs(e){return e.replace(/left|right|bottom|top/g,function(t){return O1[t]})}var j1={start:"end",end:"start"};function xh(e){return e.replace(/start|end/g,function(t){return j1[t]})}function pf(e){var t=St(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function hf(e){return Pi(rr(e)).left+pf(e).scrollLeft}function T1(e,t){var n=St(e),r=rr(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,u=0,c=0;if(i){o=i.width,l=i.height;var d=gv();(d||!d&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:l,x:u+hf(e),y:c}}function N1(e){var t,n=rr(e),r=pf(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Cr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=Cr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+hf(e),c=-r.scrollTop;return En(i||n).direction==="rtl"&&(u+=Cr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:l,x:u,y:c}}function mf(e){var t=En(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function xv(e){return["html","body","#document"].indexOf(qn(e))>=0?e.ownerDocument.body:an(e)&&mf(e)?e:xv(Hl(e))}function go(e,t){var n;t===void 0&&(t=[]);var r=xv(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=St(r),l=i?[o].concat(o.visualViewport||[],mf(r)?r:[]):r,u=t.concat(l);return i?u:u.concat(go(Hl(l)))}function ac(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function L1(e,t){var n=Pi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Sh(e,t,n){return t===hv?ac(T1(e,n)):Nr(t)?L1(t,n):ac(N1(rr(e)))}function A1(e){var t=go(Hl(e)),n=["absolute","fixed"].indexOf(En(e).position)>=0,r=n&&an(e)?Vo(e):e;return Nr(r)?t.filter(function(i){return Nr(i)&&vv(i,r)&&qn(i)!=="body"}):[]}function D1(e,t,n,r){var i=t==="clippingParents"?A1(e):[].concat(t),o=[].concat(i,[n]),l=o[0],u=o.reduce(function(c,d){var h=Sh(e,d,r);return c.top=Cr(h.top,c.top),c.right=Sl(h.right,c.right),c.bottom=Sl(h.bottom,c.bottom),c.left=Cr(h.left,c.left),c},Sh(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Sv(e){var t=e.reference,n=e.element,r=e.placement,i=r?ln(r):null,o=r?Oi(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,c;switch(i){case dt:c={x:l,y:t.y-n.height};break;case Mt:c={x:l,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:u};break;case pt:c={x:t.x-n.width,y:u};break;default:c={x:t.x,y:t.y}}var d=i?df(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Ci:c[d]=c[d]-(t[h]/2-n[h]/2);break;case Ro:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function Io(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,l=o===void 0?e.strategy:o,u=n.boundary,c=u===void 0?r1:u,d=n.rootBoundary,h=d===void 0?hv:d,g=n.elementContext,_=g===void 0?Zi:g,S=n.altBoundary,C=S===void 0?!1:S,O=n.padding,P=O===void 0?0:O,y=wv(typeof P!="number"?P:_v(P,Wo)),v=_===Zi?i1:Zi,w=e.rects.popper,b=e.elements[C?v:_],N=D1(Nr(b)?b:b.contextElement||rr(e.elements.popper),c,h,l),A=Pi(e.elements.reference),D=Sv({reference:A,element:w,placement:i}),$=ac(Object.assign({},w,D)),H=_===Zi?$:A,F={top:N.top-H.top+y.top,bottom:H.bottom-N.bottom+y.bottom,left:N.left-H.left+y.left,right:H.right-N.right+y.right},Y=e.modifiersData.offset;if(_===Zi&&Y){var ee=Y[i];Object.keys(F).forEach(function(ne){var xe=[zt,Mt].indexOf(ne)>=0?1:-1,De=[dt,Mt].indexOf(ne)>=0?"y":"x";F[ne]+=ee[De]*xe})}return F}function $1(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,l=n.padding,u=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?mv:c,h=Oi(r),g=h?u?yh:yh.filter(function(C){return Oi(C)===h}):Wo,_=g.filter(function(C){return d.indexOf(C)>=0});_.length===0&&(_=g);var S=_.reduce(function(C,O){return C[O]=Io(e,{placement:O,boundary:i,rootBoundary:o,padding:l})[ln(O)],C},{});return Object.keys(S).sort(function(C,O){return S[C]-S[O]})}function R1(e){if(ln(e)===uf)return[];var t=Xs(e);return[xh(e),t,xh(t)]}function I1(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!0:l,c=n.fallbackPlacements,d=n.padding,h=n.boundary,g=n.rootBoundary,_=n.altBoundary,S=n.flipVariations,C=S===void 0?!0:S,O=n.allowedAutoPlacements,P=t.options.placement,y=ln(P),v=y===P,w=c||(v||!C?[Xs(P)]:R1(P)),b=[P].concat(w).reduce(function(Ue,Oe){return Ue.concat(ln(Oe)===uf?$1(t,{placement:Oe,boundary:h,rootBoundary:g,padding:d,flipVariations:C,allowedAutoPlacements:O}):Oe)},[]),N=t.rects.reference,A=t.rects.popper,D=new Map,$=!0,H=b[0],F=0;F=0,De=xe?"width":"height",ke=Io(t,{placement:Y,boundary:h,rootBoundary:g,altBoundary:_,padding:d}),$e=xe?ne?zt:pt:ne?Mt:dt;N[De]>A[De]&&($e=Xs($e));var M=Xs($e),X=[];if(o&&X.push(ke[ee]<=0),u&&X.push(ke[$e]<=0,ke[M]<=0),X.every(function(Ue){return Ue})){H=Y,$=!1;break}D.set(Y,X)}if($)for(var V=C?3:1,T=function(Oe){var ze=b.find(function(Ne){var Ft=D.get(Ne);if(Ft)return Ft.slice(0,Oe).every(function(K){return K})});if(ze)return H=ze,"break"},de=V;de>0;de--){var Ct=T(de);if(Ct==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const M1={name:"flip",enabled:!0,phase:"main",fn:I1,requiresIfExists:["offset"],data:{_skip:!1}};function kh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Eh(e){return[dt,zt,Mt,pt].some(function(t){return e[t]>=0})}function z1(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,l=Io(t,{elementContext:"reference"}),u=Io(t,{altBoundary:!0}),c=kh(l,r),d=kh(u,i,o),h=Eh(c),g=Eh(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const F1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:z1};function B1(e,t,n){var r=ln(e),i=[pt,dt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=o[0],u=o[1];return l=l||0,u=(u||0)*i,[pt,zt].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function U1(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,l=mv.reduce(function(h,g){return h[g]=B1(g,t.rects,o),h},{}),u=l[t.placement],c=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=l}const W1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:U1};function V1(e){var t=e.state,n=e.name;t.modifiersData[n]=Sv({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const H1={name:"popperOffsets",enabled:!0,phase:"read",fn:V1,data:{}};function K1(e){return e==="x"?"y":"x"}function Q1(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!1:l,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,g=n.padding,_=n.tether,S=_===void 0?!0:_,C=n.tetherOffset,O=C===void 0?0:C,P=Io(t,{boundary:c,rootBoundary:d,padding:g,altBoundary:h}),y=ln(t.placement),v=Oi(t.placement),w=!v,b=df(y),N=K1(b),A=t.modifiersData.popperOffsets,D=t.rects.reference,$=t.rects.popper,H=typeof O=="function"?O(Object.assign({},t.rects,{placement:t.placement})):O,F=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(A){if(o){var ne,xe=b==="y"?dt:pt,De=b==="y"?Mt:zt,ke=b==="y"?"height":"width",$e=A[b],M=$e+P[xe],X=$e-P[De],V=S?-$[ke]/2:0,T=v===Ci?D[ke]:$[ke],de=v===Ci?-$[ke]:-D[ke],Ct=t.elements.arrow,Ue=S&&Ct?ff(Ct):{width:0,height:0},Oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yv(),ze=Oe[xe],Ne=Oe[De],Ft=mo(0,D[ke],Ue[ke]),K=w?D[ke]/2-V-Ft-ze-F.mainAxis:T-Ft-ze-F.mainAxis,Dr=w?-D[ke]/2+V+Ft+Ne+F.mainAxis:de+Ft+Ne+F.mainAxis,$r=t.elements.arrow&&Vo(t.elements.arrow),Kl=$r?b==="y"?$r.clientTop||0:$r.clientLeft||0:0,Ko=(ne=Y==null?void 0:Y[b])!=null?ne:0,or=$e+K-Ko-Kl,Qo=$e+Dr-Ko,On=mo(S?Sl(M,or):M,$e,S?Cr(X,Qo):X);A[b]=On,ee[b]=On-$e}if(u){var un,Ql=b==="x"?dt:pt,Yl=b==="x"?Mt:zt,cn=A[N],Rr=N==="y"?"height":"width",Yo=cn+P[Ql],Xo=cn-P[Yl],$i=[dt,pt].indexOf(y)!==-1,sr=(un=Y==null?void 0:Y[N])!=null?un:0,Bt=$i?Yo:cn-D[Rr]-$[Rr]-sr+F.altAxis,Ri=$i?cn+D[Rr]+$[Rr]-sr-F.altAxis:Xo,Jo=S&&$i?v1(Bt,cn,Ri):mo(S?Bt:Yo,cn,S?Ri:Xo);A[N]=Jo,ee[N]=Jo-cn}t.modifiersData[r]=ee}}const Y1={name:"preventOverflow",enabled:!0,phase:"main",fn:Q1,requiresIfExists:["offset"]};function X1(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function J1(e){return e===St(e)||!an(e)?pf(e):X1(e)}function G1(e){var t=e.getBoundingClientRect(),n=bi(t.width)/e.offsetWidth||1,r=bi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function q1(e,t,n){n===void 0&&(n=!1);var r=an(t),i=an(t)&&G1(t),o=rr(t),l=Pi(e,i,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((qn(t)!=="body"||mf(o))&&(u=J1(t)),an(t)?(c=Pi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=hf(o))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function Z1(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var l=[].concat(o.requires||[],o.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var c=t.get(u);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ek(e){var t=Z1(e);return h1.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function tk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function nk(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ch={placement:"bottom",modifiers:[],strategy:"absolute"};function bh(){for(var e=arguments.length,t=new Array(e),n=0;n=0)continue;n[r]=e[r]}return n}const lk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},ak={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(i=>i.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,i=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&i==="tooltip"&&"setAttribute"in r){const o=r.getAttribute("aria-describedby");if(o&&o.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",o?`${o},${n.id}`:n.id)}}},uk=[];function ck(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:o="absolute",modifiers:l=uk}=n,u=sk(n,ok);const c=x.useRef(l),d=x.useRef(),h=x.useCallback(()=>{var P;(P=d.current)==null||P.update()},[]),g=x.useCallback(()=>{var P;(P=d.current)==null||P.forceUpdate()},[]),[_,S]=n1(x.useState({placement:i,update:h,forceUpdate:g,attributes:{},styles:{popper:{},arrow:{}}})),C=x.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:P})=>{const y={},v={};Object.keys(P.elements).forEach(w=>{y[w]=P.styles[w],v[w]=P.attributes[w]}),S({state:P,styles:y,attributes:v,update:h,forceUpdate:g,placement:P.placement})}}),[h,g,S]),O=x.useMemo(()=>(ho(c.current,l)||(c.current=l),c.current),[l]);return x.useEffect(()=>{!d.current||!r||d.current.setOptions({placement:i,strategy:o,modifiers:[...O,C,lk]})},[o,i,C,r,O]),x.useEffect(()=>{if(!(!r||e==null||t==null))return d.current=ik(e,t,Object.assign({},u,{placement:i,strategy:o,modifiers:[...O,ak,C]})),()=>{d.current!=null&&(d.current.destroy(),d.current=void 0,S(P=>Object.assign({},P,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),_}function Ph(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function fk(e,t,n,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function $s(e,t,n,r){return pv(e,t,n,r),function(){fk(e,t,n,r)}}function dk(e){return e&&e.ownerDocument||document}var pk=function(){},hk=pk;const mk=kl(hk),Oh=()=>{};function gk(e){return e.button===0}function vk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const ru=e=>e&&("current"in e?e.current:e),jh={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function yk(e,t=Oh,{disabled:n,clickTrigger:r="click"}={}){const i=x.useRef(!1),o=x.useRef(!1),l=x.useCallback(d=>{const h=ru(e);mk(!!h,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!h||vk(d)||!gk(d)||!!Ph(h,d.target)||o.current,o.current=!1},[e]),u=Xn(d=>{const h=ru(e);h&&Ph(h,d.target)?o.current=!0:o.current=!1}),c=Xn(d=>{i.current||t(d)});x.useEffect(()=>{var d,h;if(n||e==null)return;const g=dk(ru(e)),_=g.defaultView||window;let S=(d=_.event)!=null?d:(h=_.parent)==null?void 0:h.event,C=null;jh[r]&&(C=$s(g,jh[r],u,!0));const O=$s(g,r,l,!0),P=$s(g,r,v=>{if(v===S){S=void 0;return}c(v)});let y=[];return"ontouchstart"in g.documentElement&&(y=[].slice.call(g.body.children).map(v=>$s(v,"mousemove",Oh))),()=>{C==null||C(),O(),P(),y.forEach(v=>v())}},[e,n,r,l,u,c])}function wk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function _k(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function xk({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:o,containerPadding:l,arrowElement:u,popperConfig:c={}}){var d,h,g,_,S;const C=wk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:o?"fixed":c.strategy,modifiers:_k(Object.assign({},C,{eventListeners:{enabled:t,options:(d=C.eventListeners)==null?void 0:d.options},preventOverflow:Object.assign({},C.preventOverflow,{options:l?Object.assign({padding:l},(h=C.preventOverflow)==null?void 0:h.options):(g=C.preventOverflow)==null?void 0:g.options}),offset:{options:Object.assign({offset:i},(_=C.offset)==null?void 0:_.options)},arrow:Object.assign({},C.arrow,{enabled:!!u,options:Object.assign({},(S=C.arrow)==null?void 0:S.options,{element:u})}),flip:Object.assign({enabled:!!r},C.flip)}))})}const Sk=["children","usePopper"];function kk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Ek=()=>{};function kv(e={}){const t=x.useContext(Vl),[n,r]=e1(),i=x.useRef(!1),{flip:o,offset:l,rootCloseEvent:u,fixed:c=!1,placement:d,popperConfig:h={},enableEventListeners:g=!0,usePopper:_=!!t}=e,S=(t==null?void 0:t.show)==null?!!e.show:t.show;S&&!i.current&&(i.current=!0);const C=A=>{t==null||t.toggle(!1,A)},{placement:O,setMenu:P,menuElement:y,toggleElement:v}=t||{},w=ck(v,y,xk({placement:d||O||"bottom-start",enabled:_,enableEvents:g??S,offset:l,flip:o,fixed:c,arrowElement:n,popperConfig:h})),b=Object.assign({ref:P||Ek,"aria-labelledby":v==null?void 0:v.id},w.attributes.popper,{style:w.styles.popper}),N={show:S,placement:O,hasShown:i.current,toggle:t==null?void 0:t.toggle,popper:_?w:null,arrowProps:_?Object.assign({ref:r},w.attributes.arrow,{style:w.styles.arrow}):{}};return yk(y,C,{clickTrigger:u,disabled:!S}),[b,N]}function Ev(e){let{children:t,usePopper:n=!0}=e,r=kk(e,Sk);const[i,o]=kv(Object.assign({},r,{usePopper:n}));return m.jsx(m.Fragment,{children:t(i,o)})}Ev.displayName="DropdownMenu";const Cv={prefix:String(Math.round(Math.random()*1e10)),current:0},bv=wn.createContext(Cv),Ck=wn.createContext(!1);let iu=new WeakMap;function bk(e=!1){let t=x.useContext(bv),n=x.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=iu.get(o);l==null?iu.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==l.state&&(t.current=l.id,iu.delete(o))}n.current=++t.current}return n.current}function Pk(e){let t=x.useContext(bv),n=bk(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Ok(e){let t=wn.useId(),[n]=x.useState(Ak()),r=n?"react-aria":`react-aria${Cv.prefix}`;return e||`${r}-${t}`}const jk=typeof wn.useId=="function"?Ok:Pk;function Tk(){return!1}function Nk(){return!0}function Lk(e){return()=>{}}function Ak(){return typeof wn.useSyncExternalStore=="function"?wn.useSyncExternalStore(Lk,Tk,Nk):x.useContext(Ck)}const Pv=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Th=()=>{};function Ov(){const e=jk(),{show:t=!1,toggle:n=Th,setToggle:r,menuElement:i}=x.useContext(Vl)||{},o=x.useCallback(u=>{n(!t,u)},[t,n]),l={id:e,ref:r||Th,onClick:o,"aria-expanded":!!t};return i&&Pv(i)&&(l["aria-haspopup"]=!0),[l,{show:t,toggle:n}]}function jv({children:e}){const[t,n]=Ov();return m.jsx(m.Fragment,{children:e(t,n)})}jv.displayName="DropdownToggle";const uc=x.createContext(null),Nh=(e,t=null)=>e!=null?String(e):t||null,Tv=x.createContext(null);Tv.displayName="NavContext";const Dk=["as","disabled"];function $k(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rk(e){return!e||e.trim()==="#"}function gf({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:l,tabIndex:u=0,type:c}){e||(n!=null||r!=null||i!=null?e="a":e="button");const d={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},d];const h=_=>{if((t||e==="a"&&Rk(n))&&_.preventDefault(),t){_.stopPropagation();return}l==null||l(_)},g=_=>{_.key===" "&&(_.preventDefault(),h(_))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:t?void 0:u,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:h,onKeyDown:g},d]}const Nv=x.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=$k(e,Dk);const[o,{tagName:l}]=gf(Object.assign({tagName:n,disabled:r},i));return m.jsx(l,Object.assign({},i,o,{ref:t}))});Nv.displayName="Button";const Ik="data-rr-ui-";function Lv(e){return`${Ik}${e}`}const Mk=["eventKey","disabled","onClick","active","as"];function zk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Av({key:e,href:t,active:n,disabled:r,onClick:i}){const o=x.useContext(uc),l=x.useContext(Tv),{activeKey:u}=l||{},c=Nh(e,t),d=n==null&&e!=null?Nh(u)===c:n;return[{onClick:Xn(g=>{r||(i==null||i(g),o&&!g.isPropagationStopped()&&o(c,g))}),"aria-disabled":r||void 0,"aria-selected":d,[Lv("dropdown-item")]:""},{isActive:d}]}const Dv=x.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:o,as:l=Nv}=e,u=zk(e,Mk);const[c]=Av({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,Object.assign({},u,{ref:t},c))});Dv.displayName="DropdownItem";const $v=x.createContext(dv?window:void 0);$v.Provider;function Fk(){return x.useContext($v)}function Lh(){const e=GS(),t=x.useRef(null),n=x.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Ho({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${Lv("dropdown-item")}]`,focusFirstItemOnShow:o,placement:l="bottom-start",children:u}){const c=Fk(),[d,h]=XS(t,e,r),[g,_]=Lh(),S=g.current,[C,O]=Lh(),P=C.current,y=JS(d),v=x.useRef(null),w=x.useRef(!1),b=x.useContext(uc),N=x.useCallback((Y,ee,ne=ee==null?void 0:ee.type)=>{h(Y,{originalEvent:ee,source:ne})},[h]),A=Xn((Y,ee)=>{n==null||n(Y,ee),N(!1,ee,"select"),ee.isPropagationStopped()||b==null||b(Y,ee)}),D=x.useMemo(()=>({toggle:N,placement:l,show:d,menuElement:S,toggleElement:P,setMenu:_,setToggle:O}),[N,l,d,S,P,_,O]);S&&y&&!d&&(w.current=S.contains(S.ownerDocument.activeElement));const $=Xn(()=>{P&&P.focus&&P.focus()}),H=Xn(()=>{const Y=v.current;let ee=o;if(ee==null&&(ee=g.current&&Pv(g.current)?"keyboard":!1),ee===!1||ee==="keyboard"&&!/^key.+$/.test(Y))return;const ne=mh(g.current,i)[0];ne&&ne.focus&&ne.focus()});x.useEffect(()=>{d?H():w.current&&(w.current=!1,$())},[d,w,$,H]),x.useEffect(()=>{v.current=null});const F=(Y,ee)=>{if(!g.current)return null;const ne=mh(g.current,i);let xe=ne.indexOf(Y)+ee;return xe=Math.max(0,Math.min(xe,ne.length)),ne[xe]};return ZS(x.useCallback(()=>c.document,[c]),"keydown",Y=>{var ee,ne;const{key:xe}=Y,De=Y.target,ke=(ee=g.current)==null?void 0:ee.contains(De),$e=(ne=C.current)==null?void 0:ne.contains(De);if(/input|textarea/i.test(De.tagName)&&(xe===" "||xe!=="Escape"&&ke||xe==="Escape"&&De.type==="search")||!ke&&!$e||xe==="Tab"&&(!g.current||!d))return;v.current=Y.type;const X={originalEvent:Y,source:Y.type};switch(xe){case"ArrowUp":{const V=F(De,-1);V&&V.focus&&V.focus(),Y.preventDefault();return}case"ArrowDown":if(Y.preventDefault(),!d)h(!0,X);else{const V=F(De,1);V&&V.focus&&V.focus()}return;case"Tab":pv(De.ownerDocument,"keyup",V=>{var T;(V.key==="Tab"&&!V.target||!((T=g.current)!=null&&T.contains(V.target)))&&h(!1,X)},{once:!0});break;case"Escape":xe==="Escape"&&(Y.preventDefault(),Y.stopPropagation()),h(!1,X);break}}),m.jsx(uc.Provider,{value:A,children:m.jsx(Vl.Provider,{value:D,children:u})})}Ho.displayName="Dropdown";Ho.Menu=Ev;Ho.Toggle=jv;Ho.Item=Dv;function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?h-1:0),_=1;_{t.current=e},[e]),t}function Qk(e){const t=Kk(e);return x.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const vf=x.createContext({});vf.displayName="DropdownContext";const Yk=["xxl","xl","lg","md","sm","xs"],Xk="xs",yf=x.createContext({prefixes:{},breakpoints:Yk,minBreakpoint:Xk}),{Consumer:DE,Provider:$E}=yf;function ir(e,t){const{prefixes:n}=x.useContext(yf);return e||n[t]||t}function Jk(){const{dir:e}=x.useContext(yf);return e==="rtl"}const Rv=x.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...i},o)=>(t=ir(t,"dropdown-divider"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Rv.displayName="DropdownDivider";const Iv=x.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...i},o)=>(t=ir(t,"dropdown-header"),m.jsx(n,{ref:o,className:nr(e,t),role:r,...i})));Iv.displayName="DropdownHeader";const Gk=["onKeyDown"];function qk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zk(e){return!e||e.trim()==="#"}const Mv=x.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=qk(e,Gk);const[i]=gf(Object.assign({tagName:"a"},r)),o=Xn(l=>{i.onKeyDown(l),n==null||n(l)});return Zk(r.href)||r.role==="button"?m.jsx("a",Object.assign({ref:t},r,i,{onKeyDown:o})):m.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Mv.displayName="Anchor";const zv=x.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:i,active:o,as:l=Mv,...u},c)=>{const d=ir(e,"dropdown-item"),[h,g]=Av({key:n,href:u.href,disabled:r,onClick:i,active:o});return m.jsx(l,{...u,...h,ref:c,className:nr(t,d,g.isActive&&"active",r&&"disabled")})});zv.displayName="DropdownItem";const Fv=x.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},i)=>(t=ir(t,"dropdown-item-text"),m.jsx(n,{ref:i,className:nr(e,t),...r})));Fv.displayName="DropdownItemText";const eE=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",tE=typeof document<"u",nE=tE||eE?x.useLayoutEffect:x.useEffect,Dh=e=>!e||typeof e=="function"?e:t=>{e.current=t};function rE(e,t){const n=Dh(e),r=Dh(t);return i=>{n&&n(i),r&&r(i)}}function Bv(e,t){return x.useMemo(()=>rE(e,t),[e,t])}const wf=x.createContext(null);wf.displayName="InputGroupContext";const Uv=x.createContext(null);Uv.displayName="NavbarContext";function Wv(e,t){return e}function Vv(e,t,n){const r=n?"top-end":"top-start",i=n?"top-start":"top-end",o=n?"bottom-end":"bottom-start",l=n?"bottom-start":"bottom-end",u=n?"right-start":"left-start",c=n?"right-end":"left-end",d=n?"left-start":"right-start",h=n?"left-end":"right-end";let g=e?l:o;return t==="up"?g=e?i:r:t==="end"?g=e?h:d:t==="start"?g=e?c:u:t==="down-centered"?g="bottom":t==="up-centered"&&(g="top"),g}const Hv=x.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:i=!0,show:o,renderOnMount:l,as:u="div",popperConfig:c,variant:d,...h},g)=>{let _=!1;const S=x.useContext(Uv),C=ir(e,"dropdown-menu"),{align:O,drop:P,isRTL:y}=x.useContext(vf);n=n||O;const v=x.useContext(wf),w=[];if(n)if(typeof n=="object"){const Y=Object.keys(n);if(Y.length){const ee=Y[0],ne=n[ee];_=ne==="start",w.push(`${C}-${ee}-${ne}`)}}else n==="end"&&(_=!0);const b=Vv(_,P,y),[N,{hasShown:A,popper:D,show:$,toggle:H}]=kv({flip:i,rootCloseEvent:r,show:o,usePopper:!S&&w.length===0,offset:[0,2],popperConfig:c,placement:b});if(N.ref=Bv(Wv(g),N.ref),nE(()=>{$&&(D==null||D.update())},[$]),!A&&!l&&!v)return null;typeof u!="string"&&(N.show=$,N.close=()=>H==null?void 0:H(!1),N.align=n);let F=h.style;return D!=null&&D.placement&&(F={...h.style,...N.style},h["x-placement"]=D.placement),m.jsx(u,{...h,...N,style:F,...(w.length||S)&&{"data-bs-popper":"static"},className:nr(t,C,$&&"show",_&&`${C}-end`,d&&`${C}-${d}`,...w)})});Hv.displayName="DropdownMenu";const Kv=x.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:l,...u},c)=>{const d=ir(t,"btn"),[h,{tagName:g}]=gf({tagName:e,disabled:o,...u}),_=g;return m.jsx(_,{...h,...u,ref:c,disabled:o,className:nr(l,d,i&&"active",n&&`${d}-${n}`,r&&`${d}-${r}`,u.href&&o&&"disabled")})});Kv.displayName="Button";const Qv=x.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:i=Kv,...o},l)=>{const u=ir(e,"dropdown-toggle"),c=x.useContext(Vl);r!==void 0&&(o.bsPrefix=r);const[d]=Ov();return d.ref=Bv(d.ref,Wv(l)),m.jsx(i,{className:nr(n,u,t&&`${u}-split`,(c==null?void 0:c.show)&&"show"),...d,...o})});Qv.displayName="DropdownToggle";const Yv=x.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:i,className:o,align:l="start",onSelect:u,onToggle:c,focusFirstItemOnShow:d,as:h="div",navbar:g,autoClose:_=!0,...S}=Hk(e,{show:"onToggle"}),C=x.useContext(wf),O=ir(n,"dropdown"),P=Jk(),y=D=>_===!1?D==="click":_==="inside"?D!=="rootClose":_==="outside"?D!=="select":!0,v=Qk((D,$)=>{var H;!((H=$.originalEvent)==null||(H=H.target)==null)&&H.classList.contains("dropdown-toggle")&&$.source==="mousedown"||($.originalEvent.currentTarget===document&&($.source!=="keydown"||$.originalEvent.key==="Escape")&&($.source="rootClose"),y($.source)&&(c==null||c(D,$)))}),b=Vv(l==="end",r,P),N=x.useMemo(()=>({align:l,drop:r,isRTL:P}),[l,r,P]),A={down:O,"down-centered":`${O}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return m.jsx(vf.Provider,{value:N,children:m.jsx(Ho,{placement:b,show:i,onSelect:u,onToggle:v,focusFirstItemOnShow:d,itemSelector:`.${O}-item:not(.disabled):not(:disabled)`,children:C?S.children:m.jsx(h,{...S,ref:t,className:nr(o,i&&"show",A[r])})})})});Yv.displayName="Dropdown";const Nt=Object.assign(Yv,{Toggle:Qv,Menu:Hv,Item:zv,ItemText:Fv,Divider:Rv,Header:Iv}),iE=[{title:"Home",href:"/",id:"menuHome",sort:1,iconClass:"ti ti-layout-dashboard"},{title:"Website",href:"/site",id:"menuSite",sort:2,iconClass:"ti ti-world"},{title:"FTP",href:"/ftp",id:"menuFtp",sort:3,iconClass:"ti ti-folder-share"},{title:"Databases",href:"/database",id:"menuDatabase",sort:4,iconClass:"ti ti-database"},{title:"Docker",href:"/docker",id:"menuDocker",sort:5,iconClass:"ti ti-brand-docker"},{title:"Monitor",href:"/control",id:"menuControl",sort:6,iconClass:"ti ti-heart-rate-monitor"},{title:"Security",href:"/firewall",id:"menuFirewall",sort:7,iconClass:"ti ti-shield-lock"},{title:"Files",href:"/files",id:"menuFiles",sort:8,iconClass:"ti ti-folders"},{title:"Node",href:"/node",id:"menuNode",sort:9,iconClass:"ti ti-brand-nodejs"},{title:"Logs",href:"/logs",id:"menuLogs",sort:10,iconClass:"ti ti-file-text"},{title:"Domains",href:"/ssl_domain",id:"menuDomains",sort:11,iconClass:"ti ti-world-www"},{title:"Terminal",href:"/xterm",id:"menuXterm",sort:12,iconClass:"ti ti-terminal-2"},{title:"Cron",href:"/crontab",id:"menuCrontab",sort:13,iconClass:"ti ti-clock"},{title:"App Store",href:"/soft",id:"menuSoft",sort:14,iconClass:"ti ti-package"},{title:"Services",href:"/services",id:"menuServices",sort:15,iconClass:"ti ti-server"},{title:"Plugins",href:"/plugins",id:"menuPlugins",sort:16,iconClass:"ti ti-puzzle"},{title:"Backup Plans",href:"/backup-plans",id:"menuBackupPlans",sort:17,iconClass:"ti ti-archive"},{title:"Users",href:"/users",id:"menuUsers",sort:18,iconClass:"ti ti-users"},{title:"Settings",href:"/config",id:"menuConfig",sort:19,iconClass:"ti ti-settings"},{title:"Log out",href:"/logout",id:"menuLogout",sort:20,iconClass:"ti ti-logout"}],Rs=e=>`/theme/img/theme/theme-${e}.svg`;function oE(){const{theme:e,accent:t,sidebarTheme:n,sidebarBg:r,setTheme:i,setAccent:o,setSidebarTheme:l,setSidebarBg:u,resetTheme:c}=cv(),[d,h]=x.useState(!1),g=x.useId(),_=x.useCallback(()=>h(!1),[]);return x.useEffect(()=>{if(!d)return;const S=C=>{C.key==="Escape"&&_()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[d,_]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"sidebar-contact",children:m.jsx("button",{type:"button",className:"toggle-theme border-0 bg-transparent p-0","aria-expanded":d,"aria-controls":"yakpanel-theme-panel","aria-label":d?"Close theme settings":"Open theme customizer",onClick:()=>h(S=>!S),children:m.jsx("i",{className:`fa fa-cog ${d?"fa-spin":""}`,"aria-hidden":!0})})}),m.jsxs("div",{id:"yakpanel-theme-panel",className:`sidebar-themesettings ${d?"open":""}`,role:"dialog","aria-modal":"true","aria-labelledby":g,children:[m.jsxs("div",{className:"themesettings-header",children:[m.jsx("h4",{id:g,children:"Theme Customizer"}),m.jsx("button",{type:"button",className:"btn btn-link p-0 text-body","aria-label":"Close",onClick:_,children:m.jsx("i",{className:"ti ti-x","aria-hidden":!0})})]}),m.jsxs("div",{className:"themesettings-inner",children:[m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Layout"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"light",checked:e==="light",onChange:()=>i("light"),id:"yak-lightTheme",label:"Light",imgSrc:Rs("01")})}),m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-theme-layout",value:"dark",checked:e==="dark",onChange:()=>i("dark"),id:"yak-darkTheme",label:"Dark",imgSrc:Rs("02")})})]})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Colors"}),m.jsx("div",{className:"theme-colorsset",children:m.jsx("ul",{className:"mb-0",children:[{v:"red",id:"yak-redColor"},{v:"yellow",id:"yak-yellowColor"},{v:"blue",id:"yak-blueColor"},{v:"green",id:"yak-greenColor"}].map(({v:S,id:C})=>m.jsx("li",{children:m.jsxs("div",{className:"input-themeselects",children:[m.jsx("input",{type:"radio",name:"yak-accent",id:C,value:S,checked:t===S,onChange:()=>o(S)}),m.jsx("label",{htmlFor:C,className:`${S}-clr`,title:S,children:m.jsx("span",{className:"visually-hidden",children:S})})]})},S))})})]}),m.jsxs("div",{className:"themesettings-content",children:[m.jsx("h6",{children:"Sidebar"}),m.jsx("div",{className:"row g-2",children:[{v:"light",n:"03",label:"Light"},{v:"dark",n:"04",label:"Dark"},{v:"blue",n:"05",label:"Blue"},{v:"green",n:"06",label:"Green"}].map(({v:S,n:C,label:O})=>m.jsx("div",{className:"col-6",children:m.jsx(ou,{name:"yak-sidebar-style",value:S,checked:n===S,onChange:()=>l(S),id:`yak-sidebar-${S}`,label:O,imgSrc:Rs(C)})},S))})]}),m.jsxs("div",{className:"themesettings-content m-0 border-0",children:[m.jsx("h6",{children:"Sidebar background"}),m.jsxs("div",{className:"row g-2",children:[m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:"yak-sidebarBgNone",value:"sidebarbgnone",checked:r==="sidebarbgnone",onChange:()=>u("sidebarbgnone")}),m.jsx("label",{htmlFor:"yak-sidebarBgNone",className:"d-flex align-items-center justify-content-center bg-body-secondary rounded",style:{minHeight:72},children:m.jsx("span",{className:"small text-muted",children:"Default"})})]})}),[{v:"sidebarbg1",n:"07"},{v:"sidebarbg2",n:"08"},{v:"sidebarbg3",n:"09"},{v:"sidebarbg4",n:"10"}].map(({v:S,n:C})=>m.jsx("div",{className:"col-6",children:m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:"yak-sidebarbg",id:`yak-${S}`,value:S,checked:r===S,onChange:()=>u(S)}),m.jsxs("label",{htmlFor:`yak-${S}`,children:[m.jsx("img",{src:Rs(C),alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsxs("span",{children:["Bg ",C.slice(-1)]}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})},S))]})]})]}),m.jsx("div",{className:"themesettings-footer",children:m.jsxs("ul",{className:"mb-0",children:[m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-cancel close-theme btn-light border w-100",onClick:_,children:"Cancel"})}),m.jsx("li",{children:m.jsx("button",{type:"button",className:"btn btn-reset btn-primary w-100",onClick:()=>{c()},children:"Reset"})})]})})]})]})}function ou({name:e,value:t,checked:n,onChange:r,id:i,label:o,imgSrc:l}){return m.jsxs("div",{className:"input-themeselect",children:[m.jsx("input",{type:"radio",name:e,id:i,value:t,checked:n,onChange:r}),m.jsxs("label",{htmlFor:i,children:[m.jsx("img",{src:l,alt:""}),m.jsxs("span",{className:"w-100",children:[m.jsx("span",{children:o}),m.jsx("span",{className:"checkboxs-theme"})]})]})]})}const $h="yakpanel_mini_sidebar";function sE(){const e=Ul(),{theme:t,toggleTheme:n}=cv(),[r,i]=x.useState(!1),[o,l]=x.useState(()=>localStorage.getItem($h)==="1");x.useEffect(()=>{localStorage.setItem($h,o?"1":"0")},[o]),x.useEffect(()=>{o?document.body.classList.add("mini-sidebar"):document.body.classList.remove("mini-sidebar")},[o]);const u=()=>i(!1);return m.jsxs("div",{className:`main-wrapper ${r?"slide-nav":""}`,children:[m.jsxs("div",{className:"header",children:[m.jsxs("div",{className:`header-left ${o?"":"active"}`,children:[m.jsxs(As,{to:"/",className:"logo logo-normal",onClick:u,children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel"}),m.jsx("img",{src:"/theme/img/white-logo.png",className:"white-logo",alt:""})]}),m.jsx(As,{to:"/",className:"logo logo-small",onClick:u,children:m.jsx("img",{src:"/theme/img/logo-small.png",alt:""})}),m.jsx("button",{type:"button",id:"toggle_btn",className:o?"":"active","aria-label":o?"Expand sidebar":"Collapse sidebar",onClick:()=>l(!o),children:m.jsx("i",{className:"ti ti-arrow-bar-to-left"})})]}),m.jsx("button",{type:"button",id:"mobile_btn",className:"mobile_btn d-md-none btn btn-link p-0 border-0","aria-label":"Open menu",onClick:()=>i(!r),children:m.jsxs("span",{className:"bar-icon",children:[m.jsx("span",{}),m.jsx("span",{}),m.jsx("span",{})]})}),m.jsx("div",{className:"header-user",children:m.jsxs("ul",{className:"nav user-menu",children:[m.jsx("li",{className:"nav-item nav-search-inputs me-auto d-none d-md-block",children:m.jsx("div",{className:"top-nav-search",children:m.jsx("form",{className:"dropdown",onSubmit:c=>c.preventDefault(),children:m.jsxs("div",{className:"searchinputs",children:[m.jsx("input",{type:"search",className:"form-control",placeholder:"Search","aria-label":"Search"}),m.jsx("div",{className:"search-addon",children:m.jsx("button",{type:"submit",className:"btn btn-link p-0","aria-label":"Submit search",children:m.jsx("i",{className:"ti ti-command"})})})]})})})}),m.jsx("li",{className:"nav-item",children:m.jsxs("button",{type:"button",className:"btn btn-link nav-link dark-mode-toggle p-0",id:"dark-mode-toggle","aria-label":"Toggle theme",onClick:n,children:[m.jsx("i",{className:`ti ti-sun light-mode ${t==="light"?"active":""}`}),m.jsx("i",{className:`ti ti-moon dark-mode ${t==="dark"?"active":""}`})]})}),m.jsx("li",{className:"nav-item dropdown has-arrow main-drop",children:m.jsxs(Nt,{align:"end",children:[m.jsxs(Nt.Toggle,{as:"a",className:"btn btn-link nav-link user-link p-0 d-flex align-items-center text-decoration-none",children:[m.jsx("span",{className:"user-img",children:m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",alt:"",className:"rounded-circle",width:32,height:32})}),m.jsxs("span",{className:"user-content d-none d-md-inline text-start ms-2",children:[m.jsx("span",{className:"user-name d-block fw-medium",children:"Admin"}),m.jsx("span",{className:"user-role text-muted small",children:"Panel"})]})]}),m.jsxs(Nt.Menu,{className:"dropdown-menu-end",children:[m.jsxs(Nt.Item,{onClick:()=>e("/users"),children:[m.jsx("i",{className:"ti ti-users me-2"}),"Users"]}),m.jsxs(Nt.Item,{onClick:()=>e("/config"),children:[m.jsx("i",{className:"ti ti-settings me-2"}),"Settings"]}),m.jsx(Nt.Divider,{}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]})}),m.jsx("div",{className:"dropdown mobile-user-menu d-md-none",children:m.jsxs(Nt,{children:[m.jsx(Nt.Toggle,{as:"a",className:"nav-link dropdown-toggle",children:m.jsx("i",{className:"ti ti-dots-vertical"})}),m.jsxs(Nt.Menu,{children:[m.jsxs(Nt.Item,{onClick:()=>{e("/"),u()},children:[m.jsx("i",{className:"ti ti-layout-dashboard me-2"}),"Dashboard"]}),m.jsxs(Nt.Item,{onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})]})]})})]}),m.jsx("div",{className:"sidebar",id:"sidebar",children:m.jsx("div",{className:"sidebar-inner slimscroll",children:m.jsxs("div",{id:"sidebar-menu",className:"sidebar-menu",children:[m.jsx("ul",{children:m.jsx("li",{className:"clinicdropdown",children:m.jsxs(As,{to:"/users",onClick:u,children:[m.jsx("img",{src:"/theme/img/profiles/avatar-14.jpg",className:"img-fluid rounded-circle",alt:"",width:40,height:40}),m.jsxs("div",{className:"user-names",children:[m.jsx("h5",{children:"Admin"}),m.jsx("h6",{children:"YakPanel"})]})]})})}),m.jsx("ul",{children:m.jsxs("li",{children:[m.jsx("h6",{className:"submenu-hdr",children:"Main"}),m.jsx("ul",{children:iE.filter(c=>c.id!=="menuLogout").map(c=>m.jsx("li",{children:m.jsxs(As,{to:c.href,onClick:u,className:({isActive:d})=>d?"active":void 0,children:[m.jsx("i",{className:c.iconClass}),m.jsx("span",{children:c.title})]})},c.id))})]})}),m.jsx("ul",{children:m.jsx("li",{children:m.jsxs("button",{type:"button",className:"btn btn-link text-start w-100 text-decoration-none text-body py-2 border-0",onClick:()=>e("/logout"),children:[m.jsx("i",{className:"ti ti-logout me-2"}),"Log out"]})})})]})})}),m.jsx("div",{className:"page-wrapper",children:m.jsx("div",{className:"content",children:m.jsx(ES,{})})}),r?m.jsx("button",{type:"button",className:"position-fixed top-0 start-0 w-100 h-100 bg-dark bg-opacity-25 border-0 p-0 d-md-none",style:{zIndex:1040},"aria-label":"Close menu",onClick:u}):null,m.jsx(oE,{})]})}const Xv="/api/v1";function lE(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>t&&typeof t=="object"&&"msg"in t?String(t.msg):JSON.stringify(t)).join("; ")}async function Q(e,t={}){const n=localStorage.getItem("token"),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(`${Xv}${e}`,{...t,headers:r});if(i.status===401)throw localStorage.removeItem("token"),window.location.href="/login",new Error("Unauthorized");if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||o.message||`HTTP ${i.status}`)}return i.json()}async function aE(e,t){const n=new URLSearchParams;n.set("username",e),n.set("password",t);const r=await fetch(`${Xv}/auth/login`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n.toString()});if(!r.ok){const o=await r.json().catch(()=>null),u=(o?lE(o.detail):void 0)||(o&&typeof o.message=="string"?o.message:void 0)||`Login failed (${r.status})`;throw new Error(u)}const i=await r.json();return localStorage.setItem("token",i.access_token),i}async function RE(e){return Q("/site/create",{method:"POST",body:JSON.stringify(e)})}async function IE(e){return Q(`/site/${e}`)}async function ME(e,t){return Q(`/site/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function zE(e){return Q(`/site/${e}/redirects`)}async function FE(e,t,n,r=301){return Q(`/site/${e}/redirects`,{method:"POST",body:JSON.stringify({source:t,target:n,code:r})})}async function BE(e,t,n="main"){return Q(`/site/${e}/git/clone`,{method:"POST",body:JSON.stringify({url:t,branch:n})})}async function UE(e){return Q(`/site/${e}/git/pull`,{method:"POST"})}async function WE(e,t){return Q(`/site/${e}/redirects/${t}`,{method:"DELETE"})}async function VE(e,t){return Q(`/site/${e}/status`,{method:"POST",body:JSON.stringify({status:t?1:0})})}async function HE(){return Q("/firewall/apply",{method:"POST"})}async function KE(e){return Q(`/site/${e}`,{method:"DELETE"})}async function QE(e){return Q(`/site/${e}/backup`,{method:"POST"})}async function YE(e){return Q(`/site/${e}/backups`)}async function XE(e,t){return Q(`/site/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function JE(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/site/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function GE(e){return Q(`/files/list?path=${encodeURIComponent(e)}`)}async function qE(e){return Q(`/files/dir-size?path=${encodeURIComponent(e)}`)}async function ZE(e,t,n=200){return Q(`/files/search?q=${encodeURIComponent(e)}&path=${encodeURIComponent(t)}&max_results=${n}`)}async function eC(e,t,n=!1){return Q("/files/chmod",{method:"POST",body:JSON.stringify({file_path:e,mode:t,recursive:n})})}async function tC(e,t){return Q("/files/touch",{method:"POST",body:JSON.stringify({path:e,name:t})})}async function nC(e,t,n,r){return Q("/files/copy",{method:"POST",body:JSON.stringify({path:e,name:t,dest_path:n,dest_name:null})})}async function rC(e,t,n,r){return Q("/files/move",{method:"POST",body:JSON.stringify({path:e,name:t,dest_path:n,dest_name:null})})}async function iC(e,t,n){return Q("/files/compress",{method:"POST",body:JSON.stringify({path:e,names:t,archive_name:n})})}async function oC(e,t){const n=new FormData;n.append("path",e),n.append("file",t);const r=localStorage.getItem("token"),i=await fetch("/api/v1/files/upload",{method:"POST",headers:r?{Authorization:`Bearer ${r}`}:{},body:n});if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.detail||"Upload failed")}return i.json()}async function sC(e){return Q(`/files/read?path=${encodeURIComponent(e)}`)}async function lC(e,t){return Q("/files/write",{method:"POST",body:JSON.stringify({path:e,content:t})})}async function aC(e,t){return Q("/files/mkdir",{method:"POST",body:JSON.stringify({path:e,name:t})})}async function uC(e,t,n){return Q("/files/rename",{method:"POST",body:JSON.stringify({path:e,old_name:t,new_name:n})})}async function cC(e,t,n){return Q("/files/delete",{method:"POST",body:JSON.stringify({path:e,name:t,is_dir:n})})}async function fC(e){const t=localStorage.getItem("token"),n=await fetch(`/api/v1/files/download?path=${encodeURIComponent(e)}`,{headers:t?{Authorization:`Bearer ${t}`}:{}});if(!n.ok)throw new Error("Download failed");const r=await n.blob(),i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=e.split("/").pop()||"download",o.click(),URL.revokeObjectURL(i)}async function dC(e){return Q(`/logs/list?path=${encodeURIComponent(e)}`)}async function pC(e,t=1e3){return Q(`/logs/read?path=${encodeURIComponent(e)}&tail=${t}`)}async function hC(e,t){return Q("/node/add",{method:"POST",body:JSON.stringify({script:e,name:t||""})})}async function mC(){return Q("/docker/containers")}async function gC(){return Q("/docker/images")}async function vC(e){return Q(`/docker/pull?image=${encodeURIComponent(e)}`,{method:"POST"})}async function yC(e,t,n,r){return Q("/docker/run",{method:"POST",body:JSON.stringify({image:e,name:t||"",ports:n||"",cmd:""})})}async function wC(e){return Q(`/database/${e}/backup`,{method:"POST"})}async function _C(e){return Q(`/database/${e}/backups`)}async function xC(e,t){return Q(`/database/${e}/restore`,{method:"POST",body:JSON.stringify({filename:t})})}async function SC(e,t){const n=localStorage.getItem("token"),r=await fetch(`/api/v1/database/${e}/backups/download?file=${encodeURIComponent(t)}`,{headers:n?{Authorization:`Bearer ${n}`}:{}});if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=t,l.click(),URL.revokeObjectURL(o)}async function kC(){return Q("/config/test-email",{method:"POST"})}async function EC(){return Q("/user/list")}async function CC(e){return Q("/user/create",{method:"POST",body:JSON.stringify(e)})}async function bC(e){return Q(`/user/${e}`,{method:"DELETE"})}async function PC(e){return Q(`/user/${e}/toggle-active`,{method:"PUT"})}async function OC(e,t){return Q("/auth/change-password",{method:"POST",body:JSON.stringify({old_password:e,new_password:t})})}async function jC(e,t){return Q(`/ftp/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function TC(e,t){return Q(`/database/${e}/password`,{method:"PUT",body:JSON.stringify({password:t})})}async function NC(){return Q("/dashboard/stats")}async function LC(){return Q("/crontab/apply",{method:"POST"})}async function AC(e=50){return Q(`/monitor/processes?limit=${e}`)}async function DC(e){return Q("/plugin/add-from-url",{method:"POST",body:JSON.stringify({url:e})})}async function $C(e){return Q(`/plugin/${encodeURIComponent(e)}`,{method:"DELETE"})}async function RC(){return Q("/monitor/network")}async function IC(){return Q("/backup/plans")}async function MC(e){return Q("/backup/plans",{method:"POST",body:JSON.stringify(e)})}async function zC(e,t){return Q(`/backup/plans/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function FC(e){return Q(`/backup/plans/${e}`,{method:"DELETE"})}async function BC(){return Q("/backup/run-scheduled",{method:"POST"})}function uE(){const[e,t]=x.useState(""),[n,r]=x.useState(""),[i,o]=x.useState(""),[l,u]=x.useState(!1),c=Ul();async function d(h){h.preventDefault(),o(""),u(!0);try{await aE(e,n),c("/")}catch(g){o(g instanceof Error?g.message:"Login failed")}finally{u(!1)}}return m.jsx("div",{className:"account-content position-relative min-vh-100 d-flex align-items-center justify-content-center p-4",children:m.jsx("div",{className:"card shadow-lg border-0",style:{maxWidth:420,width:"100%"},children:m.jsxs("div",{className:"card-body p-4 p-md-5",children:[m.jsxs("div",{className:"text-center mb-4",children:[m.jsx("img",{src:"/theme/img/logo.png",alt:"YakPanel",className:"mb-3",height:40}),m.jsx("h4",{className:"fw-bold",children:"YakPanel"}),m.jsx("p",{className:"text-muted small mb-0",children:"Sign in to continue"})]}),m.jsxs("form",{onSubmit:d,children:[i?m.jsx("div",{className:"alert alert-danger",role:"alert",children:i}):null,m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Username"}),m.jsx("input",{type:"text",value:e,onChange:h=>t(h.target.value),className:"form-control",required:!0,autoComplete:"username"})]}),m.jsxs("div",{className:"mb-3",children:[m.jsx("label",{className:"form-label",children:"Password"}),m.jsx("input",{type:"password",value:n,onChange:h=>r(h.target.value),className:"form-control",required:!0,autoComplete:"current-password"})]}),m.jsx("button",{type:"submit",disabled:l,className:"btn btn-primary w-100 py-2",children:l?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":!0}),"Signing in…"]}):"Login"})]}),m.jsx("p",{className:"text-center text-muted small mt-3 mb-0",children:"Default: admin / admin"}),m.jsx("p",{className:"text-center small mt-2 mb-0",children:m.jsx(sv,{to:"/install",children:"Remote SSH install (optional)"})})]})})})}function su({className:e=""}){return m.jsx("div",{className:`placeholder-glow ${e}`.trim(),children:m.jsx("span",{className:"placeholder col-12 rounded",style:{height:"1rem"}})})}function lu(){return m.jsx("div",{className:"card",children:m.jsxs("div",{className:"card-body",children:[m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"mb-2"}),m.jsx(su,{className:"w-75"})]})})}const cE=x.lazy(()=>Me(()=>import("./DashboardPage-CukNUmp0.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.DashboardPage}))),fE=x.lazy(()=>Me(()=>import("./SitePage-CeCv6Zaa.js"),__vite__mapDeps([4,5,1,6,7,8,3])).then(e=>({default:e.SitePage}))),dE=x.lazy(()=>Me(()=>import("./FilesPage-DLgTKzsa.js"),__vite__mapDeps([9,5,1,6,7,8,3])).then(e=>({default:e.FilesPage}))),pE=x.lazy(()=>Me(()=>import("./FtpPage-DG8coQcY.js"),__vite__mapDeps([10,5,1,6,7,8,3])).then(e=>({default:e.FtpPage}))),hE=x.lazy(()=>Me(()=>import("./DatabasePage-sZfqfvMQ.js"),__vite__mapDeps([11,5,1,6,7,8,3])).then(e=>({default:e.DatabasePage}))),mE=x.lazy(()=>Me(()=>import("./TerminalPage-CXXB09nH.js"),__vite__mapDeps([12,3,13])).then(e=>({default:e.TerminalPage}))),gE=x.lazy(()=>Me(()=>import("./MonitorPage-CgJf2F74.js"),__vite__mapDeps([14,1,7,3])).then(e=>({default:e.MonitorPage}))),vE=x.lazy(()=>Me(()=>import("./CrontabPage-BfaMKQc8.js"),__vite__mapDeps([15,5,1,6,7,8,3])).then(e=>({default:e.CrontabPage}))),yE=x.lazy(()=>Me(()=>import("./ConfigPage-eLTvRUp2.js"),__vite__mapDeps([16,1,6,2,3])).then(e=>({default:e.ConfigPage}))),wE=x.lazy(()=>Me(()=>import("./LogsPage-B1uIfI5z.js"),__vite__mapDeps([17,1,6,3])).then(e=>({default:e.LogsPage}))),_E=x.lazy(()=>Me(()=>import("./FirewallPage-Bu-mOiN9.js"),__vite__mapDeps([18,5,1,6,7,8,3])).then(e=>({default:e.FirewallPage}))),xE=x.lazy(()=>Me(()=>import("./DomainsPage-DVTACiDJ.js"),__vite__mapDeps([19,5,1,6,3])).then(e=>({default:e.DomainsPage}))),SE=x.lazy(()=>Me(()=>import("./DockerPage-D1AIK8Rv.js"),__vite__mapDeps([20,5,1,6,7,8,3])).then(e=>({default:e.DockerPage}))),kE=x.lazy(()=>Me(()=>import("./NodePage-BQzvbSat.js"),__vite__mapDeps([21,5,1,6,7,8,3])).then(e=>({default:e.NodePage}))),EE=x.lazy(()=>Me(()=>import("./SoftPage-B7PtFv7I.js"),__vite__mapDeps([22,1,6,3])).then(e=>({default:e.SoftPage}))),CE=x.lazy(()=>Me(()=>import("./ServicesPage-DNZuAdmh.js"),__vite__mapDeps([23,1,6,7,3])).then(e=>({default:e.ServicesPage}))),bE=x.lazy(()=>Me(()=>import("./PluginsPage-C4H8wPuq.js"),__vite__mapDeps([24,5,1,6,3])).then(e=>({default:e.PluginsPage}))),PE=x.lazy(()=>Me(()=>import("./BackupPlansPage-CgzFMegr.js"),__vite__mapDeps([25,5,1,6,7,8,3])).then(e=>({default:e.BackupPlansPage}))),OE=x.lazy(()=>Me(()=>import("./UsersPage-DqvygXkC.js"),__vite__mapDeps([26,5,1,6,7,3])).then(e=>({default:e.UsersPage}))),jE=x.lazy(()=>Me(()=>import("./RemoteInstallPage-C4gVyakl.js"),__vite__mapDeps([27,1,6])).then(e=>({default:e.RemoteInstallPage})));function Re(){return m.jsxs("div",{className:"row g-3",children:[m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})}),m.jsx("div",{className:"col-md-4",children:m.jsx(lu,{})})]})}function TE({children:e}){return localStorage.getItem("token")?m.jsx(m.Fragment,{children:e}):m.jsx(iv,{to:"/login",replace:!0})}function NE(){return m.jsx(KS,{children:m.jsxs(bS,{children:[m.jsx(we,{path:"/login",element:m.jsx(uE,{})}),m.jsx(we,{path:"/install",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(jE,{})})}),m.jsxs(we,{path:"/",element:m.jsx(TE,{children:m.jsx(sE,{})}),children:[m.jsx(we,{index:!0,element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(cE,{})})}),m.jsx(we,{path:"site",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(fE,{})})}),m.jsx(we,{path:"ftp",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(pE,{})})}),m.jsx(we,{path:"database",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(hE,{})})}),m.jsx(we,{path:"docker",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(SE,{})})}),m.jsx(we,{path:"control",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(gE,{})})}),m.jsx(we,{path:"firewall",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(_E,{})})}),m.jsx(we,{path:"files",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(dE,{})})}),m.jsx(we,{path:"node",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(kE,{})})}),m.jsx(we,{path:"logs",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(wE,{})})}),m.jsx(we,{path:"ssl_domain",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(xE,{})})}),m.jsx(we,{path:"xterm",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(mE,{})})}),m.jsx(we,{path:"crontab",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(vE,{})})}),m.jsx(we,{path:"soft",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(EE,{})})}),m.jsx(we,{path:"config",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(yE,{})})}),m.jsx(we,{path:"services",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(CE,{})})}),m.jsx(we,{path:"plugins",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(bE,{})})}),m.jsx(we,{path:"backup-plans",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(PE,{})})}),m.jsx(we,{path:"users",element:m.jsx(x.Suspense,{fallback:m.jsx(Re,{}),children:m.jsx(OE,{})})})]}),m.jsx(we,{path:"/logout",element:m.jsx(LE,{})}),m.jsx(we,{path:"*",element:m.jsx(iv,{to:"/",replace:!0})})]})})}function LE(){return localStorage.removeItem("token"),window.location.href="/login",null}au.createRoot(document.getElementById("root")).render(m.jsx(wn.StrictMode,{children:m.jsx(DS,{children:m.jsx(NE,{})})}));export{DC as $,tC as A,eC as B,iC as C,Nt as D,lC as E,qE as F,uC as G,sC as H,jC as I,_C as J,wC as K,SC as L,xC as M,TC as N,AC as O,RC as P,LC as Q,kC as R,OC as S,pC as T,dC as U,HE as V,mC as W,gC as X,vC as Y,yC as Z,hC as _,Q as a,$C as a0,IC as a1,BC as a2,FC as a3,zC as a4,MC as a5,EC as a6,PC as a7,bC as a8,CC as a9,kl as aa,dk as ab,wn as ac,AE as ad,Bk as ae,$s as af,Bv as ag,nr as ah,dv as ai,Lv as aj,Fk as ak,Xn as al,t1 as am,JS as an,Ph as ao,mh as ap,ir as aq,Qk as ar,Jk as as,fk as at,pv as au,Di as av,sv as aw,IE as b,RE as c,YE as d,KE as e,BE as f,NC as g,UE as h,FE as i,m as j,WE as k,zE as l,QE as m,JE as n,XE as o,GE as p,oC as q,x as r,VE as s,fC as t,ME as u,nC as v,rC as w,cC as x,ZE as y,aC as z}; diff --git a/YakPanel-server/frontend/dist/index.html b/YakPanel-server/frontend/dist/index.html index 839ddd75..377fed2b 100644 --- a/YakPanel-server/frontend/dist/index.html +++ b/YakPanel-server/frontend/dist/index.html @@ -5,7 +5,7 @@ YakPanel - + diff --git a/YakPanel-server/frontend/src/api/client.ts b/YakPanel-server/frontend/src/api/client.ts index fb4a5b89..2fa034d6 100644 --- a/YakPanel-server/frontend/src/api/client.ts +++ b/YakPanel-server/frontend/src/api/client.ts @@ -163,12 +163,67 @@ export async function downloadSiteBackup(siteId: number, filename: string): Prom URL.revokeObjectURL(url) } +export interface FileListItem { + name: string + is_dir: boolean + size: number + mtime?: string + mtime_ts?: number + mode?: string + mode_symbolic?: string + owner?: string + group?: string +} + export async function listFiles(path: string) { - return apiRequest<{ path: string; items: { name: string; is_dir: boolean; size: number }[] }>( - `/files/list?path=${encodeURIComponent(path)}` + return apiRequest<{ path: string; items: FileListItem[] }>(`/files/list?path=${encodeURIComponent(path)}`) +} + +export async function fileDirSize(path: string) { + return apiRequest<{ size: number }>(`/files/dir-size?path=${encodeURIComponent(path)}`) +} + +export async function fileSearch(q: string, path: string, maxResults = 200) { + return apiRequest<{ path: string; query: string; results: { path: string; name: string; is_dir: boolean }[] }>( + `/files/search?q=${encodeURIComponent(q)}&path=${encodeURIComponent(path)}&max_results=${maxResults}` ) } +export async function fileChmod(filePath: string, mode: string, recursive = false) { + return apiRequest<{ status: boolean; msg: string }>('/files/chmod', { + method: 'POST', + body: JSON.stringify({ file_path: filePath, mode, recursive }), + }) +} + +export async function fileTouch(parentPath: string, name: string) { + return apiRequest<{ status: boolean; msg: string }>('/files/touch', { + method: 'POST', + body: JSON.stringify({ path: parentPath, name }), + }) +} + +export async function fileCopy(sourceParent: string, name: string, destParent: string, destName?: string) { + return apiRequest<{ status: boolean; msg: string }>('/files/copy', { + method: 'POST', + body: JSON.stringify({ path: sourceParent, name, dest_path: destParent, dest_name: destName ?? null }), + }) +} + +export async function fileMove(sourceParent: string, name: string, destParent: string, destName?: string) { + return apiRequest<{ status: boolean; msg: string }>('/files/move', { + method: 'POST', + body: JSON.stringify({ path: sourceParent, name, dest_path: destParent, dest_name: destName ?? null }), + }) +} + +export async function fileCompress(parentPath: string, names: string[], archiveName: string) { + return apiRequest<{ status: boolean; msg: string; archive?: string }>('/files/compress', { + method: 'POST', + body: JSON.stringify({ path: parentPath, names, archive_name: archiveName }), + }) +} + export async function uploadFile(path: string, file: File) { const form = new FormData() form.append('path', path) diff --git a/YakPanel-server/frontend/src/pages/FilesPage.tsx b/YakPanel-server/frontend/src/pages/FilesPage.tsx index b455ac68..38d03f12 100644 --- a/YakPanel-server/frontend/src/pages/FilesPage.tsx +++ b/YakPanel-server/frontend/src/pages/FilesPage.tsx @@ -1,27 +1,58 @@ -import { useEffect, useState, useRef } from 'react' +import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import Modal from 'react-bootstrap/Modal' -import { listFiles, downloadFile, uploadFile, readFile, writeFile, mkdirFile, renameFile, deleteFile } from '../api/client' +import Dropdown from 'react-bootstrap/Dropdown' +import { + listFiles, + downloadFile, + uploadFile, + readFile, + writeFile, + mkdirFile, + renameFile, + deleteFile, + fileDirSize, + fileSearch, + fileChmod, + fileTouch, + fileCopy, + fileMove, + fileCompress, + type FileListItem, +} from '../api/client' import { PageHeader, AdminButton, AdminAlert, AdminTable, EmptyState } from '../components/admin' -interface FileItem { - name: string - is_dir: boolean - size: number +function joinPath(dir: string, name: string): string { + if (dir === '/') return `/${name}` + return `${dir.replace(/\/$/, '')}/${name}` +} + +function parentPath(p: string): string { + const parts = p.replace(/\/$/, '').split('/').filter(Boolean) + parts.pop() + return parts.length === 0 ? '/' : `/${parts.join('/')}` } function formatSize(bytes: number): string { - if (bytes < 1024) return bytes + ' B' - if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + ' KB' - return (bytes / 1024 / 1024).toFixed(1) + ' MB' + if (bytes < 1024) return `${bytes} B` + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB` + if (bytes < 1024 * 1024 * 1024) return `${(bytes / 1024 / 1024).toFixed(1)} MB` + return `${(bytes / 1024 / 1024 / 1024).toFixed(2)} GB` } -const TEXT_EXT = ['.txt', '.html', '.htm', '.css', '.js', '.json', '.xml', '.md', '.py', '.php', '.sh', '.conf', '.env'] +const TEXT_EXT = ['.txt', '.html', '.htm', '.css', '.js', '.json', '.xml', '.md', '.py', '.php', '.sh', '.conf', '.env', '.ini', '.log', '.yml', '.yaml'] + +type Clip = { op: 'copy' | 'cut'; entries: { parent: string; name: string }[] } export function FilesPage() { const [path, setPath] = useState('/') - const [items, setItems] = useState([]) + const [pathInput, setPathInput] = useState('/') + const [items, setItems] = useState([]) const [loading, setLoading] = useState(true) const [error, setError] = useState('') + const [filter, setFilter] = useState('') + const [selected, setSelected] = useState>(() => new Set()) + const [clipboard, setClipboard] = useState(null) + const [dirSizes, setDirSizes] = useState>({}) const [downloading, setDownloading] = useState(null) const [uploading, setUploading] = useState(false) const [editingFile, setEditingFile] = useState(null) @@ -29,44 +60,86 @@ export function FilesPage() { const [savingEdit, setSavingEdit] = useState(false) const [showMkdir, setShowMkdir] = useState(false) const [mkdirName, setMkdirName] = useState('') - const [renaming, setRenaming] = useState(null) + const [showNewFile, setShowNewFile] = useState(false) + const [newFileName, setNewFileName] = useState('') + const [renaming, setRenaming] = useState(null) const [renameValue, setRenameValue] = useState('') + const [showChmod, setShowChmod] = useState(false) + const [chmodItem, setChmodItem] = useState(null) + const [chmodMode, setChmodMode] = useState('0644') + const [chmodRecursive, setChmodRecursive] = useState(false) + const [showCompress, setShowCompress] = useState(false) + const [compressName, setCompressName] = useState('archive.zip') + const [showSearchModal, setShowSearchModal] = useState(false) + const [searchQ, setSearchQ] = useState('') + const [searchLoading, setSearchLoading] = useState(false) + const [searchResults, setSearchResults] = useState<{ path: string; name: string; is_dir: boolean }[]>([]) const fileInputRef = useRef(null) - const loadDir = (p: string) => { + const loadDir = useCallback((p: string) => { setLoading(true) setError('') + setSelected(new Set()) listFiles(p) .then((data) => { setPath(data.path) + setPathInput(data.path) setItems(data.items.sort((a, b) => (a.is_dir === b.is_dir ? 0 : a.is_dir ? -1 : 1))) + setDirSizes({}) }) .catch((err) => setError(err.message)) .finally(() => setLoading(false)) - } + }, []) useEffect(() => { loadDir(path) }, []) - const handleNavigate = (item: FileItem) => { - if (item.is_dir) { - const newPath = path.endsWith('/') ? path + item.name : path + '/' + item.name - loadDir(newPath) - } + const filteredItems = useMemo(() => { + const q = filter.trim().toLowerCase() + if (!q) return items + return items.filter((i) => i.name.toLowerCase().includes(q)) + }, [items, filter]) + + const pathSegments = path.replace(/\/$/, '').split('/').filter(Boolean) + const canGoBack = pathSegments.length > 0 + + const toggleSelect = (name: string) => { + setSelected((prev) => { + const next = new Set(prev) + if (next.has(name)) next.delete(name) + else next.add(name) + return next + }) + } + + const selectAll = () => { + if (selected.size === filteredItems.length) setSelected(new Set()) + else setSelected(new Set(filteredItems.map((i) => i.name))) + } + + const selectedList = useMemo( + () => filteredItems.filter((i) => selected.has(i.name)), + [filteredItems, selected] + ) + + const handleNavigate = (item: FileListItem) => { + if (item.is_dir) loadDir(joinPath(path, item.name)) } const handleBack = () => { - const parts = path.replace(/\/$/, '').split('/').filter(Boolean) - if (parts.length === 0) return - parts.pop() - const newPath = parts.length === 0 ? '/' : '/' + parts.join('/') - loadDir(newPath) + if (!canGoBack) return + loadDir(parentPath(path)) } - const handleDownload = (item: FileItem) => { + const goPathInput = () => { + const p = pathInput.trim() || '/' + loadDir(p.startsWith('/') ? p : `/${p}`) + } + + const handleDownload = (item: FileListItem) => { if (item.is_dir) return - const fullPath = path.endsWith('/') ? path + item.name : path + '/' + item.name + const fullPath = joinPath(path, item.name) setDownloading(item.name) downloadFile(fullPath) .catch((err) => setError(err.message)) @@ -87,8 +160,8 @@ export function FilesPage() { }) } - const handleEdit = (item: FileItem) => { - const fullPath = path.endsWith('/') ? path + item.name : path + '/' + item.name + const handleEdit = (item: FileListItem) => { + const fullPath = joinPath(path, item.name) readFile(fullPath) .then((data) => { setEditingFile(fullPath) @@ -124,6 +197,19 @@ export function FilesPage() { .catch((err) => setError(err.message)) } + const handleTouch = (e: React.FormEvent) => { + e.preventDefault() + const name = newFileName.trim() + if (!name) return + fileTouch(path, name) + .then(() => { + setShowNewFile(false) + setNewFileName('') + loadDir(path) + }) + .catch((err) => setError(err.message)) + } + const handleRename = () => { if (!renaming || !renameValue.trim()) return const newName = renameValue.trim() @@ -140,44 +226,253 @@ export function FilesPage() { .catch((err) => setError(err.message)) } - const handleDelete = (item: FileItem) => { + const handleDelete = (item: FileListItem) => { if (!confirm(`Delete ${item.is_dir ? 'folder' : 'file'} "${item.name}"?`)) return deleteFile(path, item.name, item.is_dir) .then(() => loadDir(path)) .catch((err) => setError(err.message)) } - const pathSegments = path.replace(/\/$/, '').split('/').filter(Boolean) - const canGoBack = pathSegments.length > 0 + const batchDelete = () => { + if (selectedList.length === 0) return + if (!confirm(`Delete ${selectedList.length} item(s)?`)) return + Promise.all( + selectedList.map((i) => deleteFile(path, i.name, i.is_dir)) + ) + .then(() => loadDir(path)) + .catch((err) => setError(err.message)) + } + + const copySelection = () => { + if (selectedList.length === 0) return + setClipboard({ + op: 'copy', + entries: selectedList.map((i) => ({ parent: path, name: i.name })), + }) + } + + const cutSelection = () => { + if (selectedList.length === 0) return + setClipboard({ + op: 'cut', + entries: selectedList.map((i) => ({ parent: path, name: i.name })), + }) + } + + const pasteHere = () => { + if (!clipboard || clipboard.entries.length === 0) return + const tasks = clipboard.entries.map((e) => { + if (clipboard.op === 'copy') return fileCopy(e.parent, e.name, path) + return fileMove(e.parent, e.name, path) + }) + Promise.all(tasks) + .then(() => { + if (clipboard?.op === 'cut') setClipboard(null) + loadDir(path) + }) + .catch((err) => setError(err.message)) + } + + const openChmod = (item: FileListItem) => { + setChmodItem(item) + setChmodMode(item.mode ? item.mode.padStart(3, '0') : '0644') + setChmodRecursive(item.is_dir) + setShowChmod(true) + } + + const submitChmod = () => { + if (!chmodItem) return + const fp = joinPath(path, chmodItem.name) + fileChmod(fp, chmodMode, chmodRecursive && chmodItem.is_dir) + .then(() => { + setShowChmod(false) + setChmodItem(null) + loadDir(path) + }) + .catch((err) => setError(err.message)) + } + + const openCompress = () => { + const names = selectedList.length > 0 ? selectedList.map((i) => i.name) : [] + if (names.length === 0) return + setCompressName(`archive-${Date.now()}.zip`) + setShowCompress(true) + } + + const submitCompress = () => { + const names = selectedList.length > 0 ? selectedList.map((i) => i.name) : [] + if (!compressName.trim() || names.length === 0) return + fileCompress(path, names, compressName.trim()) + .then(() => { + setShowCompress(false) + loadDir(path) + }) + .catch((err) => setError(err.message)) + } + + const calcDirSize = (item: FileListItem) => { + if (!item.is_dir) return + const fp = joinPath(path, item.name) + fileDirSize(fp) + .then((r) => setDirSizes((d) => ({ ...d, [item.name]: r.size }))) + .catch((err) => setError(err.message)) + } + + const runDeepSearch = () => { + const q = searchQ.trim() + if (!q) return + setSearchLoading(true) + setSearchResults([]) + fileSearch(q, path, 300) + .then((r) => { + setSearchResults(r.results) + setShowSearchModal(true) + }) + .catch((err) => setError(err.message)) + .finally(() => setSearchLoading(false)) + } + + const navigateToSearchHit = (hit: { path: string; is_dir: boolean }) => { + setShowSearchModal(false) + if (hit.is_dir) loadDir(hit.path) + else loadDir(parentPath(hit.path)) + } + + const breadcrumbNavigate = (idx: number) => { + if (idx < 0) { + loadDir('/') + return + } + const segs = pathSegments.slice(0, idx + 1) + loadDir(`/${segs.join('/')}`) + } return ( <> -
- - - Back - - - setShowMkdir(true)}> - - New Folder - - fileInputRef.current?.click()} disabled={uploading}> - {uploading ? ( - - ) : ( - - )} - Upload - - Path: {path || '/'} +
+
+
+ + + Back + + loadDir(path)} disabled={loading}> + + Refresh + + + + + New + + + setShowMkdir(true)}> + + Folder + + setShowNewFile(true)}> + + File + + + + + fileInputRef.current?.click()} disabled={uploading}> + {uploading ? : } + Upload + + {selectedList.length === 1 && !selectedList[0].is_dir ? ( + handleDownload(selectedList[0])}> + + Download + + ) : null} + + + Copy + + + + Cut + + + + Paste + + + + Compress + + + + Delete + +
+
+
+ Path + setPathInput(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && goPathInput()} + /> + + Go + +
+
+ + + + setFilter(e.target.value)} + /> +
+
+ setSearchQ(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && runDeepSearch()} + /> + + {searchLoading ? : 'Search'} + +
+
+ +
{ setShowMkdir(false); setMkdirName('') }} centered> - New Folder + New folder
@@ -200,6 +495,109 @@ export function FilesPage() {
+ { setShowNewFile(false); setNewFileName('') }} centered> + + New file + +
+ + setNewFileName(e.target.value)} + placeholder="filename.txt" + className="form-control" + autoFocus + /> + + + { setShowNewFile(false); setNewFileName('') }}> + Cancel + + + Create + + +
+
+ + { setShowChmod(false); setChmodItem(null) }} centered> + + Permissions + + + {chmodItem ? ( + <> +

{joinPath(path, chmodItem.name)}

+ + setChmodMode(e.target.value)} placeholder="0644" /> + {chmodItem.is_dir ? ( +
+ setChmodRecursive(e.target.checked)} + /> + +
+ ) : null} + + ) : null} +
+ + { setShowChmod(false); setChmodItem(null) }}> + Cancel + + + Apply + + +
+ + setShowCompress(false)} centered> + + Compress to ZIP + + +

{selectedList.length} item(s) selected

+ + setCompressName(e.target.value)} /> +
+ + setShowCompress(false)}> + Cancel + + + Create ZIP + + +
+ + setShowSearchModal(false)} size="lg" scrollable> + + Search results{searchQ ? `: “${searchQ}”` : ''} + + + {searchResults.length === 0 ? ( +

No matches.

+ ) : ( +
    + {searchResults.map((r) => ( +
  • + {r.path} + navigateToSearchHit(r)}> + Open + +
  • + ))} +
+ )} +
+
+ setEditingFile(null)} fullscreen="lg-down" size="lg"> {editingFile} @@ -231,116 +629,212 @@ export function FilesPage() {
) : ( - - - - Name - Size - Actions - - - - {items.length === 0 ? ( + <> + + - - - + + 0 && selected.size === filteredItems.length} + onChange={selectAll} + aria-label="Select all" + /> + + Name + Size + Modified + Permission + Owner + + Operation + - ) : ( - items.map((item) => ( - - - - - {item.is_dir ? '—' : formatSize(item.size)} - - {renaming?.name === item.name ? ( - - setRenameValue(e.target.value)} - onKeyDown={(e) => e.key === 'Enter' && handleRename()} - className="form-control form-control-sm" - style={{ width: '8rem' }} - autoFocus - /> - - - - ) : ( - - - {!item.is_dir && canEdit(item.name) ? ( - - ) : null} - {!item.is_dir ? ( - - ) : null} - - - )} + + + {filteredItems.length === 0 ? ( + + + - )) - )} - - + ) : ( + filteredItems.map((item) => ( + + e.stopPropagation()}> + toggleSelect(item.name)} + aria-label={`Select ${item.name}`} + /> + + + {item.is_dir ? ( + + ) : ( + + + {item.name} + + )} + + + {item.is_dir ? ( + dirSizes[item.name] !== undefined ? ( + formatSize(dirSizes[item.name]) + ) : ( + + ) + ) : ( + formatSize(item.size) + )} + + {item.mtime ?? '—'} + + {item.mode_symbolic ? ( + <> + {item.mode_symbolic} + + ) : ( + item.mode ?? '—' + )} + + + {item.owner ? `${item.owner}:${item.group ?? ''}` : '—'} + + + {renaming?.name === item.name ? ( + + setRenameValue(e.target.value)} + onKeyDown={(e) => e.key === 'Enter' && handleRename()} + className="form-control form-control-sm" + style={{ width: '7rem' }} + autoFocus + /> + + + + ) : ( + e.stopPropagation()}> + + More + + + {item.is_dir ? ( + handleNavigate(item)}> + + Open + + ) : ( + <> + handleDownload(item)} disabled={downloading === item.name}> + + Download + + {canEdit(item.name) ? ( + handleEdit(item)}> + + Edit + + ) : null} + + )} + + { setClipboard({ op: 'copy', entries: [{ parent: path, name: item.name }] }) }}> + + Copy + + { setClipboard({ op: 'cut', entries: [{ parent: path, name: item.name }] }) }}> + + Cut + + { + setRenaming(item) + setRenameValue(item.name) + }} + > + + Rename + + openChmod(item)}> + + Permission + + { + setSelected(new Set([item.name])) + setCompressName(`${item.name.replace(/\.[^/.]+$/, '') || 'archive'}.zip`) + setShowCompress(true) + }} + > + + Compress + + + handleDelete(item)}> + + Delete + + + + )} + + + )) + )} + + + {!loading && filteredItems.length > 0 ? ( +
+ + Directories:{' '} + {filteredItems.filter((i) => i.is_dir).length} + + + Files:{' '} + {filteredItems.filter((i) => !i.is_dir).length} + + + Showing {filteredItems.length} of {items.length} in folder + +
+ ) : null} + )} + + {clipboard && clipboard.entries.length > 0 ? ( +
+ + Clipboard: {clipboard.op} ({clipboard.entries.length} item) — use Paste in the target folder. +
+ ) : null} ) }