diff --git a/API Server/internal/api/dist/assets/index-4CKxSIBg.css b/API Server/internal/api/dist/assets/index-4CKxSIBg.css new file mode 100644 index 0000000..3b600de --- /dev/null +++ b/API Server/internal/api/dist/assets/index-4CKxSIBg.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap";/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--font-mono:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--spacing:.25rem;--container-sm:24rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--default-mono-font-family:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--font-display:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--radius-sm:6px;--radius-md:10px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mb-px{margin-bottom:-1px}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.pv-btn{border-radius:var(--radius-md);background:var(--brand);height:40px;color:var(--brand-contrast);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);border:1px solid #0000;justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.pv-btn-sec{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);height:40px;color:var(--text-primary);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.pv-input{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);width:100%;height:40px;color:var(--text-primary);font-family:var(--font-sans);padding:0 12px;font-size:.875rem}.pv-input-sm{border-radius:var(--radius-sm);width:auto;height:32px;padding:0 8px;font-size:.75rem}.pv-btn-sm{border-radius:var(--radius-sm);height:32px;padding:0 12px;font-size:.75rem}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.w-1{width:var(--spacing)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-4{width:calc(var(--spacing) * 4)}.w-40{width:calc(var(--spacing) * 40)}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[11rem\]{max-width:11rem}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.rounded-md{border-radius:10px}.rounded-sm{border-radius:6px}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\!border-transparent{border-color:#0000!important}.border-brand{border-color:var(--brand)}.border-subtle{border-color:var(--border-subtle)}.border-transparent{border-color:#0000}.\!bg-success-tint{background-color:var(--success-tint)!important}.bg-brand,.bg-brand\/10{background-color:var(--brand)}@supports (color:color-mix(in lab,red,red)){.bg-brand\/10{background-color:color-mix(in oklab,var(--brand) 10%,transparent)}}.bg-card{background-color:var(--surface-card)}.bg-current{background-color:currentColor}.bg-danger-tint{background-color:var(--danger-tint)}.bg-muted{background-color:var(--text-muted)}.bg-success{background-color:var(--success)}.bg-success-tint{background-color:var(--success-tint)}.bg-sunken{background-color:var(--bg-sunken)}.bg-warning-tint{background-color:var(--warning-tint)}.p-1{padding:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.text-center{text-align:center}.text-left{text-align:left}.pv-eyebrow{font-family:var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted);font-size:11px}.font-display{font-family:Space Grotesk,ui-sans-serif,system-ui,Segoe UI,sans-serif}.font-mono{font-family:Space Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.\!text-danger{color:var(--danger)!important}.\!text-success{color:var(--success)!important}.text-brand-text{color:var(--text-brand)}.text-danger{color:var(--danger)}.text-muted{color:var(--text-muted)}.text-on-brand{color:var(--brand-contrast)}.text-primary{color:var(--text-primary)}.text-secondary{color:var(--text-secondary)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.uppercase{text-transform:uppercase}.shadow-sm{--tw-shadow:var(--sh-sm);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:var(--sh-xs);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}@media(hover:hover){.hover\:bg-sunken:hover{background-color:var(--bg-sunken)}.hover\:text-primary:hover{color:var(--text-primary)}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-40{width:calc(var(--spacing) * 40)}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}}}:root,[data-theme=light]{--navy-950:#0b1730;--navy-900:#0f1e3d;--navy-800:#1b2e52;--navy-700:#26406e;--blue-50:#eaf1fe;--blue-100:#d6e3fd;--blue-300:#8fb4f6;--blue-400:#5b93f5;--blue-500:#3d7bf0;--blue-600:#2b62cc;--blue-700:#1f4ca0;--slate-0:#fff;--slate-50:#f6f7f9;--slate-100:#eef0f3;--slate-150:#e6e9ee;--slate-200:#dce0e7;--slate-300:#c5ccd7;--slate-400:#97a1b0;--slate-500:#6b7688;--slate-700:#333b4a;--steel:#5a6b85;--green-500:#1f8a5b;--green-100:#dcf1e7;--green-600:#177049;--amber-500:#d9852b;--amber-100:#fbebd5;--amber-600:#b86c1b;--red-500:#d64545;--red-100:#fbe0e0;--red-600:#b83232;--bg-page:var(--slate-100);--bg-sunken:var(--slate-50);--surface-card:var(--slate-0);--border-subtle:var(--slate-200);--border-strong:var(--slate-300);--border-focus:var(--blue-500);--text-primary:var(--navy-900);--text-secondary:var(--steel);--text-muted:var(--slate-400);--brand:var(--blue-500);--brand-hover:var(--blue-600);--brand-active:var(--blue-700);--brand-contrast:#fff;--text-brand:var(--blue-600);--success:var(--green-600);--success-tint:var(--green-100);--warning:var(--amber-600);--warning-tint:var(--amber-100);--danger:var(--red-600);--danger-tint:var(--red-100);--ring-focus:0 0 0 3px var(--blue-500)}@supports (color:color-mix(in lab,red,red)){:root,[data-theme=light]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-500) 45%, transparent)}}:root,[data-theme=light]{--sh-xs:0 1px 2px #0f1e3d0f;--sh-sm:0 1px 2px #0f1e3d0f, 0 1px 3px #0f1e3d0a;--dur-fast:.12s;--ease-standard:cubic-bezier(.4, 0, .2, 1);color-scheme:light}[data-theme=dark]{--bg-page:var(--navy-950);--bg-sunken:#0b111c;--surface-card:#10203f;--border-subtle:#ffffff14;--border-strong:#ffffff2e;--border-focus:var(--blue-400);--text-primary:#f4f7fc;--text-secondary:#8fa0be;--text-muted:#5e6e8c;--brand:var(--blue-400);--brand-hover:var(--blue-300);--brand-active:var(--blue-100);--brand-contrast:#0f1e3d;--text-brand:var(--blue-300);--success:#5fd3a0;--success-tint:var(--green-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--success-tint:color-mix(in srgb, var(--green-500) 22%, transparent)}}[data-theme=dark]{--warning:#f0b26a;--warning-tint:var(--amber-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--warning-tint:color-mix(in srgb, var(--amber-500) 22%, transparent)}}[data-theme=dark]{--danger:#f08a8a;--danger-tint:var(--red-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--danger-tint:color-mix(in srgb, var(--red-500) 22%, transparent)}}[data-theme=dark]{--ring-focus:0 0 0 3px var(--blue-400)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-400) 55%, transparent)}}[data-theme=dark]{--sh-xs:0 1px 2px #00000059;--sh-sm:0 1px 3px #0006;color-scheme:dark}html,body,#app{height:100%}body{font-family:var(--font-sans);background:var(--bg-page);color:var(--text-primary);-webkit-font-smoothing:antialiased}h1,h2,h3{font-family:var(--font-display);letter-spacing:-.02em}.pv-btn-sec:hover:not(:disabled){background:var(--bg-sunken)}.pv-btn-sec:active:not(:disabled){transform:translateY(1px)}.pv-btn-sec:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-btn:hover:not(:disabled){background:var(--brand-hover)}.pv-btn:active:not(:disabled){transform:translateY(1px)}.pv-btn:disabled{opacity:.55;cursor:not-allowed}.pv-btn:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-input::placeholder{color:var(--text-muted)}.pv-input:focus{border-color:var(--border-focus);box-shadow:var(--ring-focus);outline:none}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000} diff --git a/API Server/internal/api/dist/assets/index-B8Dqe_UO.js b/API Server/internal/api/dist/assets/index-B8Dqe_UO.js deleted file mode 100644 index 2f24bfd..0000000 --- a/API Server/internal/api/dist/assets/index-B8Dqe_UO.js +++ /dev/null @@ -1,17 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Ps(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const se={},jt=[],tt=()=>{},Fo=()=>!1,zn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Gn=e=>e.startsWith("onUpdate:"),Ae=Object.assign,Os=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Qi=Object.prototype.hasOwnProperty,Q=(e,t)=>Qi.call(e,t),j=Array.isArray,$t=e=>mn(e)==="[object Map]",Gt=e=>mn(e)==="[object Set]",eo=e=>mn(e)==="[object Date]",H=e=>typeof e=="function",ce=e=>typeof e=="string",nt=e=>typeof e=="symbol",te=e=>e!==null&&typeof e=="object",No=e=>(te(e)||H(e))&&H(e.then)&&H(e.catch),Lo=Object.prototype.toString,mn=e=>Lo.call(e),el=e=>mn(e).slice(8,-1),Do=e=>mn(e)==="[object Object]",Us=e=>ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,nn=Ps(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},tl=/-\w/g,He=Wn(e=>e.replace(tl,t=>t.slice(1).toUpperCase())),nl=/\B([A-Z])/g,yt=Wn(e=>e.replace(nl,"-$1").toLowerCase()),jo=Wn(e=>e.charAt(0).toUpperCase()+e.slice(1)),is=Wn(e=>e?`on${jo(e)}`:""),et=(e,t)=>!Object.is(e,t),Rn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Jn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let to;const qn=()=>to||(to=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ms(e){if(j(e)){const t={};for(let n=0;n{if(n){const s=n.split(ol);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ie(e){let t="";if(ce(e))t=e;else if(j(e))for(let n=0;ngt(n,t))}const Vo=e=>!!(e&&e.__v_isRef===!0),O=e=>ce(e)?e:e==null?"":j(e)||te(e)&&(e.toString===Lo||!H(e.toString))?Vo(e)?O(e.value):JSON.stringify(e,Ho,2):String(e),Ho=(e,t)=>Vo(t)?Ho(e,t.value):$t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],i)=>(n[ls(s,i)+" =>"]=o,n),{})}:Gt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ls(n))}:nt(t)?ls(t):te(t)&&!j(t)&&!Do(t)?String(t):t,ls=(e,t="")=>{var n;return nt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ge;class ul{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ge&&(ge.active?(this.parent=ge,this.index=(ge.scopes||(ge.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(ge===this)ge=this.prevScope;else{let t=ge;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(on){let t=on;for(on=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;sn;){let t=sn;for(sn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Wo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Jo(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ns(s),fl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function gs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(qo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===un)||(e.globalVersion=un,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!gs(e))))return;e.flags|=2;const t=e.dep,n=re,s=Ke;re=e,Ke=!0;try{Wo(e);const o=e.fn(e._value);(t.version===0||et(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{re=n,Ke=s,Jo(e),e.flags&=-3}}function Ns(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ns(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function fl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ke=!0;const Yo=[];function st(){Yo.push(Ke),Ke=!1}function ot(){const e=Yo.pop();Ke=e===void 0?!0:e}function no(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=re;re=void 0;try{t()}finally{re=n}}}let un=0;class pl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ls{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!re||!Ke||re===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==re)n=this.activeLink=new pl(re,this),re.deps?(n.prevDep=re.depsTail,re.depsTail.nextDep=n,re.depsTail=n):re.deps=re.depsTail=n,Zo(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=re.depsTail,n.nextDep=void 0,re.depsTail.nextDep=n,re.depsTail=n,re.deps===n&&(re.deps=s)}return n}trigger(t){this.version++,un++,this.notify(t)}notify(t){Is();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Fs()}}}function Zo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Zo(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const vs=new WeakMap,kt=Symbol(""),xs=Symbol(""),dn=Symbol("");function we(e,t,n){if(Ke&&re){let s=vs.get(e);s||vs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Ls),o.map=s,o.key=n),o.track()}}function ut(e,t,n,s,o,i){const l=vs.get(e);if(!l){un++;return}const r=c=>{c&&c.trigger()};if(Is(),t==="clear")l.forEach(r);else{const c=j(e),m=c&&Us(n);if(c&&n==="length"){const h=Number(s);l.forEach((x,U)=>{(U==="length"||U===dn||!nt(U)&&U>=h)&&r(x)})}else switch((n!==void 0||l.has(void 0))&&r(l.get(n)),m&&r(l.get(dn)),t){case"add":c?m&&r(l.get("length")):(r(l.get(kt)),$t(e)&&r(l.get(xs)));break;case"delete":c||(r(l.get(kt)),$t(e)&&r(l.get(xs)));break;case"set":$t(e)&&r(l.get(kt));break}}Fs()}function Nt(e){const t=X(e);return t===e?t:(we(t,"iterate",dn),Be(e)?t:t.map(ze))}function Yn(e){return we(e=X(e),"iterate",dn),e}function Xe(e,t){return pt(e)?Ht(Tt(e)?ze(t):t):ze(t)}const hl={__proto__:null,[Symbol.iterator](){return as(this,Symbol.iterator,e=>Xe(this,e))},concat(...e){return Nt(this).concat(...e.map(t=>j(t)?Nt(t):t))},entries(){return as(this,"entries",e=>(e[1]=Xe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,n=>n.map(s=>Xe(this,s)),arguments)},find(e,t){return rt(this,"find",e,t,n=>Xe(this,n),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,n=>Xe(this,n),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return cs(this,"includes",e)},indexOf(...e){return cs(this,"indexOf",e)},join(e){return Nt(this).join(e)},lastIndexOf(...e){return cs(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return qt(this,"pop")},push(...e){return qt(this,"push",e)},reduce(e,...t){return so(this,"reduce",e,t)},reduceRight(e,...t){return so(this,"reduceRight",e,t)},shift(){return qt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return qt(this,"splice",e)},toReversed(){return Nt(this).toReversed()},toSorted(e){return Nt(this).toSorted(e)},toSpliced(...e){return Nt(this).toSpliced(...e)},unshift(...e){return qt(this,"unshift",e)},values(){return as(this,"values",e=>Xe(this,e))}};function as(e,t,n){const s=Yn(e),o=s[t]();return s!==e&&!Be(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=n(i.value)),i}),o}const bl=Array.prototype;function rt(e,t,n,s,o,i){const l=Yn(e),r=l!==e&&!Be(e),c=l[t];if(c!==bl[t]){const x=c.apply(e,i);return r?ze(x):x}let m=n;l!==e&&(r?m=function(x,U){return n.call(this,Xe(e,x),U,e)}:n.length>2&&(m=function(x,U){return n.call(this,x,U,e)}));const h=c.call(l,m,s);return r&&o?o(h):h}function so(e,t,n,s){const o=Yn(e),i=o!==e&&!Be(e);let l=n,r=!1;o!==e&&(i?(r=s.length===0,l=function(m,h,x){return r&&(r=!1,m=Xe(e,m)),n.call(this,m,Xe(e,h),x,e)}):n.length>3&&(l=function(m,h,x){return n.call(this,m,h,x,e)}));const c=o[t](l,...s);return r?Xe(e,c):c}function cs(e,t,n){const s=X(e);we(s,"iterate",dn);const o=s[t](...n);return(o===-1||o===!1)&&Bs(n[0])?(n[0]=X(n[0]),s[t](...n)):o}function qt(e,t,n=[]){st(),Is();const s=X(e)[t].apply(e,n);return Fs(),ot(),s}const ml=Ps("__proto__,__v_isRef,__isVue"),Xo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(nt));function gl(e){nt(e)||(e=String(e));const t=X(this);return we(t,"has",e),t.hasOwnProperty(e)}class Qo{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(o?i?kl:si:i?ni:ti).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const l=j(t);if(!o){let c;if(l&&(c=hl[n]))return c;if(n==="hasOwnProperty")return gl}const r=Reflect.get(t,n,Se(t)?t:s);if((nt(n)?Xo.has(n):ml(n))||(o||we(t,"get",n),i))return r;if(Se(r)){const c=l&&Us(n)?r:r.value;return o&&te(c)?_s(c):c}return te(r)?o?_s(r):js(r):r}}class ei extends Qo{constructor(t=!1){super(!1,t)}set(t,n,s,o){let i=t[n];const l=j(t)&&Us(n);if(!this._isShallow){const m=pt(i);if(!Be(s)&&!pt(s)&&(i=X(i),s=X(s)),!l&&Se(i)&&!Se(s))return m||(i.value=s),!0}const r=l?Number(n)e,Tn=e=>Reflect.getPrototypeOf(e);function wl(e,t,n){return function(...s){const o=this.__v_raw,i=X(o),l=$t(i),r=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,m=o[e](...s),h=n?ys:t?Ht:ze;return!t&&we(i,"iterate",c?xs:kt),Ae(Object.create(m),{next(){const{value:x,done:U}=m.next();return U?{value:x,done:U}:{value:r?[h(x[0]),h(x[1])]:h(x),done:U}}})}}function Pn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Sl(e,t){const n={get(o){const i=this.__v_raw,l=X(i),r=X(o);e||(et(o,r)&&we(l,"get",o),we(l,"get",r));const{has:c}=Tn(l),m=t?ys:e?Ht:ze;if(c.call(l,o))return m(i.get(o));if(c.call(l,r))return m(i.get(r));i!==l&&i.get(o)},get size(){const o=this.__v_raw;return!e&&we(X(o),"iterate",kt),o.size},has(o){const i=this.__v_raw,l=X(i),r=X(o);return e||(et(o,r)&&we(l,"has",o),we(l,"has",r)),o===r?i.has(o):i.has(o)||i.has(r)},forEach(o,i){const l=this,r=l.__v_raw,c=X(r),m=t?ys:e?Ht:ze;return!e&&we(c,"iterate",kt),r.forEach((h,x)=>o.call(i,m(h),m(x),l))}};return Ae(n,e?{add:Pn("add"),set:Pn("set"),delete:Pn("delete"),clear:Pn("clear")}:{add(o){const i=X(this),l=Tn(i),r=X(o),c=!t&&!Be(o)&&!pt(o)?r:o;return l.has.call(i,c)||et(o,c)&&l.has.call(i,o)||et(r,c)&&l.has.call(i,r)||(i.add(c),ut(i,"add",c,c)),this},set(o,i){!t&&!Be(i)&&!pt(i)&&(i=X(i));const l=X(this),{has:r,get:c}=Tn(l);let m=r.call(l,o);m||(o=X(o),m=r.call(l,o));const h=c.call(l,o);return l.set(o,i),m?et(i,h)&&ut(l,"set",o,i):ut(l,"add",o,i),this},delete(o){const i=X(this),{has:l,get:r}=Tn(i);let c=l.call(i,o);c||(o=X(o),c=l.call(i,o)),r&&r.call(i,o);const m=i.delete(o);return c&&ut(i,"delete",o,void 0),m},clear(){const o=X(this),i=o.size!==0,l=o.clear();return i&&ut(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=wl(o,e,t)}),n}function Ds(e,t){const n=Sl(e,t);return(s,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(Q(n,o)&&o in s?n:s,o,i)}const Al={get:Ds(!1,!1)},Cl={get:Ds(!1,!0)},El={get:Ds(!0,!1)};const ti=new WeakMap,ni=new WeakMap,si=new WeakMap,kl=new WeakMap;function Tl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function js(e){return pt(e)?e:$s(e,!1,xl,Al,ti)}function Pl(e){return $s(e,!1,_l,Cl,ni)}function _s(e){return $s(e,!0,yl,El,si)}function $s(e,t,n,s,o){if(!te(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const l=Tl(el(e));if(l===0)return e;const r=new Proxy(e,l===2?s:n);return o.set(e,r),r}function Tt(e){return pt(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function Be(e){return!!(e&&e.__v_isShallow)}function Bs(e){return e?!!e.__v_raw:!1}function X(e){const t=e&&e.__v_raw;return t?X(t):e}function Ol(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&$o(e,"__v_skip",!0),e}const ze=e=>te(e)?js(e):e,Ht=e=>te(e)?_s(e):e;function Se(e){return e?e.__v_isRef===!0:!1}function L(e){return Ul(e,!1)}function Ul(e,t){return Se(e)?e:new Ml(e,t)}class Ml{constructor(t,n){this.dep=new Ls,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:X(t),this._value=n?t:ze(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Be(t)||pt(t);t=s?t:X(t),et(t,n)&&(this._rawValue=t,this._value=s?t:ze(t),this.dep.trigger())}}function Qt(e){return Se(e)?e.value:e}const Rl={get:(e,t,n)=>t==="__v_raw"?e:Qt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Se(o)&&!Se(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function oi(e){return Tt(e)?e:new Proxy(e,Rl)}class Il{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ls(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=un-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&re!==this)return Go(this,!0),!0}get value(){const t=this.dep.track();return qo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Fl(e,t,n=!1){let s,o;return H(e)?s=e:(s=e.get,o=e.set),new Il(s,o,n)}const On={},Ln=new WeakMap;let Et;function Nl(e,t=!1,n=Et){if(n){let s=Ln.get(n);s||Ln.set(n,s=[]),s.push(e)}}function Ll(e,t,n=se){const{immediate:s,deep:o,once:i,scheduler:l,augmentJob:r,call:c}=n,m=N=>o?N:Be(N)||o===!1||o===0?dt(N,1):dt(N);let h,x,U,R,J=!1,I=!1;if(Se(e)?(x=()=>e.value,J=Be(e)):Tt(e)?(x=()=>m(e),J=!0):j(e)?(I=!0,J=e.some(N=>Tt(N)||Be(N)),x=()=>e.map(N=>{if(Se(N))return N.value;if(Tt(N))return m(N);if(H(N))return c?c(N,2):N()})):H(e)?t?x=c?()=>c(e,2):e:x=()=>{if(U){st();try{U()}finally{ot()}}const N=Et;Et=h;try{return c?c(e,3,[R]):e(R)}finally{Et=N}}:x=tt,t&&o){const N=x,z=o===!0?1/0:o;x=()=>dt(N(),z)}const G=dl(),Y=()=>{h.stop(),G&&G.active&&Os(G.effects,h)};if(i&&t){const N=t;t=(...z)=>{const Me=N(...z);return Y(),Me}}let B=I?new Array(e.length).fill(On):On;const Z=N=>{if(!(!(h.flags&1)||!h.dirty&&!N))if(t){const z=h.run();if(N||o||J||(I?z.some((Me,Le)=>et(Me,B[Le])):et(z,B))){U&&U();const Me=Et;Et=h;try{const Le=[z,B===On?void 0:I&&B[0]===On?[]:B,R];B=z,c?c(t,3,Le):t(...Le)}finally{Et=Me}}}else h.run()};return r&&r(Z),h=new Ko(x),h.scheduler=l?()=>l(Z,!1):Z,R=N=>Nl(N,!1,h),U=h.onStop=()=>{const N=Ln.get(h);if(N){if(c)c(N,4);else for(const z of N)z();Ln.delete(h)}},t?s?Z(!0):B=h.run():l?l(Z.bind(null,!0),!0):h.run(),Y.pause=h.pause.bind(h),Y.resume=h.resume.bind(h),Y.stop=Y,Y}function dt(e,t=1/0,n){if(t<=0||!te(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Se(e))dt(e.value,t,n);else if(j(e))for(let s=0;s{dt(s,t,n)});else if(Do(e)){for(const s in e)dt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&dt(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function gn(e,t,n,s){try{return s?e(...s):e()}catch(o){Zn(o,t,n)}}function Ge(e,t,n,s){if(H(e)){const o=gn(e,t,n,s);return o&&No(o)&&o.catch(i=>{Zn(i,t,n)}),o}if(j(e)){const o=[];for(let i=0;i>>1,o=Te[s],i=fn(o);i=fn(n)?Te.push(e):Te.splice(jl(t),0,e),e.flags|=1,ri()}}function ri(){Dn||(Dn=ii.then(ci))}function $l(e){j(e)?Bt.push(...e):mt&&e.id===-1?mt.splice(Lt+1,0,e):e.flags&1||(Bt.push(e),e.flags|=1),ri()}function oo(e,t,n=Ze+1){for(;nfn(n)-fn(s));if(Bt.length=0,mt){mt.push(...t);return}for(mt=t,Lt=0;Lte.id==null?e.flags&2?-1:1/0:e.id;function ci(e){try{for(Ze=0;Ze{s._d&&mo(-1);const i=jn(t);let l;try{l=e(...o)}finally{jn(i),s._d&&mo(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function le(e,t){if($e===null)return e;const n=ts($e),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&H(t)?t.call(s&&s.proxy):t}}const Hl=Symbol.for("v-scx"),Kl=()=>In(Hl);function us(e,t,n){return di(e,t,n)}function di(e,t,n=se){const{immediate:s,deep:o,flush:i,once:l}=n,r=Ae({},n),c=t&&s||!t&&i!=="post";let m;if(hn){if(i==="sync"){const R=Kl();m=R.__watcherHandles||(R.__watcherHandles=[])}else if(!c){const R=()=>{};return R.stop=tt,R.resume=tt,R.pause=tt,R}}const h=Pe;r.call=(R,J,I)=>Ge(R,h,J,I);let x=!1;i==="post"?r.scheduler=R=>{Ue(R,h&&h.suspense)}:i!=="sync"&&(x=!0,r.scheduler=(R,J)=>{J?R():Vs(R)}),r.augmentJob=R=>{t&&(R.flags|=4),x&&(R.flags|=2,h&&(R.id=h.uid,R.i=h))};const U=Ll(e,t,r);return hn&&(m?m.push(U):c&&U()),U}function zl(e,t,n){const s=this.proxy,o=ce(e)?e.includes(".")?fi(s,e):()=>s[e]:e.bind(s,s);let i;H(t)?i=t:(i=t.handler,n=t);const l=vn(this),r=di(o,i.bind(s),n);return l(),r}function fi(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,ds=Symbol("_leaveCb");function Hs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Hs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function pi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function io(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const $n=new WeakMap;function ln(e,t,n,s,o=!1){if(j(e)){e.forEach((I,G)=>ln(I,t&&(j(t)?t[G]:t),n,s,o));return}if(rn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ln(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?ts(s.component):s.el,l=o?null:i,{i:r,r:c}=e,m=t&&t.r,h=r.refs===se?r.refs={}:r.refs,x=r.setupState,U=X(x),R=x===se?Fo:I=>io(h,I)?!1:Q(U,I),J=(I,G)=>!(G&&io(h,G));if(m!=null&&m!==c){if(lo(t),ce(m))h[m]=null,R(m)&&(x[m]=null);else if(Se(m)){const I=t;J(m,I.k)&&(m.value=null),I.k&&(h[I.k]=null)}}if(H(c)){st();try{gn(c,r,12,[l,h])}finally{ot()}}else{const I=ce(c),G=Se(c);if(I||G){const Y=()=>{if(e.f){const B=I?R(c)?x[c]:h[c]:J()||!e.k?c.value:h[e.k];if(o)j(B)&&Os(B,i);else if(j(B))B.includes(i)||B.push(i);else if(I)h[c]=[i],R(c)&&(x[c]=h[c]);else{const Z=[i];J(c,e.k)&&(c.value=Z),e.k&&(h[e.k]=Z)}}else I?(h[c]=l,R(c)&&(x[c]=l)):G&&(J(c,e.k)&&(c.value=l),e.k&&(h[e.k]=l))};if(l){const B=()=>{Y(),$n.delete(e)};B.id=-1,$n.set(e,B),Ue(B,n)}else lo(e),Y()}}}function lo(e){const t=$n.get(e);t&&(t.flags|=8,$n.delete(e))}qn().requestIdleCallback;qn().cancelIdleCallback;const rn=e=>!!e.type.__asyncLoader,hi=e=>e.type.__isKeepAlive;function Jl(e,t){bi(e,"a",t)}function ql(e,t){bi(e,"da",t)}function bi(e,t,n=Pe){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Xn(t,s,n),n){let o=n.parent;for(;o&&o.parent;)hi(o.parent.vnode)&&Yl(s,t,n,o),o=o.parent}}function Yl(e,t,n,s){const o=Xn(t,e,s,!0);Ks(()=>{Os(s[t],o)},n)}function Xn(e,t,n=Pe,s=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{st();const r=vn(n),c=Ge(t,n,e,l);return r(),ot(),c});return s?o.unshift(i):o.push(i),i}}const ht=e=>(t,n=Pe)=>{(!hn||e==="sp")&&Xn(e,(...s)=>t(...s),n)},Zl=ht("bm"),mi=ht("m"),Xl=ht("bu"),Ql=ht("u"),er=ht("bum"),Ks=ht("um"),tr=ht("sp"),nr=ht("rtg"),sr=ht("rtc");function or(e,t=Pe){Xn("ec",e,t)}const ir=Symbol.for("v-ndc");function ye(e,t,n,s){let o;const i=n,l=j(e);if(l||ce(e)){const r=l&&Tt(e);let c=!1,m=!1;r&&(c=!Be(e),m=pt(e),e=Yn(e)),o=new Array(e.length);for(let h=0,x=e.length;ht(r,c,void 0,i));else{const r=Object.keys(e);o=new Array(r.length);for(let c=0,m=r.length;ce?Li(e)?ts(e):ws(e.parent):null,an=Ae(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ws(e.parent),$root:e=>ws(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>vi(e),$forceUpdate:e=>e.f||(e.f=()=>{Vs(e.update)}),$nextTick:e=>e.n||(e.n=li.bind(e.proxy)),$watch:e=>zl.bind(e)}),fs=(e,t)=>e!==se&&!e.__isScriptSetup&&Q(e,t),lr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:i,accessCache:l,type:r,appContext:c}=e;if(t[0]!=="$"){const U=l[t];if(U!==void 0)switch(U){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(fs(s,t))return l[t]=1,s[t];if(o!==se&&Q(o,t))return l[t]=2,o[t];if(Q(i,t))return l[t]=3,i[t];if(n!==se&&Q(n,t))return l[t]=4,n[t];Ss&&(l[t]=0)}}const m=an[t];let h,x;if(m)return t==="$attrs"&&we(e.attrs,"get",""),m(e);if((h=r.__cssModules)&&(h=h[t]))return h;if(n!==se&&Q(n,t))return l[t]=4,n[t];if(x=c.config.globalProperties,Q(x,t))return x[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:i}=e;return fs(o,t)?(o[t]=n,!0):s!==se&&Q(s,t)?(s[t]=n,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:i,type:l}},r){let c;return!!(n[r]||e!==se&&r[0]!=="$"&&Q(e,r)||fs(t,r)||Q(i,r)||Q(s,r)||Q(an,r)||Q(o.config.globalProperties,r)||(c=l.__cssModules)&&c[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Q(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ro(e){return j(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ss=!0;function rr(e){const t=vi(e),n=e.proxy,s=e.ctx;Ss=!1,t.beforeCreate&&ao(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:l,watch:r,provide:c,inject:m,created:h,beforeMount:x,mounted:U,beforeUpdate:R,updated:J,activated:I,deactivated:G,beforeDestroy:Y,beforeUnmount:B,destroyed:Z,unmounted:N,render:z,renderTracked:Me,renderTriggered:Le,errorCaptured:We,serverPrefetch:De,expose:Oe,inheritAttrs:fe,components:Je,directives:Ce,filters:ve}=t;if(m&&ar(m,s,null),l)for(const oe in l){const q=l[oe];H(q)&&(s[oe]=q.bind(n))}if(o){const oe=o.call(n,n);te(oe)&&(e.data=js(oe))}if(Ss=!0,i)for(const oe in i){const q=i[oe],qe=H(q)?q.bind(n,n):H(q.get)?q.get.bind(n,n):tt,Pt=!H(q)&&H(q.set)?q.set.bind(n):tt,xe=ks({get:qe,set:Pt});Object.defineProperty(s,oe,{enumerable:!0,configurable:!0,get:()=>xe.value,set:me=>xe.value=me})}if(r)for(const oe in r)gi(r[oe],s,n,oe);if(c){const oe=H(c)?c.call(n):c;Reflect.ownKeys(oe).forEach(q=>{Vl(q,oe[q])})}h&&ao(h,e,"c");function be(oe,q){j(q)?q.forEach(qe=>oe(qe.bind(n))):q&&oe(q.bind(n))}if(be(Zl,x),be(mi,U),be(Xl,R),be(Ql,J),be(Jl,I),be(ql,G),be(or,We),be(sr,Me),be(nr,Le),be(er,B),be(Ks,N),be(tr,De),j(Oe))if(Oe.length){const oe=e.exposed||(e.exposed={});Oe.forEach(q=>{Object.defineProperty(oe,q,{get:()=>n[q],set:qe=>n[q]=qe,enumerable:!0})})}else e.exposed||(e.exposed={});z&&e.render===tt&&(e.render=z),fe!=null&&(e.inheritAttrs=fe),Je&&(e.components=Je),Ce&&(e.directives=Ce),De&&pi(e)}function ar(e,t,n=tt){j(e)&&(e=As(e));for(const s in e){const o=e[s];let i;te(o)?"default"in o?i=In(o.from||s,o.default,!0):i=In(o.from||s):i=In(o),Se(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[s]=i}}function ao(e,t,n){Ge(j(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function gi(e,t,n,s){let o=s.includes(".")?fi(n,s):()=>n[s];if(ce(e)){const i=t[e];H(i)&&us(o,i)}else if(H(e))us(o,e.bind(n));else if(te(e))if(j(e))e.forEach(i=>gi(i,t,n,s));else{const i=H(e.handler)?e.handler.bind(n):t[e.handler];H(i)&&us(o,i,e)}}function vi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let c;return r?c=r:!o.length&&!n&&!s?c=t:(c={},o.length&&o.forEach(m=>Bn(c,m,l,!0)),Bn(c,t,l)),te(t)&&i.set(t,c),c}function Bn(e,t,n,s=!1){const{mixins:o,extends:i}=t;i&&Bn(e,i,n,!0),o&&o.forEach(l=>Bn(e,l,n,!0));for(const l in t)if(!(s&&l==="expose")){const r=cr[l]||n&&n[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const cr={data:co,props:uo,emits:uo,methods:en,computed:en,beforeCreate:ke,created:ke,beforeMount:ke,mounted:ke,beforeUpdate:ke,updated:ke,beforeDestroy:ke,beforeUnmount:ke,destroyed:ke,unmounted:ke,activated:ke,deactivated:ke,errorCaptured:ke,serverPrefetch:ke,components:en,directives:en,watch:dr,provide:co,inject:ur};function co(e,t){return t?e?function(){return Ae(H(e)?e.call(this,this):e,H(t)?t.call(this,this):t)}:t:e}function ur(e,t){return en(As(e),As(t))}function As(e){if(j(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${He(t)}Modifiers`]||e[`${yt(t)}Modifiers`];function br(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||se;let o=n;const i=t.startsWith("update:"),l=i&&hr(s,t.slice(7));l&&(l.trim&&(o=n.map(h=>ce(h)?h.trim():h)),l.number&&(o=n.map(Jn)));let r,c=s[r=is(t)]||s[r=is(He(t))];!c&&i&&(c=s[r=is(yt(t))]),c&&Ge(c,e,6,o);const m=s[r+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Ge(m,e,6,o)}}const mr=new WeakMap;function yi(e,t,n=!1){const s=n?mr:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const i=e.emits;let l={},r=!1;if(!H(e)){const c=m=>{const h=yi(m,t,!0);h&&(r=!0,Ae(l,h))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!r?(te(e)&&s.set(e,null),null):(j(i)?i.forEach(c=>l[c]=null):Ae(l,i),te(e)&&s.set(e,l),l)}function Qn(e,t){return!e||!zn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,yt(t))||Q(e,t))}function fo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[i],slots:l,attrs:r,emit:c,render:m,renderCache:h,props:x,data:U,setupState:R,ctx:J,inheritAttrs:I}=e,G=jn(e);let Y,B;try{if(n.shapeFlag&4){const N=o||s,z=N;Y=Qe(m.call(z,N,h,x,R,U,J)),B=r}else{const N=t;Y=Qe(N.length>1?N(x,{attrs:r,slots:l,emit:c}):N(x,null)),B=t.props?r:gr(r)}}catch(N){cn.length=0,Zn(N,e,1),Y=Ne(vt)}let Z=Y;if(B&&I!==!1){const N=Object.keys(B),{shapeFlag:z}=Z;N.length&&z&7&&(i&&N.some(Gn)&&(B=vr(B,i)),Z=Kt(Z,B,!1,!0))}return n.dirs&&(Z=Kt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(n.dirs):n.dirs),n.transition&&Hs(Z,n.transition),Y=Z,jn(G),Y}const gr=e=>{let t;for(const n in e)(n==="class"||n==="style"||zn(n))&&((t||(t={}))[n]=e[n]);return t},vr=(e,t)=>{const n={};for(const s in e)(!Gn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function xr(e,t,n){const{props:s,children:o,component:i}=e,{props:l,children:r,patchFlag:c}=t,m=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?po(s,l,m):!!l;if(c&8){const h=t.dynamicProps;for(let x=0;xObject.create(wi),Ai=e=>Object.getPrototypeOf(e)===wi;function _r(e,t,n,s=!1){const o={},i=Si();e.propsDefaults=Object.create(null),Ci(e,t,o,i);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);n?e.props=s?o:Pl(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function wr(e,t,n,s){const{props:o,attrs:i,vnode:{patchFlag:l}}=e,r=X(o),[c]=e.propsOptions;let m=!1;if((s||l>0)&&!(l&16)){if(l&8){const h=e.vnode.dynamicProps;for(let x=0;x{c=!0;const[U,R]=Ei(x,t,!0);Ae(l,U),R&&r.push(...R)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!c)return te(e)&&s.set(e,jt),jt;if(j(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Gs=e=>j(e)?e.map(Qe):[Qe(e)],Ar=(e,t,n)=>{if(t._n)return t;const s=Bl((...o)=>Gs(t(...o)),n);return s._c=!1,s},ki=(e,t,n)=>{const s=e._ctx;for(const o in e){if(zs(o))continue;const i=e[o];if(H(i))t[o]=Ar(o,i,s);else if(i!=null){const l=Gs(i);t[o]=()=>l}}},Ti=(e,t)=>{const n=Gs(t);e.slots.default=()=>n},Pi=(e,t,n)=>{for(const s in t)(n||!zs(s))&&(e[s]=t[s])},Cr=(e,t,n)=>{const s=e.slots=Si();if(e.vnode.shapeFlag&32){const o=t._;o?(Pi(s,t,n),n&&$o(s,"_",o,!0)):ki(t,s)}else t&&Ti(e,t)},Er=(e,t,n)=>{const{vnode:s,slots:o}=e;let i=!0,l=se;if(s.shapeFlag&32){const r=t._;r?n&&r===1?i=!1:Pi(o,t,n):(i=!t.$stable,ki(t,o)),l=t}else t&&(Ti(e,t),l={default:1});if(i)for(const r in o)!zs(r)&&l[r]==null&&delete o[r]},Ue=Ur;function kr(e){return Tr(e)}function Tr(e,t){const n=qn();n.__VUE__=!0;const{insert:s,remove:o,patchProp:i,createElement:l,createText:r,createComment:c,setText:m,setElementText:h,parentNode:x,nextSibling:U,setScopeId:R=tt,insertStaticContent:J}=e,I=(a,p,g,w=null,_=null,y=null,T=void 0,C=null,A=!!p.dynamicChildren)=>{if(a===p)return;a&&!Yt(a,p)&&(w=Ot(a),me(a,_,y,!0),a=null),p.patchFlag===-2&&(A=!1,p.dynamicChildren=null);const{type:v,ref:M,shapeFlag:P}=p;switch(v){case es:G(a,p,g,w);break;case vt:Y(a,p,g,w);break;case Fn:a==null&&B(p,g,w,T);break;case ne:Je(a,p,g,w,_,y,T,C,A);break;default:P&1?z(a,p,g,w,_,y,T,C,A):P&6?Ce(a,p,g,w,_,y,T,C,A):(P&64||P&128)&&v.process(a,p,g,w,_,y,T,C,A,St)}M!=null&&_?ln(M,a&&a.ref,y,p||a,!p):M==null&&a&&a.ref!=null&&ln(a.ref,null,y,a,!0)},G=(a,p,g,w)=>{if(a==null)s(p.el=r(p.children),g,w);else{const _=p.el=a.el;p.children!==a.children&&m(_,p.children)}},Y=(a,p,g,w)=>{a==null?s(p.el=c(p.children||""),g,w):p.el=a.el},B=(a,p,g,w)=>{[a.el,a.anchor]=J(a.children,p,g,w,a.el,a.anchor)},Z=({el:a,anchor:p},g,w)=>{let _;for(;a&&a!==p;)_=U(a),s(a,g,w),a=_;s(p,g,w)},N=({el:a,anchor:p})=>{let g;for(;a&&a!==p;)g=U(a),o(a),a=g;o(p)},z=(a,p,g,w,_,y,T,C,A)=>{if(p.type==="svg"?T="svg":p.type==="math"&&(T="mathml"),a==null)Me(p,g,w,_,y,T,C,A);else{const v=a.el&&a.el._isVueCE?a.el:null;try{v&&v._beginPatch(),De(a,p,_,y,T,C,A)}finally{v&&v._endPatch()}}},Me=(a,p,g,w,_,y,T,C)=>{let A,v;const{props:M,shapeFlag:P,transition:F,dirs:D}=a;if(A=a.el=l(a.type,y,M&&M.is,M),P&8?h(A,a.children):P&16&&We(a.children,A,null,w,_,ps(a,y),T,C),D&&At(a,null,w,"created"),Le(A,a,a.scopeId,T,w),M){for(const W in M)W!=="value"&&!nn(W)&&i(A,W,null,M[W],y,w);"value"in M&&i(A,"value",null,M.value,y),(v=M.onVnodeBeforeMount)&&Ye(v,w,a)}D&&At(a,null,w,"beforeMount");const K=Pr(_,F);K&&F.beforeEnter(A),s(A,p,g),((v=M&&M.onVnodeMounted)||K||D)&&Ue(()=>{try{v&&Ye(v,w,a),K&&F.enter(A),D&&At(a,null,w,"mounted")}finally{}},_)},Le=(a,p,g,w,_)=>{if(g&&R(a,g),w)for(let y=0;y{for(let v=A;v{const C=p.el=a.el;let{patchFlag:A,dynamicChildren:v,dirs:M}=p;A|=a.patchFlag&16;const P=a.props||se,F=p.props||se;let D;if(g&&Ct(g,!1),(D=F.onVnodeBeforeUpdate)&&Ye(D,g,p,a),M&&At(p,a,g,"beforeUpdate"),g&&Ct(g,!0),v&&(!a.dynamicChildren||a.dynamicChildren.length!==v.length)&&(A=0,T=!1,v=null),(P.innerHTML&&F.innerHTML==null||P.textContent&&F.textContent==null)&&h(C,""),v?Oe(a.dynamicChildren,v,C,g,w,ps(p,_),y):T||q(a,p,C,null,g,w,ps(p,_),y,!1),A>0){if(A&16)fe(C,P,F,g,_);else if(A&2&&P.class!==F.class&&i(C,"class",null,F.class,_),A&4&&i(C,"style",P.style,F.style,_),A&8){const K=p.dynamicProps;for(let W=0;W{D&&Ye(D,g,p,a),M&&At(p,a,g,"updated")},w)},Oe=(a,p,g,w,_,y,T)=>{for(let C=0;C{if(p!==g){if(p!==se)for(const y in p)!nn(y)&&!(y in g)&&i(a,y,p[y],null,_,w);for(const y in g){if(nn(y))continue;const T=g[y],C=p[y];T!==C&&y!=="value"&&i(a,y,C,T,_,w)}"value"in g&&i(a,"value",p.value,g.value,_)}},Je=(a,p,g,w,_,y,T,C,A)=>{const v=p.el=a?a.el:r(""),M=p.anchor=a?a.anchor:r("");let{patchFlag:P,dynamicChildren:F,slotScopeIds:D}=p;D&&(C=C?C.concat(D):D),a==null?(s(v,g,w),s(M,g,w),We(p.children||[],g,M,_,y,T,C,A)):P>0&&P&64&&F&&a.dynamicChildren&&a.dynamicChildren.length===F.length?(Oe(a.dynamicChildren,F,g,_,y,T,C),(p.key!=null||_&&p===_.subTree)&&Oi(a,p,!0)):q(a,p,g,M,_,y,T,C,A)},Ce=(a,p,g,w,_,y,T,C,A)=>{p.slotScopeIds=C,a==null?p.shapeFlag&512?_.ctx.activate(p,g,w,T,A):ve(p,g,w,_,y,T,A):Wt(a,p,A)},ve=(a,p,g,w,_,y,T)=>{const C=a.component=$r(a,w,_);if(hi(a)&&(C.ctx.renderer=St),Vr(C,!1,T),C.asyncDep){if(_&&_.registerDep(C,be,T),!a.el){const A=C.subTree=Ne(vt);Y(null,A,p,g),a.placeholder=A.el}}else be(C,a,p,g,_,y,T)},Wt=(a,p,g)=>{const w=p.component=a.component;if(xr(a,p,g))if(w.asyncDep&&!w.asyncResolved){oe(w,p,g);return}else w.next=p,w.update();else p.el=a.el,w.vnode=p},be=(a,p,g,w,_,y,T)=>{const C=()=>{if(a.isMounted){let{next:P,bu:F,u:D,parent:K,vnode:W}=a;{const ue=Ui(a);if(ue){P&&(P.el=W.el,oe(a,P,T)),ue.asyncDep.then(()=>{Ue(()=>{a.isUnmounted||v()},_)});return}}let $=P,ee;Ct(a,!1),P?(P.el=W.el,oe(a,P,T)):P=W,F&&Rn(F),(ee=P.props&&P.props.onVnodeBeforeUpdate)&&Ye(ee,K,P,W),Ct(a,!0);const ae=fo(a),Ee=a.subTree;a.subTree=ae,I(Ee,ae,x(Ee.el),Ot(Ee),a,_,y),P.el=ae.el,$===null&&yr(a,ae.el),D&&Ue(D,_),(ee=P.props&&P.props.onVnodeUpdated)&&Ue(()=>Ye(ee,K,P,W),_)}else{let P;const{el:F,props:D}=p,{bm:K,m:W,parent:$,root:ee,type:ae}=a,Ee=rn(p);Ct(a,!1),K&&Rn(K),!Ee&&(P=D&&D.onVnodeBeforeMount)&&Ye(P,$,p),Ct(a,!0);{ee.ce&&ee.ce._hasShadowRoot()&&ee.ce._injectChildStyle(ae,a.parent?a.parent.type:void 0);const ue=a.subTree=fo(a);I(null,ue,g,w,a,_,y),p.el=ue.el}if(W&&Ue(W,_),!Ee&&(P=D&&D.onVnodeMounted)){const ue=p;Ue(()=>Ye(P,$,ue),_)}(p.shapeFlag&256||$&&rn($.vnode)&&$.vnode.shapeFlag&256)&&a.a&&Ue(a.a,_),a.isMounted=!0,p=g=w=null}};a.scope.on();const A=a.effect=new Ko(C);a.scope.off();const v=a.update=A.run.bind(A),M=a.job=A.runIfDirty.bind(A);M.i=a,M.id=a.uid,A.scheduler=()=>Vs(M),Ct(a,!0),v()},oe=(a,p,g)=>{p.component=a;const w=a.vnode.props;a.vnode=p,a.next=null,wr(a,p.props,w,g),Er(a,p.children,g),st(),oo(a),ot()},q=(a,p,g,w,_,y,T,C,A=!1)=>{const v=a&&a.children,M=a?a.shapeFlag:0,P=p.children,{patchFlag:F,shapeFlag:D}=p;if(F>0){if(F&128){Pt(v,P,g,w,_,y,T,C,A);return}else if(F&256){qe(v,P,g,w,_,y,T,C,A);return}}D&8?(M&16&&wt(v,_,y),P!==v&&h(g,P)):M&16?D&16?Pt(v,P,g,w,_,y,T,C,A):wt(v,_,y,!0):(M&8&&h(g,""),D&16&&We(P,g,w,_,y,T,C,A))},qe=(a,p,g,w,_,y,T,C,A)=>{a=a||jt,p=p||jt;const v=a.length,M=p.length,P=Math.min(v,M);let F;for(F=0;FM?wt(a,_,y,!0,!1,P):We(p,g,w,_,y,T,C,A,P)},Pt=(a,p,g,w,_,y,T,C,A)=>{let v=0;const M=p.length;let P=a.length-1,F=M-1;for(;v<=P&&v<=F;){const D=a[v],K=p[v]=A?ct(p[v]):Qe(p[v]);if(Yt(D,K))I(D,K,g,null,_,y,T,C,A);else break;v++}for(;v<=P&&v<=F;){const D=a[P],K=p[F]=A?ct(p[F]):Qe(p[F]);if(Yt(D,K))I(D,K,g,null,_,y,T,C,A);else break;P--,F--}if(v>P){if(v<=F){const D=F+1,K=DF)for(;v<=P;)me(a[v],_,y,!0),v++;else{const D=v,K=v,W=new Map;for(v=K;v<=F;v++){const ie=p[v]=A?ct(p[v]):Qe(p[v]);ie.key!=null&&W.set(ie.key,v)}let $,ee=0;const ae=F-K+1;let Ee=!1,ue=0;const pe=new Array(ae);for(v=0;v=ae){me(ie,_,y,!0);continue}let he;if(ie.key!=null)he=W.get(ie.key);else for($=K;$<=F;$++)if(pe[$-K]===0&&Yt(ie,p[$])){he=$;break}he===void 0?me(ie,_,y,!0):(pe[he-K]=v+1,he>=ue?ue=he:Ee=!0,I(ie,p[he],g,null,_,y,T,C,A),ee++)}const it=Ee?Or(pe):jt;for($=it.length-1,v=ae-1;v>=0;v--){const ie=K+v,he=p[ie],yn=p[ie+1],_n=ie+1{const{el:y,type:T,transition:C,children:A,shapeFlag:v}=a;if(v&6){xe(a.component.subTree,p,g,w);return}if(v&128){a.suspense.move(p,g,w);return}if(v&64){T.move(a,p,g,St);return}if(T===ne){s(y,p,g);for(let P=0;PC.enter(y),_));else{const{leave:P,delayLeave:F,afterLeave:D}=C,K=()=>{a.ctx.isUnmounted?o(y):s(y,p,g)},W=()=>{const $=y._isLeaving||!!y[ds];y._isLeaving&&y[ds](!0),C.persisted&&!$?K():P(y,()=>{K(),D&&D()})};F?F(y,K,W):W()}else s(y,p,g)},me=(a,p,g,w=!1,_=!1)=>{const{type:y,props:T,ref:C,children:A,dynamicChildren:v,shapeFlag:M,patchFlag:P,dirs:F,cacheIndex:D,memo:K}=a;if(P===-2&&(_=!1),C!=null&&(st(),ln(C,null,g,a,!0),ot()),D!=null&&(p.renderCache[D]=void 0),M&256){p.ctx.deactivate(a);return}const W=M&1&&F,$=!rn(a);let ee;if($&&(ee=T&&T.onVnodeBeforeUnmount)&&Ye(ee,p,a),M&6)Jt(a.component,g,w);else{if(M&128){a.suspense.unmount(g,w);return}W&&At(a,null,p,"beforeUnmount"),M&64?a.type.remove(a,p,g,St,w):v&&!v.hasOnce&&(y!==ne||P>0&&P&64)?wt(v,p,g,!1,!0):(y===ne&&P&384||!_&&M&16)&&wt(A,p,g),w&&_t(a)}const ae=K!=null&&D==null;($&&(ee=T&&T.onVnodeUnmounted)||W||ae)&&Ue(()=>{ee&&Ye(ee,p,a),W&&At(a,null,p,"unmounted"),ae&&(a.el=null)},g)},_t=a=>{const{type:p,el:g,anchor:w,transition:_}=a;if(p===ne){ns(g,w);return}if(p===Fn){N(a);return}const y=()=>{o(g),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(a.shapeFlag&1&&_&&!_.persisted){const{leave:T,delayLeave:C}=_,A=()=>T(g,y);C?C(a.el,y,A):A()}else y()},ns=(a,p)=>{let g;for(;a!==p;)g=U(a),o(a),a=g;o(p)},Jt=(a,p,g)=>{const{bum:w,scope:_,job:y,subTree:T,um:C,m:A,a:v}=a;bo(A),bo(v),w&&Rn(w),_.stop(),y&&(y.flags|=8,me(T,a,p,g)),C&&Ue(C,p),Ue(()=>{a.isUnmounted=!0},p)},wt=(a,p,g,w=!1,_=!1,y=0)=>{for(let T=y;T{if(a.shapeFlag&6)return Ot(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const p=U(a.anchor||a.el),g=p&&p[Gl];return g?U(g):p};let Ut=!1;const xn=(a,p,g)=>{let w;a==null?p._vnode&&(me(p._vnode,null,null,!0),w=p._vnode.component):I(p._vnode||null,a,p,null,null,null,g),p._vnode=a,Ut||(Ut=!0,oo(w),ai(),Ut=!1)},St={p:I,um:me,m:xe,r:_t,mt:ve,mc:We,pc:q,pbc:Oe,n:Ot,o:e};return{render:xn,hydrate:void 0,createApp:pr(xn)}}function ps({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Pr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Oi(e,t,n=!1){const s=e.children,o=t.children;if(j(s)&&j(o))for(let i=0;i>1,e[n[r]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function Ui(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ui(t)}function bo(e){if(e)for(let t=0;te.__isSuspense;function Ur(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):$l(e)}const ne=Symbol.for("v-fgt"),es=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),Fn=Symbol.for("v-stc"),cn=[];let Fe=null;function E(e=!1){cn.push(Fe=e?null:[])}function Mr(){cn.pop(),Fe=cn[cn.length-1]||null}let pn=1;function mo(e,t=!1){pn+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function Ii(e){return e.dynamicChildren=pn>0?Fe||jt:null,Mr(),pn>0&&Fe&&Fe.push(e),e}function k(e,t,n,s,o,i){return Ii(f(e,t,n,s,o,i,!0))}function Rr(e,t,n,s,o){return Ii(Ne(e,t,n,s,o,!0))}function Fi(e){return e?e.__v_isVNode===!0:!1}function Yt(e,t){return e.type===t.type&&e.key===t.key}const Ni=({key:e})=>e??null,Nn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ce(e)||Se(e)||H(e)?{i:$e,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,o=null,i=e===ne?0:1,l=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ni(t),ref:t&&Nn(t),scopeId:ui,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:$e};return r?(Vn(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=ce(n)?8:16),pn>0&&!l&&Fe&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Fe.push(c),c}const Ne=Ir;function Ir(e,t=null,n=null,s=0,o=null,i=!1){if((!e||e===ir)&&(e=vt),Fi(e)){const r=Kt(e,t,!0);return n&&Vn(r,n),pn>0&&!i&&Fe&&(r.shapeFlag&6?Fe[Fe.indexOf(e)]=r:Fe.push(r)),r.patchFlag=-2,r}if(Gr(e)&&(e=e.__vccOpts),t){t=Fr(t);let{class:r,style:c}=t;r&&!ce(r)&&(t.class=Ie(r)),te(c)&&(Bs(c)&&!j(c)&&(c=Ae({},c)),t.style=Ms(c))}const l=ce(e)?1:Ri(e)?128:Wl(e)?64:te(e)?4:H(e)?2:0;return f(e,t,n,s,o,l,i,!0)}function Fr(e){return e?Bs(e)||Ai(e)?Ae({},e):e:null}function Kt(e,t,n=!1,s=!1){const{props:o,ref:i,patchFlag:l,children:r,transition:c}=e,m=t?Lr(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&Ni(m),ref:t&&t.ref?n&&i?j(i)?i.concat(Nn(t)):[i,Nn(t)]:Nn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ne?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kt(e.ssContent),ssFallback:e.ssFallback&&Kt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Hs(h,c.clone(h)),h}function je(e=" ",t=0){return Ne(es,null,e,t)}function Nr(e,t){const n=Ne(Fn,null,e);return n.staticCount=t,n}function V(e="",t=!1){return t?(E(),Rr(vt,null,e)):Ne(vt,null,e)}function Qe(e){return e==null||typeof e=="boolean"?Ne(vt):j(e)?Ne(ne,null,e.slice()):Fi(e)?ct(e):Ne(es,null,String(e))}function ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kt(e)}function Vn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(j(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Vn(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Ai(t)?t._ctx=$e:o===3&&$e&&($e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(H(t)){if(s&65){Vn(e,{default:t});return}t={default:t,_ctx:$e},n=32}else t=String(t),s&64?(n=16,t=[je(t)]):n=8;e.children=t,e.shapeFlag|=n}function Lr(...e){const t={};for(let n=0;nPe||$e;let Hn,Es;{const e=qn(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),i=>{o.length>1?o.forEach(l=>l(i)):o[0](i)}};Hn=t("__VUE_INSTANCE_SETTERS__",n=>Pe=n),Es=t("__VUE_SSR_SETTERS__",n=>hn=n)}const vn=e=>{const t=Pe;return Hn(e),e.scope.on(),()=>{e.scope.off(),Hn(t)}},go=()=>{Pe&&Pe.scope.off(),Hn(null)};function Li(e){return e.vnode.shapeFlag&4}let hn=!1;function Vr(e,t=!1,n=!1){t&&Es(t);const{props:s,children:o}=e.vnode,i=Li(e);_r(e,s,i,t),Cr(e,o,n||t);const l=i?Hr(e,t):void 0;return t&&Es(!1),l}function Hr(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lr);const{setup:s}=n;if(s){st();const o=e.setupContext=s.length>1?zr(e):null,i=vn(e),l=gn(s,e,0,[e.props,o]),r=No(l);if(ot(),i(),(r||e.sp)&&!rn(e)&&pi(e),r){if(l.then(go,go),t)return l.then(c=>{vo(e,c)}).catch(c=>{Zn(c,e,0)});e.asyncDep=l}else vo(e,l)}else Di(e)}function vo(e,t,n){H(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:te(t)&&(e.setupState=oi(t)),Di(e)}function Di(e,t,n){const s=e.type;e.render||(e.render=s.render||tt);{const o=vn(e);st();try{rr(e)}finally{ot(),o()}}}const Kr={get(e,t){return we(e,"get",""),e[t]}};function zr(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Kr),slots:e.slots,emit:e.emit,expose:t}}function ts(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(oi(Ol(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in an)return an[n](e)},has(t,n){return n in t||n in an}})):e.proxy}function Gr(e){return H(e)&&"__vccOpts"in e}const ks=(e,t)=>Fl(e,t,hn),Wr="3.5.39";/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ts;const xo=typeof window<"u"&&window.trustedTypes;if(xo)try{Ts=xo.createPolicy("vue",{createHTML:e=>e})}catch{}const ji=Ts?e=>Ts.createHTML(e):e=>e,Jr="http://www.w3.org/2000/svg",qr="http://www.w3.org/1998/Math/MathML",at=typeof document<"u"?document:null,yo=at&&at.createElement("template"),Yr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?at.createElementNS(Jr,e):t==="mathml"?at.createElementNS(qr,e):n?at.createElement(e,{is:n}):at.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>at.createTextNode(e),createComment:e=>at.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>at.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,i){const l=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{yo.innerHTML=ji(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const r=yo.content;if(s==="svg"||s==="mathml"){const c=r.firstChild;for(;c.firstChild;)r.appendChild(c.firstChild);r.removeChild(c)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zr=Symbol("_vtc");function Xr(e,t,n){const s=e[Zr];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Kn=Symbol("_vod"),$i=Symbol("_vsh"),Zt={name:"show",beforeMount(e,{value:t},{transition:n}){e[Kn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Xt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Xt(e,!0),s.enter(e)):s.leave(e,()=>{Xt(e,!1)}):Xt(e,t))},beforeUnmount(e,{value:t}){Xt(e,t)}};function Xt(e,t){e.style.display=t?e[Kn]:"none",e[$i]=!t}const Qr=Symbol(""),ea=/(?:^|;)\s*display\s*:/;function ta(e,t,n){const s=e.style,o=ce(n);let i=!1;if(n&&!o){if(t)if(ce(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();n[r]==null&&tn(s,r,"")}else for(const l in t)n[l]==null&&tn(s,l,"");for(const l in n){l==="display"&&(i=!0);const r=n[l];r!=null?sa(e,l,!ce(t)&&t?t[l]:void 0,r)||tn(s,l,r):tn(s,l,"")}}else if(o){if(t!==n){const l=s[Qr];l&&(n+=";"+l),s.cssText=n,i=ea.test(n)}}else t&&e.removeAttribute("style");Kn in e&&(e[Kn]=i?s.display:"",e[$i]&&(s.display="none"))}const _o=/\s*!important$/;function tn(e,t,n){if(j(n))n.forEach(s=>tn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=na(e,t);_o.test(n)?e.setProperty(yt(s),n.replace(_o,""),"important"):e[s]=n}}const wo=["Webkit","Moz","ms"],hs={};function na(e,t){const n=hs[t];if(n)return n;let s=He(t);if(s!=="filter"&&s in e)return hs[t]=s;s=jo(s);for(let o=0;obs||(ca.then(()=>bs=0),bs=Date.now());function da(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(j(o)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const l=o.slice(),r=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,fa=(e,t,n,s,o,i)=>{const l=o==="svg";t==="class"?Xr(e,s,l):t==="style"?ta(e,n,s):zn(t)?Gn(t)||ia(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pa(e,t,s,l))?(Co(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ao(e,t,s,l,i,t!=="value")):e._isVueCE&&(ha(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ce(s)))?Co(e,He(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Ao(e,t,s,l))};function pa(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ko(t)&&H(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return ko(t)&&ce(n)?!1:t in e}function ha(e,t){const n=e._def.props;if(!n)return!1;const s=He(t);return Array.isArray(n)?n.some(o=>He(o)===s):Object.keys(n).some(o=>He(o)===s)}const xt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return j(t)?n=>Rn(t,n):t};function ba(e){e.target.composing=!0}function To(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ve=Symbol("_assign");function Po(e,t,n){return t&&(e=e.trim()),n&&(e=Jn(e)),e}const _e={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[Ve]=xt(o);const i=s||o.props&&o.props.type==="number";ft(e,t?"change":"input",l=>{l.target.composing||e[Ve](Po(e.value,n,i))}),(n||i)&&ft(e,"change",()=>{e.value=Po(e.value,n,i)}),t||(ft(e,"compositionstart",ba),ft(e,"compositionend",To),ft(e,"change",To))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:i}},l){if(e[Ve]=xt(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?Jn(e.value):e.value,c=t??"";if(r===c)return;const m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===c)||(e.value=c)}},Bi={deep:!0,created(e,t,n){e[Ve]=xt(n),ft(e,"change",()=>{const s=e._modelValue,o=zt(e),i=e.checked,l=e[Ve];if(j(s)){const r=Rs(s,o),c=r!==-1;if(i&&!c)l(s.concat(o));else if(!i&&c){const m=[...s];m.splice(r,1),l(m)}}else if(Gt(s)){const r=new Set(s);i?r.add(o):r.delete(o),l(r)}else l(Vi(e,i))})},mounted:Oo,beforeUpdate(e,t,n){e[Ve]=xt(n),Oo(e,t,n)}};function Oo(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(j(t))o=Rs(t,s.props.value)>-1;else if(Gt(t))o=t.has(s.props.value);else{if(t===n)return;o=gt(t,Vi(e,!0))}e.checked!==o&&(e.checked=o)}const ma={created(e,{value:t},n){e.checked=gt(t,n.props.value),e[Ve]=xt(n),ft(e,"change",()=>{e[Ve](zt(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[Ve]=xt(s),t!==n&&(e.checked=gt(t,s.props.value))}},Dt={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=Gt(t);ft(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?Jn(zt(l)):zt(l));e[Ve](e.multiple?o?new Set(i):i:i[0]),e._assigning=!0,li(()=>{e._assigning=!1})}),e[Ve]=xt(s)},mounted(e,{value:t}){Uo(e,t)},beforeUpdate(e,t,n){e[Ve]=xt(n)},updated(e,{value:t}){e._assigning||Uo(e,t)}};function Uo(e,t){const n=e.multiple,s=j(t);if(!(n&&!s&&!Gt(t))){for(let o=0,i=e.options.length;oString(m)===String(r)):l.selected=Rs(t,r)>-1}else l.selected=t.has(r);else if(gt(zt(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function zt(e){return"_value"in e?e._value:e.value}function Vi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ga={created(e,t,n){Un(e,t,n,null,"created")},mounted(e,t,n){Un(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Un(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Un(e,t,n,s,"updated")}};function va(e,t){switch(e){case"SELECT":return Dt;case"TEXTAREA":return _e;default:switch(t){case"checkbox":return Bi;case"radio":return ma;default:return _e}}}function Un(e,t,n,s,o){const l=va(e.tagName,n.props&&n.props.type)[o];l&&l(e,t,n,s)}const xa=["ctrl","shift","alt","meta"],ya={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>xa.some(n=>e[`${n}Key`]&&!t.includes(n))},_a=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...i)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const i=yt(o.key);if(t.some(l=>l===i||wa[l]===i))return e(o)}))},Sa=Ae({patchProp:fa},Yr);let Ro;function Aa(){return Ro||(Ro=kr(Sa))}const Ca=((...e)=>{const t=Aa().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=ka(s);if(!o)return;const i=t._component;!H(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=n(o,!1,Ea(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Ea(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ka(e){return ce(e)?document.querySelector(e):e}const Hi="pilotvault-theme";function Ta(){try{return localStorage.getItem(Hi)==="dark"?"dark":"light"}catch{return"light"}}const bn=L(Ta());function Ki(e){bn.value=e,document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(Hi,e)}catch{}}function Io(){Ki(bn.value==="dark"?"light":"dark")}Ki(bn.value);const Pa=[{code:"AL",name:"Albania",continent:"EU",bbox:"39.6,19.3,42.7,21.1"},{code:"AD",name:"Andorra",continent:"EU",bbox:"42.4,1.4,42.7,1.8"},{code:"AT",name:"Austria",continent:"EU",bbox:"46.4,9.5,49.0,17.2"},{code:"BY",name:"Belarus",continent:"EU",bbox:"51.2,23.2,56.2,32.8"},{code:"BE",name:"Belgium",continent:"EU",bbox:"49.5,2.5,51.5,6.4"},{code:"BA",name:"Bosnia and Herzegovina",continent:"EU",bbox:"42.6,15.7,45.3,19.6"},{code:"BG",name:"Bulgaria",continent:"EU",bbox:"41.2,22.4,44.2,28.6"},{code:"HR",name:"Croatia",continent:"EU",bbox:"42.4,13.5,46.6,19.4"},{code:"CY",name:"Cyprus",continent:"EU",bbox:"34.6,32.3,35.7,34.6"},{code:"CZ",name:"Czechia",continent:"EU",bbox:"48.6,12.1,51.1,18.9"},{code:"DK",name:"Denmark",continent:"EU",bbox:"54.6,8.1,57.8,12.7"},{code:"EE",name:"Estonia",continent:"EU",bbox:"57.5,21.8,59.7,28.2"},{code:"FI",name:"Finland",continent:"EU",bbox:"59.8,20.6,70.1,31.6"},{code:"FR",name:"France",continent:"EU",bbox:"41.3,-5.2,51.1,9.6"},{code:"DE",name:"Germany",continent:"EU",bbox:"47.2,5.8,55.1,15.1"},{code:"GR",name:"Greece",continent:"EU",bbox:"34.8,19.4,41.8,28.3"},{code:"HU",name:"Hungary",continent:"EU",bbox:"45.7,16.1,48.6,22.9"},{code:"IS",name:"Iceland",continent:"EU",bbox:"63.3,-24.6,66.6,-13.5"},{code:"IE",name:"Ireland",continent:"EU",bbox:"51.4,-10.6,55.4,-6.0"},{code:"IT",name:"Italy",continent:"EU",bbox:"36.6,6.6,47.1,18.6"},{code:"XK",name:"Kosovo",continent:"EU",bbox:"41.8,20.0,43.3,21.8"},{code:"LV",name:"Latvia",continent:"EU",bbox:"55.7,20.9,58.1,28.2"},{code:"LI",name:"Liechtenstein",continent:"EU",bbox:"47.0,9.4,47.3,9.6"},{code:"LT",name:"Lithuania",continent:"EU",bbox:"53.9,20.9,56.5,26.9"},{code:"LU",name:"Luxembourg",continent:"EU",bbox:"49.4,5.7,50.2,6.5"},{code:"MT",name:"Malta",continent:"EU",bbox:"35.8,14.1,36.1,14.6"},{code:"MD",name:"Moldova",continent:"EU",bbox:"45.4,26.6,48.5,30.2"},{code:"MC",name:"Monaco",continent:"EU",bbox:"43.72,7.40,43.75,7.44"},{code:"ME",name:"Montenegro",continent:"EU",bbox:"41.8,18.4,43.6,20.4"},{code:"NL",name:"Netherlands",continent:"EU",bbox:"50.7,3.3,53.7,7.2"},{code:"MK",name:"North Macedonia",continent:"EU",bbox:"40.8,20.4,42.4,23.0"},{code:"NO",name:"Norway",continent:"EU",bbox:"57.9,4.6,71.2,31.1"},{code:"PL",name:"Poland",continent:"EU",bbox:"49.0,14.1,54.9,24.2"},{code:"PT",name:"Portugal",continent:"EU",bbox:"36.9,-9.5,42.2,-6.2"},{code:"RO",name:"Romania",continent:"EU",bbox:"43.6,20.2,48.3,29.7"},{code:"SM",name:"San Marino",continent:"EU",bbox:"43.89,12.40,43.99,12.52"},{code:"RS",name:"Serbia",continent:"EU",bbox:"42.2,18.8,46.2,23.0"},{code:"SK",name:"Slovakia",continent:"EU",bbox:"47.7,16.8,49.6,22.6"},{code:"SI",name:"Slovenia",continent:"EU",bbox:"45.4,13.4,46.9,16.6"},{code:"ES",name:"Spain",continent:"EU",bbox:"35.9,-9.4,43.8,3.4"},{code:"SE",name:"Sweden",continent:"EU",bbox:"55.3,11.1,69.1,24.2"},{code:"CH",name:"Switzerland",continent:"EU",bbox:"45.8,5.9,47.8,10.5"},{code:"UA",name:"Ukraine",continent:"EU",bbox:"44.4,22.1,52.4,40.2"},{code:"GB",name:"United Kingdom",continent:"EU",bbox:"49.9,-8.7,60.9,1.8"},{code:"VA",name:"Vatican City",continent:"EU",bbox:"41.900,12.445,41.908,12.458"},{code:"RU",name:"Russia",continent:"EU",bbox:"41.2,19.6,81.9,180"},{code:"TR",name:"Turkey",continent:"EU",bbox:"35.8,25.7,42.3,44.8"},{code:"AF",name:"Afghanistan",continent:"AS",bbox:"29.4,60.5,38.5,74.9"},{code:"AM",name:"Armenia",continent:"AS",bbox:"38.8,43.4,41.3,46.6"},{code:"AZ",name:"Azerbaijan",continent:"AS",bbox:"38.4,44.8,41.9,50.4"},{code:"BH",name:"Bahrain",continent:"AS",bbox:"25.8,50.4,26.3,50.7"},{code:"BD",name:"Bangladesh",continent:"AS",bbox:"20.7,88.0,26.6,92.7"},{code:"BT",name:"Bhutan",continent:"AS",bbox:"26.7,88.7,28.3,92.1"},{code:"BN",name:"Brunei",continent:"AS",bbox:"4.0,114.0,5.1,115.4"},{code:"KH",name:"Cambodia",continent:"AS",bbox:"10.4,102.3,14.7,107.6"},{code:"CN",name:"China",continent:"AS",bbox:"18.2,73.5,53.6,134.8"},{code:"GE",name:"Georgia",continent:"AS",bbox:"41.0,40.0,43.6,46.7"},{code:"IN",name:"India",continent:"AS",bbox:"6.7,68.1,35.5,97.4"},{code:"ID",name:"Indonesia",continent:"AS",bbox:"-11.0,95.0,6.1,141.0"},{code:"IR",name:"Iran",continent:"AS",bbox:"25.0,44.0,39.8,63.3"},{code:"IQ",name:"Iraq",continent:"AS",bbox:"29.1,38.8,37.4,48.6"},{code:"IL",name:"Israel",continent:"AS",bbox:"29.5,34.2,33.3,35.9"},{code:"JP",name:"Japan",continent:"AS",bbox:"24.0,122.9,45.5,145.8"},{code:"JO",name:"Jordan",continent:"AS",bbox:"29.2,34.9,33.4,39.3"},{code:"KZ",name:"Kazakhstan",continent:"AS",bbox:"40.6,46.5,55.4,87.3"},{code:"KW",name:"Kuwait",continent:"AS",bbox:"28.5,46.5,30.1,48.4"},{code:"KG",name:"Kyrgyzstan",continent:"AS",bbox:"39.2,69.3,43.3,80.3"},{code:"LA",name:"Laos",continent:"AS",bbox:"13.9,100.1,22.5,107.7"},{code:"LB",name:"Lebanon",continent:"AS",bbox:"33.0,35.1,34.7,36.6"},{code:"MY",name:"Malaysia",continent:"AS",bbox:"0.9,99.6,7.4,119.3"},{code:"MV",name:"Maldives",continent:"AS",bbox:"-0.7,72.7,7.1,73.7"},{code:"MN",name:"Mongolia",continent:"AS",bbox:"41.6,87.7,52.1,119.9"},{code:"MM",name:"Myanmar",continent:"AS",bbox:"9.8,92.2,28.5,101.2"},{code:"NP",name:"Nepal",continent:"AS",bbox:"26.3,80.1,30.4,88.2"},{code:"KP",name:"North Korea",continent:"AS",bbox:"37.7,124.2,43.0,130.7"},{code:"OM",name:"Oman",continent:"AS",bbox:"16.6,52.0,26.4,59.8"},{code:"PK",name:"Pakistan",continent:"AS",bbox:"23.7,60.9,37.1,77.8"},{code:"PH",name:"Philippines",continent:"AS",bbox:"4.6,116.9,21.1,126.6"},{code:"QA",name:"Qatar",continent:"AS",bbox:"24.5,50.7,26.2,51.6"},{code:"SA",name:"Saudi Arabia",continent:"AS",bbox:"16.4,34.6,32.2,55.7"},{code:"SG",name:"Singapore",continent:"AS",bbox:"1.2,103.6,1.5,104.1"},{code:"KR",name:"South Korea",continent:"AS",bbox:"33.1,125.9,38.6,129.6"},{code:"LK",name:"Sri Lanka",continent:"AS",bbox:"5.9,79.7,9.8,81.9"},{code:"SY",name:"Syria",continent:"AS",bbox:"32.3,35.7,37.3,42.4"},{code:"TW",name:"Taiwan",continent:"AS",bbox:"21.9,120.0,25.3,122.0"},{code:"TJ",name:"Tajikistan",continent:"AS",bbox:"36.7,67.4,41.0,75.2"},{code:"TH",name:"Thailand",continent:"AS",bbox:"5.6,97.3,20.5,105.6"},{code:"TL",name:"Timor-Leste",continent:"AS",bbox:"-9.5,124.0,-8.1,127.3"},{code:"TM",name:"Turkmenistan",continent:"AS",bbox:"35.1,52.4,42.8,66.7"},{code:"AE",name:"United Arab Emirates",continent:"AS",bbox:"22.6,51.5,26.1,56.4"},{code:"UZ",name:"Uzbekistan",continent:"AS",bbox:"37.2,55.9,45.6,73.1"},{code:"VN",name:"Vietnam",continent:"AS",bbox:"8.2,102.1,23.4,109.5"},{code:"YE",name:"Yemen",continent:"AS",bbox:"12.1,42.5,19.0,54.5"},{code:"DZ",name:"Algeria",continent:"AF",bbox:"18.9,-8.7,37.1,12.0"},{code:"AO",name:"Angola",continent:"AF",bbox:"-18.0,11.6,-4.4,24.1"},{code:"BJ",name:"Benin",continent:"AF",bbox:"6.2,0.8,12.4,3.9"},{code:"BW",name:"Botswana",continent:"AF",bbox:"-26.9,20.0,-17.8,29.4"},{code:"BF",name:"Burkina Faso",continent:"AF",bbox:"9.4,-5.5,15.1,2.4"},{code:"BI",name:"Burundi",continent:"AF",bbox:"-4.5,29.0,-2.3,30.8"},{code:"CV",name:"Cabo Verde",continent:"AF",bbox:"14.8,-25.4,17.2,-22.7"},{code:"CM",name:"Cameroon",continent:"AF",bbox:"1.7,8.5,13.1,16.2"},{code:"CF",name:"Central African Republic",continent:"AF",bbox:"2.2,14.4,11.0,27.5"},{code:"TD",name:"Chad",continent:"AF",bbox:"7.4,13.5,23.4,24.0"},{code:"KM",name:"Comoros",continent:"AF",bbox:"-12.4,43.2,-11.4,44.5"},{code:"CG",name:"Congo",continent:"AF",bbox:"-5.0,11.1,3.7,18.6"},{code:"CD",name:"DR Congo",continent:"AF",bbox:"-13.5,12.2,5.4,31.3"},{code:"DJ",name:"Djibouti",continent:"AF",bbox:"10.9,41.7,12.7,43.4"},{code:"EG",name:"Egypt",continent:"AF",bbox:"22.0,25.0,31.7,36.9"},{code:"GQ",name:"Equatorial Guinea",continent:"AF",bbox:"0.9,9.3,3.8,11.4"},{code:"ER",name:"Eritrea",continent:"AF",bbox:"12.4,36.4,18.0,43.1"},{code:"SZ",name:"Eswatini",continent:"AF",bbox:"-27.3,30.8,-25.7,32.1"},{code:"ET",name:"Ethiopia",continent:"AF",bbox:"3.4,33.0,14.9,48.0"},{code:"GA",name:"Gabon",continent:"AF",bbox:"-4.0,8.7,2.3,14.5"},{code:"GM",name:"Gambia",continent:"AF",bbox:"13.1,-16.8,13.8,-13.8"},{code:"GH",name:"Ghana",continent:"AF",bbox:"4.7,-3.3,11.2,1.2"},{code:"GN",name:"Guinea",continent:"AF",bbox:"7.2,-15.1,12.7,-7.6"},{code:"GW",name:"Guinea-Bissau",continent:"AF",bbox:"10.9,-16.7,12.7,-13.6"},{code:"CI",name:"Ivory Coast",continent:"AF",bbox:"4.4,-8.6,10.7,-2.5"},{code:"KE",name:"Kenya",continent:"AF",bbox:"-4.7,33.9,5.5,41.9"},{code:"LS",name:"Lesotho",continent:"AF",bbox:"-30.7,27.0,-28.6,29.5"},{code:"LR",name:"Liberia",continent:"AF",bbox:"4.3,-11.5,8.6,-7.4"},{code:"LY",name:"Libya",continent:"AF",bbox:"19.5,9.3,33.2,25.2"},{code:"MG",name:"Madagascar",continent:"AF",bbox:"-25.6,43.2,-11.9,50.5"},{code:"MW",name:"Malawi",continent:"AF",bbox:"-17.1,32.7,-9.4,35.9"},{code:"ML",name:"Mali",continent:"AF",bbox:"10.1,-12.3,25.0,4.3"},{code:"MR",name:"Mauritania",continent:"AF",bbox:"14.7,-17.1,27.3,-4.8"},{code:"MU",name:"Mauritius",continent:"AF",bbox:"-20.5,57.3,-19.9,57.8"},{code:"MA",name:"Morocco",continent:"AF",bbox:"27.7,-13.2,35.9,-1.0"},{code:"MZ",name:"Mozambique",continent:"AF",bbox:"-26.9,30.2,-10.5,40.8"},{code:"NA",name:"Namibia",continent:"AF",bbox:"-28.9,11.7,-16.9,25.3"},{code:"NE",name:"Niger",continent:"AF",bbox:"11.7,0.2,23.5,16.0"},{code:"NG",name:"Nigeria",continent:"AF",bbox:"4.3,2.7,13.9,14.7"},{code:"RW",name:"Rwanda",continent:"AF",bbox:"-2.8,28.9,-1.1,30.9"},{code:"SN",name:"Senegal",continent:"AF",bbox:"12.3,-17.5,16.7,-11.4"},{code:"SL",name:"Sierra Leone",continent:"AF",bbox:"6.9,-13.3,10.0,-10.3"},{code:"SO",name:"Somalia",continent:"AF",bbox:"-1.7,40.9,12.0,51.4"},{code:"ZA",name:"South Africa",continent:"AF",bbox:"-34.8,16.5,-22.1,32.9"},{code:"SS",name:"South Sudan",continent:"AF",bbox:"3.5,24.1,12.2,35.9"},{code:"SD",name:"Sudan",continent:"AF",bbox:"8.7,21.8,22.2,38.6"},{code:"TZ",name:"Tanzania",continent:"AF",bbox:"-11.7,29.3,-1.0,40.4"},{code:"TG",name:"Togo",continent:"AF",bbox:"6.1,-0.1,11.1,1.8"},{code:"TN",name:"Tunisia",continent:"AF",bbox:"30.2,7.5,37.5,11.6"},{code:"UG",name:"Uganda",continent:"AF",bbox:"-1.5,29.6,4.2,35.0"},{code:"ZM",name:"Zambia",continent:"AF",bbox:"-18.1,21.9,-8.2,33.7"},{code:"ZW",name:"Zimbabwe",continent:"AF",bbox:"-22.4,25.2,-15.6,33.1"},{code:"CA",name:"Canada",continent:"NA",bbox:"41.7,-141.0,83.1,-52.6"},{code:"US",name:"United States",continent:"NA",bbox:"24.4,-125.0,49.4,-66.9"},{code:"MX",name:"Mexico",continent:"NA",bbox:"14.5,-118.4,32.7,-86.7"},{code:"GT",name:"Guatemala",continent:"NA",bbox:"13.7,-92.2,17.8,-88.2"},{code:"BZ",name:"Belize",continent:"NA",bbox:"15.9,-89.2,18.5,-87.8"},{code:"SV",name:"El Salvador",continent:"NA",bbox:"13.1,-90.1,14.4,-87.7"},{code:"HN",name:"Honduras",continent:"NA",bbox:"12.9,-89.4,16.5,-83.1"},{code:"NI",name:"Nicaragua",continent:"NA",bbox:"10.7,-87.7,15.0,-83.1"},{code:"CR",name:"Costa Rica",continent:"NA",bbox:"8.0,-85.9,11.2,-82.5"},{code:"PA",name:"Panama",continent:"NA",bbox:"7.2,-83.1,9.6,-77.2"},{code:"CU",name:"Cuba",continent:"NA",bbox:"19.8,-85.0,23.3,-74.1"},{code:"DO",name:"Dominican Republic",continent:"NA",bbox:"17.5,-72.0,19.9,-68.3"},{code:"HT",name:"Haiti",continent:"NA",bbox:"18.0,-74.5,20.1,-71.6"},{code:"JM",name:"Jamaica",continent:"NA",bbox:"17.7,-78.4,18.5,-76.2"},{code:"BS",name:"Bahamas",continent:"NA",bbox:"20.9,-79.0,27.3,-72.7"},{code:"TT",name:"Trinidad and Tobago",continent:"NA",bbox:"10.0,-61.9,11.4,-60.5"},{code:"AR",name:"Argentina",continent:"SA",bbox:"-55.1,-73.6,-21.8,-53.6"},{code:"BO",name:"Bolivia",continent:"SA",bbox:"-22.9,-69.6,-9.7,-57.5"},{code:"BR",name:"Brazil",continent:"SA",bbox:"-33.8,-74.0,5.3,-34.8"},{code:"CL",name:"Chile",continent:"SA",bbox:"-55.9,-75.6,-17.5,-66.4"},{code:"CO",name:"Colombia",continent:"SA",bbox:"-4.2,-79.0,12.5,-66.9"},{code:"EC",name:"Ecuador",continent:"SA",bbox:"-5.0,-81.1,1.4,-75.2"},{code:"GY",name:"Guyana",continent:"SA",bbox:"1.2,-61.4,8.6,-56.5"},{code:"PY",name:"Paraguay",continent:"SA",bbox:"-27.6,-62.6,-19.3,-54.3"},{code:"PE",name:"Peru",continent:"SA",bbox:"-18.4,-81.3,0.0,-68.7"},{code:"SR",name:"Suriname",continent:"SA",bbox:"1.8,-58.1,6.0,-54.0"},{code:"UY",name:"Uruguay",continent:"SA",bbox:"-35.0,-58.4,-30.1,-53.1"},{code:"VE",name:"Venezuela",continent:"SA",bbox:"0.6,-73.4,12.2,-59.8"},{code:"AU",name:"Australia",continent:"OC",bbox:"-43.6,113.3,-10.7,153.6"},{code:"NZ",name:"New Zealand",continent:"OC",bbox:"-47.3,166.4,-34.4,178.6"},{code:"PG",name:"Papua New Guinea",continent:"OC",bbox:"-11.7,140.8,-1.3,155.9"},{code:"FJ",name:"Fiji",continent:"OC",bbox:"-19.2,177.0,-16.0,180.0"}],Oa=[["EU","European countries"],["AS","Asian countries"],["AF","African countries"],["NA","North American countries"],["SA","South American countries"],["OC","Oceanian countries"]];function Ua(){return Oa.map(([e,t])=>({label:t,options:Pa.filter(n=>n.continent===e).slice().sort((n,s)=>n.name.localeCompare(s.name)).map(n=>({value:n.bbox,label:n.name}))}))}const Ma={class:"overflow-hidden rounded-lg border border-subtle bg-card shadow-xs"},Ra={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Ia={class:"text-base font-semibold text-primary"},Fa={class:"pv-eyebrow"},Na={class:"w-full text-left text-sm"},La={class:"border-t border-subtle px-5 py-2.5 font-mono text-xs whitespace-nowrap"},Da={class:"text-primary"},ja={class:"border-t border-subtle px-5 py-2.5 text-secondary"},ms={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brand-text",PATCH:"text-warning",DELETE:"text-danger"};return(n,s)=>(E(),k("div",Ma,[f("div",Ra,[f("div",Ia,O(e.title),1),f("span",Fa,O(e.auth),1)]),f("table",Na,[s[0]||(s[0]=f("thead",null,[f("tr",{class:"pv-eyebrow"},[f("th",{class:"px-5 py-2.5 font-medium"},"Endpoint"),f("th",{class:"px-5 py-2.5 font-medium"},"Description")])],-1)),f("tbody",null,[(E(!0),k(ne,null,ye(e.endpoints,o=>(E(),k("tr",{key:o.method+o.path,class:"transition-colors hover:bg-sunken"},[f("td",La,[f("span",{class:Ie(["font-semibold",t[o.method]])},O(o.method),3),f("span",Da,O(o.path),1)]),f("td",ja,O(o.desc),1)]))),128))])])]))}},$a={class:"mx-auto flex max-w-5xl flex-col gap-6 px-6 pt-12 pb-16"},Ba={class:"flex items-center gap-3"},Va={key:0,class:"pv-eyebrow hidden truncate sm:inline"},Ha=["title"],Ka={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},za={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Ga={key:0,class:"rounded-lg border border-subtle bg-card px-5 py-10 text-center shadow-sm"},Wa={key:1,class:"mx-auto w-full max-w-sm rounded-lg border border-subtle bg-card shadow-sm"},Ja={class:"flex flex-col gap-1"},qa={class:"flex flex-col gap-1"},Ya={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Za=["disabled"],Xa={class:"flex gap-1 self-start rounded-lg border border-subtle bg-card p-1 shadow-sm"},Qa=["onClick"],ec={class:"flex flex-col gap-6"},tc={class:"rounded-lg border border-subtle bg-card shadow-sm"},nc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},sc={class:"pv-eyebrow"},oc={class:"min-w-0"},ic={class:"text-sm font-semibold text-primary"},lc={key:0,class:"truncate font-mono text-xs text-secondary"},rc={class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5"},ac={class:"font-mono text-xs text-secondary"},cc={class:"flex flex-col gap-6"},uc={class:"rounded-lg border border-subtle bg-card shadow-sm"},dc={class:"flex flex-col gap-3 px-5 py-5"},fc={class:"flex flex-col gap-3 sm:flex-row"},pc={class:"flex flex-1 flex-col gap-1"},hc={class:"flex flex-1 flex-col gap-1"},bc={class:"flex flex-col gap-3 sm:flex-row"},mc={class:"flex flex-1 flex-col gap-1"},gc=["value"],vc={class:"flex flex-1 flex-col gap-1"},xc=["value"],yc={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},_c={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},wc=["disabled"],Sc={class:"rounded-lg border border-subtle bg-card shadow-sm"},Ac={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Cc={class:"pv-eyebrow"},Ec={class:"flex flex-col"},kc={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},Tc={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},Pc={key:2,class:"px-5 py-6 text-sm text-secondary"},Oc={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},Uc={class:"min-w-0 flex-1"},Mc={class:"flex flex-wrap items-center gap-2"},Rc={class:"truncate text-sm font-semibold text-primary"},Ic={key:0,class:"rounded-sm bg-brand/10 px-1.5 py-0.5 font-mono text-[10px] font-medium text-brand-text"},Fc={key:1,class:"rounded-sm bg-warning-tint px-1.5 py-0.5 font-mono text-[10px] font-medium text-warning"},Nc={class:"mt-0.5 font-mono text-xs text-secondary"},Lc={class:"flex shrink-0 items-center gap-2"},Dc=["onClick"],jc=["disabled","onClick"],$c={key:0,class:"mt-3 flex flex-col gap-3 rounded-md border border-subtle bg-sunken px-4 py-4"},Bc={class:"flex flex-col gap-3 sm:flex-row"},Vc={class:"flex flex-1 flex-col gap-1"},Hc={class:"flex flex-1 flex-col gap-1"},Kc={class:"flex flex-col gap-3 sm:flex-row"},zc={class:"flex flex-1 flex-col gap-1"},Gc=["disabled"],Wc=["value"],Jc={key:0,class:"text-[11px] text-muted"},qc={class:"flex flex-1 flex-col gap-1"},Yc=["value"],Zc={class:"flex items-center gap-2"},Xc={class:"flex items-center gap-2"},Qc=["disabled","onClick"],eu={class:"flex flex-col gap-6"},tu={class:"rounded-lg border border-subtle bg-card shadow-sm"},nu={class:"flex flex-col gap-3 px-5 py-5"},su={class:"flex flex-col gap-2 sm:flex-row"},ou=["disabled"],iu={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},lu={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},ru={class:"rounded-lg border border-subtle bg-card shadow-sm"},au={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},cu={class:"pv-eyebrow"},uu={class:"flex flex-col"},du={key:0,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},fu={key:1,class:"px-5 py-6 text-sm text-secondary"},pu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},hu={class:"min-w-0 flex-1"},bu={class:"truncate text-sm font-semibold text-primary"},mu={class:"mt-0.5 font-mono text-xs text-secondary"},gu={class:"flex shrink-0 items-center gap-2"},vu=["onClick"],xu=["disabled","title","onClick"],yu={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4 sm:flex-row sm:items-end"},_u={class:"flex flex-1 flex-col gap-1"},wu=["onKeyup"],Su={class:"flex items-center gap-2"},Au=["disabled","onClick"],Cu={class:"flex flex-col gap-6"},Eu={class:"rounded-lg border border-subtle bg-card shadow-sm"},ku={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Tu={class:"flex flex-col gap-3 px-5 py-5"},Pu={class:"flex flex-col gap-1"},Ou={class:"flex flex-col gap-1"},Uu={class:"flex flex-col gap-1"},Mu=["placeholder"],Ru={key:0,class:"font-mono text-[11px] text-muted"},Iu={key:0},Fu={key:1},Nu={key:1,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Lu={key:2,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},Du={class:"flex flex-wrap items-center gap-2"},ju=["disabled"],$u=["disabled"],Bu={class:"flex flex-col gap-6"},Vu={class:"rounded-lg border border-subtle bg-card shadow-sm"},Hu={class:"flex flex-col"},Ku={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},zu={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},Gu={key:2,class:"px-5 py-6 text-sm text-secondary"},Wu={key:3,class:"flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle px-3 pt-1"},Ju=["onClick"],qu={key:4,class:"px-5 py-6 text-sm text-secondary"},Yu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},Zu={class:"min-w-0 flex-1"},Xu={class:"flex flex-wrap items-center gap-2"},Qu={class:"text-sm font-semibold text-primary"},ed=["title"],td={key:0},nd={class:"mt-0.5 font-mono text-xs text-secondary"},sd={key:0,class:"mt-0.5 text-[11px] text-secondary"},od={key:1,class:"mt-2 flex flex-col gap-1.5"},id={class:"rounded-sm bg-sunken px-1.5 py-0.5 font-mono text-[10px] text-secondary"},ld={key:0,class:"font-mono text-[10px] text-muted"},rd={key:1,class:"w-full text-[11px] text-secondary sm:w-auto"},ad={key:2,class:"mt-1 truncate font-mono text-[11px] text-muted"},cd={class:"flex shrink-0 items-center gap-2"},ud=["disabled","onClick"],dd=["onClick"],fd=["disabled","onClick"],pd=["disabled","onClick"],hd={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4"},bd={class:"pv-eyebrow"},md={key:0,class:"text-danger"},gd=["onUpdate:modelValue"],vd=["value"],xd=["value","onChange"],yd=["label"],_d=["value"],wd=["onUpdate:modelValue"],Sd=["onUpdate:modelValue","type","placeholder"],Ad={key:3,class:"text-[11px] text-muted"},Cd={class:"flex items-center gap-2"},Ed=["disabled","onClick"],kd={class:"border-t border-subtle px-5 py-4"},Td={class:"flex flex-col gap-2 sm:flex-row"},Pd=["disabled"],Od={key:0,class:"mt-2 text-xs font-medium text-danger"},Mn="pv_panel_token",Ud={__name:"App",setup(e){const t=L(localStorage.getItem(Mn)||""),n=L(null),s=L(!1),o=L(!0),i=L({email:"",password:""}),l=L(""),r=L(!1),c=L("overview"),m=[{id:"overview",label:"Overview"},{id:"users",label:"Users"},{id:"organizations",label:"Organizations"},{id:"pocketbase",label:"PocketBase"},{id:"plugins",label:"Plugins"}];async function h(b){try{const u=await fetch("/api/me",{headers:{Authorization:b}});if(!u.ok)return!1;const d=await u.json();return d.role!=="superadmin"?!1:(n.value={id:d.id,email:d.email,role:d.role},!0)}catch{return!1}}async function x(b){t.value=b,localStorage.setItem(Mn,b),s.value=!0,Xs(),Me(),bt(),It(),he()}async function U(){l.value="";const b=i.value.email.trim().toLowerCase();if(!b||!i.value.password){l.value="Enter your email and password.";return}r.value=!0;try{const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:b,password:i.value.password})}),d=await u.json().catch(()=>({}));if(!u.ok||!d.token){l.value="Invalid email or password.";return}if(!await h(d.token)){l.value="Access to this panel is restricted to superadmins.";return}i.value.password="",await x(d.token)}catch{l.value="Cannot reach the API server."}finally{r.value=!1}}function R(){Qs(),localStorage.removeItem(Mn),t.value="",n.value=null,s.value=!1}const J=L(null),I=L({url:"",adminEmail:"",adminPassword:""}),G=L(null),Y=L(""),B=L(""),Z=L(!1),N=L(!1);function z(b){const u={Authorization:t.value};return b&&(u["Content-Type"]="application/json"),u}async function Me(){try{const b=await fetch("/api/admin/pb-config",{headers:z()});if(!b.ok)return;const u=await b.json();J.value=u,I.value={url:u.url||"",adminEmail:u.adminEmail||"",adminPassword:""},G.value=u.probe||null}catch{}}async function Le(){Y.value="",B.value="",N.value=!0;try{const b=await fetch("/api/admin/pb-config/test",{method:"POST",headers:z(!0),body:JSON.stringify(I.value)});G.value=await b.json()}catch{B.value="Could not run the test."}finally{N.value=!1}}async function We(){var b;if(Y.value="",B.value="",!I.value.url.trim()){B.value="A PocketBase URL is required.";return}Z.value=!0;try{const u=await fetch("/api/admin/pb-config",{method:"PUT",headers:z(!0),body:JSON.stringify(I.value)}),d=await u.json().catch(()=>({}));if(!u.ok){B.value=d.error||"Could not save the connection.";return}J.value=d.config,G.value=((b=d.config)==null?void 0:b.probe)||null,I.value={url:d.config.url,adminEmail:d.config.adminEmail,adminPassword:""},Y.value=d.warning||"Connection saved."}catch{B.value="Could not reach the API server."}finally{Z.value=!1}}const De=L([]),Oe=L(""),fe=L(""),Je=L(""),Ce=L({}),ve=L(""),Wt=[{label:"World",options:[{value:"-90,-180,90,180",label:"World"}]},{label:"Continents",options:[{value:"34,-25,72,45",label:"Europe"},{value:"-35,-18,38,52",label:"Africa"},{value:"5,25,82,180",label:"Asia"},{value:"7,-168,72,-52",label:"North America"},{value:"-56,-82,13,-34",label:"South America"},{value:"-48,110,-10,180",label:"Oceania"}]},...Ua()],be=Wt.flatMap(b=>b.options);function oe(b){const u=String(b||"").split(",").map(S=>S.trim());if(u.length!==4)return"";const d=u.map(Number);return d.some(S=>Number.isNaN(S))?"":d.join(",")}const q=L({});function qe(b){if(q.value[b])return"__custom__";const u=oe(Ce.value[b]),d=u&&be.find(S=>oe(S.value)===u);return d?d.value:"__custom__"}function Pt(b,u){if(u==="__custom__"){q.value={...q.value,[b]:!0};return}q.value={...q.value,[b]:!1},Ce.value[b]=u}const xe=L({name:"",baseURL:"",provider:""}),me=L(""),_t=L(!1),ns=[{id:"apis-external",label:"APIs — External"},{id:"drives-external",label:"Drives — External"},{id:"drives-local",label:"Drives — Local"}],Jt=L("apis-external");function wt(b){return b.category||"apis-external"}function Ot(b){return De.value.filter(u=>wt(u)===b)}const Ut=ks(()=>Ot(Jt.value)),xn={builtin:"bg-success-tint text-success",external:"bg-warning-tint text-warning"},St={ok:"bg-success-tint text-success",degraded:"bg-warning-tint text-warning",down:"bg-danger-tint text-danger"};async function bt(){Oe.value="";try{const b=await fetch("/api/admin/plugins",{headers:z()});if(!b.ok){Oe.value="Could not load plugins.";return}const u=await b.json();De.value=u.plugins||[];for(const d of De.value)d.enabled&&!d.health&&a(d.name)}catch{Oe.value="Could not reach the API server."}}async function a(b){try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(b)}/health`,{method:"POST",headers:z()}),d=await u.json().catch(()=>({}));if(u.ok&&d.health){const S=p(b);S&&(S.health=d.health)}}catch{}}function p(b){return De.value.find(u=>u.name===b)}async function g(b){ve.value=b.name,fe.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({enabled:!b.enabled})}),d=await u.json().catch(()=>({}));u.ok?d.warning&&(fe.value=`${b.name}: ${d.warning}`):fe.value=d.error||"Could not update the plugin.",await bt()}finally{ve.value=""}}function w(b){Je.value=Je.value===b.name?"":b.name;const u={...b.config||{}};for(const d of b.configFields||[])u[d.key]===void 0&&d.default&&(u[d.key]=d.default);Ce.value=u,q.value={}}async function _(b){ve.value=b.name,fe.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({config:Ce.value})}),d=await u.json().catch(()=>({}));u.ok?(fe.value=d.warning?`${b.name}: ${d.warning}`:"Configuration saved.",Je.value=""):fe.value=d.error||"Could not save the configuration.",await bt()}finally{ve.value=""}}async function y(b){ve.value=b.name,fe.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}/health`,{method:"POST",headers:z()}),d=await u.json().catch(()=>({}));if(u.ok&&d.health){const S=p(b.name);S&&(S.health=d.health)}else fe.value=d.error||"Health check failed."}finally{ve.value=""}}async function T(b){if(b.kind==="external"){ve.value=b.name;try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}`,{method:"DELETE",headers:z()});if(!u.ok){const d=await u.json().catch(()=>({}));fe.value=d.error||"Could not remove the plugin."}await bt()}finally{ve.value=""}}}async function C(){if(me.value="",!xe.value.name.trim()||!xe.value.baseURL.trim()){me.value="Name and base URL are required.";return}_t.value=!0;try{const b=await fetch("/api/admin/plugins",{method:"POST",headers:z(!0),body:JSON.stringify(xe.value)}),u=await b.json().catch(()=>({}));if(!b.ok){me.value=u.error||"Could not register the plugin.";return}xe.value={name:"",baseURL:"",provider:""},fe.value="External plugin registered.",await bt()}catch{me.value="Could not reach the API server."}finally{_t.value=!1}}const A=L([]),v=L([]),M=L(""),P=[{value:"user",label:"User"},{value:"admin",label:"Admin"},{value:"superadmin",label:"Superadmin"}],F={user:"User",admin:"Admin",superadmin:"Superadmin"},D={user:"bg-sunken text-secondary",admin:"bg-warning-tint text-warning",superadmin:"bg-success-tint text-success"},K=ks(()=>{const b={};for(const u of A.value)u.organization&&(b[u.organization]=(b[u.organization]||0)+1);return b});function W(b,u){if(!b)return u;if(b.error)return b.error;if(b.data&&typeof b.data=="object"){const d=[];for(const S in b.data)b.data[S]&&b.data[S].message&&d.push(`${S}: ${b.data[S].message}`);if(d.length)return d.join("; ")}return b.message||u}const $=L({email:"",password:"",role:"user",organization:""}),ee=L(""),ae=L(""),Ee=L(!1),ue=L(""),pe=L({}),it=L(""),ie=L("");async function he(){M.value="";try{const b=await fetch("/api/users",{headers:z()}),u=await b.json().catch(()=>({}));if(!b.ok){M.value=W(u,"Could not load users.");return}A.value=u.users||[]}catch{M.value="Could not reach the API server."}}async function yn(){ee.value="",ae.value="";const b=$.value.email.trim().toLowerCase();if(!b||!b.includes("@")){ee.value="A valid email is required.";return}if($.value.password.length<8){ee.value="Password must be at least 8 characters.";return}Ee.value=!0;try{const u=await fetch("/api/users",{method:"POST",headers:z(!0),body:JSON.stringify({email:b,password:$.value.password,role:$.value.role,organization:$.value.organization})}),d=await u.json().catch(()=>({}));if(!u.ok){ee.value=W(d,"Could not create the user.");return}$.value={email:"",password:"",role:"user",organization:""},ae.value=`Created ${d.user?d.user.email:"user"}.`,await he()}catch{ee.value="Could not reach the API server."}finally{Ee.value=!1}}function _n(b){ie.value="",ue.value=ue.value===b.id?"":b.id,pe.value={email:b.email,role:b.role,organization:b.organization||"",verified:!!b.verified,password:""}}async function zi(b){ie.value="",it.value=b.id;try{const u={},d=pe.value;if(d.email.trim().toLowerCase()!==b.email&&(u.email=d.email.trim().toLowerCase()),d.role!==b.role&&(u.role=d.role),(d.organization||"")!==(b.organization||"")&&(u.organization=d.organization||""),d.verified!==!!b.verified&&(u.verified=d.verified),d.password&&(u.password=d.password),Object.keys(u).length===0){ie.value="No changes to save.";return}const S=await fetch(`/api/users/${encodeURIComponent(b.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify(u)}),de=await S.json().catch(()=>({}));if(!S.ok){ie.value=W(de,"Could not update the user.");return}ie.value=`Updated ${b.email}.`,ue.value="",await he()}catch{ie.value="Could not reach the API server."}finally{it.value=""}}async function Gi(b){if(b.id!==(n.value&&n.value.id)&&confirm(`Delete user ${b.email}? This cannot be undone.`)){ie.value="",it.value=b.id;try{const u=await fetch(`/api/users/${encodeURIComponent(b.id)}`,{method:"DELETE",headers:z()}),d=await u.json().catch(()=>({}));if(!u.ok){ie.value=W(d,"Could not delete the user.");return}ie.value=`Deleted ${b.email}.`,ue.value===b.id&&(ue.value=""),await he()}catch{ie.value="Could not reach the API server."}finally{it.value=""}}}const wn=L(""),Mt=L(""),Sn=L(""),An=L(!1),lt=L(""),Cn=L(""),Rt=L(""),Re=L("");async function It(){try{const b=await fetch("/api/orgs",{headers:z()});if(!b.ok)return;const u=await b.json().catch(()=>({}));v.value=u.organizations||[]}catch{}}async function Ws(){Mt.value="",Sn.value="";const b=wn.value.trim();if(!b){Mt.value="An organization name is required.";return}An.value=!0;try{const u=await fetch("/api/orgs",{method:"POST",headers:z(!0),body:JSON.stringify({name:b})}),d=await u.json().catch(()=>({}));if(!u.ok){Mt.value=W(d,"Could not create the organization.");return}wn.value="",Sn.value=`Created ${d.organization?d.organization.name:"organization"}.`,await It()}catch{Mt.value="Could not reach the API server."}finally{An.value=!1}}function Wi(b){Re.value="",lt.value=lt.value===b.id?"":b.id,Cn.value=b.name}async function Js(b){Re.value="";const u=Cn.value.trim();if(!u){Re.value="An organization name is required.";return}if(u===b.name){lt.value="";return}Rt.value=b.id;try{const d=await fetch(`/api/orgs/${encodeURIComponent(b.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify({name:u})}),S=await d.json().catch(()=>({}));if(!d.ok){Re.value=W(S,"Could not rename the organization.");return}Re.value=`Renamed to ${u}.`,lt.value="",await It(),await he()}catch{Re.value="Could not reach the API server."}finally{Rt.value=""}}async function Ji(b){const u=K.value[b.id]||0;if(u>0){Re.value=`${b.name} still has ${u} member${u===1?"":"s"}; reassign or remove them first.`;return}if(confirm(`Delete organization ${b.name}?`)){Re.value="",Rt.value=b.id;try{const d=await fetch(`/api/orgs/${encodeURIComponent(b.id)}`,{method:"DELETE",headers:z()}),S=await d.json().catch(()=>({}));if(!d.ok){Re.value=W(S,"Could not delete the organization.");return}Re.value=`Deleted ${b.name}.`,lt.value===b.id&&(lt.value=""),await It()}catch{Re.value="Could not reach the API server."}finally{Rt.value=""}}}const ss=L(null),En=L(null),Ft=L({apiServer:{status:"checking",detail:""},pocketBase:{status:"checking",detail:""},webApp:{status:"checking",detail:""}});let kn=null;const qi=[{key:"apiServer",label:"API server"},{key:"pocketBase",label:"PocketBase"},{key:"webApp",label:"Web App"}],qs={checking:{label:"checking",cls:"bg-sunken text-secondary"},ok:{label:"operational",cls:"bg-success-tint text-success"},down:{label:"unreachable",cls:"bg-danger-tint text-danger"},unreachable:{label:"unreachable",cls:"bg-danger-tint text-danger"}};function Ys(b){const u=[];return b.httpStatus&&u.push("HTTP "+b.httpStatus),b.url&&u.push(b.url),typeof b.latencyMs=="number"&&u.push(b.latencyMs+"ms"),u.join(" · ")}async function Zs(){var b,u;try{const d=await fetch("/api/status");if(!d.ok)throw new Error("status "+d.status);const S=await d.json(),de=S.apiServer||{};En.value=de.devices??0,Ft.value={apiServer:{status:"ok",detail:""},pocketBase:{status:((b=S.pocketBase)==null?void 0:b.status)==="ok"?"ok":"down",detail:Ys(S.pocketBase||{})},webApp:{status:((u=S.webApp)==null?void 0:u.status)==="ok"?"ok":"down",detail:Ys(S.webApp||{})}}}catch{En.value=null,Ft.value={apiServer:{status:"unreachable",detail:""},pocketBase:{status:"unreachable",detail:""},webApp:{status:"unreachable",detail:""}}}ss.value=new Date}function Xs(){Zs(),clearInterval(kn),kn=setInterval(Zs,1e4)}function Qs(){clearInterval(kn),kn=null}mi(async()=>{t.value&&await h(t.value)?(s.value=!0,Xs(),Me(),bt(),It(),he()):t.value&&(localStorage.removeItem(Mn),t.value=""),o.value=!1}),Ks(()=>Qs());const Yi=[{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a session (via PocketBase)"},{method:"GET",path:"/api/auth/validate",desc:"Validate the current session token"},{method:"GET",path:"/api/me",desc:"Caller's id, email, role, and organization from their token"},{method:"GET",path:"/api/preferences",desc:"Read the caller's saved settings blob"},{method:"PUT",path:"/api/preferences",desc:"Persist the caller's settings onto their user record"},{method:"GET",path:"/api/devices",desc:"List connected devices and last-known state"},{method:"GET",path:"/api/devices/{id}/track",desc:"GPS track history for a device"},{method:"POST",path:"/api/devices/{id}/command",desc:"Send a command down to a device"},{method:"DELETE",path:"/api/devices/{id}",desc:"Forget a device's stored state"},{method:"GET",path:"/ws/ui",desc:"Live telemetry stream (WebSocket)"}],Zi=[{method:"GET",path:"/api/users",desc:"List users (admin: own org · superadmin: all)"},{method:"POST",path:"/api/users",desc:"Create a user {email, password, role, organization?}"},{method:"PATCH",path:"/api/users/{id}",desc:"Edit a user (role/org changes are scope-checked)"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user (not self; admins in-org only)"},{method:"GET",path:"/api/orgs",desc:"List organizations (admin: own · superadmin: all)"},{method:"POST",path:"/api/orgs",desc:"Create an organization {name} (superadmin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an empty organization (superadmin)"},{method:"GET",path:"/api/admin/pb-config",desc:"Read the PocketBase connection + live probe (superadmin)"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Test a candidate connection without applying (superadmin)"},{method:"PUT",path:"/api/admin/pb-config",desc:"Update + persist the PocketBase connection (superadmin)"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins + state + last health (superadmin)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin {name, baseURL} (superadmin)"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure a plugin (superadmin)"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin (superadmin)"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a plugin health check (superadmin)"}],Xi=[{method:"GET",path:"/ws/device?id={id}",desc:"Device telemetry uplink (WebSocket)"},{method:"POST",path:"/api/telemetry?id={id}",desc:"Push a single telemetry event over HTTP"},{method:"GET",path:"/healthz",desc:"Readiness probe"}];return(b,u)=>(E(),k("div",$a,[f("div",Ba,[u[25]||(u[25]=Nr('
PilotVault
API server
',3)),s.value&&n.value?(E(),k("span",Va,O(n.value.email),1)):V("",!0),s.value?(E(),k("button",{key:1,class:"pv-btn-sec pv-btn-sm",onClick:R},"Sign out")):V("",!0),f("button",{class:"pv-btn-sec pv-btn-sm",title:Qt(bn)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:u[0]||(u[0]=(...d)=>Qt(Io)&&Qt(Io)(...d))},[Qt(bn)==="dark"?(E(),k("svg",Ka,[...u[22]||(u[22]=[f("circle",{cx:"12",cy:"12",r:"4"},null,-1),f("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(E(),k("svg",za,[...u[23]||(u[23]=[f("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])),u[24]||(u[24]=je(" Theme ",-1))],8,Ha)]),o.value?(E(),k("div",Ga,[...u[26]||(u[26]=[f("span",{class:"pv-eyebrow"},"Checking session…",-1)])])):s.value?(E(),k(ne,{key:2},[f("div",Xa,[(E(),k(ne,null,ye(m,d=>f("button",{key:d.id,class:Ie(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",c.value===d.id?"bg-brand text-on-brand":"text-secondary hover:text-primary"]),onClick:S=>c.value=d.id},O(d.label),11,Qa)),64))]),le(f("div",ec,[f("div",tc,[f("div",nc,[u[30]||(u[30]=f("div",{class:"text-base font-semibold text-primary"},"Status",-1)),f("span",sc,O(ss.value?"checked "+ss.value.toLocaleTimeString():"—"),1)]),f("div",null,[(E(),k(ne,null,ye(qi,d=>f("div",{key:d.key,class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5 first:border-t-0"},[f("div",oc,[f("div",ic,O(d.label),1),Ft.value[d.key].detail?(E(),k("div",lc,O(Ft.value[d.key].detail),1)):V("",!0)]),f("span",{class:Ie(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",qs[Ft.value[d.key].status].cls])},[u[31]||(u[31]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),je(" "+O(qs[Ft.value[d.key].status].label),1)],2)])),64)),f("div",rc,[u[32]||(u[32]=f("div",{class:"text-sm font-semibold text-primary"},"Devices",-1)),f("span",ac,O(En.value===null?"—":En.value+" online"),1)])])]),Ne(ms,{title:"Client API",auth:"PocketBase session",endpoints:Yi}),Ne(ms,{title:"Management API",auth:"Admin · superadmin",endpoints:Zi}),Ne(ms,{title:"Device API",auth:"Device uplink",endpoints:Xi})],512),[[Zt,c.value==="overview"]]),le(f("div",cc,[f("div",uc,[u[38]||(u[38]=f("div",{class:"border-b border-subtle px-5 py-4"},[f("div",{class:"text-base font-semibold text-primary"},"Add user"),f("span",{class:"pv-eyebrow"},"Create an account")],-1)),f("div",dc,[f("div",fc,[f("label",pc,[u[33]||(u[33]=f("span",{class:"pv-eyebrow"},"Email",-1)),le(f("input",{"onUpdate:modelValue":u[3]||(u[3]=d=>$.value.email=d),type:"email",class:"pv-input",placeholder:"pilot@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[_e,$.value.email]])]),f("label",hc,[u[34]||(u[34]=f("span",{class:"pv-eyebrow"},"Password",-1)),le(f("input",{"onUpdate:modelValue":u[4]||(u[4]=d=>$.value.password=d),type:"password",class:"pv-input",placeholder:"min. 8 characters",autocomplete:"new-password"},null,512),[[_e,$.value.password]])])]),f("div",bc,[f("label",mc,[u[35]||(u[35]=f("span",{class:"pv-eyebrow"},"Role",-1)),le(f("select",{"onUpdate:modelValue":u[5]||(u[5]=d=>$.value.role=d),class:"pv-input"},[(E(),k(ne,null,ye(P,d=>f("option",{key:d.value,value:d.value},O(d.label),9,gc)),64))],512),[[Dt,$.value.role]])]),f("label",vc,[u[37]||(u[37]=f("span",{class:"pv-eyebrow"},"Organization",-1)),le(f("select",{"onUpdate:modelValue":u[6]||(u[6]=d=>$.value.organization=d),class:"pv-input"},[u[36]||(u[36]=f("option",{value:""},"— none —",-1)),(E(!0),k(ne,null,ye(v.value,d=>(E(),k("option",{key:d.id,value:d.id},O(d.name),9,xc))),128))],512),[[Dt,$.value.organization]])])]),ee.value?(E(),k("p",yc,O(ee.value),1)):ae.value?(E(),k("p",_c,O(ae.value),1)):V("",!0),f("div",null,[f("button",{class:"pv-btn",disabled:Ee.value,onClick:yn},O(Ee.value?"Creating…":"Create user"),9,wc)])])]),f("div",Sc,[f("div",Ac,[f("div",null,[u[39]||(u[39]=f("div",{class:"text-base font-semibold text-primary"},"Users",-1)),f("span",Cc,O(A.value.length)+" total",1)]),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:he},"Refresh")]),f("div",Ec,[M.value?(E(),k("p",kc,O(M.value),1)):V("",!0),ie.value?(E(),k("p",Tc,O(ie.value),1)):V("",!0),!A.value.length&&!M.value?(E(),k("p",Pc,"No users yet.")):V("",!0),(E(!0),k(ne,null,ye(A.value,d=>(E(),k("div",{key:d.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[f("div",Oc,[f("div",Uc,[f("div",Mc,[f("span",Rc,O(d.email),1),f("span",{class:Ie(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",D[d.role]])},O(F[d.role]||d.role),3),d.id===(n.value&&n.value.id)?(E(),k("span",Ic,"you")):V("",!0),d.verified?V("",!0):(E(),k("span",Fc,"unverified"))]),f("div",Nc,O(d.organizationName||(d.organization?d.organization:"no organization")),1)]),f("div",Lc,[f("button",{class:"pv-btn-sec pv-btn-sm",onClick:S=>_n(d)},O(ue.value===d.id?"Close":"Edit"),9,Dc),d.id!==(n.value&&n.value.id)?(E(),k("button",{key:0,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:it.value===d.id,onClick:S=>Gi(d)}," Delete ",8,jc)):V("",!0)])]),ue.value===d.id?(E(),k("div",$c,[f("div",Bc,[f("label",Vc,[u[40]||(u[40]=f("span",{class:"pv-eyebrow"},"Email",-1)),le(f("input",{"onUpdate:modelValue":u[7]||(u[7]=S=>pe.value.email=S),type:"email",class:"pv-input",autocomplete:"off",spellcheck:"false"},null,512),[[_e,pe.value.email]])]),f("label",Hc,[u[41]||(u[41]=f("span",{class:"pv-eyebrow"},"New password",-1)),le(f("input",{"onUpdate:modelValue":u[8]||(u[8]=S=>pe.value.password=S),type:"password",class:"pv-input",placeholder:"leave blank to keep current",autocomplete:"new-password"},null,512),[[_e,pe.value.password]])])]),f("div",Kc,[f("label",zc,[u[42]||(u[42]=f("span",{class:"pv-eyebrow"},"Role",-1)),le(f("select",{"onUpdate:modelValue":u[9]||(u[9]=S=>pe.value.role=S),class:"pv-input",disabled:d.id===(n.value&&n.value.id)},[(E(),k(ne,null,ye(P,S=>f("option",{key:S.value,value:S.value},O(S.label),9,Wc)),64))],8,Gc),[[Dt,pe.value.role]]),d.id===(n.value&&n.value.id)?(E(),k("span",Jc,"You cannot change your own role.")):V("",!0)]),f("label",qc,[u[44]||(u[44]=f("span",{class:"pv-eyebrow"},"Organization",-1)),le(f("select",{"onUpdate:modelValue":u[10]||(u[10]=S=>pe.value.organization=S),class:"pv-input"},[u[43]||(u[43]=f("option",{value:""},"— none —",-1)),(E(!0),k(ne,null,ye(v.value,S=>(E(),k("option",{key:S.id,value:S.id},O(S.name),9,Yc))),128))],512),[[Dt,pe.value.organization]])])]),f("label",Zc,[le(f("input",{"onUpdate:modelValue":u[11]||(u[11]=S=>pe.value.verified=S),type:"checkbox",class:"h-4 w-4"},null,512),[[Bi,pe.value.verified]]),u[45]||(u[45]=f("span",{class:"text-sm text-primary"},"Verified",-1))]),f("div",Xc,[f("button",{class:"pv-btn pv-btn-sm",disabled:it.value===d.id,onClick:S=>zi(d)},"Save changes",8,Qc),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[12]||(u[12]=S=>ue.value="")},"Cancel")])])):V("",!0)]))),128))])])],512),[[Zt,c.value==="users"]]),le(f("div",eu,[f("div",tu,[u[46]||(u[46]=f("div",{class:"border-b border-subtle px-5 py-4"},[f("div",{class:"text-base font-semibold text-primary"},"Add organization"),f("span",{class:"pv-eyebrow"},"Create a tenant")],-1)),f("div",nu,[f("div",su,[le(f("input",{"onUpdate:modelValue":u[13]||(u[13]=d=>wn.value=d),class:"pv-input flex-1",placeholder:"Acme Aerial Ltd.",autocomplete:"off",spellcheck:"false",onKeyup:Mo(Ws,["enter"])},null,544),[[_e,wn.value]]),f("button",{class:"pv-btn",disabled:An.value,onClick:Ws},O(An.value?"Creating…":"Create"),9,ou)]),Mt.value?(E(),k("p",iu,O(Mt.value),1)):Sn.value?(E(),k("p",lu,O(Sn.value),1)):V("",!0)])]),f("div",ru,[f("div",au,[f("div",null,[u[47]||(u[47]=f("div",{class:"text-base font-semibold text-primary"},"Organizations",-1)),f("span",cu,O(v.value.length)+" total",1)]),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:It},"Refresh")]),f("div",uu,[Re.value?(E(),k("p",du,O(Re.value),1)):V("",!0),v.value.length?V("",!0):(E(),k("p",fu,"No organizations yet.")),(E(!0),k(ne,null,ye(v.value,d=>(E(),k("div",{key:d.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[f("div",pu,[f("div",hu,[f("div",bu,O(d.name),1),f("div",mu,O(K.value[d.id]||0)+" member"+O((K.value[d.id]||0)===1?"":"s"),1)]),f("div",gu,[f("button",{class:"pv-btn-sec pv-btn-sm",onClick:S=>Wi(d)},O(lt.value===d.id?"Close":"Rename"),9,vu),f("button",{class:"pv-btn-sec pv-btn-sm !text-danger",disabled:Rt.value===d.id||(K.value[d.id]||0)>0,title:(K.value[d.id]||0)>0?"Reassign or remove members first":"Delete organization",onClick:S=>Ji(d)}," Delete ",8,xu)])]),lt.value===d.id?(E(),k("div",yu,[f("label",_u,[u[48]||(u[48]=f("span",{class:"pv-eyebrow"},"Name",-1)),le(f("input",{"onUpdate:modelValue":u[14]||(u[14]=S=>Cn.value=S),class:"pv-input",autocomplete:"off",spellcheck:"false",onKeyup:Mo(S=>Js(d),["enter"])},null,40,wu),[[_e,Cn.value]])]),f("div",Su,[f("button",{class:"pv-btn pv-btn-sm",disabled:Rt.value===d.id,onClick:S=>Js(d)},"Save",8,Au),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[15]||(u[15]=S=>lt.value="")},"Cancel")])])):V("",!0)]))),128))])])],512),[[Zt,c.value==="organizations"]]),le(f("div",Cu,[f("div",Eu,[f("div",ku,[u[50]||(u[50]=f("div",null,[f("div",{class:"text-base font-semibold text-primary"},"PocketBase connection"),f("span",{class:"pv-eyebrow"},"Settings")],-1)),G.value?(E(),k("span",{key:0,class:Ie(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",G.value.reachable?G.value.superuser?"bg-success-tint text-success":"bg-warning-tint text-warning":"bg-danger-tint text-danger"])},[u[49]||(u[49]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),je(" "+O(G.value.reachable?G.value.superuser?"connected":"reachable":"unreachable"),1)],2)):V("",!0)]),f("div",Tu,[f("label",Pu,[u[51]||(u[51]=f("span",{class:"pv-eyebrow"},"PocketBase URL",-1)),le(f("input",{"onUpdate:modelValue":u[16]||(u[16]=d=>I.value.url=d),class:"pv-input",placeholder:"http://10.2.1.10:8026",spellcheck:"false"},null,512),[[_e,I.value.url]])]),f("label",Ou,[u[52]||(u[52]=f("span",{class:"pv-eyebrow"},"Service account email",-1)),le(f("input",{"onUpdate:modelValue":u[17]||(u[17]=d=>I.value.adminEmail=d),class:"pv-input",placeholder:"admin@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[_e,I.value.adminEmail]])]),f("label",Uu,[u[53]||(u[53]=f("span",{class:"pv-eyebrow"},"Service account password",-1)),le(f("input",{"onUpdate:modelValue":u[18]||(u[18]=d=>I.value.adminPassword=d),type:"password",class:"pv-input",autocomplete:"new-password",placeholder:J.value&&J.value.adminConfigured?"leave blank to keep current":"set a password"},null,8,Mu),[[_e,I.value.adminPassword]])]),G.value?(E(),k("div",Ru,[je(" health: "+O(G.value.reachable?"ok":"down"),1),G.value.latencyMs?(E(),k("span",Iu," · "+O(G.value.latencyMs)+"ms",1)):V("",!0),je(" · superuser auth: "+O(G.value.superuser?"ok":"—"),1),G.value.detail?(E(),k("span",Fu," · "+O(G.value.detail),1)):V("",!0)])):V("",!0),B.value?(E(),k("p",Nu,O(B.value),1)):Y.value?(E(),k("p",Lu,O(Y.value),1)):V("",!0),f("div",Du,[f("button",{class:"pv-btn",disabled:Z.value,onClick:We},O(Z.value?"Saving…":"Save connection"),9,ju),f("button",{class:"pv-btn-sec",disabled:N.value,onClick:Le},O(N.value?"Testing…":"Test connection"),9,$u)]),u[54]||(u[54]=f("p",{class:"text-[11px] text-muted"}," The service account is used only for user & organization management. Changing the URL repoints the whole API Server at a new PocketBase and may sign you out. ",-1))])])],512),[[Zt,c.value==="pocketbase"]]),le(f("div",Bu,[f("div",Vu,[f("div",{class:"flex items-center justify-between border-b border-subtle px-5 py-4"},[u[55]||(u[55]=f("div",null,[f("div",{class:"text-base font-semibold text-primary"},"Plugins"),f("span",{class:"pv-eyebrow"},"External integrations")],-1)),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:bt},"Refresh")]),f("div",Hu,[Oe.value?(E(),k("p",Ku,O(Oe.value),1)):V("",!0),fe.value?(E(),k("p",zu,O(fe.value),1)):V("",!0),!De.value.length&&!Oe.value?(E(),k("p",Gu,"No plugins registered yet.")):V("",!0),De.value.length?(E(),k("div",Wu,[(E(),k(ne,null,ye(ns,d=>f("button",{key:d.id,class:Ie(["-mb-px whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",Jt.value===d.id?"border-brand text-primary":"border-transparent text-secondary hover:text-primary"]),onClick:S=>Jt.value=d.id},O(d.label),11,Ju)),64))])):V("",!0),De.value.length&&!Ut.value.length?(E(),k("p",qu,"No plugins in this category.")):V("",!0),(E(!0),k(ne,null,ye(Ut.value,d=>(E(),k("div",{key:d.name,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[f("div",Yu,[f("div",Zu,[f("div",Xu,[f("span",Qu,O(d.name),1),f("span",{class:Ie(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",xn[d.kind]])},O(d.kind),3),d.health?(E(),k("span",{key:0,class:Ie(["inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium",St[d.health.status]]),title:d.health.detail||""},[u[56]||(u[56]=f("span",{class:"h-1 w-1 rounded-full bg-current"},null,-1)),je(O(d.health.status),1),d.health.latencyMs?(E(),k("span",td," · "+O(d.health.latencyMs)+"ms",1)):V("",!0)],10,ed)):V("",!0)]),f("div",nd,O(d.provider)+" · v"+O(d.version)+" · "+O(d.authType),1),d.health&&d.health.detail?(E(),k("div",sd,O(d.health.detail),1)):V("",!0),d.capabilities&&d.capabilities.length?(E(),k("div",od,[u[57]||(u[57]=f("div",{class:"pv-eyebrow"},"Capabilities",-1)),(E(!0),k(ne,null,ye(d.capabilities,S=>(E(),k("div",{key:S.id,class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},[f("span",id,O(S.id),1),S.method||S.endpoint?(E(),k("span",ld,O(S.method)+" "+O(S.endpoint),1)):V("",!0),S.description?(E(),k("span",rd,O(S.description),1)):V("",!0)]))),128))])):V("",!0),d.baseURL?(E(),k("div",ad,O(d.baseURL),1)):V("",!0)]),f("div",cd,[f("button",{class:Ie(["pv-btn-sec pv-btn-sm",d.enabled?"!border-transparent !bg-success-tint !text-success":""]),disabled:ve.value===d.name,onClick:S=>g(d)},[f("span",{class:Ie(["h-1.5 w-1.5 rounded-full",d.enabled?"bg-success":"bg-muted"])},null,2),je(" "+O(d.enabled?"Enabled":"Disabled"),1)],10,ud),d.configFields&&d.configFields.length?(E(),k("button",{key:0,class:"pv-btn-sec pv-btn-sm",onClick:S=>w(d)},"Configure",8,dd)):V("",!0),f("button",{class:"pv-btn-sec pv-btn-sm",disabled:ve.value===d.name,onClick:S=>y(d)},"Check",8,fd),d.kind==="external"?(E(),k("button",{key:1,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:ve.value===d.name,onClick:S=>T(d)},"Remove",8,pd)):V("",!0)])]),Je.value===d.name?(E(),k("div",hd,[(E(!0),k(ne,null,ye(d.configFields,S=>(E(),k("label",{key:S.key,class:"flex flex-col gap-1"},[f("span",bd,[je(O(S.label),1),S.required?(E(),k("span",md," *")):V("",!0)]),S.type==="select"?le((E(),k("select",{key:0,"onUpdate:modelValue":de=>Ce.value[S.key]=de,class:"pv-input"},[(E(!0),k(ne,null,ye(S.options,de=>(E(),k("option",{key:de.value,value:de.value},O(de.label),9,vd))),128))],8,gd)),[[Dt,Ce.value[S.key]]]):S.type==="bbox"?(E(),k(ne,{key:1},[f("select",{value:qe(S.key),class:"pv-input",onChange:de=>Pt(S.key,de.target.value)},[(E(),k(ne,null,ye(Wt,de=>f("optgroup",{key:de.label,label:de.label},[(E(!0),k(ne,null,ye(de.options,os=>(E(),k("option",{key:os.value,value:os.value},O(os.label),9,_d))),128))],8,yd)),64)),u[58]||(u[58]=f("option",{value:"__custom__"},"Custom…",-1))],40,xd),qe(S.key)==="__custom__"?le((E(),k("input",{key:0,"onUpdate:modelValue":de=>Ce.value[S.key]=de,type:"text",class:"pv-input font-mono",autocomplete:"off",placeholder:"50.5,3.2,53.7,7.3"},null,8,wd)),[[_e,Ce.value[S.key]]]):V("",!0)],64)):le((E(),k("input",{key:2,"onUpdate:modelValue":de=>Ce.value[S.key]=de,type:S.secret||S.type==="password"?"password":S.type==="number"?"number":"text",class:"pv-input",autocomplete:"off",placeholder:S.help||""},null,8,Sd)),[[ga,Ce.value[S.key]]]),S.help?(E(),k("span",Ad,O(S.help),1)):V("",!0)]))),128)),f("div",Cd,[f("button",{class:"pv-btn pv-btn-sm",disabled:ve.value===d.name,onClick:S=>_(d)},"Save configuration",8,Ed),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[19]||(u[19]=S=>Je.value="")},"Cancel")])])):V("",!0)]))),128)),f("div",kd,[u[59]||(u[59]=f("div",{class:"pv-eyebrow mb-2"},"Register external plugin",-1)),f("div",Td,[le(f("input",{"onUpdate:modelValue":u[20]||(u[20]=d=>xe.value.name=d),class:"pv-input sm:w-40",placeholder:"name",autocomplete:"off",spellcheck:"false"},null,512),[[_e,xe.value.name]]),le(f("input",{"onUpdate:modelValue":u[21]||(u[21]=d=>xe.value.baseURL=d),class:"pv-input flex-1",placeholder:"https://plugin.example.com",autocomplete:"off",spellcheck:"false"},null,512),[[_e,xe.value.baseURL]]),f("button",{class:"pv-btn",disabled:_t.value,onClick:C},O(_t.value?"Adding…":"Add"),9,Pd)]),me.value?(E(),k("p",Od,O(me.value),1)):V("",!0),u[60]||(u[60]=f("p",{class:"mt-2 text-[11px] text-muted"},[je(" A remote service that answers "),f("span",{class:"font-mono"},"GET /health"),je(" and "),f("span",{class:"font-mono"},"GET /manifest"),je(" — added at runtime, no rebuild. ")],-1))])])])],512),[[Zt,c.value==="plugins"]])],64)):(E(),k("div",Wa,[u[29]||(u[29]=f("div",{class:"border-b border-subtle px-5 py-4"},[f("div",{class:"text-base font-semibold text-primary"},"Sign in"),f("span",{class:"pv-eyebrow"},"Superadmin access only")],-1)),f("form",{class:"flex flex-col gap-3 px-5 py-5",onSubmit:_a(U,["prevent"])},[f("label",Ja,[u[27]||(u[27]=f("span",{class:"pv-eyebrow"},"Email",-1)),le(f("input",{"onUpdate:modelValue":u[1]||(u[1]=d=>i.value.email=d),type:"email",autocomplete:"username",class:"pv-input",placeholder:"superadmin@pilotvault.local"},null,512),[[_e,i.value.email]])]),f("label",qa,[u[28]||(u[28]=f("span",{class:"pv-eyebrow"},"Password",-1)),le(f("input",{"onUpdate:modelValue":u[2]||(u[2]=d=>i.value.password=d),type:"password",autocomplete:"current-password",class:"pv-input",placeholder:"••••••••"},null,512),[[_e,i.value.password]])]),l.value?(E(),k("p",Ya,O(l.value),1)):V("",!0),f("button",{type:"submit",class:"pv-btn mt-1",disabled:r.value},O(r.value?"Signing in…":"Sign in"),9,Za)],32)])),u[61]||(u[61]=f("p",{class:"text-center font-mono text-[11px] text-muted"}," PilotVault — live drone telemetry, command & control. ",-1))]))}};Ca(Ud).mount("#app"); diff --git a/API Server/internal/api/dist/assets/index-CVh8EDzq.css b/API Server/internal/api/dist/assets/index-CVh8EDzq.css deleted file mode 100644 index a434a20..0000000 --- a/API Server/internal/api/dist/assets/index-CVh8EDzq.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap";/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--font-mono:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--spacing:.25rem;--container-sm:24rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--default-mono-font-family:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--font-display:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--radius-sm:6px;--radius-md:10px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mb-px{margin-bottom:-1px}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.pv-btn{border-radius:var(--radius-md);background:var(--brand);height:40px;color:var(--brand-contrast);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);border:1px solid #0000;justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.pv-btn-sec{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);height:40px;color:var(--text-primary);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.pv-input{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);width:100%;height:40px;color:var(--text-primary);font-family:var(--font-sans);padding:0 12px;font-size:.875rem}.pv-btn-sm{border-radius:var(--radius-sm);height:32px;padding:0 12px;font-size:.75rem}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.w-1{width:var(--spacing)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-4{width:calc(var(--spacing) * 4)}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.rounded-md{border-radius:10px}.rounded-sm{border-radius:6px}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\!border-transparent{border-color:#0000!important}.border-brand{border-color:var(--brand)}.border-subtle{border-color:var(--border-subtle)}.border-transparent{border-color:#0000}.\!bg-success-tint{background-color:var(--success-tint)!important}.bg-brand,.bg-brand\/10{background-color:var(--brand)}@supports (color:color-mix(in lab,red,red)){.bg-brand\/10{background-color:color-mix(in oklab,var(--brand) 10%,transparent)}}.bg-card{background-color:var(--surface-card)}.bg-current{background-color:currentColor}.bg-danger-tint{background-color:var(--danger-tint)}.bg-muted{background-color:var(--text-muted)}.bg-success{background-color:var(--success)}.bg-success-tint{background-color:var(--success-tint)}.bg-sunken{background-color:var(--bg-sunken)}.bg-warning-tint{background-color:var(--warning-tint)}.p-1{padding:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.text-center{text-align:center}.text-left{text-align:left}.pv-eyebrow{font-family:var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted);font-size:11px}.font-display{font-family:Space Grotesk,ui-sans-serif,system-ui,Segoe UI,sans-serif}.font-mono{font-family:Space Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.\!text-danger{color:var(--danger)!important}.\!text-success{color:var(--success)!important}.text-brand-text{color:var(--text-brand)}.text-danger{color:var(--danger)}.text-muted{color:var(--text-muted)}.text-on-brand{color:var(--brand-contrast)}.text-primary{color:var(--text-primary)}.text-secondary{color:var(--text-secondary)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.uppercase{text-transform:uppercase}.shadow-sm{--tw-shadow:var(--sh-sm);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:var(--sh-xs);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}@media(hover:hover){.hover\:bg-sunken:hover{background-color:var(--bg-sunken)}.hover\:text-primary:hover{color:var(--text-primary)}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-40{width:calc(var(--spacing) * 40)}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}}}:root,[data-theme=light]{--navy-950:#0b1730;--navy-900:#0f1e3d;--navy-800:#1b2e52;--navy-700:#26406e;--blue-50:#eaf1fe;--blue-100:#d6e3fd;--blue-300:#8fb4f6;--blue-400:#5b93f5;--blue-500:#3d7bf0;--blue-600:#2b62cc;--blue-700:#1f4ca0;--slate-0:#fff;--slate-50:#f6f7f9;--slate-100:#eef0f3;--slate-150:#e6e9ee;--slate-200:#dce0e7;--slate-300:#c5ccd7;--slate-400:#97a1b0;--slate-500:#6b7688;--slate-700:#333b4a;--steel:#5a6b85;--green-500:#1f8a5b;--green-100:#dcf1e7;--green-600:#177049;--amber-500:#d9852b;--amber-100:#fbebd5;--amber-600:#b86c1b;--red-500:#d64545;--red-100:#fbe0e0;--red-600:#b83232;--bg-page:var(--slate-100);--bg-sunken:var(--slate-50);--surface-card:var(--slate-0);--border-subtle:var(--slate-200);--border-strong:var(--slate-300);--border-focus:var(--blue-500);--text-primary:var(--navy-900);--text-secondary:var(--steel);--text-muted:var(--slate-400);--brand:var(--blue-500);--brand-hover:var(--blue-600);--brand-active:var(--blue-700);--brand-contrast:#fff;--text-brand:var(--blue-600);--success:var(--green-600);--success-tint:var(--green-100);--warning:var(--amber-600);--warning-tint:var(--amber-100);--danger:var(--red-600);--danger-tint:var(--red-100);--ring-focus:0 0 0 3px var(--blue-500)}@supports (color:color-mix(in lab,red,red)){:root,[data-theme=light]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-500) 45%, transparent)}}:root,[data-theme=light]{--sh-xs:0 1px 2px #0f1e3d0f;--sh-sm:0 1px 2px #0f1e3d0f, 0 1px 3px #0f1e3d0a;--dur-fast:.12s;--ease-standard:cubic-bezier(.4, 0, .2, 1);color-scheme:light}[data-theme=dark]{--bg-page:var(--navy-950);--bg-sunken:#0b111c;--surface-card:#10203f;--border-subtle:#ffffff14;--border-strong:#ffffff2e;--border-focus:var(--blue-400);--text-primary:#f4f7fc;--text-secondary:#8fa0be;--text-muted:#5e6e8c;--brand:var(--blue-400);--brand-hover:var(--blue-300);--brand-active:var(--blue-100);--brand-contrast:#0f1e3d;--text-brand:var(--blue-300);--success:#5fd3a0;--success-tint:var(--green-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--success-tint:color-mix(in srgb, var(--green-500) 22%, transparent)}}[data-theme=dark]{--warning:#f0b26a;--warning-tint:var(--amber-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--warning-tint:color-mix(in srgb, var(--amber-500) 22%, transparent)}}[data-theme=dark]{--danger:#f08a8a;--danger-tint:var(--red-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--danger-tint:color-mix(in srgb, var(--red-500) 22%, transparent)}}[data-theme=dark]{--ring-focus:0 0 0 3px var(--blue-400)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-400) 55%, transparent)}}[data-theme=dark]{--sh-xs:0 1px 2px #00000059;--sh-sm:0 1px 3px #0006;color-scheme:dark}html,body,#app{height:100%}body{font-family:var(--font-sans);background:var(--bg-page);color:var(--text-primary);-webkit-font-smoothing:antialiased}h1,h2,h3{font-family:var(--font-display);letter-spacing:-.02em}.pv-btn-sec:hover:not(:disabled){background:var(--bg-sunken)}.pv-btn-sec:active:not(:disabled){transform:translateY(1px)}.pv-btn-sec:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-btn:hover:not(:disabled){background:var(--brand-hover)}.pv-btn:active:not(:disabled){transform:translateY(1px)}.pv-btn:disabled{opacity:.55;cursor:not-allowed}.pv-btn:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-input::placeholder{color:var(--text-muted)}.pv-input:focus{border-color:var(--border-focus);box-shadow:var(--ring-focus);outline:none}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000} diff --git a/API Server/internal/api/dist/assets/index-Dh-j3HLZ.js b/API Server/internal/api/dist/assets/index-Dh-j3HLZ.js new file mode 100644 index 0000000..961afd9 --- /dev/null +++ b/API Server/internal/api/dist/assets/index-Dh-j3HLZ.js @@ -0,0 +1,17 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Is(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const oe={},Gt=[],rt=()=>{},Bo=()=>!1,Yn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Zn=e=>e.startsWith("onUpdate:"),Se=Object.assign,Rs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},il=Object.prototype.hasOwnProperty,ee=(e,t)=>il.call(e,t),B=Array.isArray,Wt=e=>_n(e)==="[object Map]",Qt=e=>_n(e)==="[object Set]",oo=e=>_n(e)==="[object Date]",V=e=>typeof e=="function",ae=e=>typeof e=="string",at=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",$o=e=>(se(e)||V(e))&&V(e.then)&&V(e.catch),jo=Object.prototype.toString,_n=e=>jo.call(e),ll=e=>_n(e).slice(8,-1),Vo=e=>_n(e)==="[object Object]",Fs=e=>ae(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,an=Is(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},rl=/-\w/g,Je=Xn(e=>e.replace(rl,t=>t.slice(1).toUpperCase())),al=/\B([A-Z])/g,At=Xn(e=>e.replace(al,"-$1").toLowerCase()),Ho=Xn(e=>e.charAt(0).toUpperCase()+e.slice(1)),cs=Xn(e=>e?`on${Ho(e)}`:""),lt=(e,t)=>!Object.is(e,t),Dn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Qn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let io;const es=()=>io||(io=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ns(e){if(B(e)){const t={};for(let n=0;n{if(n){const s=n.split(ul);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Fe(e){let t="";if(ae(e))t=e;else if(B(e))for(let n=0;n_t(n,t))}const Go=e=>!!(e&&e.__v_isRef===!0),O=e=>ae(e)?e:e==null?"":B(e)||se(e)&&(e.toString===jo||!V(e.toString))?Go(e)?O(e.value):JSON.stringify(e,Wo,2):String(e),Wo=(e,t)=>Go(t)?Wo(e,t.value):Wt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],i)=>(n[us(s,i)+" =>"]=o,n),{})}:Qt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>us(n))}:at(t)?us(t):se(t)&&!B(t)&&!Vo(t)?String(t):t,us=(e,t="")=>{var n;return at(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ge;class ml{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ge&&(ge.active?(this.parent=ge,this.index=(ge.scopes||(ge.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(ge===this)ge=this.prevScope;else{let t=ge;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(un){let t=un;for(un=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;cn;){let t=cn;for(cn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Zo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Xo(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),$s(s),vl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function _s(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Qo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Qo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===bn)||(e.globalVersion=bn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_s(e))))return;e.flags|=2;const t=e.dep,n=le,s=qe;le=e,qe=!0;try{Zo(e);const o=e.fn(e._value);(t.version===0||lt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{le=n,qe=s,Xo(e),e.flags&=-3}}function $s(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)$s(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function vl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let qe=!0;const ei=[];function ct(){ei.push(qe),qe=!1}function ut(){const e=ei.pop();qe=e===void 0?!0:e}function lo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=le;le=void 0;try{t()}finally{le=n}}}let bn=0;class xl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class js{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!le||!qe||le===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==le)n=this.activeLink=new xl(le,this),le.deps?(n.prevDep=le.depsTail,le.depsTail.nextDep=n,le.depsTail=n):le.deps=le.depsTail=n,ti(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=le.depsTail,n.nextDep=void 0,le.depsTail.nextDep=n,le.depsTail=n,le.deps===n&&(le.deps=s)}return n}trigger(t){this.version++,bn++,this.notify(t)}notify(t){Ds();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Bs()}}}function ti(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ti(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ws=new WeakMap,It=Symbol(""),Ss=Symbol(""),mn=Symbol("");function _e(e,t,n){if(qe&&le){let s=ws.get(e);s||ws.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new js),o.map=s,o.key=n),o.track()}}function bt(e,t,n,s,o,i){const l=ws.get(e);if(!l){bn++;return}const r=u=>{u&&u.trigger()};if(Ds(),t==="clear")l.forEach(r);else{const u=B(e),m=u&&Fs(n);if(u&&n==="length"){const h=Number(s);l.forEach((y,U)=>{(U==="length"||U===mn||!at(U)&&U>=h)&&r(y)})}else switch((n!==void 0||l.has(void 0))&&r(l.get(n)),m&&r(l.get(mn)),t){case"add":u?m&&r(l.get("length")):(r(l.get(It)),Wt(e)&&r(l.get(Ss)));break;case"delete":u||(r(l.get(It)),Wt(e)&&r(l.get(Ss)));break;case"set":Wt(e)&&r(l.get(It));break}}Bs()}function Ht(e){const t=Q(e);return t===e?t:(_e(t,"iterate",mn),ze(e)?t:t.map(Ye))}function ts(e){return _e(e=Q(e),"iterate",mn),e}function ot(e,t){return vt(e)?Yt(Rt(e)?Ye(t):t):Ye(t)}const yl={__proto__:null,[Symbol.iterator](){return fs(this,Symbol.iterator,e=>ot(this,e))},concat(...e){return Ht(this).concat(...e.map(t=>B(t)?Ht(t):t))},entries(){return fs(this,"entries",e=>(e[1]=ot(this,e[1]),e))},every(e,t){return ft(this,"every",e,t,void 0,arguments)},filter(e,t){return ft(this,"filter",e,t,n=>n.map(s=>ot(this,s)),arguments)},find(e,t){return ft(this,"find",e,t,n=>ot(this,n),arguments)},findIndex(e,t){return ft(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ft(this,"findLast",e,t,n=>ot(this,n),arguments)},findLastIndex(e,t){return ft(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ft(this,"forEach",e,t,void 0,arguments)},includes(...e){return ps(this,"includes",e)},indexOf(...e){return ps(this,"indexOf",e)},join(e){return Ht(this).join(e)},lastIndexOf(...e){return ps(this,"lastIndexOf",e)},map(e,t){return ft(this,"map",e,t,void 0,arguments)},pop(){return en(this,"pop")},push(...e){return en(this,"push",e)},reduce(e,...t){return ro(this,"reduce",e,t)},reduceRight(e,...t){return ro(this,"reduceRight",e,t)},shift(){return en(this,"shift")},some(e,t){return ft(this,"some",e,t,void 0,arguments)},splice(...e){return en(this,"splice",e)},toReversed(){return Ht(this).toReversed()},toSorted(e){return Ht(this).toSorted(e)},toSpliced(...e){return Ht(this).toSpliced(...e)},unshift(...e){return en(this,"unshift",e)},values(){return fs(this,"values",e=>ot(this,e))}};function fs(e,t,n){const s=ts(e),o=s[t]();return s!==e&&!ze(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=n(i.value)),i}),o}const _l=Array.prototype;function ft(e,t,n,s,o,i){const l=ts(e),r=l!==e&&!ze(e),u=l[t];if(u!==_l[t]){const y=u.apply(e,i);return r?Ye(y):y}let m=n;l!==e&&(r?m=function(y,U){return n.call(this,ot(e,y),U,e)}:n.length>2&&(m=function(y,U){return n.call(this,y,U,e)}));const h=u.call(l,m,s);return r&&o?o(h):h}function ro(e,t,n,s){const o=ts(e),i=o!==e&&!ze(e);let l=n,r=!1;o!==e&&(i?(r=s.length===0,l=function(m,h,y){return r&&(r=!1,m=ot(e,m)),n.call(this,m,ot(e,h),y,e)}):n.length>3&&(l=function(m,h,y){return n.call(this,m,h,y,e)}));const u=o[t](l,...s);return r?ot(e,u):u}function ps(e,t,n){const s=Q(e);_e(s,"iterate",mn);const o=s[t](...n);return(o===-1||o===!1)&&zs(n[0])?(n[0]=Q(n[0]),s[t](...n)):o}function en(e,t,n=[]){ct(),Ds();const s=Q(e)[t].apply(e,n);return Bs(),ut(),s}const wl=Is("__proto__,__v_isRef,__isVue"),ni=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(at));function Sl(e){at(e)||(e=String(e));const t=Q(this);return _e(t,"has",e),t.hasOwnProperty(e)}class si{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(o?i?Il:ri:i?li:ii).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const l=B(t);if(!o){let u;if(l&&(u=yl[n]))return u;if(n==="hasOwnProperty")return Sl}const r=Reflect.get(t,n,we(t)?t:s);if((at(n)?ni.has(n):wl(n))||(o||_e(t,"get",n),i))return r;if(we(r)){const u=l&&Fs(n)?r:r.value;return o&&se(u)?Cs(u):u}return se(r)?o?Cs(r):Hs(r):r}}class oi extends si{constructor(t=!1){super(!1,t)}set(t,n,s,o){let i=t[n];const l=B(t)&&Fs(n);if(!this._isShallow){const m=vt(i);if(!ze(s)&&!vt(s)&&(i=Q(i),s=Q(s)),!l&&we(i)&&!we(s))return m||(i.value=s),!0}const r=l?Number(n)e,In=e=>Reflect.getPrototypeOf(e);function Tl(e,t,n){return function(...s){const o=this.__v_raw,i=Q(o),l=Wt(i),r=e==="entries"||e===Symbol.iterator&&l,u=e==="keys"&&l,m=o[e](...s),h=n?As:t?Yt:Ye;return!t&&_e(i,"iterate",u?Ss:It),Se(Object.create(m),{next(){const{value:y,done:U}=m.next();return U?{value:y,done:U}:{value:r?[h(y[0]),h(y[1])]:h(y),done:U}}})}}function Rn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Pl(e,t){const n={get(o){const i=this.__v_raw,l=Q(i),r=Q(o);e||(lt(o,r)&&_e(l,"get",o),_e(l,"get",r));const{has:u}=In(l),m=t?As:e?Yt:Ye;if(u.call(l,o))return m(i.get(o));if(u.call(l,r))return m(i.get(r));i!==l&&i.get(o)},get size(){const o=this.__v_raw;return!e&&_e(Q(o),"iterate",It),o.size},has(o){const i=this.__v_raw,l=Q(i),r=Q(o);return e||(lt(o,r)&&_e(l,"has",o),_e(l,"has",r)),o===r?i.has(o):i.has(o)||i.has(r)},forEach(o,i){const l=this,r=l.__v_raw,u=Q(r),m=t?As:e?Yt:Ye;return!e&&_e(u,"iterate",It),r.forEach((h,y)=>o.call(i,m(h),m(y),l))}};return Se(n,e?{add:Rn("add"),set:Rn("set"),delete:Rn("delete"),clear:Rn("clear")}:{add(o){const i=Q(this),l=In(i),r=Q(o),u=!t&&!ze(o)&&!vt(o)?r:o;return l.has.call(i,u)||lt(o,u)&&l.has.call(i,o)||lt(r,u)&&l.has.call(i,r)||(i.add(u),bt(i,"add",u,u)),this},set(o,i){!t&&!ze(i)&&!vt(i)&&(i=Q(i));const l=Q(this),{has:r,get:u}=In(l);let m=r.call(l,o);m||(o=Q(o),m=r.call(l,o));const h=u.call(l,o);return l.set(o,i),m?lt(i,h)&&bt(l,"set",o,i):bt(l,"add",o,i),this},delete(o){const i=Q(this),{has:l,get:r}=In(i);let u=l.call(i,o);u||(o=Q(o),u=l.call(i,o)),r&&r.call(i,o);const m=i.delete(o);return u&&bt(i,"delete",o,void 0),m},clear(){const o=Q(this),i=o.size!==0,l=o.clear();return i&&bt(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Tl(o,e,t)}),n}function Vs(e,t){const n=Pl(e,t);return(s,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ee(n,o)&&o in s?n:s,o,i)}const Ol={get:Vs(!1,!1)},Ul={get:Vs(!1,!0)},Ml={get:Vs(!0,!1)};const ii=new WeakMap,li=new WeakMap,ri=new WeakMap,Il=new WeakMap;function Rl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Hs(e){return vt(e)?e:Ks(e,!1,Cl,Ol,ii)}function Fl(e){return Ks(e,!1,kl,Ul,li)}function Cs(e){return Ks(e,!0,El,Ml,ri)}function Ks(e,t,n,s,o){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const l=Rl(ll(e));if(l===0)return e;const r=new Proxy(e,l===2?s:n);return o.set(e,r),r}function Rt(e){return vt(e)?Rt(e.__v_raw):!!(e&&e.__v_isReactive)}function vt(e){return!!(e&&e.__v_isReadonly)}function ze(e){return!!(e&&e.__v_isShallow)}function zs(e){return e?!!e.__v_raw:!1}function Q(e){const t=e&&e.__v_raw;return t?Q(t):e}function Nl(e){return!ee(e,"__v_skip")&&Object.isExtensible(e)&&Ko(e,"__v_skip",!0),e}const Ye=e=>se(e)?Hs(e):e,Yt=e=>se(e)?Cs(e):e;function we(e){return e?e.__v_isRef===!0:!1}function L(e){return Ll(e,!1)}function Ll(e,t){return we(e)?e:new Dl(e,t)}class Dl{constructor(t,n){this.dep=new js,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Q(t),this._value=n?t:Ye(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ze(t)||vt(t);t=s?t:Q(t),lt(t,n)&&(this._rawValue=t,this._value=s?t:Ye(t),this.dep.trigger())}}function on(e){return we(e)?e.value:e}const Bl={get:(e,t,n)=>t==="__v_raw"?e:on(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return we(o)&&!we(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function ai(e){return Rt(e)?e:new Proxy(e,Bl)}class $l{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new js(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=bn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&le!==this)return Yo(this,!0),!0}get value(){const t=this.dep.track();return Qo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function jl(e,t,n=!1){let s,o;return V(e)?s=e:(s=e.get,o=e.set),new $l(s,o,n)}const Fn={},Vn=new WeakMap;let Mt;function Vl(e,t=!1,n=Mt){if(n){let s=Vn.get(n);s||Vn.set(n,s=[]),s.push(e)}}function Hl(e,t,n=oe){const{immediate:s,deep:o,once:i,scheduler:l,augmentJob:r,call:u}=n,m=N=>o?N:ze(N)||o===!1||o===0?mt(N,1):mt(N);let h,y,U,M,J=!1,I=!1;if(we(e)?(y=()=>e.value,J=ze(e)):Rt(e)?(y=()=>m(e),J=!0):B(e)?(I=!0,J=e.some(N=>Rt(N)||ze(N)),y=()=>e.map(N=>{if(we(N))return N.value;if(Rt(N))return m(N);if(V(N))return u?u(N,2):N()})):V(e)?t?y=u?()=>u(e,2):e:y=()=>{if(U){ct();try{U()}finally{ut()}}const N=Mt;Mt=h;try{return u?u(e,3,[M]):e(M)}finally{Mt=N}}:y=rt,t&&o){const N=y,K=o===!0?1/0:o;y=()=>mt(N(),K)}const z=gl(),Y=()=>{h.stop(),z&&z.active&&Rs(z.effects,h)};if(i&&t){const N=t;t=(...K)=>{const Ue=N(...K);return Y(),Ue}}let j=I?new Array(e.length).fill(Fn):Fn;const Z=N=>{if(!(!(h.flags&1)||!h.dirty&&!N))if(t){const K=h.run();if(N||o||J||(I?K.some((Ue,De)=>lt(Ue,j[De])):lt(K,j))){U&&U();const Ue=Mt;Mt=h;try{const De=[K,j===Fn?void 0:I&&j[0]===Fn?[]:j,M];j=K,u?u(t,3,De):t(...De)}finally{Mt=Ue}}}else h.run()};return r&&r(Z),h=new Jo(y),h.scheduler=l?()=>l(Z,!1):Z,M=N=>Vl(N,!1,h),U=h.onStop=()=>{const N=Vn.get(h);if(N){if(u)u(N,4);else for(const K of N)K();Vn.delete(h)}},t?s?Z(!0):j=h.run():l?l(Z.bind(null,!0),!0):h.run(),Y.pause=h.pause.bind(h),Y.resume=h.resume.bind(h),Y.stop=Y,Y}function mt(e,t=1/0,n){if(t<=0||!se(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,we(e))mt(e.value,t,n);else if(B(e))for(let s=0;s{mt(s,t,n)});else if(Vo(e)){for(const s in e)mt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&mt(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function wn(e,t,n,s){try{return s?e(...s):e()}catch(o){ns(o,t,n)}}function Ze(e,t,n,s){if(V(e)){const o=wn(e,t,n,s);return o&&$o(o)&&o.catch(i=>{ns(i,t,n)}),o}if(B(e)){const o=[];for(let i=0;i>>1,o=ke[s],i=gn(o);i=gn(n)?ke.push(e):ke.splice(zl(t),0,e),e.flags|=1,di()}}function di(){Hn||(Hn=ci.then(pi))}function Gl(e){B(e)?Jt.push(...e):yt&&e.id===-1?yt.splice(Kt+1,0,e):e.flags&1||(Jt.push(e),e.flags|=1),di()}function ao(e,t,n=st+1){for(;ngn(n)-gn(s));if(Jt.length=0,yt){yt.push(...t);return}for(yt=t,Kt=0;Kte.id==null?e.flags&2?-1:1/0:e.id;function pi(e){try{for(st=0;st{s._d&&yo(-1);const i=Kn(t);let l;try{l=e(...o)}finally{Kn(i),s._d&&yo(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function ie(e,t){if(Ke===null)return e;const n=ls(Ke),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&V(t)?t.call(s&&s.proxy):t}}const ql=Symbol.for("v-scx"),Yl=()=>Bn(ql);function hs(e,t,n){return bi(e,t,n)}function bi(e,t,n=oe){const{immediate:s,deep:o,flush:i,once:l}=n,r=Se({},n),u=t&&s||!t&&i!=="post";let m;if(xn){if(i==="sync"){const M=Yl();m=M.__watcherHandles||(M.__watcherHandles=[])}else if(!u){const M=()=>{};return M.stop=rt,M.resume=rt,M.pause=rt,M}}const h=Te;r.call=(M,J,I)=>Ze(M,h,J,I);let y=!1;i==="post"?r.scheduler=M=>{Oe(M,h&&h.suspense)}:i!=="sync"&&(y=!0,r.scheduler=(M,J)=>{J?M():Gs(M)}),r.augmentJob=M=>{t&&(M.flags|=4),y&&(M.flags|=2,h&&(M.id=h.uid,M.i=h))};const U=Hl(e,t,r);return xn&&(m?m.push(U):u&&U()),U}function Zl(e,t,n){const s=this.proxy,o=ae(e)?e.includes(".")?mi(s,e):()=>s[e]:e.bind(s,s);let i;V(t)?i=t:(i=t.handler,n=t);const l=Sn(this),r=bi(o,i.bind(s),n);return l(),r}function mi(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,bs=Symbol("_leaveCb");function Ws(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ws(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function gi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function co(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const zn=new WeakMap;function dn(e,t,n,s,o=!1){if(B(e)){e.forEach((I,z)=>dn(I,t&&(B(t)?t[z]:t),n,s,o));return}if(fn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&dn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?ls(s.component):s.el,l=o?null:i,{i:r,r:u}=e,m=t&&t.r,h=r.refs===oe?r.refs={}:r.refs,y=r.setupState,U=Q(y),M=y===oe?Bo:I=>co(h,I)?!1:ee(U,I),J=(I,z)=>!(z&&co(h,z));if(m!=null&&m!==u){if(uo(t),ae(m))h[m]=null,M(m)&&(y[m]=null);else if(we(m)){const I=t;J(m,I.k)&&(m.value=null),I.k&&(h[I.k]=null)}}if(V(u)){ct();try{wn(u,r,12,[l,h])}finally{ut()}}else{const I=ae(u),z=we(u);if(I||z){const Y=()=>{if(e.f){const j=I?M(u)?y[u]:h[u]:J()||!e.k?u.value:h[e.k];if(o)B(j)&&Rs(j,i);else if(B(j))j.includes(i)||j.push(i);else if(I)h[u]=[i],M(u)&&(y[u]=h[u]);else{const Z=[i];J(u,e.k)&&(u.value=Z),e.k&&(h[e.k]=Z)}}else I?(h[u]=l,M(u)&&(y[u]=l)):z&&(J(u,e.k)&&(u.value=l),e.k&&(h[e.k]=l))};if(l){const j=()=>{Y(),zn.delete(e)};j.id=-1,zn.set(e,j),Oe(j,n)}else uo(e),Y()}}}function uo(e){const t=zn.get(e);t&&(t.flags|=8,zn.delete(e))}es().requestIdleCallback;es().cancelIdleCallback;const fn=e=>!!e.type.__asyncLoader,vi=e=>e.type.__isKeepAlive;function er(e,t){xi(e,"a",t)}function tr(e,t){xi(e,"da",t)}function xi(e,t,n=Te){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ss(t,s,n),n){let o=n.parent;for(;o&&o.parent;)vi(o.parent.vnode)&&nr(s,t,n,o),o=o.parent}}function nr(e,t,n,s){const o=ss(t,e,s,!0);Js(()=>{Rs(s[t],o)},n)}function ss(e,t,n=Te,s=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{ct();const r=Sn(n),u=Ze(t,n,e,l);return r(),ut(),u});return s?o.unshift(i):o.push(i),i}}const xt=e=>(t,n=Te)=>{(!xn||e==="sp")&&ss(e,(...s)=>t(...s),n)},sr=xt("bm"),yi=xt("m"),or=xt("bu"),ir=xt("u"),lr=xt("bum"),Js=xt("um"),rr=xt("sp"),ar=xt("rtg"),cr=xt("rtc");function ur(e,t=Te){ss("ec",e,t)}const dr=Symbol.for("v-ndc");function he(e,t,n,s){let o;const i=n,l=B(e);if(l||ae(e)){const r=l&&Rt(e);let u=!1,m=!1;r&&(u=!ze(e),m=vt(e),e=ts(e)),o=new Array(e.length);for(let h=0,y=e.length;ht(r,u,void 0,i));else{const r=Object.keys(e);o=new Array(r.length);for(let u=0,m=r.length;ue?ji(e)?ls(e):Es(e.parent):null,pn=Se(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Es(e.parent),$root:e=>Es(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wi(e),$forceUpdate:e=>e.f||(e.f=()=>{Gs(e.update)}),$nextTick:e=>e.n||(e.n=ui.bind(e.proxy)),$watch:e=>Zl.bind(e)}),ms=(e,t)=>e!==oe&&!e.__isScriptSetup&&ee(e,t),fr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:i,accessCache:l,type:r,appContext:u}=e;if(t[0]!=="$"){const U=l[t];if(U!==void 0)switch(U){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(ms(s,t))return l[t]=1,s[t];if(o!==oe&&ee(o,t))return l[t]=2,o[t];if(ee(i,t))return l[t]=3,i[t];if(n!==oe&&ee(n,t))return l[t]=4,n[t];ks&&(l[t]=0)}}const m=pn[t];let h,y;if(m)return t==="$attrs"&&_e(e.attrs,"get",""),m(e);if((h=r.__cssModules)&&(h=h[t]))return h;if(n!==oe&&ee(n,t))return l[t]=4,n[t];if(y=u.config.globalProperties,ee(y,t))return y[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:i}=e;return ms(o,t)?(o[t]=n,!0):s!==oe&&ee(s,t)?(s[t]=n,!0):ee(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:i,type:l}},r){let u;return!!(n[r]||e!==oe&&r[0]!=="$"&&ee(e,r)||ms(t,r)||ee(i,r)||ee(s,r)||ee(pn,r)||ee(o.config.globalProperties,r)||(u=l.__cssModules)&&u[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ee(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function fo(e){return B(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ks=!0;function pr(e){const t=wi(e),n=e.proxy,s=e.ctx;ks=!1,t.beforeCreate&&po(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:l,watch:r,provide:u,inject:m,created:h,beforeMount:y,mounted:U,beforeUpdate:M,updated:J,activated:I,deactivated:z,beforeDestroy:Y,beforeUnmount:j,destroyed:Z,unmounted:N,render:K,renderTracked:Ue,renderTriggered:De,errorCaptured:Xe,serverPrefetch:Be,expose:Pe,inheritAttrs:de,components:Qe,directives:Ae,filters:ve}=t;if(m&&hr(m,s,null),l)for(const ne in l){const q=l[ne];V(q)&&(s[ne]=q.bind(n))}if(o){const ne=o.call(n,n);se(ne)&&(e.data=Hs(ne))}if(ks=!0,i)for(const ne in i){const q=i[ne],et=V(q)?q.bind(n,n):V(q.get)?q.get.bind(n,n):rt,Nt=!V(q)&&V(q.set)?q.set.bind(n):rt,be=Us({get:et,set:Nt});Object.defineProperty(s,ne,{enumerable:!0,configurable:!0,get:()=>be.value,set:pe=>be.value=pe})}if(r)for(const ne in r)_i(r[ne],s,n,ne);if(u){const ne=V(u)?u.call(n):u;Reflect.ownKeys(ne).forEach(q=>{Jl(q,ne[q])})}h&&po(h,e,"c");function fe(ne,q){B(q)?q.forEach(et=>ne(et.bind(n))):q&&ne(q.bind(n))}if(fe(sr,y),fe(yi,U),fe(or,M),fe(ir,J),fe(er,I),fe(tr,z),fe(ur,Xe),fe(cr,Ue),fe(ar,De),fe(lr,j),fe(Js,N),fe(rr,Be),B(Pe))if(Pe.length){const ne=e.exposed||(e.exposed={});Pe.forEach(q=>{Object.defineProperty(ne,q,{get:()=>n[q],set:et=>n[q]=et,enumerable:!0})})}else e.exposed||(e.exposed={});K&&e.render===rt&&(e.render=K),de!=null&&(e.inheritAttrs=de),Qe&&(e.components=Qe),Ae&&(e.directives=Ae),Be&&gi(e)}function hr(e,t,n=rt){B(e)&&(e=Ts(e));for(const s in e){const o=e[s];let i;se(o)?"default"in o?i=Bn(o.from||s,o.default,!0):i=Bn(o.from||s):i=Bn(o),we(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[s]=i}}function po(e,t,n){Ze(B(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function _i(e,t,n,s){let o=s.includes(".")?mi(n,s):()=>n[s];if(ae(e)){const i=t[e];V(i)&&hs(o,i)}else if(V(e))hs(o,e.bind(n));else if(se(e))if(B(e))e.forEach(i=>_i(i,t,n,s));else{const i=V(e.handler)?e.handler.bind(n):t[e.handler];V(i)&&hs(o,i,e)}}function wi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let u;return r?u=r:!o.length&&!n&&!s?u=t:(u={},o.length&&o.forEach(m=>Gn(u,m,l,!0)),Gn(u,t,l)),se(t)&&i.set(t,u),u}function Gn(e,t,n,s=!1){const{mixins:o,extends:i}=t;i&&Gn(e,i,n,!0),o&&o.forEach(l=>Gn(e,l,n,!0));for(const l in t)if(!(s&&l==="expose")){const r=br[l]||n&&n[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const br={data:ho,props:bo,emits:bo,methods:ln,computed:ln,beforeCreate:Ee,created:Ee,beforeMount:Ee,mounted:Ee,beforeUpdate:Ee,updated:Ee,beforeDestroy:Ee,beforeUnmount:Ee,destroyed:Ee,unmounted:Ee,activated:Ee,deactivated:Ee,errorCaptured:Ee,serverPrefetch:Ee,components:ln,directives:ln,watch:gr,provide:ho,inject:mr};function ho(e,t){return t?e?function(){return Se(V(e)?e.call(this,this):e,V(t)?t.call(this,this):t)}:t:e}function mr(e,t){return ln(Ts(e),Ts(t))}function Ts(e){if(B(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${At(t)}Modifiers`];function _r(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||oe;let o=n;const i=t.startsWith("update:"),l=i&&yr(s,t.slice(7));l&&(l.trim&&(o=n.map(h=>ae(h)?h.trim():h)),l.number&&(o=n.map(Qn)));let r,u=s[r=cs(t)]||s[r=cs(Je(t))];!u&&i&&(u=s[r=cs(At(t))]),u&&Ze(u,e,6,o);const m=s[r+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Ze(m,e,6,o)}}const wr=new WeakMap;function Ai(e,t,n=!1){const s=n?wr:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const i=e.emits;let l={},r=!1;if(!V(e)){const u=m=>{const h=Ai(m,t,!0);h&&(r=!0,Se(l,h))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!i&&!r?(se(e)&&s.set(e,null),null):(B(i)?i.forEach(u=>l[u]=null):Se(l,i),se(e)&&s.set(e,l),l)}function os(e,t){return!e||!Yn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ee(e,t[0].toLowerCase()+t.slice(1))||ee(e,At(t))||ee(e,t))}function mo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[i],slots:l,attrs:r,emit:u,render:m,renderCache:h,props:y,data:U,setupState:M,ctx:J,inheritAttrs:I}=e,z=Kn(e);let Y,j;try{if(n.shapeFlag&4){const N=o||s,K=N;Y=it(m.call(K,N,h,y,M,U,J)),j=r}else{const N=t;Y=it(N.length>1?N(y,{attrs:r,slots:l,emit:u}):N(y,null)),j=t.props?r:Sr(r)}}catch(N){hn.length=0,ns(N,e,1),Y=Le(wt)}let Z=Y;if(j&&I!==!1){const N=Object.keys(j),{shapeFlag:K}=Z;N.length&&K&7&&(i&&N.some(Zn)&&(j=Ar(j,i)),Z=Zt(Z,j,!1,!0))}return n.dirs&&(Z=Zt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(n.dirs):n.dirs),n.transition&&Ws(Z,n.transition),Y=Z,Kn(z),Y}const Sr=e=>{let t;for(const n in e)(n==="class"||n==="style"||Yn(n))&&((t||(t={}))[n]=e[n]);return t},Ar=(e,t)=>{const n={};for(const s in e)(!Zn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Cr(e,t,n){const{props:s,children:o,component:i}=e,{props:l,children:r,patchFlag:u}=t,m=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?go(s,l,m):!!l;if(u&8){const h=t.dynamicProps;for(let y=0;yObject.create(Ei),Ti=e=>Object.getPrototypeOf(e)===Ei;function kr(e,t,n,s=!1){const o={},i=ki();e.propsDefaults=Object.create(null),Pi(e,t,o,i);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);n?e.props=s?o:Fl(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Tr(e,t,n,s){const{props:o,attrs:i,vnode:{patchFlag:l}}=e,r=Q(o),[u]=e.propsOptions;let m=!1;if((s||l>0)&&!(l&16)){if(l&8){const h=e.vnode.dynamicProps;for(let y=0;y{u=!0;const[U,M]=Oi(y,t,!0);Se(l,U),M&&r.push(...M)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!u)return se(e)&&s.set(e,Gt),Gt;if(B(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Ys=e=>B(e)?e.map(it):[it(e)],Or=(e,t,n)=>{if(t._n)return t;const s=Wl((...o)=>Ys(t(...o)),n);return s._c=!1,s},Ui=(e,t,n)=>{const s=e._ctx;for(const o in e){if(qs(o))continue;const i=e[o];if(V(i))t[o]=Or(o,i,s);else if(i!=null){const l=Ys(i);t[o]=()=>l}}},Mi=(e,t)=>{const n=Ys(t);e.slots.default=()=>n},Ii=(e,t,n)=>{for(const s in t)(n||!qs(s))&&(e[s]=t[s])},Ur=(e,t,n)=>{const s=e.slots=ki();if(e.vnode.shapeFlag&32){const o=t._;o?(Ii(s,t,n),n&&Ko(s,"_",o,!0)):Ui(t,s)}else t&&Mi(e,t)},Mr=(e,t,n)=>{const{vnode:s,slots:o}=e;let i=!0,l=oe;if(s.shapeFlag&32){const r=t._;r?n&&r===1?i=!1:Ii(o,t,n):(i=!t.$stable,Ui(t,o)),l=t}else t&&(Mi(e,t),l={default:1});if(i)for(const r in o)!qs(r)&&l[r]==null&&delete o[r]},Oe=Lr;function Ir(e){return Rr(e)}function Rr(e,t){const n=es();n.__VUE__=!0;const{insert:s,remove:o,patchProp:i,createElement:l,createText:r,createComment:u,setText:m,setElementText:h,parentNode:y,nextSibling:U,setScopeId:M=rt,insertStaticContent:J}=e,I=(c,p,g,S=null,w=null,v=null,T=void 0,k=null,E=!!p.dynamicChildren)=>{if(c===p)return;c&&!tn(c,p)&&(S=Me(c),pe(c,w,v,!0),c=null),p.patchFlag===-2&&(E=!1,p.dynamicChildren=null);const{type:_,ref:F,shapeFlag:P}=p;switch(_){case is:z(c,p,g,S);break;case wt:Y(c,p,g,S);break;case $n:c==null&&j(p,g,S,T);break;case X:Qe(c,p,g,S,w,v,T,k,E);break;default:P&1?K(c,p,g,S,w,v,T,k,E):P&6?Ae(c,p,g,S,w,v,T,k,E):(P&64||P&128)&&_.process(c,p,g,S,w,v,T,k,E,kt)}F!=null&&w?dn(F,c&&c.ref,v,p||c,!p):F==null&&c&&c.ref!=null&&dn(c.ref,null,v,c,!0)},z=(c,p,g,S)=>{if(c==null)s(p.el=r(p.children),g,S);else{const w=p.el=c.el;p.children!==c.children&&m(w,p.children)}},Y=(c,p,g,S)=>{c==null?s(p.el=u(p.children||""),g,S):p.el=c.el},j=(c,p,g,S)=>{[c.el,c.anchor]=J(c.children,p,g,S,c.el,c.anchor)},Z=({el:c,anchor:p},g,S)=>{let w;for(;c&&c!==p;)w=U(c),s(c,g,S),c=w;s(p,g,S)},N=({el:c,anchor:p})=>{let g;for(;c&&c!==p;)g=U(c),o(c),c=g;o(p)},K=(c,p,g,S,w,v,T,k,E)=>{if(p.type==="svg"?T="svg":p.type==="math"&&(T="mathml"),c==null)Ue(p,g,S,w,v,T,k,E);else{const _=c.el&&c.el._isVueCE?c.el:null;try{_&&_._beginPatch(),Be(c,p,w,v,T,k,E)}finally{_&&_._endPatch()}}},Ue=(c,p,g,S,w,v,T,k)=>{let E,_;const{props:F,shapeFlag:P,transition:R,dirs:D}=c;if(E=c.el=l(c.type,v,F&&F.is,F),P&8?h(E,c.children):P&16&&Xe(c.children,E,null,S,w,gs(c,v),T,k),D&&Ot(c,null,S,"created"),De(E,c,c.scopeId,T,S),F){for(const W in F)W!=="value"&&!an(W)&&i(E,W,null,F[W],v,S);"value"in F&&i(E,"value",null,F.value,v),(_=F.onVnodeBeforeMount)&&nt(_,S,c)}D&&Ot(c,null,S,"beforeMount");const H=Fr(w,R);H&&R.beforeEnter(E),s(E,p,g),((_=F&&F.onVnodeMounted)||H||D)&&Oe(()=>{try{_&&nt(_,S,c),H&&R.enter(E),D&&Ot(c,null,S,"mounted")}finally{}},w)},De=(c,p,g,S,w)=>{if(g&&M(c,g),S)for(let v=0;v{for(let _=E;_{const k=p.el=c.el;let{patchFlag:E,dynamicChildren:_,dirs:F}=p;E|=c.patchFlag&16;const P=c.props||oe,R=p.props||oe;let D;if(g&&Ut(g,!1),(D=R.onVnodeBeforeUpdate)&&nt(D,g,p,c),F&&Ot(p,c,g,"beforeUpdate"),g&&Ut(g,!0),_&&(!c.dynamicChildren||c.dynamicChildren.length!==_.length)&&(E=0,T=!1,_=null),(P.innerHTML&&R.innerHTML==null||P.textContent&&R.textContent==null)&&h(k,""),_?Pe(c.dynamicChildren,_,k,g,S,gs(p,w),v):T||q(c,p,k,null,g,S,gs(p,w),v,!1),E>0){if(E&16)de(k,P,R,g,w);else if(E&2&&P.class!==R.class&&i(k,"class",null,R.class,w),E&4&&i(k,"style",P.style,R.style,w),E&8){const H=p.dynamicProps;for(let W=0;W{D&&nt(D,g,p,c),F&&Ot(p,c,g,"updated")},S)},Pe=(c,p,g,S,w,v,T)=>{for(let k=0;k{if(p!==g){if(p!==oe)for(const v in p)!an(v)&&!(v in g)&&i(c,v,p[v],null,w,S);for(const v in g){if(an(v))continue;const T=g[v],k=p[v];T!==k&&v!=="value"&&i(c,v,k,T,w,S)}"value"in g&&i(c,"value",p.value,g.value,w)}},Qe=(c,p,g,S,w,v,T,k,E)=>{const _=p.el=c?c.el:r(""),F=p.anchor=c?c.anchor:r("");let{patchFlag:P,dynamicChildren:R,slotScopeIds:D}=p;D&&(k=k?k.concat(D):D),c==null?(s(_,g,S),s(F,g,S),Xe(p.children||[],g,F,w,v,T,k,E)):P>0&&P&64&&R&&c.dynamicChildren&&c.dynamicChildren.length===R.length?(Pe(c.dynamicChildren,R,g,w,v,T,k),(p.key!=null||w&&p===w.subTree)&&Ri(c,p,!0)):q(c,p,g,F,w,v,T,k,E)},Ae=(c,p,g,S,w,v,T,k,E)=>{p.slotScopeIds=k,c==null?p.shapeFlag&512?w.ctx.activate(p,g,S,T,E):ve(p,g,S,w,v,T,E):Ft(c,p,E)},ve=(c,p,g,S,w,v,T)=>{const k=c.component=Gr(c,S,w);if(vi(c)&&(k.ctx.renderer=kt),Jr(k,!1,T),k.asyncDep){if(w&&w.registerDep(k,fe,T),!c.el){const E=k.subTree=Le(wt);Y(null,E,p,g),c.placeholder=E.el}}else fe(k,c,p,g,w,v,T)},Ft=(c,p,g)=>{const S=p.component=c.component;if(Cr(c,p,g))if(S.asyncDep&&!S.asyncResolved){ne(S,p,g);return}else S.next=p,S.update();else p.el=c.el,S.vnode=p},fe=(c,p,g,S,w,v,T)=>{const k=()=>{if(c.isMounted){let{next:P,bu:R,u:D,parent:H,vnode:W}=c;{const xe=Fi(c);if(xe){P&&(P.el=W.el,ne(c,P,T)),xe.asyncDep.then(()=>{Oe(()=>{c.isUnmounted||_()},w)});return}}let G=P,re;Ut(c,!1),P?(P.el=W.el,ne(c,P,T)):P=W,R&&Dn(R),(re=P.props&&P.props.onVnodeBeforeUpdate)&&nt(re,H,P,W),Ut(c,!0);const ue=mo(c),$e=c.subTree;c.subTree=ue,I($e,ue,y($e.el),Me($e),c,w,v),P.el=ue.el,G===null&&Er(c,ue.el),D&&Oe(D,w),(re=P.props&&P.props.onVnodeUpdated)&&Oe(()=>nt(re,H,P,W),w)}else{let P;const{el:R,props:D}=p,{bm:H,m:W,parent:G,root:re,type:ue}=c,$e=fn(p);Ut(c,!1),H&&Dn(H),!$e&&(P=D&&D.onVnodeBeforeMount)&&nt(P,G,p),Ut(c,!0);{re.ce&&re.ce._hasShadowRoot()&&re.ce._injectChildStyle(ue,c.parent?c.parent.type:void 0);const xe=c.subTree=mo(c);I(null,xe,g,S,c,w,v),p.el=xe.el}if(W&&Oe(W,w),!$e&&(P=D&&D.onVnodeMounted)){const xe=p;Oe(()=>nt(P,G,xe),w)}(p.shapeFlag&256||G&&fn(G.vnode)&&G.vnode.shapeFlag&256)&&c.a&&Oe(c.a,w),c.isMounted=!0,p=g=S=null}};c.scope.on();const E=c.effect=new Jo(k);c.scope.off();const _=c.update=E.run.bind(E),F=c.job=E.runIfDirty.bind(E);F.i=c,F.id=c.uid,E.scheduler=()=>Gs(F),Ut(c,!0),_()},ne=(c,p,g)=>{p.component=c;const S=c.vnode.props;c.vnode=p,c.next=null,Tr(c,p.props,S,g),Mr(c,p.children,g),ct(),ao(c),ut()},q=(c,p,g,S,w,v,T,k,E=!1)=>{const _=c&&c.children,F=c?c.shapeFlag:0,P=p.children,{patchFlag:R,shapeFlag:D}=p;if(R>0){if(R&128){Nt(_,P,g,S,w,v,T,k,E);return}else if(R&256){et(_,P,g,S,w,v,T,k,E);return}}D&8?(F&16&&Ct(_,w,v),P!==_&&h(g,P)):F&16?D&16?Nt(_,P,g,S,w,v,T,k,E):Ct(_,w,v,!0):(F&8&&h(g,""),D&16&&Xe(P,g,S,w,v,T,k,E))},et=(c,p,g,S,w,v,T,k,E)=>{c=c||Gt,p=p||Gt;const _=c.length,F=p.length,P=Math.min(_,F);let R;for(R=0;RF?Ct(c,w,v,!0,!1,P):Xe(p,g,S,w,v,T,k,E,P)},Nt=(c,p,g,S,w,v,T,k,E)=>{let _=0;const F=p.length;let P=c.length-1,R=F-1;for(;_<=P&&_<=R;){const D=c[_],H=p[_]=E?ht(p[_]):it(p[_]);if(tn(D,H))I(D,H,g,null,w,v,T,k,E);else break;_++}for(;_<=P&&_<=R;){const D=c[P],H=p[R]=E?ht(p[R]):it(p[R]);if(tn(D,H))I(D,H,g,null,w,v,T,k,E);else break;P--,R--}if(_>P){if(_<=R){const D=R+1,H=DR)for(;_<=P;)pe(c[_],w,v,!0),_++;else{const D=_,H=_,W=new Map;for(_=H;_<=R;_++){const ce=p[_]=E?ht(p[_]):it(p[_]);ce.key!=null&&W.set(ce.key,_)}let G,re=0;const ue=R-H+1;let $e=!1,xe=0;const Ie=new Array(ue);for(_=0;_=ue){pe(ce,w,v,!0);continue}let Ce;if(ce.key!=null)Ce=W.get(ce.key);else for(G=H;G<=R;G++)if(Ie[G-H]===0&&tn(ce,p[G])){Ce=G;break}Ce===void 0?pe(ce,w,v,!0):(Ie[Ce-H]=_+1,Ce>=xe?xe=Ce:$e=!0,I(ce,p[Ce],g,null,w,v,T,k,E),re++)}const me=$e?Nr(Ie):Gt;for(G=me.length-1,_=ue-1;_>=0;_--){const ce=H+_,Ce=p[ce],Tt=p[ce+1],We=ce+1{const{el:v,type:T,transition:k,children:E,shapeFlag:_}=c;if(_&6){be(c.component.subTree,p,g,S);return}if(_&128){c.suspense.move(p,g,S);return}if(_&64){T.move(c,p,g,kt);return}if(T===X){s(v,p,g);for(let P=0;Pk.enter(v),w));else{const{leave:P,delayLeave:R,afterLeave:D}=k,H=()=>{c.ctx.isUnmounted?o(v):s(v,p,g)},W=()=>{const G=v._isLeaving||!!v[bs];v._isLeaving&&v[bs](!0),k.persisted&&!G?H():P(v,()=>{H(),D&&D()})};R?R(v,H,W):W()}else s(v,p,g)},pe=(c,p,g,S=!1,w=!1)=>{const{type:v,props:T,ref:k,children:E,dynamicChildren:_,shapeFlag:F,patchFlag:P,dirs:R,cacheIndex:D,memo:H}=c;if(P===-2&&(w=!1),k!=null&&(ct(),dn(k,null,g,c,!0),ut()),D!=null&&(p.renderCache[D]=void 0),F&256){p.ctx.deactivate(c);return}const W=F&1&&R,G=!fn(c);let re;if(G&&(re=T&&T.onVnodeBeforeUnmount)&&nt(re,p,c),F&6)rs(c.component,g,S);else{if(F&128){c.suspense.unmount(g,S);return}W&&Ot(c,null,p,"beforeUnmount"),F&64?c.type.remove(c,p,g,kt,S):_&&!_.hasOnce&&(v!==X||P>0&&P&64)?Ct(_,p,g,!1,!0):(v===X&&P&384||!w&&F&16)&&Ct(E,p,g),S&&An(c)}const ue=H!=null&&D==null;(G&&(re=T&&T.onVnodeUnmounted)||W||ue)&&Oe(()=>{re&&nt(re,p,c),W&&Ot(c,null,p,"unmounted"),ue&&(c.el=null)},g)},An=c=>{const{type:p,el:g,anchor:S,transition:w}=c;if(p===X){Cn(g,S);return}if(p===$n){N(c);return}const v=()=>{o(g),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(c.shapeFlag&1&&w&&!w.persisted){const{leave:T,delayLeave:k}=w,E=()=>T(g,v);k?k(c.el,v,E):E()}else v()},Cn=(c,p)=>{let g;for(;c!==p;)g=U(c),o(c),c=g;o(p)},rs=(c,p,g)=>{const{bum:S,scope:w,job:v,subTree:T,um:k,m:E,a:_}=c;xo(E),xo(_),S&&Dn(S),w.stop(),v&&(v.flags|=8,pe(T,c,p,g)),k&&Oe(k,p),Oe(()=>{c.isUnmounted=!0},p)},Ct=(c,p,g,S=!1,w=!1,v=0)=>{for(let T=v;T{if(c.shapeFlag&6)return Me(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const p=U(c.anchor||c.el),g=p&&p[Xl];return g?U(g):p};let tt=!1;const Et=(c,p,g)=>{let S;c==null?p._vnode&&(pe(p._vnode,null,null,!0),S=p._vnode.component):I(p._vnode||null,c,p,null,null,null,g),p._vnode=c,tt||(tt=!0,ao(S),fi(),tt=!1)},kt={p:I,um:pe,m:be,r:An,mt:ve,mc:Xe,pc:q,pbc:Pe,n:Me,o:e};return{render:Et,hydrate:void 0,createApp:xr(Et)}}function gs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ut({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ri(e,t,n=!1){const s=e.children,o=t.children;if(B(s)&&B(o))for(let i=0;i>1,e[n[r]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function Fi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fi(t)}function xo(e){if(e)for(let t=0;te.__isSuspense;function Lr(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):Gl(e)}const X=Symbol.for("v-fgt"),is=Symbol.for("v-txt"),wt=Symbol.for("v-cmt"),$n=Symbol.for("v-stc"),hn=[];let Ne=null;function A(e=!1){hn.push(Ne=e?null:[])}function Dr(){hn.pop(),Ne=hn[hn.length-1]||null}let vn=1;function yo(e,t=!1){vn+=e,e<0&&Ne&&t&&(Ne.hasOnce=!0)}function Di(e){return e.dynamicChildren=vn>0?Ne||Gt:null,Dr(),vn>0&&Ne&&Ne.push(e),e}function C(e,t,n,s,o,i){return Di(f(e,t,n,s,o,i,!0))}function Br(e,t,n,s,o){return Di(Le(e,t,n,s,o,!0))}function Bi(e){return e?e.__v_isVNode===!0:!1}function tn(e,t){return e.type===t.type&&e.key===t.key}const $i=({key:e})=>e??null,jn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ae(e)||we(e)||V(e)?{i:Ke,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,o=null,i=e===X?0:1,l=!1,r=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$i(t),ref:t&&jn(t),scopeId:hi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ke};return r?(Wn(u,n),i&128&&e.normalize(u)):n&&(u.shapeFlag|=ae(n)?8:16),vn>0&&!l&&Ne&&(u.patchFlag>0||i&6)&&u.patchFlag!==32&&Ne.push(u),u}const Le=$r;function $r(e,t=null,n=null,s=0,o=null,i=!1){if((!e||e===dr)&&(e=wt),Bi(e)){const r=Zt(e,t,!0);return n&&Wn(r,n),vn>0&&!i&&Ne&&(r.shapeFlag&6?Ne[Ne.indexOf(e)]=r:Ne.push(r)),r.patchFlag=-2,r}if(Xr(e)&&(e=e.__vccOpts),t){t=jr(t);let{class:r,style:u}=t;r&&!ae(r)&&(t.class=Fe(r)),se(u)&&(zs(u)&&!B(u)&&(u=Se({},u)),t.style=Ns(u))}const l=ae(e)?1:Li(e)?128:Ql(e)?64:se(e)?4:V(e)?2:0;return f(e,t,n,s,o,l,i,!0)}function jr(e){return e?zs(e)||Ti(e)?Se({},e):e:null}function Zt(e,t,n=!1,s=!1){const{props:o,ref:i,patchFlag:l,children:r,transition:u}=e,m=t?Hr(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&$i(m),ref:t&&t.ref?n&&i?B(i)?i.concat(jn(t)):[i,jn(t)]:jn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==X?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&Ws(h,u.clone(h)),h}function He(e=" ",t=0){return Le(is,null,e,t)}function Vr(e,t){const n=Le($n,null,e);return n.staticCount=t,n}function $(e="",t=!1){return t?(A(),Br(wt,null,e)):Le(wt,null,e)}function it(e){return e==null||typeof e=="boolean"?Le(wt):B(e)?Le(X,null,e.slice()):Bi(e)?ht(e):Le(is,null,String(e))}function ht(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Wn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(B(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Wn(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Ti(t)?t._ctx=Ke:o===3&&Ke&&(Ke.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(V(t)){if(s&65){Wn(e,{default:t});return}t={default:t,_ctx:Ke},n=32}else t=String(t),s&64?(n=16,t=[He(t)]):n=8;e.children=t,e.shapeFlag|=n}function Hr(...e){const t={};for(let n=0;nTe||Ke;let Jn,Os;{const e=es(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),i=>{o.length>1?o.forEach(l=>l(i)):o[0](i)}};Jn=t("__VUE_INSTANCE_SETTERS__",n=>Te=n),Os=t("__VUE_SSR_SETTERS__",n=>xn=n)}const Sn=e=>{const t=Te;return Jn(e),e.scope.on(),()=>{e.scope.off(),Jn(t)}},_o=()=>{Te&&Te.scope.off(),Jn(null)};function ji(e){return e.vnode.shapeFlag&4}let xn=!1;function Jr(e,t=!1,n=!1){t&&Os(t);const{props:s,children:o}=e.vnode,i=ji(e);kr(e,s,i,t),Ur(e,o,n||t);const l=i?qr(e,t):void 0;return t&&Os(!1),l}function qr(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,fr);const{setup:s}=n;if(s){ct();const o=e.setupContext=s.length>1?Zr(e):null,i=Sn(e),l=wn(s,e,0,[e.props,o]),r=$o(l);if(ut(),i(),(r||e.sp)&&!fn(e)&&gi(e),r){if(l.then(_o,_o),t)return l.then(u=>{wo(e,u)}).catch(u=>{ns(u,e,0)});e.asyncDep=l}else wo(e,l)}else Vi(e)}function wo(e,t,n){V(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=ai(t)),Vi(e)}function Vi(e,t,n){const s=e.type;e.render||(e.render=s.render||rt);{const o=Sn(e);ct();try{pr(e)}finally{ut(),o()}}}const Yr={get(e,t){return _e(e,"get",""),e[t]}};function Zr(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Yr),slots:e.slots,emit:e.emit,expose:t}}function ls(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ai(Nl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in pn)return pn[n](e)},has(t,n){return n in t||n in pn}})):e.proxy}function Xr(e){return V(e)&&"__vccOpts"in e}const Us=(e,t)=>jl(e,t,xn),Qr="3.5.39";/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ms;const So=typeof window<"u"&&window.trustedTypes;if(So)try{Ms=So.createPolicy("vue",{createHTML:e=>e})}catch{}const Hi=Ms?e=>Ms.createHTML(e):e=>e,ea="http://www.w3.org/2000/svg",ta="http://www.w3.org/1998/Math/MathML",pt=typeof document<"u"?document:null,Ao=pt&&pt.createElement("template"),na={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?pt.createElementNS(ea,e):t==="mathml"?pt.createElementNS(ta,e):n?pt.createElement(e,{is:n}):pt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>pt.createTextNode(e),createComment:e=>pt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,i){const l=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{Ao.innerHTML=Hi(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const r=Ao.content;if(s==="svg"||s==="mathml"){const u=r.firstChild;for(;u.firstChild;)r.appendChild(u.firstChild);r.removeChild(u)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},sa=Symbol("_vtc");function oa(e,t,n){const s=e[sa];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const qn=Symbol("_vod"),Ki=Symbol("_vsh"),nn={name:"show",beforeMount(e,{value:t},{transition:n}){e[qn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):sn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),sn(e,!0),s.enter(e)):s.leave(e,()=>{sn(e,!1)}):sn(e,t))},beforeUnmount(e,{value:t}){sn(e,t)}};function sn(e,t){e.style.display=t?e[qn]:"none",e[Ki]=!t}const ia=Symbol(""),la=/(?:^|;)\s*display\s*:/;function ra(e,t,n){const s=e.style,o=ae(n);let i=!1;if(n&&!o){if(t)if(ae(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();n[r]==null&&rn(s,r,"")}else for(const l in t)n[l]==null&&rn(s,l,"");for(const l in n){l==="display"&&(i=!0);const r=n[l];r!=null?ca(e,l,!ae(t)&&t?t[l]:void 0,r)||rn(s,l,r):rn(s,l,"")}}else if(o){if(t!==n){const l=s[ia];l&&(n+=";"+l),s.cssText=n,i=la.test(n)}}else t&&e.removeAttribute("style");qn in e&&(e[qn]=i?s.display:"",e[Ki]&&(s.display="none"))}const Co=/\s*!important$/;function rn(e,t,n){if(B(n))n.forEach(s=>rn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=aa(e,t);Co.test(n)?e.setProperty(At(s),n.replace(Co,""),"important"):e[s]=n}}const Eo=["Webkit","Moz","ms"],vs={};function aa(e,t){const n=vs[t];if(n)return n;let s=Je(t);if(s!=="filter"&&s in e)return vs[t]=s;s=Ho(s);for(let o=0;oxs||(ba.then(()=>xs=0),xs=Date.now());function ga(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(B(o)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const l=o.slice(),r=[s];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,va=(e,t,n,s,o,i)=>{const l=o==="svg";t==="class"?oa(e,s,l):t==="style"?ra(e,n,s):Yn(t)?Zn(t)||da(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):xa(e,t,s,l))?(Po(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&To(e,t,s,l,i,t!=="value")):e._isVueCE&&(ya(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ae(s)))?Po(e,Je(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),To(e,t,s,l))};function xa(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Uo(t)&&V(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Uo(t)&&ae(n)?!1:t in e}function ya(e,t){const n=e._def.props;if(!n)return!1;const s=Je(t);return Array.isArray(n)?n.some(o=>Je(o)===s):Object.keys(n).some(o=>Je(o)===s)}const St=e=>{const t=e.props["onUpdate:modelValue"]||!1;return B(t)?n=>Dn(t,n):t};function _a(e){e.target.composing=!0}function Mo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ge=Symbol("_assign");function Io(e,t,n){return t&&(e=e.trim()),n&&(e=Qn(e)),e}const ye={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[Ge]=St(o);const i=s||o.props&&o.props.type==="number";gt(e,t?"change":"input",l=>{l.target.composing||e[Ge](Io(e.value,n,i))}),(n||i)&>(e,"change",()=>{e.value=Io(e.value,n,i)}),t||(gt(e,"compositionstart",_a),gt(e,"compositionend",Mo),gt(e,"change",Mo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:i}},l){if(e[Ge]=St(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?Qn(e.value):e.value,u=t??"";if(r===u)return;const m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===u)||(e.value=u)}},zi={deep:!0,created(e,t,n){e[Ge]=St(n),gt(e,"change",()=>{const s=e._modelValue,o=Xt(e),i=e.checked,l=e[Ge];if(B(s)){const r=Ls(s,o),u=r!==-1;if(i&&!u)l(s.concat(o));else if(!i&&u){const m=[...s];m.splice(r,1),l(m)}}else if(Qt(s)){const r=new Set(s);i?r.add(o):r.delete(o),l(r)}else l(Gi(e,i))})},mounted:Ro,beforeUpdate(e,t,n){e[Ge]=St(n),Ro(e,t,n)}};function Ro(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(B(t))o=Ls(t,s.props.value)>-1;else if(Qt(t))o=t.has(s.props.value);else{if(t===n)return;o=_t(t,Gi(e,!0))}e.checked!==o&&(e.checked=o)}const wa={created(e,{value:t},n){e.checked=_t(t,n.props.value),e[Ge]=St(n),gt(e,"change",()=>{e[Ge](Xt(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[Ge]=St(s),t!==n&&(e.checked=_t(t,s.props.value))}},zt={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=Qt(t);gt(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?Qn(Xt(l)):Xt(l));e[Ge](e.multiple?o?new Set(i):i:i[0]),e._assigning=!0,ui(()=>{e._assigning=!1})}),e[Ge]=St(s)},mounted(e,{value:t}){Fo(e,t)},beforeUpdate(e,t,n){e[Ge]=St(n)},updated(e,{value:t}){e._assigning||Fo(e,t)}};function Fo(e,t){const n=e.multiple,s=B(t);if(!(n&&!s&&!Qt(t))){for(let o=0,i=e.options.length;oString(m)===String(r)):l.selected=Ls(t,r)>-1}else l.selected=t.has(r);else if(_t(Xt(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Xt(e){return"_value"in e?e._value:e.value}function Gi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Sa={created(e,t,n){Nn(e,t,n,null,"created")},mounted(e,t,n){Nn(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Nn(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Nn(e,t,n,s,"updated")}};function Aa(e,t){switch(e){case"SELECT":return zt;case"TEXTAREA":return ye;default:switch(t){case"checkbox":return zi;case"radio":return wa;default:return ye}}}function Nn(e,t,n,s,o){const l=Aa(e.tagName,n.props&&n.props.type)[o];l&&l(e,t,n,s)}const Ca=["ctrl","shift","alt","meta"],Ea={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ca.some(n=>e[`${n}Key`]&&!t.includes(n))},ka=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...i)=>{for(let l=0;l{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const i=At(o.key);if(t.some(l=>l===i||Ta[l]===i))return e(o)}))},Pa=Se({patchProp:va},na);let Lo;function Oa(){return Lo||(Lo=Ir(Pa))}const Ua=((...e)=>{const t=Oa().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Ia(s);if(!o)return;const i=t._component;!V(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=n(o,!1,Ma(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Ma(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ia(e){return ae(e)?document.querySelector(e):e}const Wi="pilotvault-theme";function Ra(){try{return localStorage.getItem(Wi)==="dark"?"dark":"light"}catch{return"light"}}const yn=L(Ra());function Ji(e){yn.value=e,document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(Wi,e)}catch{}}function Do(){Ji(yn.value==="dark"?"light":"dark")}Ji(yn.value);const Fa=[{code:"AL",name:"Albania",continent:"EU",bbox:"39.6,19.3,42.7,21.1"},{code:"AD",name:"Andorra",continent:"EU",bbox:"42.4,1.4,42.7,1.8"},{code:"AT",name:"Austria",continent:"EU",bbox:"46.4,9.5,49.0,17.2"},{code:"BY",name:"Belarus",continent:"EU",bbox:"51.2,23.2,56.2,32.8"},{code:"BE",name:"Belgium",continent:"EU",bbox:"49.5,2.5,51.5,6.4"},{code:"BA",name:"Bosnia and Herzegovina",continent:"EU",bbox:"42.6,15.7,45.3,19.6"},{code:"BG",name:"Bulgaria",continent:"EU",bbox:"41.2,22.4,44.2,28.6"},{code:"HR",name:"Croatia",continent:"EU",bbox:"42.4,13.5,46.6,19.4"},{code:"CY",name:"Cyprus",continent:"EU",bbox:"34.6,32.3,35.7,34.6"},{code:"CZ",name:"Czechia",continent:"EU",bbox:"48.6,12.1,51.1,18.9"},{code:"DK",name:"Denmark",continent:"EU",bbox:"54.6,8.1,57.8,12.7"},{code:"EE",name:"Estonia",continent:"EU",bbox:"57.5,21.8,59.7,28.2"},{code:"FI",name:"Finland",continent:"EU",bbox:"59.8,20.6,70.1,31.6"},{code:"FR",name:"France",continent:"EU",bbox:"41.3,-5.2,51.1,9.6"},{code:"DE",name:"Germany",continent:"EU",bbox:"47.2,5.8,55.1,15.1"},{code:"GR",name:"Greece",continent:"EU",bbox:"34.8,19.4,41.8,28.3"},{code:"HU",name:"Hungary",continent:"EU",bbox:"45.7,16.1,48.6,22.9"},{code:"IS",name:"Iceland",continent:"EU",bbox:"63.3,-24.6,66.6,-13.5"},{code:"IE",name:"Ireland",continent:"EU",bbox:"51.4,-10.6,55.4,-6.0"},{code:"IT",name:"Italy",continent:"EU",bbox:"36.6,6.6,47.1,18.6"},{code:"XK",name:"Kosovo",continent:"EU",bbox:"41.8,20.0,43.3,21.8"},{code:"LV",name:"Latvia",continent:"EU",bbox:"55.7,20.9,58.1,28.2"},{code:"LI",name:"Liechtenstein",continent:"EU",bbox:"47.0,9.4,47.3,9.6"},{code:"LT",name:"Lithuania",continent:"EU",bbox:"53.9,20.9,56.5,26.9"},{code:"LU",name:"Luxembourg",continent:"EU",bbox:"49.4,5.7,50.2,6.5"},{code:"MT",name:"Malta",continent:"EU",bbox:"35.8,14.1,36.1,14.6"},{code:"MD",name:"Moldova",continent:"EU",bbox:"45.4,26.6,48.5,30.2"},{code:"MC",name:"Monaco",continent:"EU",bbox:"43.72,7.40,43.75,7.44"},{code:"ME",name:"Montenegro",continent:"EU",bbox:"41.8,18.4,43.6,20.4"},{code:"NL",name:"Netherlands",continent:"EU",bbox:"50.7,3.3,53.7,7.2"},{code:"MK",name:"North Macedonia",continent:"EU",bbox:"40.8,20.4,42.4,23.0"},{code:"NO",name:"Norway",continent:"EU",bbox:"57.9,4.6,71.2,31.1"},{code:"PL",name:"Poland",continent:"EU",bbox:"49.0,14.1,54.9,24.2"},{code:"PT",name:"Portugal",continent:"EU",bbox:"36.9,-9.5,42.2,-6.2"},{code:"RO",name:"Romania",continent:"EU",bbox:"43.6,20.2,48.3,29.7"},{code:"SM",name:"San Marino",continent:"EU",bbox:"43.89,12.40,43.99,12.52"},{code:"RS",name:"Serbia",continent:"EU",bbox:"42.2,18.8,46.2,23.0"},{code:"SK",name:"Slovakia",continent:"EU",bbox:"47.7,16.8,49.6,22.6"},{code:"SI",name:"Slovenia",continent:"EU",bbox:"45.4,13.4,46.9,16.6"},{code:"ES",name:"Spain",continent:"EU",bbox:"35.9,-9.4,43.8,3.4"},{code:"SE",name:"Sweden",continent:"EU",bbox:"55.3,11.1,69.1,24.2"},{code:"CH",name:"Switzerland",continent:"EU",bbox:"45.8,5.9,47.8,10.5"},{code:"UA",name:"Ukraine",continent:"EU",bbox:"44.4,22.1,52.4,40.2"},{code:"GB",name:"United Kingdom",continent:"EU",bbox:"49.9,-8.7,60.9,1.8"},{code:"VA",name:"Vatican City",continent:"EU",bbox:"41.900,12.445,41.908,12.458"},{code:"RU",name:"Russia",continent:"EU",bbox:"41.2,19.6,81.9,180"},{code:"TR",name:"Turkey",continent:"EU",bbox:"35.8,25.7,42.3,44.8"},{code:"AF",name:"Afghanistan",continent:"AS",bbox:"29.4,60.5,38.5,74.9"},{code:"AM",name:"Armenia",continent:"AS",bbox:"38.8,43.4,41.3,46.6"},{code:"AZ",name:"Azerbaijan",continent:"AS",bbox:"38.4,44.8,41.9,50.4"},{code:"BH",name:"Bahrain",continent:"AS",bbox:"25.8,50.4,26.3,50.7"},{code:"BD",name:"Bangladesh",continent:"AS",bbox:"20.7,88.0,26.6,92.7"},{code:"BT",name:"Bhutan",continent:"AS",bbox:"26.7,88.7,28.3,92.1"},{code:"BN",name:"Brunei",continent:"AS",bbox:"4.0,114.0,5.1,115.4"},{code:"KH",name:"Cambodia",continent:"AS",bbox:"10.4,102.3,14.7,107.6"},{code:"CN",name:"China",continent:"AS",bbox:"18.2,73.5,53.6,134.8"},{code:"GE",name:"Georgia",continent:"AS",bbox:"41.0,40.0,43.6,46.7"},{code:"IN",name:"India",continent:"AS",bbox:"6.7,68.1,35.5,97.4"},{code:"ID",name:"Indonesia",continent:"AS",bbox:"-11.0,95.0,6.1,141.0"},{code:"IR",name:"Iran",continent:"AS",bbox:"25.0,44.0,39.8,63.3"},{code:"IQ",name:"Iraq",continent:"AS",bbox:"29.1,38.8,37.4,48.6"},{code:"IL",name:"Israel",continent:"AS",bbox:"29.5,34.2,33.3,35.9"},{code:"JP",name:"Japan",continent:"AS",bbox:"24.0,122.9,45.5,145.8"},{code:"JO",name:"Jordan",continent:"AS",bbox:"29.2,34.9,33.4,39.3"},{code:"KZ",name:"Kazakhstan",continent:"AS",bbox:"40.6,46.5,55.4,87.3"},{code:"KW",name:"Kuwait",continent:"AS",bbox:"28.5,46.5,30.1,48.4"},{code:"KG",name:"Kyrgyzstan",continent:"AS",bbox:"39.2,69.3,43.3,80.3"},{code:"LA",name:"Laos",continent:"AS",bbox:"13.9,100.1,22.5,107.7"},{code:"LB",name:"Lebanon",continent:"AS",bbox:"33.0,35.1,34.7,36.6"},{code:"MY",name:"Malaysia",continent:"AS",bbox:"0.9,99.6,7.4,119.3"},{code:"MV",name:"Maldives",continent:"AS",bbox:"-0.7,72.7,7.1,73.7"},{code:"MN",name:"Mongolia",continent:"AS",bbox:"41.6,87.7,52.1,119.9"},{code:"MM",name:"Myanmar",continent:"AS",bbox:"9.8,92.2,28.5,101.2"},{code:"NP",name:"Nepal",continent:"AS",bbox:"26.3,80.1,30.4,88.2"},{code:"KP",name:"North Korea",continent:"AS",bbox:"37.7,124.2,43.0,130.7"},{code:"OM",name:"Oman",continent:"AS",bbox:"16.6,52.0,26.4,59.8"},{code:"PK",name:"Pakistan",continent:"AS",bbox:"23.7,60.9,37.1,77.8"},{code:"PH",name:"Philippines",continent:"AS",bbox:"4.6,116.9,21.1,126.6"},{code:"QA",name:"Qatar",continent:"AS",bbox:"24.5,50.7,26.2,51.6"},{code:"SA",name:"Saudi Arabia",continent:"AS",bbox:"16.4,34.6,32.2,55.7"},{code:"SG",name:"Singapore",continent:"AS",bbox:"1.2,103.6,1.5,104.1"},{code:"KR",name:"South Korea",continent:"AS",bbox:"33.1,125.9,38.6,129.6"},{code:"LK",name:"Sri Lanka",continent:"AS",bbox:"5.9,79.7,9.8,81.9"},{code:"SY",name:"Syria",continent:"AS",bbox:"32.3,35.7,37.3,42.4"},{code:"TW",name:"Taiwan",continent:"AS",bbox:"21.9,120.0,25.3,122.0"},{code:"TJ",name:"Tajikistan",continent:"AS",bbox:"36.7,67.4,41.0,75.2"},{code:"TH",name:"Thailand",continent:"AS",bbox:"5.6,97.3,20.5,105.6"},{code:"TL",name:"Timor-Leste",continent:"AS",bbox:"-9.5,124.0,-8.1,127.3"},{code:"TM",name:"Turkmenistan",continent:"AS",bbox:"35.1,52.4,42.8,66.7"},{code:"AE",name:"United Arab Emirates",continent:"AS",bbox:"22.6,51.5,26.1,56.4"},{code:"UZ",name:"Uzbekistan",continent:"AS",bbox:"37.2,55.9,45.6,73.1"},{code:"VN",name:"Vietnam",continent:"AS",bbox:"8.2,102.1,23.4,109.5"},{code:"YE",name:"Yemen",continent:"AS",bbox:"12.1,42.5,19.0,54.5"},{code:"DZ",name:"Algeria",continent:"AF",bbox:"18.9,-8.7,37.1,12.0"},{code:"AO",name:"Angola",continent:"AF",bbox:"-18.0,11.6,-4.4,24.1"},{code:"BJ",name:"Benin",continent:"AF",bbox:"6.2,0.8,12.4,3.9"},{code:"BW",name:"Botswana",continent:"AF",bbox:"-26.9,20.0,-17.8,29.4"},{code:"BF",name:"Burkina Faso",continent:"AF",bbox:"9.4,-5.5,15.1,2.4"},{code:"BI",name:"Burundi",continent:"AF",bbox:"-4.5,29.0,-2.3,30.8"},{code:"CV",name:"Cabo Verde",continent:"AF",bbox:"14.8,-25.4,17.2,-22.7"},{code:"CM",name:"Cameroon",continent:"AF",bbox:"1.7,8.5,13.1,16.2"},{code:"CF",name:"Central African Republic",continent:"AF",bbox:"2.2,14.4,11.0,27.5"},{code:"TD",name:"Chad",continent:"AF",bbox:"7.4,13.5,23.4,24.0"},{code:"KM",name:"Comoros",continent:"AF",bbox:"-12.4,43.2,-11.4,44.5"},{code:"CG",name:"Congo",continent:"AF",bbox:"-5.0,11.1,3.7,18.6"},{code:"CD",name:"DR Congo",continent:"AF",bbox:"-13.5,12.2,5.4,31.3"},{code:"DJ",name:"Djibouti",continent:"AF",bbox:"10.9,41.7,12.7,43.4"},{code:"EG",name:"Egypt",continent:"AF",bbox:"22.0,25.0,31.7,36.9"},{code:"GQ",name:"Equatorial Guinea",continent:"AF",bbox:"0.9,9.3,3.8,11.4"},{code:"ER",name:"Eritrea",continent:"AF",bbox:"12.4,36.4,18.0,43.1"},{code:"SZ",name:"Eswatini",continent:"AF",bbox:"-27.3,30.8,-25.7,32.1"},{code:"ET",name:"Ethiopia",continent:"AF",bbox:"3.4,33.0,14.9,48.0"},{code:"GA",name:"Gabon",continent:"AF",bbox:"-4.0,8.7,2.3,14.5"},{code:"GM",name:"Gambia",continent:"AF",bbox:"13.1,-16.8,13.8,-13.8"},{code:"GH",name:"Ghana",continent:"AF",bbox:"4.7,-3.3,11.2,1.2"},{code:"GN",name:"Guinea",continent:"AF",bbox:"7.2,-15.1,12.7,-7.6"},{code:"GW",name:"Guinea-Bissau",continent:"AF",bbox:"10.9,-16.7,12.7,-13.6"},{code:"CI",name:"Ivory Coast",continent:"AF",bbox:"4.4,-8.6,10.7,-2.5"},{code:"KE",name:"Kenya",continent:"AF",bbox:"-4.7,33.9,5.5,41.9"},{code:"LS",name:"Lesotho",continent:"AF",bbox:"-30.7,27.0,-28.6,29.5"},{code:"LR",name:"Liberia",continent:"AF",bbox:"4.3,-11.5,8.6,-7.4"},{code:"LY",name:"Libya",continent:"AF",bbox:"19.5,9.3,33.2,25.2"},{code:"MG",name:"Madagascar",continent:"AF",bbox:"-25.6,43.2,-11.9,50.5"},{code:"MW",name:"Malawi",continent:"AF",bbox:"-17.1,32.7,-9.4,35.9"},{code:"ML",name:"Mali",continent:"AF",bbox:"10.1,-12.3,25.0,4.3"},{code:"MR",name:"Mauritania",continent:"AF",bbox:"14.7,-17.1,27.3,-4.8"},{code:"MU",name:"Mauritius",continent:"AF",bbox:"-20.5,57.3,-19.9,57.8"},{code:"MA",name:"Morocco",continent:"AF",bbox:"27.7,-13.2,35.9,-1.0"},{code:"MZ",name:"Mozambique",continent:"AF",bbox:"-26.9,30.2,-10.5,40.8"},{code:"NA",name:"Namibia",continent:"AF",bbox:"-28.9,11.7,-16.9,25.3"},{code:"NE",name:"Niger",continent:"AF",bbox:"11.7,0.2,23.5,16.0"},{code:"NG",name:"Nigeria",continent:"AF",bbox:"4.3,2.7,13.9,14.7"},{code:"RW",name:"Rwanda",continent:"AF",bbox:"-2.8,28.9,-1.1,30.9"},{code:"SN",name:"Senegal",continent:"AF",bbox:"12.3,-17.5,16.7,-11.4"},{code:"SL",name:"Sierra Leone",continent:"AF",bbox:"6.9,-13.3,10.0,-10.3"},{code:"SO",name:"Somalia",continent:"AF",bbox:"-1.7,40.9,12.0,51.4"},{code:"ZA",name:"South Africa",continent:"AF",bbox:"-34.8,16.5,-22.1,32.9"},{code:"SS",name:"South Sudan",continent:"AF",bbox:"3.5,24.1,12.2,35.9"},{code:"SD",name:"Sudan",continent:"AF",bbox:"8.7,21.8,22.2,38.6"},{code:"TZ",name:"Tanzania",continent:"AF",bbox:"-11.7,29.3,-1.0,40.4"},{code:"TG",name:"Togo",continent:"AF",bbox:"6.1,-0.1,11.1,1.8"},{code:"TN",name:"Tunisia",continent:"AF",bbox:"30.2,7.5,37.5,11.6"},{code:"UG",name:"Uganda",continent:"AF",bbox:"-1.5,29.6,4.2,35.0"},{code:"ZM",name:"Zambia",continent:"AF",bbox:"-18.1,21.9,-8.2,33.7"},{code:"ZW",name:"Zimbabwe",continent:"AF",bbox:"-22.4,25.2,-15.6,33.1"},{code:"CA",name:"Canada",continent:"NA",bbox:"41.7,-141.0,83.1,-52.6"},{code:"US",name:"United States",continent:"NA",bbox:"24.4,-125.0,49.4,-66.9"},{code:"MX",name:"Mexico",continent:"NA",bbox:"14.5,-118.4,32.7,-86.7"},{code:"GT",name:"Guatemala",continent:"NA",bbox:"13.7,-92.2,17.8,-88.2"},{code:"BZ",name:"Belize",continent:"NA",bbox:"15.9,-89.2,18.5,-87.8"},{code:"SV",name:"El Salvador",continent:"NA",bbox:"13.1,-90.1,14.4,-87.7"},{code:"HN",name:"Honduras",continent:"NA",bbox:"12.9,-89.4,16.5,-83.1"},{code:"NI",name:"Nicaragua",continent:"NA",bbox:"10.7,-87.7,15.0,-83.1"},{code:"CR",name:"Costa Rica",continent:"NA",bbox:"8.0,-85.9,11.2,-82.5"},{code:"PA",name:"Panama",continent:"NA",bbox:"7.2,-83.1,9.6,-77.2"},{code:"CU",name:"Cuba",continent:"NA",bbox:"19.8,-85.0,23.3,-74.1"},{code:"DO",name:"Dominican Republic",continent:"NA",bbox:"17.5,-72.0,19.9,-68.3"},{code:"HT",name:"Haiti",continent:"NA",bbox:"18.0,-74.5,20.1,-71.6"},{code:"JM",name:"Jamaica",continent:"NA",bbox:"17.7,-78.4,18.5,-76.2"},{code:"BS",name:"Bahamas",continent:"NA",bbox:"20.9,-79.0,27.3,-72.7"},{code:"TT",name:"Trinidad and Tobago",continent:"NA",bbox:"10.0,-61.9,11.4,-60.5"},{code:"AR",name:"Argentina",continent:"SA",bbox:"-55.1,-73.6,-21.8,-53.6"},{code:"BO",name:"Bolivia",continent:"SA",bbox:"-22.9,-69.6,-9.7,-57.5"},{code:"BR",name:"Brazil",continent:"SA",bbox:"-33.8,-74.0,5.3,-34.8"},{code:"CL",name:"Chile",continent:"SA",bbox:"-55.9,-75.6,-17.5,-66.4"},{code:"CO",name:"Colombia",continent:"SA",bbox:"-4.2,-79.0,12.5,-66.9"},{code:"EC",name:"Ecuador",continent:"SA",bbox:"-5.0,-81.1,1.4,-75.2"},{code:"GY",name:"Guyana",continent:"SA",bbox:"1.2,-61.4,8.6,-56.5"},{code:"PY",name:"Paraguay",continent:"SA",bbox:"-27.6,-62.6,-19.3,-54.3"},{code:"PE",name:"Peru",continent:"SA",bbox:"-18.4,-81.3,0.0,-68.7"},{code:"SR",name:"Suriname",continent:"SA",bbox:"1.8,-58.1,6.0,-54.0"},{code:"UY",name:"Uruguay",continent:"SA",bbox:"-35.0,-58.4,-30.1,-53.1"},{code:"VE",name:"Venezuela",continent:"SA",bbox:"0.6,-73.4,12.2,-59.8"},{code:"AU",name:"Australia",continent:"OC",bbox:"-43.6,113.3,-10.7,153.6"},{code:"NZ",name:"New Zealand",continent:"OC",bbox:"-47.3,166.4,-34.4,178.6"},{code:"PG",name:"Papua New Guinea",continent:"OC",bbox:"-11.7,140.8,-1.3,155.9"},{code:"FJ",name:"Fiji",continent:"OC",bbox:"-19.2,177.0,-16.0,180.0"}],Na=[["EU","European countries"],["AS","Asian countries"],["AF","African countries"],["NA","North American countries"],["SA","South American countries"],["OC","Oceanian countries"]];function La(){return Na.map(([e,t])=>({label:t,options:Fa.filter(n=>n.continent===e).slice().sort((n,s)=>n.name.localeCompare(s.name)).map(n=>({value:n.bbox,label:n.name}))}))}const Da={class:"overflow-hidden rounded-lg border border-subtle bg-card shadow-xs"},Ba={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},$a={class:"text-base font-semibold text-primary"},ja={class:"pv-eyebrow"},Va={class:"w-full text-left text-sm"},Ha={class:"border-t border-subtle px-5 py-2.5 font-mono text-xs whitespace-nowrap"},Ka={class:"text-primary"},za={class:"border-t border-subtle px-5 py-2.5 text-secondary"},ys={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brand-text",PATCH:"text-warning",DELETE:"text-danger"};return(n,s)=>(A(),C("div",Da,[f("div",Ba,[f("div",$a,O(e.title),1),f("span",ja,O(e.auth),1)]),f("table",Va,[s[0]||(s[0]=f("thead",null,[f("tr",{class:"pv-eyebrow"},[f("th",{class:"px-5 py-2.5 font-medium"},"Endpoint"),f("th",{class:"px-5 py-2.5 font-medium"},"Description")])],-1)),f("tbody",null,[(A(!0),C(X,null,he(e.endpoints,o=>(A(),C("tr",{key:o.method+o.path,class:"transition-colors hover:bg-sunken"},[f("td",Ha,[f("span",{class:Fe(["font-semibold",t[o.method]])},O(o.method),3),f("span",Ka,O(o.path),1)]),f("td",za,O(o.desc),1)]))),128))])])]))}},Ga={class:"mx-auto flex max-w-5xl flex-col gap-6 px-6 pt-12 pb-16"},Wa={class:"flex items-center gap-3"},Ja={key:0,class:"pv-eyebrow hidden truncate sm:inline"},qa=["title"],Ya={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Za={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Xa={key:0,class:"rounded-lg border border-subtle bg-card px-5 py-10 text-center shadow-sm"},Qa={key:1,class:"mx-auto w-full max-w-sm rounded-lg border border-subtle bg-card shadow-sm"},ec={class:"flex flex-col gap-1"},tc={class:"flex flex-col gap-1"},nc={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},sc=["disabled"],oc={class:"flex gap-1 self-start rounded-lg border border-subtle bg-card p-1 shadow-sm"},ic=["onClick"],lc={class:"flex flex-col gap-6"},rc={class:"rounded-lg border border-subtle bg-card shadow-sm"},ac={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},cc={class:"pv-eyebrow"},uc={class:"min-w-0"},dc={class:"text-sm font-semibold text-primary"},fc={key:0,class:"truncate font-mono text-xs text-secondary"},pc={class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5"},hc={class:"font-mono text-xs text-secondary"},bc={class:"flex flex-col gap-6"},mc={class:"rounded-lg border border-subtle bg-card shadow-sm"},gc={class:"flex flex-col gap-3 px-5 py-5"},vc={class:"flex flex-col gap-3 sm:flex-row"},xc={class:"flex flex-1 flex-col gap-1"},yc={class:"flex flex-1 flex-col gap-1"},_c={class:"flex flex-col gap-3 sm:flex-row"},wc={class:"flex flex-1 flex-col gap-1"},Sc=["value"],Ac={class:"flex flex-1 flex-col gap-1"},Cc=["value"],Ec={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},kc={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},Tc=["disabled"],Pc={class:"rounded-lg border border-subtle bg-card shadow-sm"},Oc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Uc={class:"pv-eyebrow"},Mc={class:"flex flex-col"},Ic={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},Rc={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},Fc={key:2,class:"px-5 py-6 text-sm text-secondary"},Nc={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},Lc={class:"min-w-0 flex-1"},Dc={class:"flex flex-wrap items-center gap-2"},Bc={class:"truncate text-sm font-semibold text-primary"},$c={key:0,class:"rounded-sm bg-brand/10 px-1.5 py-0.5 font-mono text-[10px] font-medium text-brand-text"},jc={key:1,class:"rounded-sm bg-warning-tint px-1.5 py-0.5 font-mono text-[10px] font-medium text-warning"},Vc={class:"mt-0.5 font-mono text-xs text-secondary"},Hc={class:"flex shrink-0 items-center gap-2"},Kc=["onClick"],zc=["disabled","onClick"],Gc={key:0,class:"mt-3 flex flex-col gap-3 rounded-md border border-subtle bg-sunken px-4 py-4"},Wc={class:"flex flex-col gap-3 sm:flex-row"},Jc={class:"flex flex-1 flex-col gap-1"},qc={class:"flex flex-1 flex-col gap-1"},Yc={class:"flex flex-col gap-3 sm:flex-row"},Zc={class:"flex flex-1 flex-col gap-1"},Xc=["disabled"],Qc=["value"],eu={key:0,class:"text-[11px] text-muted"},tu={class:"flex flex-1 flex-col gap-1"},nu=["value"],su={class:"flex items-center gap-2"},ou={class:"flex items-center gap-2"},iu=["disabled","onClick"],lu={class:"flex flex-col gap-6"},ru={class:"rounded-lg border border-subtle bg-card shadow-sm"},au={class:"flex flex-col gap-3 px-5 py-5"},cu={class:"flex flex-col gap-2 sm:flex-row"},uu=["disabled"],du={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},fu={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},pu={class:"rounded-lg border border-subtle bg-card shadow-sm"},hu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},bu={class:"pv-eyebrow"},mu={class:"flex flex-col"},gu={key:0,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},vu={key:1,class:"px-5 py-6 text-sm text-secondary"},xu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},yu={class:"min-w-0 flex-1"},_u={class:"truncate text-sm font-semibold text-primary"},wu={class:"mt-0.5 font-mono text-xs text-secondary"},Su={class:"flex shrink-0 items-center gap-2"},Au=["onClick"],Cu=["disabled","title","onClick"],Eu={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4 sm:flex-row sm:items-end"},ku={class:"flex flex-1 flex-col gap-1"},Tu=["onKeyup"],Pu={class:"flex items-center gap-2"},Ou=["disabled","onClick"],Uu={class:"flex flex-col gap-6"},Mu={class:"rounded-lg border border-subtle bg-card shadow-sm"},Iu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Ru={class:"flex flex-col gap-3 px-5 py-5"},Fu={class:"flex flex-col gap-1"},Nu={class:"flex flex-col gap-1"},Lu={class:"flex flex-col gap-1"},Du=["placeholder"],Bu={key:0,class:"font-mono text-[11px] text-muted"},$u={key:0},ju={key:1},Vu={key:1,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Hu={key:2,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},Ku={class:"flex flex-wrap items-center gap-2"},zu=["disabled"],Gu=["disabled"],Wu={class:"flex flex-col gap-6"},Ju={class:"rounded-lg border border-subtle bg-card shadow-sm"},qu={class:"flex flex-col"},Yu={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},Zu={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},Xu={key:2,class:"px-5 py-6 text-sm text-secondary"},Qu={key:3,class:"flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle px-3 pt-1"},ed=["onClick"],td={key:4,class:"px-5 py-6 text-sm text-secondary"},nd={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},sd={class:"min-w-0 flex-1"},od={class:"flex flex-wrap items-center gap-2"},id={class:"text-sm font-semibold text-primary"},ld=["title"],rd={key:0},ad={class:"mt-0.5 font-mono text-xs text-secondary"},cd={key:0,class:"mt-0.5 text-[11px] text-secondary"},ud={key:1,class:"mt-2 flex flex-col gap-1.5"},dd={class:"rounded-sm bg-sunken px-1.5 py-0.5 font-mono text-[10px] text-secondary"},fd={key:0,class:"font-mono text-[10px] text-muted"},pd={key:1,class:"w-full text-[11px] text-secondary sm:w-auto"},hd={key:2,class:"mt-1 truncate font-mono text-[11px] text-muted"},bd={class:"flex shrink-0 items-center gap-2"},md=["disabled","onClick"],gd=["onClick"],vd=["value","onChange"],xd=["label"],yd=["value"],_d=["value","onInput"],wd=["disabled","onClick"],Sd=["disabled","onClick"],Ad={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4"},Cd={class:"pv-eyebrow"},Ed={key:0,class:"text-danger"},kd=["onUpdate:modelValue"],Td=["value"],Pd=["value","onChange"],Od=["label"],Ud=["value"],Md=["onUpdate:modelValue"],Id=["onUpdate:modelValue","type","placeholder"],Rd={key:3,class:"text-[11px] text-muted"},Fd={class:"flex items-center gap-2"},Nd=["disabled","onClick"],Ld={class:"border-t border-subtle px-5 py-4"},Dd={class:"flex flex-col gap-2 sm:flex-row"},Bd=["disabled"],$d={key:0,class:"mt-2 text-xs font-medium text-danger"},Ln="pv_panel_token",jd={__name:"App",setup(e){const t=L(localStorage.getItem(Ln)||""),n=L(null),s=L(!1),o=L(!0),i=L({email:"",password:""}),l=L(""),r=L(!1),u=L("overview"),m=[{id:"overview",label:"Overview"},{id:"users",label:"Users"},{id:"organizations",label:"Organizations"},{id:"pocketbase",label:"PocketBase"},{id:"plugins",label:"Plugins"}];async function h(b){try{const a=await fetch("/api/me",{headers:{Authorization:b}});if(!a.ok)return!1;const d=await a.json();return d.role!=="superadmin"?!1:(n.value={id:d.id,email:d.email,role:d.role},!0)}catch{return!1}}async function y(b){t.value=b,localStorage.setItem(Ln,b),s.value=!0,no(),Ue(),v(),$t(),Pt()}async function U(){l.value="";const b=i.value.email.trim().toLowerCase();if(!b||!i.value.password){l.value="Enter your email and password.";return}r.value=!0;try{const a=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:b,password:i.value.password})}),d=await a.json().catch(()=>({}));if(!a.ok||!d.token){l.value="Invalid email or password.";return}if(!await h(d.token)){l.value="Access to this panel is restricted to superadmins.";return}i.value.password="",await y(d.token)}catch{l.value="Cannot reach the API server."}finally{r.value=!1}}function M(){so(),localStorage.removeItem(Ln),t.value="",n.value=null,s.value=!1}const J=L(null),I=L({url:"",adminEmail:"",adminPassword:""}),z=L(null),Y=L(""),j=L(""),Z=L(!1),N=L(!1);function K(b){const a={Authorization:t.value};return b&&(a["Content-Type"]="application/json"),a}async function Ue(){try{const b=await fetch("/api/admin/pb-config",{headers:K()});if(!b.ok)return;const a=await b.json();J.value=a,I.value={url:a.url||"",adminEmail:a.adminEmail||"",adminPassword:""},z.value=a.probe||null}catch{}}async function De(){Y.value="",j.value="",N.value=!0;try{const b=await fetch("/api/admin/pb-config/test",{method:"POST",headers:K(!0),body:JSON.stringify(I.value)});z.value=await b.json()}catch{j.value="Could not run the test."}finally{N.value=!1}}async function Xe(){var b;if(Y.value="",j.value="",!I.value.url.trim()){j.value="A PocketBase URL is required.";return}Z.value=!0;try{const a=await fetch("/api/admin/pb-config",{method:"PUT",headers:K(!0),body:JSON.stringify(I.value)}),d=await a.json().catch(()=>({}));if(!a.ok){j.value=d.error||"Could not save the connection.";return}J.value=d.config,z.value=((b=d.config)==null?void 0:b.probe)||null,I.value={url:d.config.url,adminEmail:d.config.adminEmail,adminPassword:""},Y.value=d.warning||"Connection saved."}catch{j.value="Could not reach the API server."}finally{Z.value=!1}}const Be=L([]),Pe=L(""),de=L(""),Qe=L(""),Ae=L({}),ve=L(""),Ft=[{label:"World",options:[{value:"-90,-180,90,180",label:"World"}]},{label:"Continents",options:[{value:"34,-25,72,45",label:"Europe"},{value:"-35,-18,38,52",label:"Africa"},{value:"5,25,82,180",label:"Asia"},{value:"7,-168,72,-52",label:"North America"},{value:"-56,-82,13,-34",label:"South America"},{value:"-48,110,-10,180",label:"Oceania"}]},...La()],fe=Ft.flatMap(b=>b.options);function ne(b){const a=String(b||"").split(",").map(x=>x.trim());if(a.length!==4)return"";const d=a.map(Number);return d.some(x=>Number.isNaN(x))?"":d.join(",")}const q=L({});function et(b){if(q.value[b])return"__custom__";const a=ne(Ae.value[b]),d=a&&fe.find(x=>ne(x.value)===a);return d?d.value:"__custom__"}function Nt(b,a){if(a==="__custom__"){q.value={...q.value,[b]:!0};return}q.value={...q.value,[b]:!1},Ae.value[b]=a}const be=L({}),pe=L({});function An(b){return!!(b.configFields&&b.configFields.some(a=>a.type==="bbox"))}function Cn(b){if(pe.value[b])return"__custom__";const a=be.value[b];if(!a)return"__default__";const d=ne(a),x=d&&fe.find(te=>ne(te.value)===d);return x?x.value:"__custom__"}function rs(b,a){if(a==="__default__"){pe.value={...pe.value,[b]:!1},be.value={...be.value,[b]:""};return}if(a==="__custom__"){pe.value={...pe.value,[b]:!0};return}pe.value={...pe.value,[b]:!1},be.value={...be.value,[b]:a}}function Ct(b,a){be.value={...be.value,[b]:a}}const Me=L({name:"",baseURL:"",provider:""}),tt=L(""),Et=L(!1),kt=[{id:"apis-external",label:"APIs — External"},{id:"drives-external",label:"Drives — External"},{id:"drives-local",label:"Drives — Local"}],En=L("apis-external");function c(b){return b.category||"apis-external"}function p(b){return Be.value.filter(a=>c(a)===b)}const g=Us(()=>p(En.value)),S={builtin:"bg-success-tint text-success",external:"bg-warning-tint text-warning"},w={ok:"bg-success-tint text-success",degraded:"bg-warning-tint text-warning",down:"bg-danger-tint text-danger"};async function v(){Pe.value="";try{const b=await fetch("/api/admin/plugins",{headers:K()});if(!b.ok){Pe.value="Could not load plugins.";return}const a=await b.json();Be.value=a.plugins||[];for(const d of Be.value)d.enabled&&!d.health&&T(d.name)}catch{Pe.value="Could not reach the API server."}}async function T(b){try{const a=await fetch(`/api/admin/plugins/${encodeURIComponent(b)}/health`,{method:"POST",headers:K()}),d=await a.json().catch(()=>({}));if(a.ok&&d.health){const x=k(b);x&&(x.health=d.health)}}catch{}}function k(b){return Be.value.find(a=>a.name===b)}async function E(b){ve.value=b.name,de.value="";try{const a=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}`,{method:"PUT",headers:K(!0),body:JSON.stringify({enabled:!b.enabled})}),d=await a.json().catch(()=>({}));a.ok?d.warning&&(de.value=`${b.name}: ${d.warning}`):de.value=d.error||"Could not update the plugin.",await v()}finally{ve.value=""}}function _(b){Qe.value=Qe.value===b.name?"":b.name;const a={...b.config||{}};for(const d of b.configFields||[])a[d.key]===void 0&&d.default&&(a[d.key]=d.default);Ae.value=a,q.value={}}async function F(b){ve.value=b.name,de.value="";try{const a=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}`,{method:"PUT",headers:K(!0),body:JSON.stringify({config:Ae.value})}),d=await a.json().catch(()=>({}));a.ok?(de.value=d.warning?`${b.name}: ${d.warning}`:"Configuration saved.",Qe.value=""):de.value=d.error||"Could not save the configuration.",await v()}finally{ve.value=""}}async function P(b){ve.value=b.name,de.value="";try{const a=(be.value[b.name]||"").trim(),d=a?`?bbox=${encodeURIComponent(a)}`:"",x=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}/health${d}`,{method:"POST",headers:K()}),te=await x.json().catch(()=>({}));if(x.ok&&te.health){const Vt=k(b.name);Vt&&(Vt.health=te.health)}else de.value=te.error||"Health check failed."}finally{ve.value=""}}async function R(b){if(b.kind==="external"){ve.value=b.name;try{const a=await fetch(`/api/admin/plugins/${encodeURIComponent(b.name)}`,{method:"DELETE",headers:K()});if(!a.ok){const d=await a.json().catch(()=>({}));de.value=d.error||"Could not remove the plugin."}await v()}finally{ve.value=""}}}async function D(){if(tt.value="",!Me.value.name.trim()||!Me.value.baseURL.trim()){tt.value="Name and base URL are required.";return}Et.value=!0;try{const b=await fetch("/api/admin/plugins",{method:"POST",headers:K(!0),body:JSON.stringify(Me.value)}),a=await b.json().catch(()=>({}));if(!b.ok){tt.value=a.error||"Could not register the plugin.";return}Me.value={name:"",baseURL:"",provider:""},de.value="External plugin registered.",await v()}catch{tt.value="Could not reach the API server."}finally{Et.value=!1}}const H=L([]),W=L([]),G=L(""),re=[{value:"user",label:"User"},{value:"admin",label:"Admin"},{value:"superadmin",label:"Superadmin"}],ue={user:"User",admin:"Admin",superadmin:"Superadmin"},$e={user:"bg-sunken text-secondary",admin:"bg-warning-tint text-warning",superadmin:"bg-success-tint text-success"},xe=Us(()=>{const b={};for(const a of H.value)a.organization&&(b[a.organization]=(b[a.organization]||0)+1);return b});function Ie(b,a){if(!b)return a;if(b.error)return b.error;if(b.data&&typeof b.data=="object"){const d=[];for(const x in b.data)b.data[x]&&b.data[x].message&&d.push(`${x}: ${b.data[x].message}`);if(d.length)return d.join("; ")}return b.message||a}const me=L({email:"",password:"",role:"user",organization:""}),ce=L(""),Ce=L(""),Tt=L(!1),We=L(""),je=L({}),Lt=L(""),Ve=L("");async function Pt(){G.value="";try{const b=await fetch("/api/users",{headers:K()}),a=await b.json().catch(()=>({}));if(!b.ok){G.value=Ie(a,"Could not load users.");return}H.value=a.users||[]}catch{G.value="Could not reach the API server."}}async function qi(){ce.value="",Ce.value="";const b=me.value.email.trim().toLowerCase();if(!b||!b.includes("@")){ce.value="A valid email is required.";return}if(me.value.password.length<8){ce.value="Password must be at least 8 characters.";return}Tt.value=!0;try{const a=await fetch("/api/users",{method:"POST",headers:K(!0),body:JSON.stringify({email:b,password:me.value.password,role:me.value.role,organization:me.value.organization})}),d=await a.json().catch(()=>({}));if(!a.ok){ce.value=Ie(d,"Could not create the user.");return}me.value={email:"",password:"",role:"user",organization:""},Ce.value=`Created ${d.user?d.user.email:"user"}.`,await Pt()}catch{ce.value="Could not reach the API server."}finally{Tt.value=!1}}function Yi(b){Ve.value="",We.value=We.value===b.id?"":b.id,je.value={email:b.email,role:b.role,organization:b.organization||"",verified:!!b.verified,password:""}}async function Zi(b){Ve.value="",Lt.value=b.id;try{const a={},d=je.value;if(d.email.trim().toLowerCase()!==b.email&&(a.email=d.email.trim().toLowerCase()),d.role!==b.role&&(a.role=d.role),(d.organization||"")!==(b.organization||"")&&(a.organization=d.organization||""),d.verified!==!!b.verified&&(a.verified=d.verified),d.password&&(a.password=d.password),Object.keys(a).length===0){Ve.value="No changes to save.";return}const x=await fetch(`/api/users/${encodeURIComponent(b.id)}`,{method:"PATCH",headers:K(!0),body:JSON.stringify(a)}),te=await x.json().catch(()=>({}));if(!x.ok){Ve.value=Ie(te,"Could not update the user.");return}Ve.value=`Updated ${b.email}.`,We.value="",await Pt()}catch{Ve.value="Could not reach the API server."}finally{Lt.value=""}}async function Xi(b){if(b.id!==(n.value&&n.value.id)&&confirm(`Delete user ${b.email}? This cannot be undone.`)){Ve.value="",Lt.value=b.id;try{const a=await fetch(`/api/users/${encodeURIComponent(b.id)}`,{method:"DELETE",headers:K()}),d=await a.json().catch(()=>({}));if(!a.ok){Ve.value=Ie(d,"Could not delete the user.");return}Ve.value=`Deleted ${b.email}.`,We.value===b.id&&(We.value=""),await Pt()}catch{Ve.value="Could not reach the API server."}finally{Lt.value=""}}}const kn=L(""),Dt=L(""),Tn=L(""),Pn=L(!1),dt=L(""),On=L(""),Bt=L(""),Re=L("");async function $t(){try{const b=await fetch("/api/orgs",{headers:K()});if(!b.ok)return;const a=await b.json().catch(()=>({}));W.value=a.organizations||[]}catch{}}async function Zs(){Dt.value="",Tn.value="";const b=kn.value.trim();if(!b){Dt.value="An organization name is required.";return}Pn.value=!0;try{const a=await fetch("/api/orgs",{method:"POST",headers:K(!0),body:JSON.stringify({name:b})}),d=await a.json().catch(()=>({}));if(!a.ok){Dt.value=Ie(d,"Could not create the organization.");return}kn.value="",Tn.value=`Created ${d.organization?d.organization.name:"organization"}.`,await $t()}catch{Dt.value="Could not reach the API server."}finally{Pn.value=!1}}function Qi(b){Re.value="",dt.value=dt.value===b.id?"":b.id,On.value=b.name}async function Xs(b){Re.value="";const a=On.value.trim();if(!a){Re.value="An organization name is required.";return}if(a===b.name){dt.value="";return}Bt.value=b.id;try{const d=await fetch(`/api/orgs/${encodeURIComponent(b.id)}`,{method:"PATCH",headers:K(!0),body:JSON.stringify({name:a})}),x=await d.json().catch(()=>({}));if(!d.ok){Re.value=Ie(x,"Could not rename the organization.");return}Re.value=`Renamed to ${a}.`,dt.value="",await $t(),await Pt()}catch{Re.value="Could not reach the API server."}finally{Bt.value=""}}async function el(b){const a=xe.value[b.id]||0;if(a>0){Re.value=`${b.name} still has ${a} member${a===1?"":"s"}; reassign or remove them first.`;return}if(confirm(`Delete organization ${b.name}?`)){Re.value="",Bt.value=b.id;try{const d=await fetch(`/api/orgs/${encodeURIComponent(b.id)}`,{method:"DELETE",headers:K()}),x=await d.json().catch(()=>({}));if(!d.ok){Re.value=Ie(x,"Could not delete the organization.");return}Re.value=`Deleted ${b.name}.`,dt.value===b.id&&(dt.value=""),await $t()}catch{Re.value="Could not reach the API server."}finally{Bt.value=""}}}const as=L(null),Un=L(null),jt=L({apiServer:{status:"checking",detail:""},pocketBase:{status:"checking",detail:""},webApp:{status:"checking",detail:""}});let Mn=null;const tl=[{key:"apiServer",label:"API server"},{key:"pocketBase",label:"PocketBase"},{key:"webApp",label:"Web App"}],Qs={checking:{label:"checking",cls:"bg-sunken text-secondary"},ok:{label:"operational",cls:"bg-success-tint text-success"},down:{label:"unreachable",cls:"bg-danger-tint text-danger"},unreachable:{label:"unreachable",cls:"bg-danger-tint text-danger"}};function eo(b){const a=[];return b.httpStatus&&a.push("HTTP "+b.httpStatus),b.url&&a.push(b.url),typeof b.latencyMs=="number"&&a.push(b.latencyMs+"ms"),a.join(" · ")}async function to(){var b,a;try{const d=await fetch("/api/status");if(!d.ok)throw new Error("status "+d.status);const x=await d.json(),te=x.apiServer||{};Un.value=te.devices??0,jt.value={apiServer:{status:"ok",detail:""},pocketBase:{status:((b=x.pocketBase)==null?void 0:b.status)==="ok"?"ok":"down",detail:eo(x.pocketBase||{})},webApp:{status:((a=x.webApp)==null?void 0:a.status)==="ok"?"ok":"down",detail:eo(x.webApp||{})}}}catch{Un.value=null,jt.value={apiServer:{status:"unreachable",detail:""},pocketBase:{status:"unreachable",detail:""},webApp:{status:"unreachable",detail:""}}}as.value=new Date}function no(){to(),clearInterval(Mn),Mn=setInterval(to,1e4)}function so(){clearInterval(Mn),Mn=null}yi(async()=>{t.value&&await h(t.value)?(s.value=!0,no(),Ue(),v(),$t(),Pt()):t.value&&(localStorage.removeItem(Ln),t.value=""),o.value=!1}),Js(()=>so());const nl=[{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a session (via PocketBase)"},{method:"GET",path:"/api/auth/validate",desc:"Validate the current session token"},{method:"GET",path:"/api/me",desc:"Caller's id, email, role, and organization from their token"},{method:"GET",path:"/api/preferences",desc:"Read the caller's saved settings blob"},{method:"PUT",path:"/api/preferences",desc:"Persist the caller's settings onto their user record"},{method:"GET",path:"/api/devices",desc:"List connected devices and last-known state"},{method:"GET",path:"/api/devices/{id}/track",desc:"GPS track history for a device"},{method:"POST",path:"/api/devices/{id}/command",desc:"Send a command down to a device"},{method:"DELETE",path:"/api/devices/{id}",desc:"Forget a device's stored state"},{method:"GET",path:"/ws/ui",desc:"Live telemetry stream (WebSocket)"}],sl=[{method:"GET",path:"/api/users",desc:"List users (admin: own org · superadmin: all)"},{method:"POST",path:"/api/users",desc:"Create a user {email, password, role, organization?}"},{method:"PATCH",path:"/api/users/{id}",desc:"Edit a user (role/org changes are scope-checked)"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user (not self; admins in-org only)"},{method:"GET",path:"/api/orgs",desc:"List organizations (admin: own · superadmin: all)"},{method:"POST",path:"/api/orgs",desc:"Create an organization {name} (superadmin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an empty organization (superadmin)"},{method:"GET",path:"/api/admin/pb-config",desc:"Read the PocketBase connection + live probe (superadmin)"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Test a candidate connection without applying (superadmin)"},{method:"PUT",path:"/api/admin/pb-config",desc:"Update + persist the PocketBase connection (superadmin)"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins + state + last health (superadmin)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin {name, baseURL} (superadmin)"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure a plugin (superadmin)"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin (superadmin)"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a plugin health check (superadmin)"}],ol=[{method:"GET",path:"/ws/device?id={id}",desc:"Device telemetry uplink (WebSocket)"},{method:"POST",path:"/api/telemetry?id={id}",desc:"Push a single telemetry event over HTTP"},{method:"GET",path:"/healthz",desc:"Readiness probe"}];return(b,a)=>(A(),C("div",Ga,[f("div",Wa,[a[25]||(a[25]=Vr('
PilotVault
API server
',3)),s.value&&n.value?(A(),C("span",Ja,O(n.value.email),1)):$("",!0),s.value?(A(),C("button",{key:1,class:"pv-btn-sec pv-btn-sm",onClick:M},"Sign out")):$("",!0),f("button",{class:"pv-btn-sec pv-btn-sm",title:on(yn)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:a[0]||(a[0]=(...d)=>on(Do)&&on(Do)(...d))},[on(yn)==="dark"?(A(),C("svg",Ya,[...a[22]||(a[22]=[f("circle",{cx:"12",cy:"12",r:"4"},null,-1),f("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(A(),C("svg",Za,[...a[23]||(a[23]=[f("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])),a[24]||(a[24]=He(" Theme ",-1))],8,qa)]),o.value?(A(),C("div",Xa,[...a[26]||(a[26]=[f("span",{class:"pv-eyebrow"},"Checking session…",-1)])])):s.value?(A(),C(X,{key:2},[f("div",oc,[(A(),C(X,null,he(m,d=>f("button",{key:d.id,class:Fe(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",u.value===d.id?"bg-brand text-on-brand":"text-secondary hover:text-primary"]),onClick:x=>u.value=d.id},O(d.label),11,ic)),64))]),ie(f("div",lc,[f("div",rc,[f("div",ac,[a[30]||(a[30]=f("div",{class:"text-base font-semibold text-primary"},"Status",-1)),f("span",cc,O(as.value?"checked "+as.value.toLocaleTimeString():"—"),1)]),f("div",null,[(A(),C(X,null,he(tl,d=>f("div",{key:d.key,class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5 first:border-t-0"},[f("div",uc,[f("div",dc,O(d.label),1),jt.value[d.key].detail?(A(),C("div",fc,O(jt.value[d.key].detail),1)):$("",!0)]),f("span",{class:Fe(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",Qs[jt.value[d.key].status].cls])},[a[31]||(a[31]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),He(" "+O(Qs[jt.value[d.key].status].label),1)],2)])),64)),f("div",pc,[a[32]||(a[32]=f("div",{class:"text-sm font-semibold text-primary"},"Devices",-1)),f("span",hc,O(Un.value===null?"—":Un.value+" online"),1)])])]),Le(ys,{title:"Client API",auth:"PocketBase session",endpoints:nl}),Le(ys,{title:"Management API",auth:"Admin · superadmin",endpoints:sl}),Le(ys,{title:"Device API",auth:"Device uplink",endpoints:ol})],512),[[nn,u.value==="overview"]]),ie(f("div",bc,[f("div",mc,[a[38]||(a[38]=f("div",{class:"border-b border-subtle px-5 py-4"},[f("div",{class:"text-base font-semibold text-primary"},"Add user"),f("span",{class:"pv-eyebrow"},"Create an account")],-1)),f("div",gc,[f("div",vc,[f("label",xc,[a[33]||(a[33]=f("span",{class:"pv-eyebrow"},"Email",-1)),ie(f("input",{"onUpdate:modelValue":a[3]||(a[3]=d=>me.value.email=d),type:"email",class:"pv-input",placeholder:"pilot@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[ye,me.value.email]])]),f("label",yc,[a[34]||(a[34]=f("span",{class:"pv-eyebrow"},"Password",-1)),ie(f("input",{"onUpdate:modelValue":a[4]||(a[4]=d=>me.value.password=d),type:"password",class:"pv-input",placeholder:"min. 8 characters",autocomplete:"new-password"},null,512),[[ye,me.value.password]])])]),f("div",_c,[f("label",wc,[a[35]||(a[35]=f("span",{class:"pv-eyebrow"},"Role",-1)),ie(f("select",{"onUpdate:modelValue":a[5]||(a[5]=d=>me.value.role=d),class:"pv-input"},[(A(),C(X,null,he(re,d=>f("option",{key:d.value,value:d.value},O(d.label),9,Sc)),64))],512),[[zt,me.value.role]])]),f("label",Ac,[a[37]||(a[37]=f("span",{class:"pv-eyebrow"},"Organization",-1)),ie(f("select",{"onUpdate:modelValue":a[6]||(a[6]=d=>me.value.organization=d),class:"pv-input"},[a[36]||(a[36]=f("option",{value:""},"— none —",-1)),(A(!0),C(X,null,he(W.value,d=>(A(),C("option",{key:d.id,value:d.id},O(d.name),9,Cc))),128))],512),[[zt,me.value.organization]])])]),ce.value?(A(),C("p",Ec,O(ce.value),1)):Ce.value?(A(),C("p",kc,O(Ce.value),1)):$("",!0),f("div",null,[f("button",{class:"pv-btn",disabled:Tt.value,onClick:qi},O(Tt.value?"Creating…":"Create user"),9,Tc)])])]),f("div",Pc,[f("div",Oc,[f("div",null,[a[39]||(a[39]=f("div",{class:"text-base font-semibold text-primary"},"Users",-1)),f("span",Uc,O(H.value.length)+" total",1)]),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:Pt},"Refresh")]),f("div",Mc,[G.value?(A(),C("p",Ic,O(G.value),1)):$("",!0),Ve.value?(A(),C("p",Rc,O(Ve.value),1)):$("",!0),!H.value.length&&!G.value?(A(),C("p",Fc,"No users yet.")):$("",!0),(A(!0),C(X,null,he(H.value,d=>(A(),C("div",{key:d.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[f("div",Nc,[f("div",Lc,[f("div",Dc,[f("span",Bc,O(d.email),1),f("span",{class:Fe(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",$e[d.role]])},O(ue[d.role]||d.role),3),d.id===(n.value&&n.value.id)?(A(),C("span",$c,"you")):$("",!0),d.verified?$("",!0):(A(),C("span",jc,"unverified"))]),f("div",Vc,O(d.organizationName||(d.organization?d.organization:"no organization")),1)]),f("div",Hc,[f("button",{class:"pv-btn-sec pv-btn-sm",onClick:x=>Yi(d)},O(We.value===d.id?"Close":"Edit"),9,Kc),d.id!==(n.value&&n.value.id)?(A(),C("button",{key:0,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:Lt.value===d.id,onClick:x=>Xi(d)}," Delete ",8,zc)):$("",!0)])]),We.value===d.id?(A(),C("div",Gc,[f("div",Wc,[f("label",Jc,[a[40]||(a[40]=f("span",{class:"pv-eyebrow"},"Email",-1)),ie(f("input",{"onUpdate:modelValue":a[7]||(a[7]=x=>je.value.email=x),type:"email",class:"pv-input",autocomplete:"off",spellcheck:"false"},null,512),[[ye,je.value.email]])]),f("label",qc,[a[41]||(a[41]=f("span",{class:"pv-eyebrow"},"New password",-1)),ie(f("input",{"onUpdate:modelValue":a[8]||(a[8]=x=>je.value.password=x),type:"password",class:"pv-input",placeholder:"leave blank to keep current",autocomplete:"new-password"},null,512),[[ye,je.value.password]])])]),f("div",Yc,[f("label",Zc,[a[42]||(a[42]=f("span",{class:"pv-eyebrow"},"Role",-1)),ie(f("select",{"onUpdate:modelValue":a[9]||(a[9]=x=>je.value.role=x),class:"pv-input",disabled:d.id===(n.value&&n.value.id)},[(A(),C(X,null,he(re,x=>f("option",{key:x.value,value:x.value},O(x.label),9,Qc)),64))],8,Xc),[[zt,je.value.role]]),d.id===(n.value&&n.value.id)?(A(),C("span",eu,"You cannot change your own role.")):$("",!0)]),f("label",tu,[a[44]||(a[44]=f("span",{class:"pv-eyebrow"},"Organization",-1)),ie(f("select",{"onUpdate:modelValue":a[10]||(a[10]=x=>je.value.organization=x),class:"pv-input"},[a[43]||(a[43]=f("option",{value:""},"— none —",-1)),(A(!0),C(X,null,he(W.value,x=>(A(),C("option",{key:x.id,value:x.id},O(x.name),9,nu))),128))],512),[[zt,je.value.organization]])])]),f("label",su,[ie(f("input",{"onUpdate:modelValue":a[11]||(a[11]=x=>je.value.verified=x),type:"checkbox",class:"h-4 w-4"},null,512),[[zi,je.value.verified]]),a[45]||(a[45]=f("span",{class:"text-sm text-primary"},"Verified",-1))]),f("div",ou,[f("button",{class:"pv-btn pv-btn-sm",disabled:Lt.value===d.id,onClick:x=>Zi(d)},"Save changes",8,iu),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:a[12]||(a[12]=x=>We.value="")},"Cancel")])])):$("",!0)]))),128))])])],512),[[nn,u.value==="users"]]),ie(f("div",lu,[f("div",ru,[a[46]||(a[46]=f("div",{class:"border-b border-subtle px-5 py-4"},[f("div",{class:"text-base font-semibold text-primary"},"Add organization"),f("span",{class:"pv-eyebrow"},"Create a tenant")],-1)),f("div",au,[f("div",cu,[ie(f("input",{"onUpdate:modelValue":a[13]||(a[13]=d=>kn.value=d),class:"pv-input flex-1",placeholder:"Acme Aerial Ltd.",autocomplete:"off",spellcheck:"false",onKeyup:No(Zs,["enter"])},null,544),[[ye,kn.value]]),f("button",{class:"pv-btn",disabled:Pn.value,onClick:Zs},O(Pn.value?"Creating…":"Create"),9,uu)]),Dt.value?(A(),C("p",du,O(Dt.value),1)):Tn.value?(A(),C("p",fu,O(Tn.value),1)):$("",!0)])]),f("div",pu,[f("div",hu,[f("div",null,[a[47]||(a[47]=f("div",{class:"text-base font-semibold text-primary"},"Organizations",-1)),f("span",bu,O(W.value.length)+" total",1)]),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:$t},"Refresh")]),f("div",mu,[Re.value?(A(),C("p",gu,O(Re.value),1)):$("",!0),W.value.length?$("",!0):(A(),C("p",vu,"No organizations yet.")),(A(!0),C(X,null,he(W.value,d=>(A(),C("div",{key:d.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[f("div",xu,[f("div",yu,[f("div",_u,O(d.name),1),f("div",wu,O(xe.value[d.id]||0)+" member"+O((xe.value[d.id]||0)===1?"":"s"),1)]),f("div",Su,[f("button",{class:"pv-btn-sec pv-btn-sm",onClick:x=>Qi(d)},O(dt.value===d.id?"Close":"Rename"),9,Au),f("button",{class:"pv-btn-sec pv-btn-sm !text-danger",disabled:Bt.value===d.id||(xe.value[d.id]||0)>0,title:(xe.value[d.id]||0)>0?"Reassign or remove members first":"Delete organization",onClick:x=>el(d)}," Delete ",8,Cu)])]),dt.value===d.id?(A(),C("div",Eu,[f("label",ku,[a[48]||(a[48]=f("span",{class:"pv-eyebrow"},"Name",-1)),ie(f("input",{"onUpdate:modelValue":a[14]||(a[14]=x=>On.value=x),class:"pv-input",autocomplete:"off",spellcheck:"false",onKeyup:No(x=>Xs(d),["enter"])},null,40,Tu),[[ye,On.value]])]),f("div",Pu,[f("button",{class:"pv-btn pv-btn-sm",disabled:Bt.value===d.id,onClick:x=>Xs(d)},"Save",8,Ou),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:a[15]||(a[15]=x=>dt.value="")},"Cancel")])])):$("",!0)]))),128))])])],512),[[nn,u.value==="organizations"]]),ie(f("div",Uu,[f("div",Mu,[f("div",Iu,[a[50]||(a[50]=f("div",null,[f("div",{class:"text-base font-semibold text-primary"},"PocketBase connection"),f("span",{class:"pv-eyebrow"},"Settings")],-1)),z.value?(A(),C("span",{key:0,class:Fe(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",z.value.reachable?z.value.superuser?"bg-success-tint text-success":"bg-warning-tint text-warning":"bg-danger-tint text-danger"])},[a[49]||(a[49]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),He(" "+O(z.value.reachable?z.value.superuser?"connected":"reachable":"unreachable"),1)],2)):$("",!0)]),f("div",Ru,[f("label",Fu,[a[51]||(a[51]=f("span",{class:"pv-eyebrow"},"PocketBase URL",-1)),ie(f("input",{"onUpdate:modelValue":a[16]||(a[16]=d=>I.value.url=d),class:"pv-input",placeholder:"http://10.2.1.10:8026",spellcheck:"false"},null,512),[[ye,I.value.url]])]),f("label",Nu,[a[52]||(a[52]=f("span",{class:"pv-eyebrow"},"Service account email",-1)),ie(f("input",{"onUpdate:modelValue":a[17]||(a[17]=d=>I.value.adminEmail=d),class:"pv-input",placeholder:"admin@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[ye,I.value.adminEmail]])]),f("label",Lu,[a[53]||(a[53]=f("span",{class:"pv-eyebrow"},"Service account password",-1)),ie(f("input",{"onUpdate:modelValue":a[18]||(a[18]=d=>I.value.adminPassword=d),type:"password",class:"pv-input",autocomplete:"new-password",placeholder:J.value&&J.value.adminConfigured?"leave blank to keep current":"set a password"},null,8,Du),[[ye,I.value.adminPassword]])]),z.value?(A(),C("div",Bu,[He(" health: "+O(z.value.reachable?"ok":"down"),1),z.value.latencyMs?(A(),C("span",$u," · "+O(z.value.latencyMs)+"ms",1)):$("",!0),He(" · superuser auth: "+O(z.value.superuser?"ok":"—"),1),z.value.detail?(A(),C("span",ju," · "+O(z.value.detail),1)):$("",!0)])):$("",!0),j.value?(A(),C("p",Vu,O(j.value),1)):Y.value?(A(),C("p",Hu,O(Y.value),1)):$("",!0),f("div",Ku,[f("button",{class:"pv-btn",disabled:Z.value,onClick:Xe},O(Z.value?"Saving…":"Save connection"),9,zu),f("button",{class:"pv-btn-sec",disabled:N.value,onClick:De},O(N.value?"Testing…":"Test connection"),9,Gu)]),a[54]||(a[54]=f("p",{class:"text-[11px] text-muted"}," The service account is used only for user & organization management. Changing the URL repoints the whole API Server at a new PocketBase and may sign you out. ",-1))])])],512),[[nn,u.value==="pocketbase"]]),ie(f("div",Wu,[f("div",Ju,[f("div",{class:"flex items-center justify-between border-b border-subtle px-5 py-4"},[a[55]||(a[55]=f("div",null,[f("div",{class:"text-base font-semibold text-primary"},"Plugins"),f("span",{class:"pv-eyebrow"},"External integrations")],-1)),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:v},"Refresh")]),f("div",qu,[Pe.value?(A(),C("p",Yu,O(Pe.value),1)):$("",!0),de.value?(A(),C("p",Zu,O(de.value),1)):$("",!0),!Be.value.length&&!Pe.value?(A(),C("p",Xu,"No plugins registered yet.")):$("",!0),Be.value.length?(A(),C("div",Qu,[(A(),C(X,null,he(kt,d=>f("button",{key:d.id,class:Fe(["-mb-px whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",En.value===d.id?"border-brand text-primary":"border-transparent text-secondary hover:text-primary"]),onClick:x=>En.value=d.id},O(d.label),11,ed)),64))])):$("",!0),Be.value.length&&!g.value.length?(A(),C("p",td,"No plugins in this category.")):$("",!0),(A(!0),C(X,null,he(g.value,d=>(A(),C("div",{key:d.name,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[f("div",nd,[f("div",sd,[f("div",od,[f("span",id,O(d.name),1),f("span",{class:Fe(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",S[d.kind]])},O(d.kind),3),d.health?(A(),C("span",{key:0,class:Fe(["inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium",w[d.health.status]]),title:d.health.detail||""},[a[56]||(a[56]=f("span",{class:"h-1 w-1 rounded-full bg-current"},null,-1)),He(O(d.health.status),1),d.health.latencyMs?(A(),C("span",rd," · "+O(d.health.latencyMs)+"ms",1)):$("",!0)],10,ld)):$("",!0)]),f("div",ad,O(d.provider)+" · v"+O(d.version)+" · "+O(d.authType),1),d.health&&d.health.detail?(A(),C("div",cd,O(d.health.detail),1)):$("",!0),d.capabilities&&d.capabilities.length?(A(),C("div",ud,[a[57]||(a[57]=f("div",{class:"pv-eyebrow"},"Capabilities",-1)),(A(!0),C(X,null,he(d.capabilities,x=>(A(),C("div",{key:x.id,class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},[f("span",dd,O(x.id),1),x.method||x.endpoint?(A(),C("span",fd,O(x.method)+" "+O(x.endpoint),1)):$("",!0),x.description?(A(),C("span",pd,O(x.description),1)):$("",!0)]))),128))])):$("",!0),d.baseURL?(A(),C("div",hd,O(d.baseURL),1)):$("",!0)]),f("div",bd,[f("button",{class:Fe(["pv-btn-sec pv-btn-sm",d.enabled?"!border-transparent !bg-success-tint !text-success":""]),disabled:ve.value===d.name,onClick:x=>E(d)},[f("span",{class:Fe(["h-1.5 w-1.5 rounded-full",d.enabled?"bg-success":"bg-muted"])},null,2),He(" "+O(d.enabled?"Enabled":"Disabled"),1)],10,md),d.configFields&&d.configFields.length?(A(),C("button",{key:0,class:"pv-btn-sec pv-btn-sm",onClick:x=>_(d)},"Configure",8,gd)):$("",!0),An(d)?(A(),C(X,{key:1},[f("select",{value:Cn(d.name),class:"pv-input pv-input-sm max-w-[11rem]",title:"Bounding box used for this Check — smaller areas cost fewer OpenSky credits",onChange:x=>rs(d.name,x.target.value)},[a[58]||(a[58]=f("option",{value:"__default__"},"Probe: saved default",-1)),(A(),C(X,null,he(Ft,x=>f("optgroup",{key:x.label,label:x.label},[(A(!0),C(X,null,he(x.options,te=>(A(),C("option",{key:te.value,value:te.value},O(te.label),9,yd))),128))],8,xd)),64)),a[59]||(a[59]=f("option",{value:"__custom__"},"Custom…",-1))],40,vd),Cn(d.name)==="__custom__"?(A(),C("input",{key:0,value:be.value[d.name]||"",class:"pv-input pv-input-sm w-40 font-mono",placeholder:"lamin,lomin,lamax,lomax",onInput:x=>Ct(d.name,x.target.value)},null,40,_d)):$("",!0)],64)):$("",!0),f("button",{class:"pv-btn-sec pv-btn-sm",disabled:ve.value===d.name,onClick:x=>P(d)},"Check",8,wd),d.kind==="external"?(A(),C("button",{key:2,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:ve.value===d.name,onClick:x=>R(d)},"Remove",8,Sd)):$("",!0)])]),Qe.value===d.name?(A(),C("div",Ad,[(A(!0),C(X,null,he(d.configFields,x=>(A(),C("label",{key:x.key,class:"flex flex-col gap-1"},[f("span",Cd,[He(O(x.label),1),x.required?(A(),C("span",Ed," *")):$("",!0)]),x.type==="select"?ie((A(),C("select",{key:0,"onUpdate:modelValue":te=>Ae.value[x.key]=te,class:"pv-input"},[(A(!0),C(X,null,he(x.options,te=>(A(),C("option",{key:te.value,value:te.value},O(te.label),9,Td))),128))],8,kd)),[[zt,Ae.value[x.key]]]):x.type==="bbox"?(A(),C(X,{key:1},[f("select",{value:et(x.key),class:"pv-input",onChange:te=>Nt(x.key,te.target.value)},[(A(),C(X,null,he(Ft,te=>f("optgroup",{key:te.label,label:te.label},[(A(!0),C(X,null,he(te.options,Vt=>(A(),C("option",{key:Vt.value,value:Vt.value},O(Vt.label),9,Ud))),128))],8,Od)),64)),a[60]||(a[60]=f("option",{value:"__custom__"},"Custom…",-1))],40,Pd),et(x.key)==="__custom__"?ie((A(),C("input",{key:0,"onUpdate:modelValue":te=>Ae.value[x.key]=te,type:"text",class:"pv-input font-mono",autocomplete:"off",placeholder:"50.5,3.2,53.7,7.3"},null,8,Md)),[[ye,Ae.value[x.key]]]):$("",!0)],64)):ie((A(),C("input",{key:2,"onUpdate:modelValue":te=>Ae.value[x.key]=te,type:x.secret||x.type==="password"?"password":x.type==="number"?"number":"text",class:"pv-input",autocomplete:"off",placeholder:x.help||""},null,8,Id)),[[Sa,Ae.value[x.key]]]),x.help?(A(),C("span",Rd,O(x.help),1)):$("",!0)]))),128)),f("div",Fd,[f("button",{class:"pv-btn pv-btn-sm",disabled:ve.value===d.name,onClick:x=>F(d)},"Save configuration",8,Nd),f("button",{class:"pv-btn-sec pv-btn-sm",onClick:a[19]||(a[19]=x=>Qe.value="")},"Cancel")])])):$("",!0)]))),128)),f("div",Ld,[a[61]||(a[61]=f("div",{class:"pv-eyebrow mb-2"},"Register external plugin",-1)),f("div",Dd,[ie(f("input",{"onUpdate:modelValue":a[20]||(a[20]=d=>Me.value.name=d),class:"pv-input sm:w-40",placeholder:"name",autocomplete:"off",spellcheck:"false"},null,512),[[ye,Me.value.name]]),ie(f("input",{"onUpdate:modelValue":a[21]||(a[21]=d=>Me.value.baseURL=d),class:"pv-input flex-1",placeholder:"https://plugin.example.com",autocomplete:"off",spellcheck:"false"},null,512),[[ye,Me.value.baseURL]]),f("button",{class:"pv-btn",disabled:Et.value,onClick:D},O(Et.value?"Adding…":"Add"),9,Bd)]),tt.value?(A(),C("p",$d,O(tt.value),1)):$("",!0),a[62]||(a[62]=f("p",{class:"mt-2 text-[11px] text-muted"},[He(" A remote service that answers "),f("span",{class:"font-mono"},"GET /health"),He(" and "),f("span",{class:"font-mono"},"GET /manifest"),He(" — added at runtime, no rebuild. ")],-1))])])])],512),[[nn,u.value==="plugins"]])],64)):(A(),C("div",Qa,[a[29]||(a[29]=f("div",{class:"border-b border-subtle px-5 py-4"},[f("div",{class:"text-base font-semibold text-primary"},"Sign in"),f("span",{class:"pv-eyebrow"},"Superadmin access only")],-1)),f("form",{class:"flex flex-col gap-3 px-5 py-5",onSubmit:ka(U,["prevent"])},[f("label",ec,[a[27]||(a[27]=f("span",{class:"pv-eyebrow"},"Email",-1)),ie(f("input",{"onUpdate:modelValue":a[1]||(a[1]=d=>i.value.email=d),type:"email",autocomplete:"username",class:"pv-input",placeholder:"superadmin@pilotvault.local"},null,512),[[ye,i.value.email]])]),f("label",tc,[a[28]||(a[28]=f("span",{class:"pv-eyebrow"},"Password",-1)),ie(f("input",{"onUpdate:modelValue":a[2]||(a[2]=d=>i.value.password=d),type:"password",autocomplete:"current-password",class:"pv-input",placeholder:"••••••••"},null,512),[[ye,i.value.password]])]),l.value?(A(),C("p",nc,O(l.value),1)):$("",!0),f("button",{type:"submit",class:"pv-btn mt-1",disabled:r.value},O(r.value?"Signing in…":"Sign in"),9,sc)],32)])),a[63]||(a[63]=f("p",{class:"text-center font-mono text-[11px] text-muted"}," PilotVault — live drone telemetry, command & control. ",-1))]))}};Ua(jd).mount("#app"); diff --git a/API Server/internal/api/dist/index.html b/API Server/internal/api/dist/index.html index 9f80255..a7c14f0 100644 --- a/API Server/internal/api/dist/index.html +++ b/API Server/internal/api/dist/index.html @@ -6,8 +6,8 @@ PilotVault · API Server - - + +
diff --git a/API Server/internal/api/integrations.go b/API Server/internal/api/integrations.go index 8186105..ac8f157 100644 --- a/API Server/internal/api/integrations.go +++ b/API Server/internal/api/integrations.go @@ -536,11 +536,17 @@ func (s *Server) handleOpenSkyHealth(w http.ResponseWriter, r *http.Request) { "status": "down", "detail": "OpenSky is disabled for your organization"}}) return } + // A ?bbox= override lets the Settings "Test connection" probe a specific area + // (to check its credit cost) without changing the saved default. + bbox := res.eff.Bbox + if q := strings.TrimSpace(r.URL.Query().Get("bbox")); q != "" && validBBox(q) { + bbox = q + } cfg := map[string]string{ "clientId": res.eff.ClientID, "clientSecret": res.eff.ClientSecret, "plan": res.eff.Plan, - "bbox": res.eff.Bbox, + "bbox": bbox, "allowAnonymous": boolStr(res.allowAnon), } h, err := s.plugins.HealthCheckWith(r.Context(), openSkyPlugin, cfg) diff --git a/API Server/internal/api/plugins.go b/API Server/internal/api/plugins.go index 5c3afb4..6f3649d 100644 --- a/API Server/internal/api/plugins.go +++ b/API Server/internal/api/plugins.go @@ -93,9 +93,41 @@ func (s *Server) handleDeletePlugin(w http.ResponseWriter, r *http.Request) { writeJSON(w, http.StatusOK, map[string]any{"ok": true}) } -// POST /api/admin/plugins/{name}/health — run a health check now. +// POST /api/admin/plugins/{name}/health — run a health check now. An optional +// ?bbox= overrides the plugin's stored bounding box for this probe only (used by +// the panel to test-probe OpenSky over a smaller, cheaper area without changing +// the saved default). Ignored by plugins that don't use a bbox. func (s *Server) handlePluginHealth(w http.ResponseWriter, r *http.Request) { - h, err := s.plugins.HealthCheck(r.Context(), r.PathValue("name")) + name := r.PathValue("name") + + if bbox := strings.TrimSpace(r.URL.Query().Get("bbox")); bbox != "" { + if !validBBox(bbox) { + writeError(w, http.StatusBadRequest, "invalid bbox") + return + } + cfg, _, ok := s.plugins.RawConfig(name) + if !ok { + writeError(w, http.StatusNotFound, "unknown plugin") + return + } + if cfg == nil { + cfg = map[string]string{} + } + cfg["bbox"] = bbox + h, err := s.plugins.HealthCheckWith(r.Context(), name, cfg) + if err != nil { + if plugins.IsUnknown(err) { + writeError(w, http.StatusNotFound, "unknown plugin") + return + } + writeJSON(w, http.StatusBadGateway, map[string]any{"error": err.Error()}) + return + } + writeJSON(w, http.StatusOK, map[string]any{"health": h}) + return + } + + h, err := s.plugins.HealthCheck(r.Context(), name) if err != nil { if plugins.IsUnknown(err) { writeError(w, http.StatusNotFound, "unknown plugin") diff --git a/API Server/panel/src/App.vue b/API Server/panel/src/App.vue index 3d4f97d..8e27953 100644 --- a/API Server/panel/src/App.vue +++ b/API Server/panel/src/App.vue @@ -217,6 +217,41 @@ function setBboxSelect(key, v) { bboxCustom.value = { ...bboxCustom.value, [key]: false }; editConfig.value[key] = v; } + +// ---- Probe bounding box (Check-only override) ---------------------------- +// A plugin can be test-probed over a specific area without touching its saved +// config, so OpenSky's credit cost (which scales with box size) can be checked +// cheaply. State is per plugin name; empty value = "saved default" (no override). +const probeBbox = ref({}); // name -> bbox string ("" = saved default) +const probeBboxCustom = ref({}); // name -> in "Custom…" mode +function pluginHasBbox(p) { + return !!(p.configFields && p.configFields.some((f) => f.type === "bbox")); +} +function probeBboxSelectValue(name) { + if (probeBboxCustom.value[name]) return "__custom__"; + const v = probeBbox.value[name]; + if (!v) return "__default__"; + const norm = normBbox(v); + const match = norm && BBOX_FLAT.find((o) => normBbox(o.value) === norm); + return match ? match.value : "__custom__"; +} +function setProbeBbox(name, v) { + if (v === "__default__") { + probeBboxCustom.value = { ...probeBboxCustom.value, [name]: false }; + probeBbox.value = { ...probeBbox.value, [name]: "" }; + return; + } + if (v === "__custom__") { + probeBboxCustom.value = { ...probeBboxCustom.value, [name]: true }; + return; + } + probeBboxCustom.value = { ...probeBboxCustom.value, [name]: false }; + probeBbox.value = { ...probeBbox.value, [name]: v }; +} +function setProbeBboxCustom(name, v) { + probeBbox.value = { ...probeBbox.value, [name]: v }; +} + const newExt = ref({ name: "", baseURL: "", provider: "" }); const newExtErr = ref(""); const newExtBusy = ref(false); @@ -348,7 +383,10 @@ async function checkPlugin(p) { busyPlugin.value = p.name; pluginsMsg.value = ""; try { - const r = await fetch(`/api/admin/plugins/${encodeURIComponent(p.name)}/health`, { + // A probe area (if chosen) overrides the saved bbox for this check only. + const area = (probeBbox.value[p.name] || "").trim(); + const qs = area ? `?bbox=${encodeURIComponent(area)}` : ""; + const r = await fetch(`/api/admin/plugins/${encodeURIComponent(p.name)}/health${qs}`, { method: "POST", headers: authHeaders(), }); @@ -1303,6 +1341,27 @@ const deviceApi = [ {{ p.enabled ? "Enabled" : "Disabled" }} + diff --git a/API Server/panel/src/style.css b/API Server/panel/src/style.css index 2849628..a51f44d 100644 --- a/API Server/panel/src/style.css +++ b/API Server/panel/src/style.css @@ -210,6 +210,15 @@ h1, h2, h3 { border-radius: var(--radius-sm); } +/* Compact input to sit inline with pv-btn-sm (auto width, not full-width) */ +@utility pv-input-sm { + width: auto; + height: 32px; + padding: 0 8px; + font-size: 0.75rem; + border-radius: var(--radius-sm); +} + /* Primary button */ @utility pv-btn { display: inline-flex; diff --git a/Web App/server/bff.go b/Web App/server/bff.go index 1e642e8..f2c2d6a 100644 --- a/Web App/server/bff.go +++ b/Web App/server/bff.go @@ -229,7 +229,12 @@ func (a *App) handlePutOpenSky(w http.ResponseWriter, r *http.Request) { // POST /bff/integrations/opensky/health → API Server /api/integrations/opensky/health func (a *App) handleOpenSkyHealth(w http.ResponseWriter, r *http.Request) { - req, _ := http.NewRequest(http.MethodPost, a.apiBaseFor(r)+"/api/integrations/opensky/health", nil) + target := a.apiBaseFor(r) + "/api/integrations/opensky/health" + // Forward the optional ?bbox= probe-area override from Test connection. + if r.URL.RawQuery != "" { + target += "?" + r.URL.RawQuery + } + req, _ := http.NewRequest(http.MethodPost, target, nil) req.Header.Set("Authorization", tokenOf(r)) a.doRelay(w, req) } diff --git a/Web App/server/dist/assets/index-BSx6Lf8i.js b/Web App/server/dist/assets/index-BSx6Lf8i.js deleted file mode 100644 index 39d0510..0000000 --- a/Web App/server/dist/assets/index-BSx6Lf8i.js +++ /dev/null @@ -1,20 +0,0 @@ -(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))l(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Or(t){const i=Object.create(null);for(const s of t.split(","))i[s]=1;return s=>s in i}const vt={},Io=[],Wn=()=>{},yu=()=>!1,Ca=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),La=t=>t.startsWith("onUpdate:"),$t=Object.assign,zr=(t,i)=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)},fd=Object.prototype.hasOwnProperty,ft=(t,i)=>fd.call(t,i),De=Array.isArray,$o=t=>Ds(t)==="[object Map]",Zo=t=>Ds(t)==="[object Set]",_l=t=>Ds(t)==="[object Date]",Ye=t=>typeof t=="function",St=t=>typeof t=="string",Nn=t=>typeof t=="symbol",ht=t=>t!==null&&typeof t=="object",xu=t=>(ht(t)||Ye(t))&&Ye(t.then)&&Ye(t.catch),wu=Object.prototype.toString,Ds=t=>wu.call(t),hd=t=>Ds(t).slice(8,-1),ku=t=>Ds(t)==="[object Object]",Ir=t=>St(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ws=Or(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ma=t=>{const i=Object.create(null);return(s=>i[s]||(i[s]=t(s)))},pd=/-\w/g,In=Ma(t=>t.replace(pd,i=>i.slice(1).toUpperCase())),md=/\B([A-Z])/g,Ni=Ma(t=>t.replace(md,"-$1").toLowerCase()),Su=Ma(t=>t.charAt(0).toUpperCase()+t.slice(1)),tr=Ma(t=>t?`on${Su(t)}`:""),jn=(t,i)=>!Object.is(t,i),ha=(t,...i)=>{for(let s=0;s{Object.defineProperty(t,i,{configurable:!0,enumerable:!1,writable:l,value:s})},Aa=t=>{const i=parseFloat(t);return isNaN(i)?t:i},gd=t=>{const i=St(t)?Number(t):NaN;return isNaN(i)?t:i};let bl;const Ea=()=>bl||(bl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bo(t){if(De(t)){const i={};for(let s=0;s{if(s){const l=s.split(_d);l.length>1&&(i[l[0].trim()]=l[1].trim())}}),i}function Ee(t){let i="";if(St(t))i=t;else if(De(t))for(let s=0;szi(s,i))}const Cu=t=>!!(t&&t.__v_isRef===!0),k=t=>St(t)?t:t==null?"":De(t)||ht(t)&&(t.toString===wu||!Ye(t.toString))?Cu(t)?k(t.value):JSON.stringify(t,Lu,2):String(t),Lu=(t,i)=>Cu(i)?Lu(t,i.value):$o(i)?{[`Map(${i.size})`]:[...i.entries()].reduce((s,[l,u],d)=>(s[nr(l,d)+" =>"]=u,s),{})}:Zo(i)?{[`Set(${i.size})`]:[...i.values()].map(s=>nr(s))}:Nn(i)?nr(i):ht(i)&&!De(i)&&!ku(i)?String(i):i,nr=(t,i="")=>{var s;return Nn(t)?`Symbol(${(s=t.description)!=null?s:i})`:t};/** -* @vue/reactivity v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ut;class Sd{constructor(i=!1){this.detached=i,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!i&&Ut&&(Ut.active?(this.parent=Ut,this.index=(Ut.scopes||(Ut.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,s;if(this.scopes)for(i=0,s=this.scopes.length;i0&&--this._on===0){if(Ut===this)Ut=this.prevScope;else{let i=Ut;for(;i;){if(i.prevScope===this){i.prevScope=this.prevScope;break}i=i.prevScope}}this.prevScope=void 0}}stop(i){if(this._active){this._active=!1;let s,l;for(s=0,l=this.effects.length;s0)return;if(Ss){let i=Ss;for(Ss=void 0;i;){const s=i.next;i.next=void 0,i.flags&=-9,i=s}}let t;for(;ks;){let i=ks;for(ks=void 0;i;){const s=i.next;if(i.next=void 0,i.flags&=-9,i.flags&1)try{i.trigger()}catch(l){t||(t=l)}i=s}}if(t)throw t}function Ou(t){for(let i=t.deps;i;i=i.nextDep)i.version=-1,i.prevActiveLink=i.dep.activeLink,i.dep.activeLink=i}function zu(t){let i,s=t.depsTail,l=s;for(;l;){const u=l.prevDep;l.version===-1?(l===s&&(s=u),Fr(l),Pd(l)):i=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=u}t.deps=i,t.depsTail=s}function mr(t){for(let i=t.deps;i;i=i.nextDep)if(i.dep.version!==i.version||i.dep.computed&&(Iu(i.dep.computed)||i.dep.version!==i.version))return!0;return!!t._dirty}function Iu(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Ms)||(t.globalVersion=Ms,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!mr(t))))return;t.flags|=2;const i=t.dep,s=bt,l=$n;bt=t,$n=!0;try{Ou(t);const u=t.fn(t._value);(i.version===0||jn(u,t._value))&&(t.flags|=128,t._value=u,i.version++)}catch(u){throw i.version++,u}finally{bt=s,$n=l,zu(t),t.flags&=-3}}function Fr(t,i=!1){const{dep:s,prevSub:l,nextSub:u}=t;if(l&&(l.nextSub=u,t.prevSub=void 0),u&&(u.prevSub=l,t.nextSub=void 0),s.subs===t&&(s.subs=l,!l&&s.computed)){s.computed.flags&=-5;for(let d=s.computed.deps;d;d=d.nextDep)Fr(d,!0)}!i&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pd(t){const{prevDep:i,nextDep:s}=t;i&&(i.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=i,t.nextDep=void 0)}let $n=!0;const $u=[];function Kn(){$u.push($n),$n=!1}function Gn(){const t=$u.pop();$n=t===void 0?!0:t}function yl(t){const{cleanup:i}=t;if(t.cleanup=void 0,i){const s=bt;bt=void 0;try{i()}finally{bt=s}}}let Ms=0;class Cd{constructor(i,s){this.sub=i,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rr{constructor(i){this.computed=i,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(i){if(!bt||!$n||bt===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==bt)s=this.activeLink=new Cd(bt,this),bt.deps?(s.prevDep=bt.depsTail,bt.depsTail.nextDep=s,bt.depsTail=s):bt.deps=bt.depsTail=s,Nu(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const l=s.nextDep;l.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=l),s.prevDep=bt.depsTail,s.nextDep=void 0,bt.depsTail.nextDep=s,bt.depsTail=s,bt.deps===s&&(bt.deps=l)}return s}trigger(i){this.version++,Ms++,this.notify(i)}notify(i){Nr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Dr()}}}function Nu(t){if(t.dep.sc++,t.sub.flags&4){const i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let l=i.deps;l;l=l.nextDep)Nu(l)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const gr=new WeakMap,lo=Symbol(""),vr=Symbol(""),As=Symbol("");function jt(t,i,s){if($n&&bt){let l=gr.get(t);l||gr.set(t,l=new Map);let u=l.get(s);u||(l.set(s,u=new Rr),u.map=l,u.key=s),u.track()}}function ui(t,i,s,l,u,d){const h=gr.get(t);if(!h){Ms++;return}const v=b=>{b&&b.trigger()};if(Nr(),i==="clear")h.forEach(v);else{const b=De(t),C=b&&Ir(s);if(b&&s==="length"){const T=Number(l);h.forEach((M,R)=>{(R==="length"||R===As||!Nn(R)&&R>=T)&&v(M)})}else switch((s!==void 0||h.has(void 0))&&v(h.get(s)),C&&v(h.get(As)),i){case"add":b?C&&v(h.get("length")):(v(h.get(lo)),$o(t)&&v(h.get(vr)));break;case"delete":b||(v(h.get(lo)),$o(t)&&v(h.get(vr)));break;case"set":$o(t)&&v(h.get(lo));break}}Dr()}function Oo(t){const i=ct(t);return i===t?i:(jt(i,"iterate",As),Cn(t)?i:i.map(Dn))}function Oa(t){return jt(t=ct(t),"iterate",As),t}function Zn(t,i){return fi(t)?Uo(uo(t)?Dn(i):i):Dn(i)}const Ld={__proto__:null,[Symbol.iterator](){return or(this,Symbol.iterator,t=>Zn(this,t))},concat(...t){return Oo(this).concat(...t.map(i=>De(i)?Oo(i):i))},entries(){return or(this,"entries",t=>(t[1]=Zn(this,t[1]),t))},every(t,i){return si(this,"every",t,i,void 0,arguments)},filter(t,i){return si(this,"filter",t,i,s=>s.map(l=>Zn(this,l)),arguments)},find(t,i){return si(this,"find",t,i,s=>Zn(this,s),arguments)},findIndex(t,i){return si(this,"findIndex",t,i,void 0,arguments)},findLast(t,i){return si(this,"findLast",t,i,s=>Zn(this,s),arguments)},findLastIndex(t,i){return si(this,"findLastIndex",t,i,void 0,arguments)},forEach(t,i){return si(this,"forEach",t,i,void 0,arguments)},includes(...t){return sr(this,"includes",t)},indexOf(...t){return sr(this,"indexOf",t)},join(t){return Oo(this).join(t)},lastIndexOf(...t){return sr(this,"lastIndexOf",t)},map(t,i){return si(this,"map",t,i,void 0,arguments)},pop(){return ps(this,"pop")},push(...t){return ps(this,"push",t)},reduce(t,...i){return xl(this,"reduce",t,i)},reduceRight(t,...i){return xl(this,"reduceRight",t,i)},shift(){return ps(this,"shift")},some(t,i){return si(this,"some",t,i,void 0,arguments)},splice(...t){return ps(this,"splice",t)},toReversed(){return Oo(this).toReversed()},toSorted(t){return Oo(this).toSorted(t)},toSpliced(...t){return Oo(this).toSpliced(...t)},unshift(...t){return ps(this,"unshift",t)},values(){return or(this,"values",t=>Zn(this,t))}};function or(t,i,s){const l=Oa(t),u=l[i]();return l!==t&&!Cn(t)&&(u._next=u.next,u.next=()=>{const d=u._next();return d.done||(d.value=s(d.value)),d}),u}const Md=Array.prototype;function si(t,i,s,l,u,d){const h=Oa(t),v=h!==t&&!Cn(t),b=h[i];if(b!==Md[i]){const M=b.apply(t,d);return v?Dn(M):M}let C=s;h!==t&&(v?C=function(M,R){return s.call(this,Zn(t,M),R,t)}:s.length>2&&(C=function(M,R){return s.call(this,M,R,t)}));const T=b.call(h,C,l);return v&&u?u(T):T}function xl(t,i,s,l){const u=Oa(t),d=u!==t&&!Cn(t);let h=s,v=!1;u!==t&&(d?(v=l.length===0,h=function(C,T,M){return v&&(v=!1,C=Zn(t,C)),s.call(this,C,Zn(t,T),M,t)}):s.length>3&&(h=function(C,T,M){return s.call(this,C,T,M,t)}));const b=u[i](h,...l);return v?Zn(t,b):b}function sr(t,i,s){const l=ct(t);jt(l,"iterate",As);const u=l[i](...s);return(u===-1||u===!1)&&Vr(s[0])?(s[0]=ct(s[0]),l[i](...s)):u}function ps(t,i,s=[]){Kn(),Nr();const l=ct(t)[i].apply(t,s);return Dr(),Gn(),l}const Ad=Or("__proto__,__v_isRef,__isVue"),Du=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Nn));function Ed(t){Nn(t)||(t=String(t));const i=ct(this);return jt(i,"has",t),i.hasOwnProperty(t)}class Fu{constructor(i=!1,s=!1){this._isReadonly=i,this._isShallow=s}get(i,s,l){if(s==="__v_skip")return i.__v_skip;const u=this._isReadonly,d=this._isShallow;if(s==="__v_isReactive")return!u;if(s==="__v_isReadonly")return u;if(s==="__v_isShallow")return d;if(s==="__v_raw")return l===(u?d?Ud:Vu:d?Uu:Bu).get(i)||Object.getPrototypeOf(i)===Object.getPrototypeOf(l)?i:void 0;const h=De(i);if(!u){let b;if(h&&(b=Ld[s]))return b;if(s==="hasOwnProperty")return Ed}const v=Reflect.get(i,s,Gt(i)?i:l);if((Nn(s)?Du.has(s):Ad(s))||(u||jt(i,"get",s),d))return v;if(Gt(v)){const b=h&&Ir(s)?v:v.value;return u&&ht(b)?br(b):b}return ht(v)?u?br(v):kt(v):v}}class Ru extends Fu{constructor(i=!1){super(!1,i)}set(i,s,l,u){let d=i[s];const h=De(i)&&Ir(s);if(!this._isShallow){const C=fi(d);if(!Cn(l)&&!fi(l)&&(d=ct(d),l=ct(l)),!h&&Gt(d)&&!Gt(l))return C||(d.value=l),!0}const v=h?Number(s)t,ra=t=>Reflect.getPrototypeOf(t);function Nd(t,i,s){return function(...l){const u=this.__v_raw,d=ct(u),h=$o(d),v=t==="entries"||t===Symbol.iterator&&h,b=t==="keys"&&h,C=u[t](...l),T=s?_r:i?Uo:Dn;return!i&&jt(d,"iterate",b?vr:lo),$t(Object.create(C),{next(){const{value:M,done:R}=C.next();return R?{value:M,done:R}:{value:v?[T(M[0]),T(M[1])]:T(M),done:R}}})}}function la(t){return function(...i){return t==="delete"?!1:t==="clear"?void 0:this}}function Dd(t,i){const s={get(u){const d=this.__v_raw,h=ct(d),v=ct(u);t||(jn(u,v)&&jt(h,"get",u),jt(h,"get",v));const{has:b}=ra(h),C=i?_r:t?Uo:Dn;if(b.call(h,u))return C(d.get(u));if(b.call(h,v))return C(d.get(v));d!==h&&d.get(u)},get size(){const u=this.__v_raw;return!t&&jt(ct(u),"iterate",lo),u.size},has(u){const d=this.__v_raw,h=ct(d),v=ct(u);return t||(jn(u,v)&&jt(h,"has",u),jt(h,"has",v)),u===v?d.has(u):d.has(u)||d.has(v)},forEach(u,d){const h=this,v=h.__v_raw,b=ct(v),C=i?_r:t?Uo:Dn;return!t&&jt(b,"iterate",lo),v.forEach((T,M)=>u.call(d,C(T),C(M),h))}};return $t(s,t?{add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear")}:{add(u){const d=ct(this),h=ra(d),v=ct(u),b=!i&&!Cn(u)&&!fi(u)?v:u;return h.has.call(d,b)||jn(u,b)&&h.has.call(d,u)||jn(v,b)&&h.has.call(d,v)||(d.add(b),ui(d,"add",b,b)),this},set(u,d){!i&&!Cn(d)&&!fi(d)&&(d=ct(d));const h=ct(this),{has:v,get:b}=ra(h);let C=v.call(h,u);C||(u=ct(u),C=v.call(h,u));const T=b.call(h,u);return h.set(u,d),C?jn(d,T)&&ui(h,"set",u,d):ui(h,"add",u,d),this},delete(u){const d=ct(this),{has:h,get:v}=ra(d);let b=h.call(d,u);b||(u=ct(u),b=h.call(d,u)),v&&v.call(d,u);const C=d.delete(u);return b&&ui(d,"delete",u,void 0),C},clear(){const u=ct(this),d=u.size!==0,h=u.clear();return d&&ui(u,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(u=>{s[u]=Nd(u,t,i)}),s}function Br(t,i){const s=Dd(t,i);return(l,u,d)=>u==="__v_isReactive"?!t:u==="__v_isReadonly"?t:u==="__v_raw"?l:Reflect.get(ft(s,u)&&u in l?s:l,u,d)}const Fd={get:Br(!1,!1)},Rd={get:Br(!1,!0)},Bd={get:Br(!0,!1)};const Bu=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,Ud=new WeakMap;function Vd(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kt(t){return fi(t)?t:Ur(t,!1,zd,Fd,Bu)}function Zd(t){return Ur(t,!1,$d,Rd,Uu)}function br(t){return Ur(t,!0,Id,Bd,Vu)}function Ur(t,i,s,l,u){if(!ht(t)||t.__v_raw&&!(i&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const d=u.get(t);if(d)return d;const h=Vd(hd(t));if(h===0)return t;const v=new Proxy(t,h===2?l:s);return u.set(t,v),v}function uo(t){return fi(t)?uo(t.__v_raw):!!(t&&t.__v_isReactive)}function fi(t){return!!(t&&t.__v_isReadonly)}function Cn(t){return!!(t&&t.__v_isShallow)}function Vr(t){return t?!!t.__v_raw:!1}function ct(t){const i=t&&t.__v_raw;return i?ct(i):t}function Hd(t){return!ft(t,"__v_skip")&&Object.isExtensible(t)&&Tu(t,"__v_skip",!0),t}const Dn=t=>ht(t)?kt(t):t,Uo=t=>ht(t)?br(t):t;function Gt(t){return t?t.__v_isRef===!0:!1}function W(t){return jd(t,!1)}function jd(t,i){return Gt(t)?t:new Wd(t,i)}class Wd{constructor(i,s){this.dep=new Rr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?i:ct(i),this._value=s?i:Dn(i),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(i){const s=this._rawValue,l=this.__v_isShallow||Cn(i)||fi(i);i=l?i:ct(i),jn(i,s)&&(this._rawValue=i,this._value=l?i:Dn(i),this.dep.trigger())}}function Oe(t){return Gt(t)?t.value:t}const Kd={get:(t,i,s)=>i==="__v_raw"?t:Oe(Reflect.get(t,i,s)),set:(t,i,s,l)=>{const u=t[i];return Gt(u)&&!Gt(s)?(u.value=s,!0):Reflect.set(t,i,s,l)}};function Zu(t){return uo(t)?t:new Proxy(t,Kd)}class Gd{constructor(i,s,l){this.fn=i,this.setter=s,this._value=void 0,this.dep=new Rr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ms-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&bt!==this)return Eu(this,!0),!0}get value(){const i=this.dep.track();return Iu(this),i&&(i.version=this.dep.version),this._value}set value(i){this.setter&&this.setter(i)}}function qd(t,i,s=!1){let l,u;return Ye(t)?l=t:(l=t.get,u=t.set),new Gd(l,u,s)}const ua={},ma=new WeakMap;let so;function Yd(t,i=!1,s=so){if(s){let l=ma.get(s);l||ma.set(s,l=[]),l.push(t)}}function Jd(t,i,s=vt){const{immediate:l,deep:u,once:d,scheduler:h,augmentJob:v,call:b}=s,C=fe=>u?fe:Cn(fe)||u===!1||u===0?ci(fe,1):ci(fe);let T,M,R,B,Z=!1,F=!1;if(Gt(t)?(M=()=>t.value,Z=Cn(t)):uo(t)?(M=()=>C(t),Z=!0):De(t)?(F=!0,Z=t.some(fe=>uo(fe)||Cn(fe)),M=()=>t.map(fe=>{if(Gt(fe))return fe.value;if(uo(fe))return C(fe);if(Ye(fe))return b?b(fe,2):fe()})):Ye(t)?i?M=b?()=>b(t,2):t:M=()=>{if(R){Kn();try{R()}finally{Gn()}}const fe=so;so=T;try{return b?b(t,3,[B]):t(B)}finally{so=fe}}:M=Wn,i&&u){const fe=M,Ue=u===!0?1/0:u;M=()=>ci(fe(),Ue)}const he=Td(),pe=()=>{T.stop(),he&&he.active&&zr(he.effects,T)};if(d&&i){const fe=i;i=(...Ue)=>{const $e=fe(...Ue);return pe(),$e}}let q=F?new Array(t.length).fill(ua):ua;const Te=fe=>{if(!(!(T.flags&1)||!T.dirty&&!fe))if(i){const Ue=T.run();if(fe||u||Z||(F?Ue.some(($e,Ie)=>jn($e,q[Ie])):jn(Ue,q))){R&&R();const $e=so;so=T;try{const Ie=[Ue,q===ua?void 0:F&&q[0]===ua?[]:q,B];q=Ue,b?b(i,3,Ie):i(...Ie)}finally{so=$e}}}else T.run()};return v&&v(Te),T=new Mu(M),T.scheduler=h?()=>h(Te,!1):Te,B=fe=>Yd(fe,!1,T),R=T.onStop=()=>{const fe=ma.get(T);if(fe){if(b)b(fe,4);else for(const Ue of fe)Ue();ma.delete(T)}},i?l?Te(!0):q=T.run():h?h(Te.bind(null,!0),!0):T.run(),pe.pause=T.pause.bind(T),pe.resume=T.resume.bind(T),pe.stop=pe,pe}function ci(t,i=1/0,s){if(i<=0||!ht(t)||t.__v_skip||(s=s||new Map,(s.get(t)||0)>=i))return t;if(s.set(t,i),i--,Gt(t))ci(t.value,i,s);else if(De(t))for(let l=0;l{ci(l,i,s)});else if(ku(t)){for(const l in t)ci(t[l],i,s);for(const l of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,l)&&ci(t[l],i,s)}return t}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Fs(t,i,s,l){try{return l?t(...l):t()}catch(u){za(u,i,s)}}function Mn(t,i,s,l){if(Ye(t)){const u=Fs(t,i,s,l);return u&&xu(u)&&u.catch(d=>{za(d,i,s)}),u}if(De(t)){const u=[];for(let d=0;d>>1,u=Xt[l],d=Es(u);d=Es(s)?Xt.push(t):Xt.splice(Qd(i),0,t),t.flags|=1,Wu()}}function Wu(){ga||(ga=Hu.then(Gu))}function ef(t){De(t)?No.push(...t):Oi&&t.id===-1?Oi.splice(zo+1,0,t):t.flags&1||(No.push(t),t.flags|=1),Wu()}function wl(t,i,s=Vn+1){for(;sEs(s)-Es(l));if(No.length=0,Oi){Oi.push(...i);return}for(Oi=i,zo=0;zot.id==null?t.flags&2?-1:1/0:t.id;function Gu(t){try{for(Vn=0;Vn{l._d&&ya(-1);const d=va(i);let h;try{h=t(...u)}finally{va(d),l._d&&ya(1)}return h};return l._n=!0,l._c=!0,l._d=!0,l}function re(t,i){if(Kt===null)return t;const s=Fa(Kt),l=t.dirs||(t.dirs=[]);for(let u=0;u1)return s&&Ye(i)?i.call(l&&l.proxy):i}}const tf=Symbol.for("v-scx"),nf=()=>Ts(tf);function It(t,i,s){return Ju(t,i,s)}function Ju(t,i,s=vt){const{immediate:l,deep:u,flush:d,once:h}=s,v=$t({},s),b=i&&l||!i&&d!=="post";let C;if($s){if(d==="sync"){const B=nf();C=B.__watcherHandles||(B.__watcherHandles=[])}else if(!b){const B=()=>{};return B.stop=Wn,B.resume=Wn,B.pause=Wn,B}}const T=Qt;v.call=(B,Z,F)=>Mn(B,T,Z,F);let M=!1;d==="post"?v.scheduler=B=>{Jt(B,T&&T.suspense)}:d!=="sync"&&(M=!0,v.scheduler=(B,Z)=>{Z?B():Zr(B)}),v.augmentJob=B=>{i&&(B.flags|=4),M&&(B.flags|=2,T&&(B.id=T.uid,B.i=T))};const R=Jd(t,i,v);return $s&&(C?C.push(R):b&&R()),R}function of(t,i,s){const l=this.proxy,u=St(t)?t.includes(".")?Xu(l,t):()=>l[t]:t.bind(l,l);let d;Ye(i)?d=i:(d=i.handler,s=i);const h=Rs(this),v=Ju(u,d.bind(l),s);return h(),v}function Xu(t,i){const s=i.split(".");return()=>{let l=t;for(let u=0;ut.__isTeleport,ao=t=>t&&(t.disabled||t.disabled===""),sf=t=>t&&(t.defer||t.defer===""),kl=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Sl=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,yr=(t,i)=>{const s=t&&t.to;return St(s)?i?i(s):null:s},af={name:"Teleport",__isTeleport:!0,process(t,i,s,l,u,d,h,v,b,C){const{mc:T,pc:M,pbc:R,o:{insert:B,querySelector:Z,createText:F,createComment:he,parentNode:pe}}=C,q=ao(i.props);let{dynamicChildren:Te}=i;const fe=(Ie,Ge,_e)=>{Ie.shapeFlag&16&&T(Ie.children,Ge,_e,u,d,h,v,b)},Ue=(Ie=i)=>{const Ge=ao(Ie.props),_e=Ie.target=yr(Ie.props,Z),ye=xr(_e,Ie,F,B);_e&&(h!=="svg"&&kl(_e)?h="svg":h!=="mathml"&&Sl(_e)&&(h="mathml"),u&&u.isCE&&(u.ce._teleportTargets||(u.ce._teleportTargets=new Set)).add(_e),Ge||(fe(Ie,_e,ye),_s(Ie,!1)))},$e=Ie=>{const Ge=()=>{if(Ei.get(Ie)===Ge){if(Ei.delete(Ie),ao(Ie.props)){const _e=pe(Ie.el)||s;fe(Ie,_e,Ie.anchor),_s(Ie,!0)}Ue(Ie)}};Ei.set(Ie,Ge),Jt(Ge,d)};if(t==null){const Ie=i.el=F(""),Ge=i.anchor=F("");if(B(Ie,s,l),B(Ge,s,l),sf(i.props)||d&&d.pendingBranch){$e(i);return}q&&(fe(i,s,Ge),_s(i,!0)),Ue()}else{i.el=t.el;const Ie=i.anchor=t.anchor,Ge=Ei.get(t);if(Ge){Ge.flags|=8,Ei.delete(t),$e(i);return}i.targetStart=t.targetStart;const _e=i.target=t.target,ye=i.targetAnchor=t.targetAnchor,ze=ao(t.props),ne=ze?s:_e,je=ze?Ie:ye;if(h==="svg"||kl(_e)?h="svg":(h==="mathml"||Sl(_e))&&(h="mathml"),Te?(R(t.dynamicChildren,Te,ne,u,d,h,v),Wr(t,i,!0)):b||M(t,i,ne,je,u,d,h,v,!1),q)ze?i.props&&t.props&&i.props.to!==t.props.to&&(i.props.to=t.props.to):ca(i,s,Ie,C,1);else if((i.props&&i.props.to)!==(t.props&&t.props.to)){const ie=yr(i.props,Z);ie&&(i.target=ie,ca(i,ie,null,C,0))}else ze&&ca(i,_e,ye,C,1);_s(i,q)}},remove(t,i,s,{um:l,o:{remove:u}},d){const{shapeFlag:h,children:v,anchor:b,targetStart:C,targetAnchor:T,target:M,props:R}=t,B=ao(R),Z=d||!B,F=Ei.get(t);if(F&&(F.flags|=8,Ei.delete(t)),M&&(u(C),u(T)),d&&u(b),!F&&(B||M)&&h&16)for(let he=0;he{t.isMounted=!0}),Ho(()=>{t.isUnmounting=!0}),t}const Sn=[Function,Array],tc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Sn,onEnter:Sn,onAfterEnter:Sn,onEnterCancelled:Sn,onBeforeLeave:Sn,onLeave:Sn,onAfterLeave:Sn,onLeaveCancelled:Sn,onBeforeAppear:Sn,onAppear:Sn,onAfterAppear:Sn,onAppearCancelled:Sn},nc=t=>{const i=t.subTree;return i.component?nc(i.component):i},cf={name:"BaseTransition",props:tc,setup(t,{slots:i}){const s=Lc(),l=uf();return()=>{const u=i.default&&sc(i.default(),!0),d=u&&u.length?ic(u):s.subTree?D():void 0;if(!d)return;const h=ct(t),{mode:v}=h;if(l.isLeaving)return ar(d);const b=Tl(d);if(!b)return ar(d);let C=wr(b,h,l,s,M=>C=M);b.type!==Wt&&Os(b,C);let T=s.subTree&&Tl(s.subTree);if(T&&T.type!==Wt&&!ro(T,b)&&nc(s).type!==Wt){let M=wr(T,h,l,s);if(Os(T,M),v==="out-in"&&b.type!==Wt)return l.isLeaving=!0,M.afterLeave=()=>{l.isLeaving=!1,s.job.flags&8||s.update(),delete M.afterLeave,T=void 0},ar(d);v==="in-out"&&b.type!==Wt?M.delayLeave=(R,B,Z)=>{const F=oc(l,T);F[String(T.key)]=T,R[Pn]=()=>{B(),R[Pn]=void 0,delete C.delayedLeave,T=void 0},C.delayedLeave=()=>{Z(),delete C.delayedLeave,T=void 0}}:T=void 0}else T&&(T=void 0);return d}}};function ic(t){let i=t[0];if(t.length>1){for(const s of t)if(s.type!==Wt){i=s;break}}return i}const df=cf;function oc(t,i){const{leavingVNodes:s}=t;let l=s.get(i.type);return l||(l=Object.create(null),s.set(i.type,l)),l}function wr(t,i,s,l,u){const{appear:d,mode:h,persisted:v=!1,onBeforeEnter:b,onEnter:C,onAfterEnter:T,onEnterCancelled:M,onBeforeLeave:R,onLeave:B,onAfterLeave:Z,onLeaveCancelled:F,onBeforeAppear:he,onAppear:pe,onAfterAppear:q,onAppearCancelled:Te}=i,fe=String(t.key),Ue=oc(s,t),$e=(_e,ye)=>{_e&&Mn(_e,l,9,ye)},Ie=(_e,ye)=>{const ze=ye[1];$e(_e,ye),De(_e)?_e.every(ne=>ne.length<=1)&&ze():_e.length<=1&&ze()},Ge={mode:h,persisted:v,beforeEnter(_e){let ye=b;if(!s.isMounted)if(d)ye=he||b;else return;_e[Pn]&&_e[Pn](!0);const ze=Ue[fe];ze&&ro(t,ze)&&ze.el[Pn]&&ze.el[Pn](),$e(ye,[_e])},enter(_e){if(Ue[fe]===t)return;let ye=C,ze=T,ne=M;if(!s.isMounted)if(d)ye=pe||C,ze=q||T,ne=Te||M;else return;let je=!1;_e[ms]=We=>{je||(je=!0,We?$e(ne,[_e]):$e(ze,[_e]),Ge.delayedLeave&&Ge.delayedLeave(),_e[ms]=void 0)};const ie=_e[ms].bind(null,!1);ye?Ie(ye,[_e,ie]):ie()},leave(_e,ye){const ze=String(t.key);if(_e[ms]&&_e[ms](!0),s.isUnmounting)return ye();$e(R,[_e]);let ne=!1;_e[Pn]=ie=>{ne||(ne=!0,ye(),ie?$e(F,[_e]):$e(Z,[_e]),_e[Pn]=void 0,Ue[ze]===t&&delete Ue[ze])};const je=_e[Pn].bind(null,!1);Ue[ze]=t,B?Ie(B,[_e,je]):je()},clone(_e){const ye=wr(_e,i,s,l,u);return u&&u(ye),ye}};return Ge}function ar(t){if(Ia(t))return t=Ii(t),t.children=null,t}function Tl(t){if(!Ia(t))return ec(t.type)&&t.children?ic(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:i,children:s}=t;if(s){if(i&16)return s[0];if(i&32&&Ye(s.default))return s.default()}}function Os(t,i){t.shapeFlag&6&&t.component?(t.transition=i,Os(t.component.subTree,i)):t.shapeFlag&128?(t.ssContent.transition=i.clone(t.ssContent),t.ssFallback.transition=i.clone(t.ssFallback)):t.transition=i}function sc(t,i=!1,s){let l=[],u=0;for(let d=0;d1)for(let d=0;dPs(F,i&&(De(i)?i[he]:i),s,l,u));return}if(Do(l)&&!u){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&Ps(t,i,s,l.component.subTree);return}const d=l.shapeFlag&4?Fa(l.component):l.el,h=u?null:d,{i:v,r:b}=t,C=i&&i.r,T=v.refs===vt?v.refs={}:v.refs,M=v.setupState,R=ct(M),B=M===vt?yu:F=>Pl(T,F)?!1:ft(R,F),Z=(F,he)=>!(he&&Pl(T,he));if(C!=null&&C!==b){if(Cl(i),St(C))T[C]=null,B(C)&&(M[C]=null);else if(Gt(C)){const F=i;Z(C,F.k)&&(C.value=null),F.k&&(T[F.k]=null)}}if(Ye(b)){Kn();try{Fs(b,v,12,[h,T])}finally{Gn()}}else{const F=St(b),he=Gt(b);if(F||he){const pe=()=>{if(t.f){const q=F?B(b)?M[b]:T[b]:Z()||!t.k?b.value:T[t.k];if(u)De(q)&&zr(q,d);else if(De(q))q.includes(d)||q.push(d);else if(F)T[b]=[d],B(b)&&(M[b]=T[b]);else{const Te=[d];Z(b,t.k)&&(b.value=Te),t.k&&(T[t.k]=Te)}}else F?(T[b]=h,B(b)&&(M[b]=h)):he&&(Z(b,t.k)&&(b.value=h),t.k&&(T[t.k]=h))};if(h){const q=()=>{pe(),_a.delete(t)};q.id=-1,_a.set(t,q),Jt(q,s)}else Cl(t),pe()}}}function Cl(t){const i=_a.get(t);i&&(i.flags|=8,_a.delete(t))}Ea().requestIdleCallback;Ea().cancelIdleCallback;const Do=t=>!!t.type.__asyncLoader,Ia=t=>t.type.__isKeepAlive;function ff(t,i){rc(t,"a",i)}function hf(t,i){rc(t,"da",i)}function rc(t,i,s=Qt){const l=t.__wdc||(t.__wdc=()=>{let u=s;for(;u;){if(u.isDeactivated)return;u=u.parent}return t()});if($a(i,l,s),s){let u=s.parent;for(;u&&u.parent;)Ia(u.parent.vnode)&&pf(l,i,s,u),u=u.parent}}function pf(t,i,s,l){const u=$a(i,t,l,!0);lc(()=>{zr(l[i],u)},s)}function $a(t,i,s=Qt,l=!1){if(s){const u=s[t]||(s[t]=[]),d=i.__weh||(i.__weh=(...h)=>{Kn();const v=Rs(s),b=Mn(i,s,t,h);return v(),Gn(),b});return l?u.unshift(d):u.push(d),d}}const pi=t=>(i,s=Qt)=>{(!$s||t==="sp")&&$a(t,(...l)=>i(...l),s)},mf=pi("bm"),hi=pi("m"),gf=pi("bu"),vf=pi("u"),Ho=pi("bum"),lc=pi("um"),_f=pi("sp"),bf=pi("rtg"),yf=pi("rtc");function xf(t,i=Qt){$a("ec",t,i)}const wf=Symbol.for("v-ndc");function Be(t,i,s,l){let u;const d=s,h=De(t);if(h||St(t)){const v=h&&uo(t);let b=!1,C=!1;v&&(b=!Cn(t),C=fi(t),t=Oa(t)),u=new Array(t.length);for(let T=0,M=t.length;Ti(v,b,void 0,d));else{const v=Object.keys(t);u=new Array(v.length);for(let b=0,C=v.length;b0;return p(),lt(ue,null,[E("slot",s,l)],C?-2:64)}let d=t[i];d&&d._c&&(d._d=!1),p();const h=d&&uc(d(s)),v=s.key||h&&h.key,b=lt(ue,{key:(v&&!Nn(v)?v:`_${i}`)+(!h&&l?"_fb":"")},h||[],h&&t._===1?64:-2);return b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function uc(t){return t.some(i=>Is(i)?!(i.type===Wt||i.type===ue&&!uc(i.children)):!0)?t:null}const kr=t=>t?Mc(t)?Fa(t):kr(t.parent):null,Cs=$t(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>kr(t.parent),$root:t=>kr(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>dc(t),$forceUpdate:t=>t.f||(t.f=()=>{Zr(t.update)}),$nextTick:t=>t.n||(t.n=ju.bind(t.proxy)),$watch:t=>of.bind(t)}),rr=(t,i)=>t!==vt&&!t.__isScriptSetup&&ft(t,i),Sf={get({_:t},i){if(i==="__v_skip")return!0;const{ctx:s,setupState:l,data:u,props:d,accessCache:h,type:v,appContext:b}=t;if(i[0]!=="$"){const R=h[i];if(R!==void 0)switch(R){case 1:return l[i];case 2:return u[i];case 4:return s[i];case 3:return d[i]}else{if(rr(l,i))return h[i]=1,l[i];if(u!==vt&&ft(u,i))return h[i]=2,u[i];if(ft(d,i))return h[i]=3,d[i];if(s!==vt&&ft(s,i))return h[i]=4,s[i];Sr&&(h[i]=0)}}const C=Cs[i];let T,M;if(C)return i==="$attrs"&&jt(t.attrs,"get",""),C(t);if((T=v.__cssModules)&&(T=T[i]))return T;if(s!==vt&&ft(s,i))return h[i]=4,s[i];if(M=b.config.globalProperties,ft(M,i))return M[i]},set({_:t},i,s){const{data:l,setupState:u,ctx:d}=t;return rr(u,i)?(u[i]=s,!0):l!==vt&&ft(l,i)?(l[i]=s,!0):ft(t.props,i)||i[0]==="$"&&i.slice(1)in t?!1:(d[i]=s,!0)},has({_:{data:t,setupState:i,accessCache:s,ctx:l,appContext:u,props:d,type:h}},v){let b;return!!(s[v]||t!==vt&&v[0]!=="$"&&ft(t,v)||rr(i,v)||ft(d,v)||ft(l,v)||ft(Cs,v)||ft(u.config.globalProperties,v)||(b=h.__cssModules)&&b[v])},defineProperty(t,i,s){return s.get!=null?t._.accessCache[i]=0:ft(s,"value")&&this.set(t,i,s.value,null),Reflect.defineProperty(t,i,s)}};function Ll(t){return De(t)?t.reduce((i,s)=>(i[s]=null,i),{}):t}let Sr=!0;function Tf(t){const i=dc(t),s=t.proxy,l=t.ctx;Sr=!1,i.beforeCreate&&Ml(i.beforeCreate,t,"bc");const{data:u,computed:d,methods:h,watch:v,provide:b,inject:C,created:T,beforeMount:M,mounted:R,beforeUpdate:B,updated:Z,activated:F,deactivated:he,beforeDestroy:pe,beforeUnmount:q,destroyed:Te,unmounted:fe,render:Ue,renderTracked:$e,renderTriggered:Ie,errorCaptured:Ge,serverPrefetch:_e,expose:ye,inheritAttrs:ze,components:ne,directives:je,filters:ie}=i;if(C&&Pf(C,l,null),h)for(const ce in h){const se=h[ce];Ye(se)&&(l[ce]=se.bind(s))}if(u){const ce=u.call(s,s);ht(ce)&&(t.data=kt(ce))}if(Sr=!0,d)for(const ce in d){const se=d[ce],ot=Ye(se)?se.bind(s,s):Ye(se.get)?se.get.bind(s,s):Wn,ee=!Ye(se)&&Ye(se.set)?se.set.bind(s):Wn,be=we({get:ot,set:ee});Object.defineProperty(l,ce,{enumerable:!0,configurable:!0,get:()=>be.value,set:Ne=>be.value=Ne})}if(v)for(const ce in v)cc(v[ce],l,s,ce);if(b){const ce=Ye(b)?b.call(s):b;Reflect.ownKeys(ce).forEach(se=>{Yu(se,ce[se])})}T&&Ml(T,t,"c");function le(ce,se){De(se)?se.forEach(ot=>ce(ot.bind(s))):se&&ce(se.bind(s))}if(le(mf,M),le(hi,R),le(gf,B),le(vf,Z),le(ff,F),le(hf,he),le(xf,Ge),le(yf,$e),le(bf,Ie),le(Ho,q),le(lc,fe),le(_f,_e),De(ye))if(ye.length){const ce=t.exposed||(t.exposed={});ye.forEach(se=>{Object.defineProperty(ce,se,{get:()=>s[se],set:ot=>s[se]=ot,enumerable:!0})})}else t.exposed||(t.exposed={});Ue&&t.render===Wn&&(t.render=Ue),ze!=null&&(t.inheritAttrs=ze),ne&&(t.components=ne),je&&(t.directives=je),_e&&ac(t)}function Pf(t,i,s=Wn){De(t)&&(t=Tr(t));for(const l in t){const u=t[l];let d;ht(u)?"default"in u?d=Ts(u.from||l,u.default,!0):d=Ts(u.from||l):d=Ts(u),Gt(d)?Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>d.value,set:h=>d.value=h}):i[l]=d}}function Ml(t,i,s){Mn(De(t)?t.map(l=>l.bind(i.proxy)):t.bind(i.proxy),i,s)}function cc(t,i,s,l){let u=l.includes(".")?Xu(s,l):()=>s[l];if(St(t)){const d=i[t];Ye(d)&&It(u,d)}else if(Ye(t))It(u,t.bind(s));else if(ht(t))if(De(t))t.forEach(d=>cc(d,i,s,l));else{const d=Ye(t.handler)?t.handler.bind(s):i[t.handler];Ye(d)&&It(u,d,t)}}function dc(t){const i=t.type,{mixins:s,extends:l}=i,{mixins:u,optionsCache:d,config:{optionMergeStrategies:h}}=t.appContext,v=d.get(i);let b;return v?b=v:!u.length&&!s&&!l?b=i:(b={},u.length&&u.forEach(C=>ba(b,C,h,!0)),ba(b,i,h)),ht(i)&&d.set(i,b),b}function ba(t,i,s,l=!1){const{mixins:u,extends:d}=i;d&&ba(t,d,s,!0),u&&u.forEach(h=>ba(t,h,s,!0));for(const h in i)if(!(l&&h==="expose")){const v=Cf[h]||s&&s[h];t[h]=v?v(t[h],i[h]):i[h]}return t}const Cf={data:Al,props:El,emits:El,methods:bs,computed:bs,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:bs,directives:bs,watch:Mf,provide:Al,inject:Lf};function Al(t,i){return i?t?function(){return $t(Ye(t)?t.call(this,this):t,Ye(i)?i.call(this,this):i)}:i:t}function Lf(t,i){return bs(Tr(t),Tr(i))}function Tr(t){if(De(t)){const i={};for(let s=0;si==="modelValue"||i==="model-value"?t.modelModifiers:t[`${i}Modifiers`]||t[`${In(i)}Modifiers`]||t[`${Ni(i)}Modifiers`];function zf(t,i,...s){if(t.isUnmounted)return;const l=t.vnode.props||vt;let u=s;const d=i.startsWith("update:"),h=d&&Of(l,i.slice(7));h&&(h.trim&&(u=s.map(T=>St(T)?T.trim():T)),h.number&&(u=s.map(Aa)));let v,b=l[v=tr(i)]||l[v=tr(In(i))];!b&&d&&(b=l[v=tr(Ni(i))]),b&&Mn(b,t,6,u);const C=l[v+"Once"];if(C){if(!t.emitted)t.emitted={};else if(t.emitted[v])return;t.emitted[v]=!0,Mn(C,t,6,u)}}const If=new WeakMap;function hc(t,i,s=!1){const l=s?If:i.emitsCache,u=l.get(t);if(u!==void 0)return u;const d=t.emits;let h={},v=!1;if(!Ye(t)){const b=C=>{const T=hc(C,i,!0);T&&(v=!0,$t(h,T))};!s&&i.mixins.length&&i.mixins.forEach(b),t.extends&&b(t.extends),t.mixins&&t.mixins.forEach(b)}return!d&&!v?(ht(t)&&l.set(t,null),null):(De(d)?d.forEach(b=>h[b]=null):$t(h,d),ht(t)&&l.set(t,h),h)}function Na(t,i){return!t||!Ca(i)?!1:(i=i.slice(2),i=i==="Once"?i:i.replace(/Once$/,""),ft(t,i[0].toLowerCase()+i.slice(1))||ft(t,Ni(i))||ft(t,i))}function Ol(t){const{type:i,vnode:s,proxy:l,withProxy:u,propsOptions:[d],slots:h,attrs:v,emit:b,render:C,renderCache:T,props:M,data:R,setupState:B,ctx:Z,inheritAttrs:F}=t,he=va(t);let pe,q;try{if(s.shapeFlag&4){const fe=u||l,Ue=fe;pe=Hn(C.call(Ue,fe,T,M,B,R,Z)),q=v}else{const fe=i;pe=Hn(fe.length>1?fe(M,{attrs:v,slots:h,emit:b}):fe(M,null)),q=i.props?v:$f(v)}}catch(fe){Ls.length=0,za(fe,t,1),pe=E(Wt)}let Te=pe;if(q&&F!==!1){const fe=Object.keys(q),{shapeFlag:Ue}=Te;fe.length&&Ue&7&&(d&&fe.some(La)&&(q=Nf(q,d)),Te=Ii(Te,q,!1,!0))}return s.dirs&&(Te=Ii(Te,null,!1,!0),Te.dirs=Te.dirs?Te.dirs.concat(s.dirs):s.dirs),s.transition&&Os(Te,s.transition),pe=Te,va(he),pe}const $f=t=>{let i;for(const s in t)(s==="class"||s==="style"||Ca(s))&&((i||(i={}))[s]=t[s]);return i},Nf=(t,i)=>{const s={};for(const l in t)(!La(l)||!(l.slice(9)in i))&&(s[l]=t[l]);return s};function Df(t,i,s){const{props:l,children:u,component:d}=t,{props:h,children:v,patchFlag:b}=i,C=d.emitsOptions;if(i.dirs||i.transition)return!0;if(s&&b>=0){if(b&1024)return!0;if(b&16)return l?zl(l,h,C):!!h;if(b&8){const T=i.dynamicProps;for(let M=0;MObject.create(mc),vc=t=>Object.getPrototypeOf(t)===mc;function Rf(t,i,s,l=!1){const u={},d=gc();t.propsDefaults=Object.create(null),_c(t,i,u,d);for(const h in t.propsOptions[0])h in u||(u[h]=void 0);s?t.props=l?u:Zd(u):t.type.props?t.props=u:t.props=d,t.attrs=d}function Bf(t,i,s,l){const{props:u,attrs:d,vnode:{patchFlag:h}}=t,v=ct(u),[b]=t.propsOptions;let C=!1;if((l||h>0)&&!(h&16)){if(h&8){const T=t.vnode.dynamicProps;for(let M=0;M{b=!0;const[R,B]=bc(M,i,!0);$t(h,R),B&&v.push(...B)};!s&&i.mixins.length&&i.mixins.forEach(T),t.extends&&T(t.extends),t.mixins&&t.mixins.forEach(T)}if(!d&&!b)return ht(t)&&l.set(t,Io),Io;if(De(d))for(let T=0;Tt==="_"||t==="_ctx"||t==="$stable",jr=t=>De(t)?t.map(Hn):[Hn(t)],Vf=(t,i,s)=>{if(i._n)return i;const l=Pe((...u)=>jr(i(...u)),s);return l._c=!1,l},yc=(t,i,s)=>{const l=t._ctx;for(const u in t){if(Hr(u))continue;const d=t[u];if(Ye(d))i[u]=Vf(u,d,l);else if(d!=null){const h=jr(d);i[u]=()=>h}}},xc=(t,i)=>{const s=jr(i);t.slots.default=()=>s},wc=(t,i,s)=>{for(const l in i)(s||!Hr(l))&&(t[l]=i[l])},Zf=(t,i,s)=>{const l=t.slots=gc();if(t.vnode.shapeFlag&32){const u=i._;u?(wc(l,i,s),s&&Tu(l,"_",u,!0)):yc(i,l)}else i&&xc(t,i)},Hf=(t,i,s)=>{const{vnode:l,slots:u}=t;let d=!0,h=vt;if(l.shapeFlag&32){const v=i._;v?s&&v===1?d=!1:wc(u,i,s):(d=!i.$stable,yc(i,u)),h=i}else i&&(xc(t,i),h={default:1});if(d)for(const v in u)!Hr(v)&&h[v]==null&&delete u[v]},Jt=qf;function jf(t){return Wf(t)}function Wf(t,i){const s=Ea();s.__VUE__=!0;const{insert:l,remove:u,patchProp:d,createElement:h,createText:v,createComment:b,setText:C,setElementText:T,parentNode:M,nextSibling:R,setScopeId:B=Wn,insertStaticContent:Z}=t,F=(y,_,w,K=null,H=null,V=null,ae=void 0,te=null,Q=!!_.dynamicChildren)=>{if(y===_)return;y&&!ro(y,_)&&(K=A(y),Ne(y,H,V,!0),y=null),_.patchFlag===-2&&(Q=!1,_.dynamicChildren=null);const{type:G,ref:me,shapeFlag:oe}=_;switch(G){case Da:he(y,_,w,K);break;case Wt:pe(y,_,w,K);break;case ur:y==null&&q(_,w,K,ae);break;case ue:ne(y,_,w,K,H,V,ae,te,Q);break;default:oe&1?Ue(y,_,w,K,H,V,ae,te,Q):oe&6?je(y,_,w,K,H,V,ae,te,Q):(oe&64||oe&128)&&G.process(y,_,w,K,H,V,ae,te,Q,ut)}me!=null&&H?Ps(me,y&&y.ref,V,_||y,!_):me==null&&y&&y.ref!=null&&Ps(y.ref,null,V,y,!0)},he=(y,_,w,K)=>{if(y==null)l(_.el=v(_.children),w,K);else{const H=_.el=y.el;_.children!==y.children&&C(H,_.children)}},pe=(y,_,w,K)=>{y==null?l(_.el=b(_.children||""),w,K):_.el=y.el},q=(y,_,w,K)=>{[y.el,y.anchor]=Z(y.children,_,w,K,y.el,y.anchor)},Te=({el:y,anchor:_},w,K)=>{let H;for(;y&&y!==_;)H=R(y),l(y,w,K),y=H;l(_,w,K)},fe=({el:y,anchor:_})=>{let w;for(;y&&y!==_;)w=R(y),u(y),y=w;u(_)},Ue=(y,_,w,K,H,V,ae,te,Q)=>{if(_.type==="svg"?ae="svg":_.type==="math"&&(ae="mathml"),y==null)$e(_,w,K,H,V,ae,te,Q);else{const G=y.el&&y.el._isVueCE?y.el:null;try{G&&G._beginPatch(),_e(y,_,H,V,ae,te,Q)}finally{G&&G._endPatch()}}},$e=(y,_,w,K,H,V,ae,te)=>{let Q,G;const{props:me,shapeFlag:oe,transition:ke,dirs:Ce}=y;if(Q=y.el=h(y.type,V,me&&me.is,me),oe&8?T(Q,y.children):oe&16&&Ge(y.children,Q,null,K,H,lr(y,V),ae,te),Ce&&to(y,null,K,"created"),Ie(Q,y,y.scopeId,ae,K),me){for(const et in me)et!=="value"&&!ws(et)&&d(Q,et,null,me[et],V,K);"value"in me&&d(Q,"value",null,me.value,V),(G=me.onVnodeBeforeMount)&&Un(G,K,y)}Ce&&to(y,null,K,"beforeMount");const He=Kf(H,ke);He&&ke.beforeEnter(Q),l(Q,_,w),((G=me&&me.onVnodeMounted)||He||Ce)&&Jt(()=>{try{G&&Un(G,K,y),He&&ke.enter(Q),Ce&&to(y,null,K,"mounted")}finally{}},H)},Ie=(y,_,w,K,H)=>{if(w&&B(y,w),K)for(let V=0;V{for(let G=Q;G{const te=_.el=y.el;let{patchFlag:Q,dynamicChildren:G,dirs:me}=_;Q|=y.patchFlag&16;const oe=y.props||vt,ke=_.props||vt;let Ce;if(w&&no(w,!1),(Ce=ke.onVnodeBeforeUpdate)&&Un(Ce,w,_,y),me&&to(_,y,w,"beforeUpdate"),w&&no(w,!0),G&&(!y.dynamicChildren||y.dynamicChildren.length!==G.length)&&(Q=0,ae=!1,G=null),(oe.innerHTML&&ke.innerHTML==null||oe.textContent&&ke.textContent==null)&&T(te,""),G?ye(y.dynamicChildren,G,te,w,K,lr(_,H),V):ae||se(y,_,te,null,w,K,lr(_,H),V,!1),Q>0){if(Q&16)ze(te,oe,ke,w,H);else if(Q&2&&oe.class!==ke.class&&d(te,"class",null,ke.class,H),Q&4&&d(te,"style",oe.style,ke.style,H),Q&8){const He=_.dynamicProps;for(let et=0;et{Ce&&Un(Ce,w,_,y),me&&to(_,y,w,"updated")},K)},ye=(y,_,w,K,H,V,ae)=>{for(let te=0;te<_.length;te++){const Q=y[te],G=_[te],me=Q.el&&(Q.type===ue||!ro(Q,G)||Q.shapeFlag&198)?M(Q.el):w;F(Q,G,me,null,K,H,V,ae,!0)}},ze=(y,_,w,K,H)=>{if(_!==w){if(_!==vt)for(const V in _)!ws(V)&&!(V in w)&&d(y,V,_[V],null,H,K);for(const V in w){if(ws(V))continue;const ae=w[V],te=_[V];ae!==te&&V!=="value"&&d(y,V,te,ae,H,K)}"value"in w&&d(y,"value",_.value,w.value,H)}},ne=(y,_,w,K,H,V,ae,te,Q)=>{const G=_.el=y?y.el:v(""),me=_.anchor=y?y.anchor:v("");let{patchFlag:oe,dynamicChildren:ke,slotScopeIds:Ce}=_;Ce&&(te=te?te.concat(Ce):Ce),y==null?(l(G,w,K),l(me,w,K),Ge(_.children||[],w,me,H,V,ae,te,Q)):oe>0&&oe&64&&ke&&y.dynamicChildren&&y.dynamicChildren.length===ke.length?(ye(y.dynamicChildren,ke,w,H,V,ae,te),(_.key!=null||H&&_===H.subTree)&&Wr(y,_,!0)):se(y,_,w,me,H,V,ae,te,Q)},je=(y,_,w,K,H,V,ae,te,Q)=>{_.slotScopeIds=te,y==null?_.shapeFlag&512?H.ctx.activate(_,w,K,ae,Q):ie(_,w,K,H,V,ae,Q):We(y,_,Q)},ie=(y,_,w,K,H,V,ae)=>{const te=y.component=nh(y,K,H);if(Ia(y)&&(te.ctx.renderer=ut),ih(te,!1,ae),te.asyncDep){if(H&&H.registerDep(te,le,ae),!y.el){const Q=te.subTree=E(Wt);pe(null,Q,_,w),y.placeholder=Q.el}}else le(te,y,_,w,H,V,ae)},We=(y,_,w)=>{const K=_.component=y.component;if(Df(y,_,w))if(K.asyncDep&&!K.asyncResolved){ce(K,_,w);return}else K.next=_,K.update();else _.el=y.el,K.vnode=_},le=(y,_,w,K,H,V,ae)=>{const te=()=>{if(y.isMounted){let{next:oe,bu:ke,u:Ce,parent:He,vnode:et}=y;{const pt=kc(y);if(pt){oe&&(oe.el=et.el,ce(y,oe,ae)),pt.asyncDep.then(()=>{Jt(()=>{y.isUnmounted||G()},H)});return}}let U=oe,O;no(y,!1),oe?(oe.el=et.el,ce(y,oe,ae)):oe=et,ke&&ha(ke),(O=oe.props&&oe.props.onVnodeBeforeUpdate)&&Un(O,He,oe,et),no(y,!0);const xe=Ol(y),Je=y.subTree;y.subTree=xe,F(Je,xe,M(Je.el),A(Je),y,H,V),oe.el=xe.el,U===null&&Ff(y,xe.el),Ce&&Jt(Ce,H),(O=oe.props&&oe.props.onVnodeUpdated)&&Jt(()=>Un(O,He,oe,et),H)}else{let oe;const{el:ke,props:Ce}=_,{bm:He,m:et,parent:U,root:O,type:xe}=y,Je=Do(_);no(y,!1),He&&ha(He),!Je&&(oe=Ce&&Ce.onVnodeBeforeMount)&&Un(oe,U,_),no(y,!0);{O.ce&&O.ce._hasShadowRoot()&&O.ce._injectChildStyle(xe,y.parent?y.parent.type:void 0);const pt=y.subTree=Ol(y);F(null,pt,w,K,y,H,V),_.el=pt.el}if(et&&Jt(et,H),!Je&&(oe=Ce&&Ce.onVnodeMounted)){const pt=_;Jt(()=>Un(oe,U,pt),H)}(_.shapeFlag&256||U&&Do(U.vnode)&&U.vnode.shapeFlag&256)&&y.a&&Jt(y.a,H),y.isMounted=!0,_=w=K=null}};y.scope.on();const Q=y.effect=new Mu(te);y.scope.off();const G=y.update=Q.run.bind(Q),me=y.job=Q.runIfDirty.bind(Q);me.i=y,me.id=y.uid,Q.scheduler=()=>Zr(me),no(y,!0),G()},ce=(y,_,w)=>{_.component=y;const K=y.vnode.props;y.vnode=_,y.next=null,Bf(y,_.props,K,w),Hf(y,_.children,w),Kn(),wl(y),Gn()},se=(y,_,w,K,H,V,ae,te,Q=!1)=>{const G=y&&y.children,me=y?y.shapeFlag:0,oe=_.children,{patchFlag:ke,shapeFlag:Ce}=_;if(ke>0){if(ke&128){ee(G,oe,w,K,H,V,ae,te,Q);return}else if(ke&256){ot(G,oe,w,K,H,V,ae,te,Q);return}}Ce&8?(me&16&&Y(G,H,V),oe!==G&&T(w,oe)):me&16?Ce&16?ee(G,oe,w,K,H,V,ae,te,Q):Y(G,H,V,!0):(me&8&&T(w,""),Ce&16&&Ge(oe,w,K,H,V,ae,te,Q))},ot=(y,_,w,K,H,V,ae,te,Q)=>{y=y||Io,_=_||Io;const G=y.length,me=_.length,oe=Math.min(G,me);let ke;for(ke=0;keme?Y(y,H,V,!0,!1,oe):Ge(_,w,K,H,V,ae,te,Q,oe)},ee=(y,_,w,K,H,V,ae,te,Q)=>{let G=0;const me=_.length;let oe=y.length-1,ke=me-1;for(;G<=oe&&G<=ke;){const Ce=y[G],He=_[G]=Q?li(_[G]):Hn(_[G]);if(ro(Ce,He))F(Ce,He,w,null,H,V,ae,te,Q);else break;G++}for(;G<=oe&&G<=ke;){const Ce=y[oe],He=_[ke]=Q?li(_[ke]):Hn(_[ke]);if(ro(Ce,He))F(Ce,He,w,null,H,V,ae,te,Q);else break;oe--,ke--}if(G>oe){if(G<=ke){const Ce=ke+1,He=Ceke)for(;G<=oe;)Ne(y[G],H,V,!0),G++;else{const Ce=G,He=G,et=new Map;for(G=He;G<=ke;G++){const de=_[G]=Q?li(_[G]):Hn(_[G]);de.key!=null&&et.set(de.key,G)}let U,O=0;const xe=ke-He+1;let Je=!1,pt=0;const Ve=new Array(xe);for(G=0;G=xe){Ne(de,H,V,!0);continue}let Fe;if(de.key!=null)Fe=et.get(de.key);else for(U=He;U<=ke;U++)if(Ve[U-He]===0&&ro(de,_[U])){Fe=U;break}Fe===void 0?Ne(de,H,V,!0):(Ve[Fe-He]=G+1,Fe>=pt?pt=Fe:Je=!0,F(de,_[Fe],w,null,H,V,ae,te,Q),O++)}const Vt=Je?Gf(Ve):Io;for(U=Vt.length-1,G=xe-1;G>=0;G--){const de=He+G,Fe=_[de],Nt=_[de+1],qn=de+1{const{el:V,type:ae,transition:te,children:Q,shapeFlag:G}=y;if(G&6){be(y.component.subTree,_,w,K);return}if(G&128){y.suspense.move(_,w,K);return}if(G&64){ae.move(y,_,w,ut);return}if(ae===ue){l(V,_,w);for(let oe=0;oete.enter(V),H));else{const{leave:oe,delayLeave:ke,afterLeave:Ce}=te,He=()=>{y.ctx.isUnmounted?u(V):l(V,_,w)},et=()=>{const U=V._isLeaving||!!V[Pn];V._isLeaving&&V[Pn](!0),te.persisted&&!U?He():oe(V,()=>{He(),Ce&&Ce()})};ke?ke(V,He,et):et()}else l(V,_,w)},Ne=(y,_,w,K=!1,H=!1)=>{const{type:V,props:ae,ref:te,children:Q,dynamicChildren:G,shapeFlag:me,patchFlag:oe,dirs:ke,cacheIndex:Ce,memo:He}=y;if(oe===-2&&(H=!1),te!=null&&(Kn(),Ps(te,null,w,y,!0),Gn()),Ce!=null&&(_.renderCache[Ce]=void 0),me&256){_.ctx.deactivate(y);return}const et=me&1&&ke,U=!Do(y);let O;if(U&&(O=ae&&ae.onVnodeBeforeUnmount)&&Un(O,_,y),me&6)Ze(y.component,w,K);else{if(me&128){y.suspense.unmount(w,K);return}et&&to(y,null,_,"beforeUnmount"),me&64?y.type.remove(y,_,w,ut,K):G&&!G.hasOnce&&(V!==ue||oe>0&&oe&64)?Y(G,_,w,!1,!0):(V===ue&&oe&384||!H&&me&16)&&Y(Q,_,w),K&&dt(y)}const xe=He!=null&&Ce==null;(U&&(O=ae&&ae.onVnodeUnmounted)||et||xe)&&Jt(()=>{O&&Un(O,_,y),et&&to(y,null,_,"unmounted"),xe&&(y.el=null)},w)},dt=y=>{const{type:_,el:w,anchor:K,transition:H}=y;if(_===ue){at(w,K);return}if(_===ur){fe(y);return}const V=()=>{u(w),H&&!H.persisted&&H.afterLeave&&H.afterLeave()};if(y.shapeFlag&1&&H&&!H.persisted){const{leave:ae,delayLeave:te}=H,Q=()=>ae(w,V);te?te(y.el,V,Q):Q()}else V()},at=(y,_)=>{let w;for(;y!==_;)w=R(y),u(y),y=w;u(_)},Ze=(y,_,w)=>{const{bum:K,scope:H,job:V,subTree:ae,um:te,m:Q,a:G}=y;$l(Q),$l(G),K&&ha(K),H.stop(),V&&(V.flags|=8,Ne(ae,y,_,w)),te&&Jt(te,_),Jt(()=>{y.isUnmounted=!0},_)},Y=(y,_,w,K=!1,H=!1,V=0)=>{for(let ae=V;ae{if(y.shapeFlag&6)return A(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const _=R(y.anchor||y.el),w=_&&_[Qu];return w?R(w):_};let z=!1;const gt=(y,_,w)=>{let K;y==null?_._vnode&&(Ne(_._vnode,null,null,!0),K=_._vnode.component):F(_._vnode||null,y,_,null,null,null,w),_._vnode=y,z||(z=!0,wl(K),Ku(),z=!1)},ut={p:F,um:Ne,m:be,r:dt,mt:ie,mc:Ge,pc:se,pbc:ye,n:A,o:t};return{render:gt,hydrate:void 0,createApp:Ef(gt)}}function lr({type:t,props:i},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&i&&i.encoding&&i.encoding.includes("html")?void 0:s}function no({effect:t,job:i},s){s?(t.flags|=32,i.flags|=4):(t.flags&=-33,i.flags&=-5)}function Kf(t,i){return(!t||t&&!t.pendingBranch)&&i&&!i.persisted}function Wr(t,i,s=!1){const l=t.children,u=i.children;if(De(l)&&De(u))for(let d=0;d>1,t[s[v]]0&&(i[l]=s[d-1]),s[d]=l)}}for(d=s.length,h=s[d-1];d-- >0;)s[d]=h,h=i[h];return s}function kc(t){const i=t.subTree.component;if(i)return i.asyncDep&&!i.asyncResolved?i:kc(i)}function $l(t){if(t)for(let i=0;it.__isSuspense;function qf(t,i){i&&i.pendingBranch?De(t)?i.effects.push(...t):i.effects.push(t):ef(t)}const ue=Symbol.for("v-fgt"),Da=Symbol.for("v-txt"),Wt=Symbol.for("v-cmt"),ur=Symbol.for("v-stc"),Ls=[];let mn=null;function p(t=!1){Ls.push(mn=t?null:[])}function Yf(){Ls.pop(),mn=Ls[Ls.length-1]||null}let zs=1;function ya(t,i=!1){zs+=t,t<0&&mn&&i&&(mn.hasOnce=!0)}function Pc(t){return t.dynamicChildren=zs>0?mn||Io:null,Yf(),zs>0&&mn&&mn.push(t),t}function g(t,i,s,l,u,d){return Pc(r(t,i,s,l,u,d,!0))}function lt(t,i,s,l,u){return Pc(E(t,i,s,l,u,!0))}function Is(t){return t?t.__v_isVNode===!0:!1}function ro(t,i){return t.type===i.type&&t.key===i.key}const Cc=({key:t})=>t??null,pa=({ref:t,ref_key:i,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?St(t)||Gt(t)||Ye(t)?{i:Kt,r:t,k:i,f:!!s}:t:null);function r(t,i=null,s=null,l=0,u=null,d=t===ue?0:1,h=!1,v=!1){const b={__v_isVNode:!0,__v_skip:!0,type:t,props:i,key:i&&Cc(i),ref:i&&pa(i),scopeId:qu,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:l,dynamicProps:u,dynamicChildren:null,appContext:null,ctx:Kt};return v?(xa(b,s),d&128&&t.normalize(b)):s&&(b.shapeFlag|=St(s)?8:16),zs>0&&!h&&mn&&(b.patchFlag>0||d&6)&&b.patchFlag!==32&&mn.push(b),b}const E=Jf;function Jf(t,i=null,s=null,l=0,u=null,d=!1){if((!t||t===wf)&&(t=Wt),Is(t)){const v=Ii(t,i,!0);return s&&xa(v,s),zs>0&&!d&&mn&&(v.shapeFlag&6?mn[mn.indexOf(t)]=v:mn.push(v)),v.patchFlag=-2,v}if(rh(t)&&(t=t.__vccOpts),i){i=Xf(i);let{class:v,style:b}=i;v&&!St(v)&&(i.class=Ee(v)),ht(b)&&(Vr(b)&&!De(b)&&(b=$t({},b)),i.style=Bo(b))}const h=St(t)?1:Tc(t)?128:ec(t)?64:ht(t)?4:Ye(t)?2:0;return r(t,i,s,l,u,h,d,!0)}function Xf(t){return t?Vr(t)||vc(t)?$t({},t):t:null}function Ii(t,i,s=!1,l=!1){const{props:u,ref:d,patchFlag:h,children:v,transition:b}=t,C=i?Qf(u||{},i):u,T={__v_isVNode:!0,__v_skip:!0,type:t.type,props:C,key:C&&Cc(C),ref:i&&i.ref?s&&d?De(d)?d.concat(pa(i)):[d,pa(i)]:pa(i):d,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:v,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:i&&t.type!==ue?h===-1?16:h|16:h,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:b,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ii(t.ssContent),ssFallback:t.ssFallback&&Ii(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return b&&l&&Os(T,b.clone(T)),T}function $(t=" ",i=0){return E(Da,null,t,i)}function D(t="",i=!1){return i?(p(),lt(Wt,null,t)):E(Wt,null,t)}function Hn(t){return t==null||typeof t=="boolean"?E(Wt):De(t)?E(ue,null,t.slice()):Is(t)?li(t):E(Da,null,String(t))}function li(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ii(t)}function xa(t,i){let s=0;const{shapeFlag:l}=t;if(i==null)i=null;else if(De(i))s=16;else if(typeof i=="object")if(l&65){const u=i.default;u&&(u._c&&(u._d=!1),xa(t,u()),u._c&&(u._d=!0));return}else{s=32;const u=i._;!u&&!vc(i)?i._ctx=Kt:u===3&&Kt&&(Kt.slots._===1?i._=1:(i._=2,t.patchFlag|=1024))}else if(Ye(i)){if(l&65){xa(t,{default:i});return}i={default:i,_ctx:Kt},s=32}else i=String(i),l&64?(s=16,i=[$(i)]):s=8;t.children=i,t.shapeFlag|=s}function Qf(...t){const i={};for(let s=0;sQt||Kt;let wa,Cr;{const t=Ea(),i=(s,l)=>{let u;return(u=t[s])||(u=t[s]=[]),u.push(l),d=>{u.length>1?u.forEach(h=>h(d)):u[0](d)}};wa=i("__VUE_INSTANCE_SETTERS__",s=>Qt=s),Cr=i("__VUE_SSR_SETTERS__",s=>$s=s)}const Rs=t=>{const i=Qt;return wa(t),t.scope.on(),()=>{t.scope.off(),wa(i)}},Nl=()=>{Qt&&Qt.scope.off(),wa(null)};function Mc(t){return t.vnode.shapeFlag&4}let $s=!1;function ih(t,i=!1,s=!1){i&&Cr(i);const{props:l,children:u}=t.vnode,d=Mc(t);Rf(t,l,d,i),Zf(t,u,s||i);const h=d?oh(t,i):void 0;return i&&Cr(!1),h}function oh(t,i){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Sf);const{setup:l}=s;if(l){Kn();const u=t.setupContext=l.length>1?ah(t):null,d=Rs(t),h=Fs(l,t,0,[t.props,u]),v=xu(h);if(Gn(),d(),(v||t.sp)&&!Do(t)&&ac(t),v){if(h.then(Nl,Nl),i)return h.then(b=>{Dl(t,b)}).catch(b=>{za(b,t,0)});t.asyncDep=h}else Dl(t,h)}else Ac(t)}function Dl(t,i,s){Ye(i)?t.type.__ssrInlineRender?t.ssrRender=i:t.render=i:ht(i)&&(t.setupState=Zu(i)),Ac(t)}function Ac(t,i,s){const l=t.type;t.render||(t.render=l.render||Wn);{const u=Rs(t);Kn();try{Tf(t)}finally{Gn(),u()}}}const sh={get(t,i){return jt(t,"get",""),t[i]}};function ah(t){const i=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,sh),slots:t.slots,emit:t.emit,expose:i}}function Fa(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Zu(Hd(t.exposed)),{get(i,s){if(s in i)return i[s];if(s in Cs)return Cs[s](t)},has(i,s){return s in i||s in Cs}})):t.proxy}function rh(t){return Ye(t)&&"__vccOpts"in t}const we=(t,i)=>qd(t,i,$s);function lh(t,i,s){try{ya(-1);const l=arguments.length;return l===2?ht(i)&&!De(i)?Is(i)?E(t,null,[i]):E(t,i):E(t,null,i):(l>3?s=Array.prototype.slice.call(arguments,2):l===3&&Is(s)&&(s=[s]),E(t,i,s))}finally{ya(1)}}const uh="3.5.39";/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Lr;const Fl=typeof window<"u"&&window.trustedTypes;if(Fl)try{Lr=Fl.createPolicy("vue",{createHTML:t=>t})}catch{}const Ec=Lr?t=>Lr.createHTML(t):t=>t,ch="http://www.w3.org/2000/svg",dh="http://www.w3.org/1998/Math/MathML",ri=typeof document<"u"?document:null,Rl=ri&&ri.createElement("template"),fh={insert:(t,i,s)=>{i.insertBefore(t,s||null)},remove:t=>{const i=t.parentNode;i&&i.removeChild(t)},createElement:(t,i,s,l)=>{const u=i==="svg"?ri.createElementNS(ch,t):i==="mathml"?ri.createElementNS(dh,t):s?ri.createElement(t,{is:s}):ri.createElement(t);return t==="select"&&l&&l.multiple!=null&&u.setAttribute("multiple",l.multiple),u},createText:t=>ri.createTextNode(t),createComment:t=>ri.createComment(t),setText:(t,i)=>{t.nodeValue=i},setElementText:(t,i)=>{t.textContent=i},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ri.querySelector(t),setScopeId(t,i){t.setAttribute(i,"")},insertStaticContent(t,i,s,l,u,d){const h=s?s.previousSibling:i.lastChild;if(u&&(u===d||u.nextSibling))for(;i.insertBefore(u.cloneNode(!0),s),!(u===d||!(u=u.nextSibling)););else{Rl.innerHTML=Ec(l==="svg"?`${t}`:l==="mathml"?`${t}`:t);const v=Rl.content;if(l==="svg"||l==="mathml"){const b=v.firstChild;for(;b.firstChild;)v.appendChild(b.firstChild);v.removeChild(b)}i.insertBefore(v,s)}return[h?h.nextSibling:i.firstChild,s?s.previousSibling:i.lastChild]}},Mi="transition",gs="animation",Ns=Symbol("_vtc"),Oc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hh=$t({},tc,Oc),ph=t=>(t.displayName="Transition",t.props=hh,t),mh=ph((t,{slots:i})=>lh(df,gh(t),i)),io=(t,i=[])=>{De(t)?t.forEach(s=>s(...i)):t&&t(...i)},Bl=t=>t?De(t)?t.some(i=>i.length>1):t.length>1:!1;function gh(t){const i={};for(const ne in t)ne in Oc||(i[ne]=t[ne]);if(t.css===!1)return i;const{name:s="v",type:l,duration:u,enterFromClass:d=`${s}-enter-from`,enterActiveClass:h=`${s}-enter-active`,enterToClass:v=`${s}-enter-to`,appearFromClass:b=d,appearActiveClass:C=h,appearToClass:T=v,leaveFromClass:M=`${s}-leave-from`,leaveActiveClass:R=`${s}-leave-active`,leaveToClass:B=`${s}-leave-to`}=t,Z=vh(u),F=Z&&Z[0],he=Z&&Z[1],{onBeforeEnter:pe,onEnter:q,onEnterCancelled:Te,onLeave:fe,onLeaveCancelled:Ue,onBeforeAppear:$e=pe,onAppear:Ie=q,onAppearCancelled:Ge=Te}=i,_e=(ne,je,ie,We)=>{ne._enterCancelled=We,oo(ne,je?T:v),oo(ne,je?C:h),ie&&ie()},ye=(ne,je)=>{ne._isLeaving=!1,oo(ne,M),oo(ne,B),oo(ne,R),je&&je()},ze=ne=>(je,ie)=>{const We=ne?Ie:q,le=()=>_e(je,ne,ie);io(We,[je,le]),Ul(()=>{oo(je,ne?b:d),ai(je,ne?T:v),Bl(We)||Vl(je,l,F,le)})};return $t(i,{onBeforeEnter(ne){io(pe,[ne]),ai(ne,d),ai(ne,h)},onBeforeAppear(ne){io($e,[ne]),ai(ne,b),ai(ne,C)},onEnter:ze(!1),onAppear:ze(!0),onLeave(ne,je){ne._isLeaving=!0;const ie=()=>ye(ne,je);ai(ne,M),ne._enterCancelled?(ai(ne,R),jl(ne)):(jl(ne),ai(ne,R)),Ul(()=>{ne._isLeaving&&(oo(ne,M),ai(ne,B),Bl(fe)||Vl(ne,l,he,ie))}),io(fe,[ne,ie])},onEnterCancelled(ne){_e(ne,!1,void 0,!0),io(Te,[ne])},onAppearCancelled(ne){_e(ne,!0,void 0,!0),io(Ge,[ne])},onLeaveCancelled(ne){ye(ne),io(Ue,[ne])}})}function vh(t){if(t==null)return null;if(ht(t))return[cr(t.enter),cr(t.leave)];{const i=cr(t);return[i,i]}}function cr(t){return gd(t)}function ai(t,i){i.split(/\s+/).forEach(s=>s&&t.classList.add(s)),(t[Ns]||(t[Ns]=new Set)).add(i)}function oo(t,i){i.split(/\s+/).forEach(l=>l&&t.classList.remove(l));const s=t[Ns];s&&(s.delete(i),s.size||(t[Ns]=void 0))}function Ul(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let _h=0;function Vl(t,i,s,l){const u=t._endId=++_h,d=()=>{u===t._endId&&l()};if(s!=null)return setTimeout(d,s);const{type:h,timeout:v,propCount:b}=bh(t,i);if(!h)return l();const C=h+"end";let T=0;const M=()=>{t.removeEventListener(C,R),d()},R=B=>{B.target===t&&++T>=b&&M()};setTimeout(()=>{T(s[Z]||"").split(", "),u=l(`${Mi}Delay`),d=l(`${Mi}Duration`),h=Zl(u,d),v=l(`${gs}Delay`),b=l(`${gs}Duration`),C=Zl(v,b);let T=null,M=0,R=0;i===Mi?h>0&&(T=Mi,M=h,R=d.length):i===gs?C>0&&(T=gs,M=C,R=b.length):(M=Math.max(h,C),T=M>0?h>C?Mi:gs:null,R=T?T===Mi?d.length:b.length:0);const B=T===Mi&&/\b(?:transform|all)(?:,|$)/.test(l(`${Mi}Property`).toString());return{type:T,timeout:M,propCount:R,hasTransform:B}}function Zl(t,i){for(;t.lengthHl(s)+Hl(t[l])))}function Hl(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function jl(t){return(t?t.ownerDocument:document).body.offsetHeight}function yh(t,i,s){const l=t[Ns];l&&(i=(i?[i,...l]:[...l]).join(" ")),i==null?t.removeAttribute("class"):s?t.setAttribute("class",i):t.className=i}const ka=Symbol("_vod"),zc=Symbol("_vsh"),xh={name:"show",beforeMount(t,{value:i},{transition:s}){t[ka]=t.style.display==="none"?"":t.style.display,s&&i?s.beforeEnter(t):vs(t,i)},mounted(t,{value:i},{transition:s}){s&&i&&s.enter(t)},updated(t,{value:i,oldValue:s},{transition:l}){!i!=!s&&(l?i?(l.beforeEnter(t),vs(t,!0),l.enter(t)):l.leave(t,()=>{vs(t,!1)}):vs(t,i))},beforeUnmount(t,{value:i}){vs(t,i)}};function vs(t,i){t.style.display=i?t[ka]:"none",t[zc]=!i}const wh=Symbol(""),kh=/(?:^|;)\s*display\s*:/;function Sh(t,i,s){const l=t.style,u=St(s);let d=!1;if(s&&!u){if(i)if(St(i))for(const h of i.split(";")){const v=h.slice(0,h.indexOf(":")).trim();s[v]==null&&ys(l,v,"")}else for(const h in i)s[h]==null&&ys(l,h,"");for(const h in s){h==="display"&&(d=!0);const v=s[h];v!=null?Ph(t,h,!St(i)&&i?i[h]:void 0,v)||ys(l,h,v):ys(l,h,"")}}else if(u){if(i!==s){const h=l[wh];h&&(s+=";"+h),l.cssText=s,d=kh.test(s)}}else i&&t.removeAttribute("style");ka in t&&(t[ka]=d?l.display:"",t[zc]&&(l.display="none"))}const Wl=/\s*!important$/;function ys(t,i,s){if(De(s))s.forEach(l=>ys(t,i,l));else if(s==null&&(s=""),i.startsWith("--"))t.setProperty(i,s);else{const l=Th(t,i);Wl.test(s)?t.setProperty(Ni(l),s.replace(Wl,""),"important"):t[l]=s}}const Kl=["Webkit","Moz","ms"],dr={};function Th(t,i){const s=dr[i];if(s)return s;let l=In(i);if(l!=="filter"&&l in t)return dr[i]=l;l=Su(l);for(let u=0;ufr||(Oh.then(()=>fr=0),fr=Date.now());function Ih(t,i){const s=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=s.attached)return;const u=s.value;if(De(u)){const d=l.stopImmediatePropagation;l.stopImmediatePropagation=()=>{d.call(l),l._stopped=!0};const h=u.slice(),v=[l];for(let b=0;bt.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,$h=(t,i,s,l,u,d)=>{const h=u==="svg";i==="class"?yh(t,l,h):i==="style"?Sh(t,s,l):Ca(i)?La(i)||Lh(t,i,s,l,d):(i[0]==="."?(i=i.slice(1),!0):i[0]==="^"?(i=i.slice(1),!1):Nh(t,i,l,h))?(Yl(t,i,l),!t.tagName.includes("-")&&(i==="value"||i==="checked"||i==="selected")&&ql(t,i,l,h,d,i!=="value")):t._isVueCE&&(Dh(t,i)||t._def.__asyncLoader&&(/[A-Z]/.test(i)||!St(l)))?Yl(t,In(i),l,d,i):(i==="true-value"?t._trueValue=l:i==="false-value"&&(t._falseValue=l),ql(t,i,l,h))};function Nh(t,i,s,l){if(l)return!!(i==="innerHTML"||i==="textContent"||i in t&&Xl(i)&&Ye(s));if(i==="spellcheck"||i==="draggable"||i==="translate"||i==="autocorrect"||i==="sandbox"&&t.tagName==="IFRAME"||i==="form"||i==="list"&&t.tagName==="INPUT"||i==="type"&&t.tagName==="TEXTAREA")return!1;if(i==="width"||i==="height"){const u=t.tagName;if(u==="IMG"||u==="VIDEO"||u==="CANVAS"||u==="SOURCE")return!1}return Xl(i)&&St(s)?!1:i in t}function Dh(t,i){const s=t._def.props;if(!s)return!1;const l=In(i);return Array.isArray(s)?s.some(u=>In(u)===l):Object.keys(s).some(u=>In(u)===l)}const $i=t=>{const i=t.props["onUpdate:modelValue"]||!1;return De(i)?s=>ha(i,s):i};function Fh(t){t.target.composing=!0}function Ql(t){const i=t.target;i.composing&&(i.composing=!1,i.dispatchEvent(new Event("input")))}const Ln=Symbol("_assign");function eu(t,i,s){return i&&(t=t.trim()),s&&(t=Aa(t)),t}const Se={created(t,{modifiers:{lazy:i,trim:s,number:l}},u){t[Ln]=$i(u);const d=l||u.props&&u.props.type==="number";di(t,i?"change":"input",h=>{h.target.composing||t[Ln](eu(t.value,s,d))}),(s||d)&&di(t,"change",()=>{t.value=eu(t.value,s,d)}),i||(di(t,"compositionstart",Fh),di(t,"compositionend",Ql),di(t,"change",Ql))},mounted(t,{value:i}){t.value=i??""},beforeUpdate(t,{value:i,oldValue:s,modifiers:{lazy:l,trim:u,number:d}},h){if(t[Ln]=$i(h),t.composing)return;const v=(d||t.type==="number")&&!/^0\d/.test(t.value)?Aa(t.value):t.value,b=i??"";if(v===b)return;const C=t.getRootNode();(C instanceof Document||C instanceof ShadowRoot)&&C.activeElement===t&&t.type!=="range"&&(l&&i===s||u&&t.value.trim()===b)||(t.value=b)}},Sa={deep:!0,created(t,i,s){t[Ln]=$i(s),di(t,"change",()=>{const l=t._modelValue,u=Vo(t),d=t.checked,h=t[Ln];if(De(l)){const v=$r(l,u),b=v!==-1;if(d&&!b)h(l.concat(u));else if(!d&&b){const C=[...l];C.splice(v,1),h(C)}}else if(Zo(l)){const v=new Set(l);d?v.add(u):v.delete(u),h(v)}else h(Ic(t,d))})},mounted:tu,beforeUpdate(t,i,s){t[Ln]=$i(s),tu(t,i,s)}};function tu(t,{value:i,oldValue:s},l){t._modelValue=i;let u;if(De(i))u=$r(i,l.props.value)>-1;else if(Zo(i))u=i.has(l.props.value);else{if(i===s)return;u=zi(i,Ic(t,!0))}t.checked!==u&&(t.checked=u)}const Rh={created(t,{value:i},s){t.checked=zi(i,s.props.value),t[Ln]=$i(s),di(t,"change",()=>{t[Ln](Vo(t))})},beforeUpdate(t,{value:i,oldValue:s},l){t[Ln]=$i(l),i!==s&&(t.checked=zi(i,l.props.value))}},Mt={deep:!0,created(t,{value:i,modifiers:{number:s}},l){const u=Zo(i);di(t,"change",()=>{const d=Array.prototype.filter.call(t.options,h=>h.selected).map(h=>s?Aa(Vo(h)):Vo(h));t[Ln](t.multiple?u?new Set(d):d:d[0]),t._assigning=!0,ju(()=>{t._assigning=!1})}),t[Ln]=$i(l)},mounted(t,{value:i}){nu(t,i)},beforeUpdate(t,i,s){t[Ln]=$i(s)},updated(t,{value:i}){t._assigning||nu(t,i)}};function nu(t,i){const s=t.multiple,l=De(i);if(!(s&&!l&&!Zo(i))){for(let u=0,d=t.options.length;uString(C)===String(v)):h.selected=$r(i,v)>-1}else h.selected=i.has(v);else if(zi(Vo(h),i)){t.selectedIndex!==u&&(t.selectedIndex=u);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Vo(t){return"_value"in t?t._value:t.value}function Ic(t,i){const s=i?"_trueValue":"_falseValue";return s in t?t[s]:i}const Bh={created(t,i,s){da(t,i,s,null,"created")},mounted(t,i,s){da(t,i,s,null,"mounted")},beforeUpdate(t,i,s,l){da(t,i,s,l,"beforeUpdate")},updated(t,i,s,l){da(t,i,s,l,"updated")}};function Uh(t,i){switch(t){case"SELECT":return Mt;case"TEXTAREA":return Se;default:switch(i){case"checkbox":return Sa;case"radio":return Rh;default:return Se}}}function da(t,i,s,l,u){const h=Uh(t.tagName,s.props&&s.props.type)[u];h&&h(t,i,s,l)}const Vh=["ctrl","shift","alt","meta"],Zh={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,i)=>Vh.some(s=>t[`${s}Key`]&&!i.includes(s))},Kr=(t,i)=>{if(!t)return t;const s=t._withMods||(t._withMods={}),l=i.join(".");return s[l]||(s[l]=((u,...d)=>{for(let h=0;h{const s=t._withKeys||(t._withKeys={}),l=i.join(".");return s[l]||(s[l]=(u=>{if(!("key"in u))return;const d=Ni(u.key);if(i.some(h=>h===d||Hh[h]===d))return t(u)}))},jh=$t({patchProp:$h},fh);let ou;function Wh(){return ou||(ou=jf(jh))}const Kh=((...t)=>{const i=Wh().createApp(...t),{mount:s}=i;return i.mount=l=>{const u=qh(l);if(!u)return;const d=i._component;!Ye(d)&&!d.render&&!d.template&&(d.template=u.innerHTML),u.nodeType===1&&(u.textContent="");const h=s(u,!1,Gh(u));return u instanceof Element&&(u.removeAttribute("v-cloak"),u.setAttribute("data-v-app","")),h},i});function Gh(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function qh(t){return St(t)?document.querySelector(t):t}const $c="pv_theme",su={light:"#EEF0F3",dark:"#0B1730"},Ta=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;function Nc(){return Ta&&Ta.matches?"dark":"light"}function Yh(){try{return localStorage.getItem($c)||"light"}catch{return"light"}}function Dc(t){return t==="system"?Nc():t}function Fc(t){const i=document.documentElement;i.setAttribute("data-theme",t),i.style.backgroundColor=su[t]||su.light}const co=W(Yh()),Ro=W(Dc(co.value));function Pa(t){co.value=t;const i=Dc(t);Ro.value=i,Fc(i);try{localStorage.setItem($c,t)}catch{}}function au(){Pa(Ro.value==="dark"?"light":"dark")}Ta&&Ta.addEventListener("change",()=>{if(co.value==="system"){const t=Nc();Ro.value=t,Fc(t)}});async function Jh(){try{const t=await fetch("/bff/config");return t.ok?await t.json():{apiBase:""}}catch{return{apiBase:""}}}async function ru(){try{const t=await fetch("/bff/me");return t.ok?await t.json():null}catch{return null}}async function Xh(t,i,s){const l=await fetch("/bff/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:i,apiBase:s})});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Qh(){try{await fetch("/bff/logout",{method:"POST"})}catch{}}async function ep(){try{const t=await fetch("/bff/devices");return t.ok?await t.json():[]}catch{return[]}}async function tp(){try{const t=await fetch("/bff/users");return t.ok?{ok:!0,status:200,users:(await t.json()).users||[]}:{ok:!1,status:t.status,users:[]}}catch{return{ok:!1,status:0,users:[]}}}async function np(t,i,s,l){const u=await fetch("/bff/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:i,role:s,organization:l})});return{ok:u.ok,status:u.status,body:await u.json().catch(()=>({}))}}async function ip(t,i){const s=await fetch(`/bff/users/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function op(t){const i=await fetch(`/bff/users/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function sp(){try{const t=await fetch("/bff/orgs");return t.ok?{ok:!0,status:200,organizations:(await t.json()).organizations||[]}:{ok:!1,status:t.status,organizations:[]}}catch{return{ok:!1,status:0,organizations:[]}}}async function ap(t){const i=await fetch("/bff/orgs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function rp(t,i){const s=await fetch(`/bff/orgs/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function lp(t){const i=await fetch(`/bff/orgs/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function up(){try{const t=await fetch("/bff/preferences");if(!t.ok)return null;const i=await t.json();return i&&typeof i.preferences=="object"?i.preferences:null}catch{return null}}async function cp(t){try{return(await fetch("/bff/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:t})})).ok}catch{return!1}}async function dp(){try{const t=await fetch("/bff/integrations/opensky");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function lu(t){const i=await fetch("/bff/integrations/opensky",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function fp(){const t=await fetch("/bff/integrations/opensky/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function hp(t){try{const i=t?`?bbox=${encodeURIComponent(t)}`:"",s=await fetch(`/bff/integrations/opensky/states${i}`);if(!s.ok)return{states:[],unavailable:!0,detail:"OpenSky unavailable"};const l=await s.json();return{states:l.states||[],time:l.time,unavailable:!!l.unavailable,detail:l.detail||"",plan:l.plan||"",recommendedInterval:l.recommendedInterval||0}}catch{return{states:[],unavailable:!0,detail:"OpenSky unavailable"}}}async function pp(){try{const t=await fetch("/bff/integrations/filetransfer");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function uu(t){const i=await fetch("/bff/integrations/filetransfer",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function mp(){const t=await fetch("/bff/integrations/filetransfer/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function gp(){try{const t=await fetch("/bff/integrations/localstorage");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function fa(t){const i=await fetch("/bff/integrations/localstorage",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function vp(){const t=await fetch("/bff/integrations/localstorage/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function _p(){try{const t=await fetch("/bff/integrations/webdav");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function cu(t){const i=await fetch("/bff/integrations/webdav",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function bp(){const t=await fetch("/bff/integrations/webdav/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function Rc(){try{const t=await fetch("/bff/drones");return t.ok?{ok:!0,status:200,drones:(await t.json()).drones||[]}:{ok:!1,status:t.status,drones:[]}}catch{return{ok:!1,status:0,drones:[]}}}async function yp(t){const i=await fetch("/bff/drones",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function xp(t,i){const s=await fetch(`/bff/drones/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function wp(t){const i=await fetch(`/bff/drones/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function kp(){try{const t=await fetch("/bff/flights");return t.ok?{ok:!0,status:200,flights:(await t.json()).flights||[]}:{ok:!1,status:t.status,flights:[]}}catch{return{ok:!1,status:0,flights:[]}}}async function Sp(t){const i=await fetch("/bff/flights",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Tp(t,i){const s=await fetch(`/bff/flights/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function Pp(t){const i=await fetch(`/bff/flights/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}function Cp(){return"/bff/logbook/export"}async function Lp(t){try{const i=t!=null&&t!==""?`?expiring=${encodeURIComponent(t)}`:"",s=await fetch(`/bff/documents${i}`);return s.ok?{ok:!0,status:200,documents:(await s.json()).documents||[]}:{ok:!1,status:s.status,documents:[]}}catch{return{ok:!1,status:0,documents:[]}}}async function Mp(t,i){const s=new FormData;Object.entries(t).forEach(([u,d])=>{d!=null&&d!==""&&s.append(u,d)}),i&&s.append("file",i);const l=await fetch("/bff/documents",{method:"POST",body:s});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Ap(t,i){const s=await fetch(`/bff/documents/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function Ep(t){const i=await fetch(`/bff/documents/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}function hr(t){return`/bff/documents/${encodeURIComponent(t)}/file`}function Op(t){return`/bff/documents/${encodeURIComponent(t)}/file?inline=1`}async function zp(t,i,s){const l=await fetch(`/bff/devices/${encodeURIComponent(t)}/command`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:i,payload:s})});return{ok:l.ok,body:await l.json().catch(()=>({}))}}const Bc="pv_prefs",Mr={name:"",username:"",displayName:"",bio:"",avatar:"",showEmail:!1,fontSize:"md",language:"en",region:"US",dateFormat:"MDY",timeFormat:"24",reduceMotion:!1,showAirTraffic:!0,autoBbox:!0,airTrafficInterval:"auto",twoFactor:!1};function Ip(){try{return{...Mr,...JSON.parse(localStorage.getItem(Bc)||"{}")||{}}}catch{return{...Mr}}}const ve=kt(Ip());function Uc(){try{localStorage.setItem(Bc,JSON.stringify(ve))}catch{}}function Vc(t){if(!t||typeof t!="object")return!1;for(const i of Object.keys(Mr))i in t&&(ve[i]=t[i]);return!0}const $p={sm:15,md:16,lg:18};function Gr(t){document.documentElement.style.fontSize=($p[t]||16)+"px"}function qr(t){document.documentElement.classList.toggle("reduce-motion",!!t)}function Zc(t){const i=new Date(t),s=i.getFullYear(),l=String(i.getMonth()+1).padStart(2,"0"),u=String(i.getDate()).padStart(2,"0");let d;switch(ve.dateFormat){case"DMY":d=`${u}/${l}/${s}`;break;case"YMD":d=`${s}/${l}/${u}`;break;case"ISO":d=`${s}-${l}-${u}`;break;default:d=`${l}/${u}/${s}`}let h;return ve.timeFormat==="12"?h=i.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):h=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}:${String(i.getSeconds()).padStart(2,"0")}`,{date:d,time:h}}function du(t){return Zc(t).time}function fu(t){const i=Zc(t);return`${i.date} ${i.time}`}let Yr=!1,Ar=!1,Er=null;function Np(){return{...JSON.parse(JSON.stringify(ve)),themeMode:co.value}}function Jr(){!Yr||Ar||(clearTimeout(Er),Er=setTimeout(()=>{cp(Np())},600))}function Dp(t){Ar=!0;try{Vc(t),t.themeMode&&Pa(t.themeMode),Gr(ve.fontSize),qr(ve.reduceMotion),Uc()}finally{Ar=!1}}async function hu(){Yr=!0;const t=await up();t&&Object.keys(t).length?Dp(t):Jr()}function Fp(){Yr=!1,clearTimeout(Er)}It(ve,()=>{Uc(),Jr()},{deep:!0});It(co,Jr);It(()=>ve.fontSize,Gr,{immediate:!0});It(()=>ve.reduceMotion,qr,{immediate:!0});const Rp=["width","height"],Hc={__name:"BrandMark",props:{size:{type:[Number,String],default:28}},setup(t){return(i,s)=>(p(),g("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},[...s[0]||(s[0]=[r("g",{"stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},[r("polyline",{points:"8,30 19,17 30,30",stroke:"var(--accent)"}),r("polyline",{points:"18,33 29,20 40,33",stroke:"currentColor"})],-1)])],8,Rp))}},Bp=["title","aria-label"],Up={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Vp={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Zp={__name:"ThemeToggle",setup(t){return(i,s)=>(p(),g("button",{class:"btn-icon",type:"button",title:Oe(Ro)==="dark"?"Switch to light":"Switch to dark","aria-label":Oe(Ro)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:s[0]||(s[0]=(...l)=>Oe(au)&&Oe(au)(...l))},[Oe(Ro)==="dark"?(p(),g("svg",Up,[...s[1]||(s[1]=[r("circle",{cx:"12",cy:"12",r:"4"},null,-1),r("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(p(),g("svg",Vp,[...s[2]||(s[2]=[r("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z"},null,-1)])]))],8,Bp))}},Hp={class:"relative grid h-full place-items-center p-5"},jp={class:"absolute right-5 top-5"},Wp={class:"mb-6 flex items-center gap-3 text-ink"},Kp={class:"relative mb-1"},Gp=["type"],qp=["aria-label","title"],Yp={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Jp={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Xp={key:0,class:"mt-4"},Qp={key:1,class:"mt-4 rounded border border-line bg-danger-soft px-3 py-2 text-sm text-danger-fg"},em=["disabled"],tm={__name:"LoginView",props:{defaultApiBase:{type:String,default:""}},emits:["signed-in"],setup(t,{emit:i}){const s=t,l=i,u=W(""),d=W(""),h=W(localStorage.getItem("api_url")||s.defaultApiBase||"http://localhost:8080"),v=W(!1),b=W(!1),C=W(!1),T=W("");async function M(){C.value=!0,T.value="",localStorage.setItem("api_url",h.value.trim());const{ok:R,status:B,body:Z}=await Xh(u.value.trim(),d.value,h.value.trim());if(C.value=!1,R){l("signed-in",Z.email);return}T.value=B===400?"Invalid email or password.":B===502?"API server can't reach PocketBase.":Z.message||Z.error||"Cannot reach the API server."}return(R,B)=>(p(),g("div",Hp,[r("div",jp,[E(Zp)]),r("form",{class:"panel w-[380px] p-8 shadow-md",onSubmit:Kr(M,["prevent"])},[r("div",Wp,[E(Hc,{size:34}),B[5]||(B[5]=r("div",{class:"leading-tight"},[r("div",{class:"text-mode"},"PilotVault"),r("div",{class:"eyebrow mt-0.5"},"Control panel")],-1))]),B[9]||(B[9]=r("label",{class:"eyebrow mb-1.5 block"},"Email",-1)),re(r("input",{"onUpdate:modelValue":B[0]||(B[0]=Z=>u.value=Z),type:"email",autocomplete:"username",required:"",class:"field mb-4",placeholder:"you@example.com"},null,512),[[Se,u.value]]),B[10]||(B[10]=r("label",{class:"eyebrow mb-1.5 block"},"Password",-1)),r("div",Kp,[re(r("input",{"onUpdate:modelValue":B[1]||(B[1]=Z=>d.value=Z),type:b.value?"text":"password",autocomplete:"current-password",required:"",class:"field w-full pr-10",placeholder:"••••••••"},null,8,Gp),[[Bh,d.value]]),r("button",{type:"button",class:"absolute inset-y-0 right-0 grid w-10 place-items-center text-ink-muted transition hover:text-ink-secondary","aria-label":b.value?"Hide password":"Show password",title:b.value?"Hide password":"Show password",onClick:B[2]||(B[2]=Z=>b.value=!b.value)},[b.value?(p(),g("svg",Yp,[...B[6]||(B[6]=[r("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"},null,-1),r("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])])):(p(),g("svg",Jp,[...B[7]||(B[7]=[r("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},null,-1),r("circle",{cx:"12",cy:"12",r:"3"},null,-1)])]))],8,qp)]),v.value?(p(),g("div",Xp,[B[8]||(B[8]=r("label",{class:"eyebrow mb-1.5 block"},"API Server",-1)),re(r("input",{"onUpdate:modelValue":B[3]||(B[3]=Z=>h.value=Z),type:"text",class:"field font-mono",placeholder:"10.2.1.101:8080"},null,512),[[Se,h.value]])])):D("",!0),T.value?(p(),g("p",Qp,k(T.value),1)):D("",!0),r("button",{type:"submit",class:"btn-accent mt-6 w-full",disabled:C.value},k(C.value?"Signing in…":"Sign in"),9,em),r("button",{type:"button",class:"mx-auto mt-3 block text-xs text-ink-muted transition hover:text-ink-secondary",onClick:B[4]||(B[4]=Z=>v.value=!v.value)},k(v.value?"Hide server settings":"Server settings"),1)],32)]))}};function nm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xs={exports:{}};/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */var im=xs.exports,pu;function om(){return pu||(pu=1,(function(t,i){(function(s,l){l(i)})(im,(function(s){var l="1.9.4";function u(e){var n,o,a,c;for(o=1,a=arguments.length;o"u"||!L||!L.Mixin)){e=Te(e)?e:[e];for(var n=0;n0?Math.floor(e):Math.ceil(e)};se.prototype={clone:function(){return new se(this.x,this.y)},add:function(e){return this.clone()._add(ee(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(ee(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new se(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new se(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ot(this.x),this.y=ot(this.y),this},distanceTo:function(e){e=ee(e);var n=e.x-this.x,o=e.y-this.y;return Math.sqrt(n*n+o*o)},equals:function(e){return e=ee(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=ee(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+R(this.x)+", "+R(this.y)+")"}};function ee(e,n,o){return e instanceof se?e:Te(e)?new se(e[0],e[1]):e==null?e:typeof e=="object"&&"x"in e&&"y"in e?new se(e.x,e.y):new se(e,n,o)}function be(e,n){if(e)for(var o=n?[e,n]:e,a=0,c=o.length;a=this.min.x&&o.x<=this.max.x&&n.y>=this.min.y&&o.y<=this.max.y},intersects:function(e){e=Ne(e);var n=this.min,o=this.max,a=e.min,c=e.max,m=c.x>=n.x&&a.x<=o.x,P=c.y>=n.y&&a.y<=o.y;return m&&P},overlaps:function(e){e=Ne(e);var n=this.min,o=this.max,a=e.min,c=e.max,m=c.x>n.x&&a.xn.y&&a.y=n.lat&&c.lat<=o.lat&&a.lng>=n.lng&&c.lng<=o.lng},intersects:function(e){e=at(e);var n=this._southWest,o=this._northEast,a=e.getSouthWest(),c=e.getNorthEast(),m=c.lat>=n.lat&&a.lat<=o.lat,P=c.lng>=n.lng&&a.lng<=o.lng;return m&&P},overlaps:function(e){e=at(e);var n=this._southWest,o=this._northEast,a=e.getSouthWest(),c=e.getNorthEast(),m=c.lat>n.lat&&a.latn.lng&&a.lng1,vn=(function(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",M,n),window.removeEventListener("testPassiveEventSupport",M,n)}catch{}return e})(),ho=(function(){return!!document.createElement("canvas").getContext})(),Ot=!!(document.createElementNS&&K("svg").createSVGRect),en=!!Ot&&(function(){var e=document.createElement("div");return e.innerHTML="",(e.firstChild&&e.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Pt=!Ot&&(function(){try{var e=document.createElement("div");e.innerHTML='';var n=e.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}})(),Va=navigator.platform.indexOf("Mac")===0,Bs=navigator.platform.indexOf("Linux")===0;function tn(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Le={ie:ae,ielt9:te,edge:Q,webkit:G,android:me,android23:oe,androidStock:Ce,opera:He,chrome:et,gecko:U,safari:O,phantom:xe,opera12:Je,win:pt,ie3d:Ve,webkit3d:Vt,gecko3d:de,any3d:Fe,mobile:Nt,mobileWebkit:qn,mobileWebkit3d:fo,msPointer:gn,pointer:Yn,touch:Ba,touchNative:jo,mobileOpera:Wo,mobileGecko:Ko,retina:Ua,passiveEvents:vn,canvas:ho,svg:Ot,vml:Pt,inlineSvg:en,mac:Va,linux:Bs},Us=Le.msPointer?"MSPointerDown":"pointerdown",Vs=Le.msPointer?"MSPointerMove":"pointermove",Zs=Le.msPointer?"MSPointerUp":"pointerup",Go=Le.msPointer?"MSPointerCancel":"pointercancel",qo={touchstart:Us,touchmove:Vs,touchend:Zs,touchcancel:Go},Hs={touchstart:vi,touchmove:nn,touchend:nn,touchcancel:nn},mi={},rt=!1;function gi(e,n,o){return n==="touchstart"&&po(),Hs[n]?(o=Hs[n].bind(this,o),e.addEventListener(qo[n],o,!1),o):(console.warn("wrong event specified:",n),M)}function Yo(e,n,o){if(!qo[n]){console.warn("wrong event specified:",n);return}e.removeEventListener(qo[n],o,!1)}function Zt(e){mi[e.pointerId]=e}function Di(e){mi[e.pointerId]&&(mi[e.pointerId]=e)}function Fi(e){delete mi[e.pointerId]}function po(){rt||(document.addEventListener(Us,Zt,!0),document.addEventListener(Vs,Di,!0),document.addEventListener(Zs,Fi,!0),document.addEventListener(Go,Fi,!0),rt=!0)}function nn(e,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var o in mi)n.touches.push(mi[o]);n.changedTouches=[n],e(n)}}function vi(e,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Et(n),nn(e,n)}function Za(e){var n={},o,a;for(a in e)o=e[a],n[a]=o&&o.bind?o.bind(e):o;return e=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var Jo=200;function Xo(e,n){e.addEventListener("dblclick",n);var o=0,a;function c(m){if(m.detail!==1){a=m.detail;return}if(!(m.pointerType==="mouse"||m.sourceCapabilities&&!m.sourceCapabilities.firesTouchEvents)){var P=wo(m);if(!(P.some(function(N){return N instanceof HTMLLabelElement&&N.attributes.for})&&!P.some(function(N){return N instanceof HTMLInputElement||N instanceof HTMLSelectElement}))){var I=Date.now();I-o<=Jo?(a++,a===2&&n(Za(m))):a=1,o=I}}}return e.addEventListener("click",c),{dblclick:n,simDblclick:c}}function Ha(e,n){e.removeEventListener("dblclick",n.dblclick),e.removeEventListener("click",n.simDblclick)}var on=Fn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),sn=Fn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Jn=sn==="webkitTransition"||sn==="OTransition"?sn+"End":"transitionend";function cn(e){return typeof e=="string"?document.getElementById(e):e}function _i(e,n){var o=e.style[n]||e.currentStyle&&e.currentStyle[n];if((!o||o==="auto")&&document.defaultView){var a=document.defaultView.getComputedStyle(e,null);o=a?a[n]:null}return o==="auto"?null:o}function tt(e,n,o){var a=document.createElement(e);return a.className=n||"",o&&o.appendChild(a),a}function yt(e){var n=e.parentNode;n&&n.removeChild(e)}function mo(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function bi(e){var n=e.parentNode;n&&n.lastChild!==e&&n.appendChild(e)}function yi(e){var n=e.parentNode;n&&n.firstChild!==e&&n.insertBefore(e,n.firstChild)}function go(e,n){if(e.classList!==void 0)return e.classList.contains(n);var o=Me(e);return o.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(o)}function qe(e,n){if(e.classList!==void 0)for(var o=Z(n),a=0,c=o.length;a0?2*window.devicePixelRatio:1;function it(e){return Le.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/os:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function Rt(e,n){var o=n.relatedTarget;if(!o)return!0;try{for(;o&&o!==e;)o=o.parentNode}catch{return!1}return o!==e}var ki={__proto__:null,on:Ke,off:mt,stopPropagation:Qn,disableScrollPropagation:is,disableClickPropagation:wi,preventDefault:Et,stop:En,getPropagationPath:wo,getMousePosition:Vi,getWheelDelta:it,isExternalTarget:Rt,addListener:Ke,removeListener:mt},ss=ce.extend({run:function(e,n,o,a){this.stop(),this._el=e,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(a||.5,.2),this._startPos=Dt(e),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ze(this._animate,this),this._step()},_step:function(e){var n=+new Date-this._startTime,o=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,n){this._enforcingBounds=!0;var o=this.getCenter(),a=this._limitCenter(o,this._zoom,at(e));return o.equals(a)||this.panTo(a,n),this._enforcingBounds=!1,this},panInside:function(e,n){n=n||{};var o=ee(n.paddingTopLeft||n.padding||[0,0]),a=ee(n.paddingBottomRight||n.padding||[0,0]),c=this.project(this.getCenter()),m=this.project(e),P=this.getPixelBounds(),I=Ne([P.min.add(o),P.max.subtract(a)]),N=I.getSize();if(!I.contains(m)){this._enforcingBounds=!0;var J=m.subtract(I.getCenter()),ge=I.extend(m).getSize().subtract(N);c.x+=J.x<0?-ge.x:ge.x,c.y+=J.y<0?-ge.y:ge.y,this.panTo(this.unproject(c),n),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=u({animate:!1,pan:!0},e===!0?{animate:!0}:e);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),a=n.divideBy(2).round(),c=o.divideBy(2).round(),m=a.subtract(c);return!m.x&&!m.y?this:(e.animate&&e.pan?this.panBy(m):(e.pan&&this._rawPanBy(m),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=u({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=h(this._handleGeolocationResponse,this),o=h(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,e):navigator.geolocation.getCurrentPosition(n,o,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var n=e.code,o=e.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+o+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var n=e.coords.latitude,o=e.coords.longitude,a=new Ze(n,o),c=a.toBounds(e.coords.accuracy*2),m=this._locateOptions;if(m.setView){var P=this.getBoundsZoom(c);this.setView(a,m.maxZoom?Math.min(P,m.maxZoom):P)}var I={latlng:a,bounds:c,timestamp:e.timestamp};for(var N in e.coords)typeof e.coords[N]=="number"&&(I[N]=e.coords[N]);this.fire("locationfound",I)}},addHandler:function(e,n){if(!n)return this;var o=this[e]=new n(this);return this._handlers.push(o),this.options[e]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),yt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ne(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)yt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,n){var o="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),a=tt("div",o,n||this._mapPane);return e&&(this._panes[e]=a),a},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),n=this.unproject(e.getBottomLeft()),o=this.unproject(e.getTopRight());return new dt(n,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,n,o){e=at(e),o=ee(o||[0,0]);var a=this.getZoom()||0,c=this.getMinZoom(),m=this.getMaxZoom(),P=e.getNorthWest(),I=e.getSouthEast(),N=this.getSize().subtract(o),J=Ne(this.project(I,a),this.project(P,a)).getSize(),ge=Le.any3d?this.options.zoomSnap:1,Re=N.x/J.x,Qe=N.y/J.y,qt=n?Math.max(Re,Qe):Math.min(Re,Qe);return a=this.getScaleZoom(qt,a),ge&&(a=Math.round(a/(ge/100))*(ge/100),a=n?Math.ceil(a/ge)*ge:Math.floor(a/ge)*ge),Math.max(c,Math.min(m,a))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new se(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,n){var o=this._getTopLeftPoint(e,n);return new be(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e=="string"?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,n){var o=this.options.crs;return n=n===void 0?this._zoom:n,o.scale(e)/o.scale(n)},getScaleZoom:function(e,n){var o=this.options.crs;n=n===void 0?this._zoom:n;var a=o.zoom(e*o.scale(n));return isNaN(a)?1/0:a},project:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(Y(e),n)},unproject:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(ee(e),n)},layerPointToLatLng:function(e){var n=ee(e).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(e){var n=this.project(Y(e))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(Y(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(at(e))},distance:function(e,n){return this.options.crs.distance(Y(e),Y(n))},containerPointToLayerPoint:function(e){return ee(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return ee(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var n=this.containerPointToLayerPoint(ee(e));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Y(e)))},mouseEventToContainerPoint:function(e){return Vi(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var n=this._container=cn(e);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(n,"scroll",this._onScroll,this),this._containerId=b(n)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Le.any3d,qe(e,"leaflet-container"+(Le.touch?" leaflet-touch":"")+(Le.retina?" leaflet-retina":"")+(Le.ielt9?" leaflet-oldie":"")+(Le.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=_i(e,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),xt(this._mapPane,new se(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(qe(e.markerPane,"leaflet-zoom-hide"),qe(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,n,o){xt(this._mapPane,new se(0,0));var a=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var c=this._zoom!==n;this._moveStart(c,o)._move(e,n)._moveEnd(c),this.fire("viewreset"),a&&this.fire("load")},_moveStart:function(e,n){return e&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(e,n,o,a){n===void 0&&(n=this._zoom);var c=this._zoom!==n;return this._zoom=n,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),a?o&&o.pinch&&this.fire("zoom",o):((c||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ne(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){xt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[b(this._container)]=this;var n=e?mt:Ke;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),Le.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ne(this._resizeRequest),this._resizeRequest=ze(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,n){for(var o=[],a,c=n==="mouseout"||n==="mouseover",m=e.target||e.srcElement,P=!1;m;){if(a=this._targets[b(m)],a&&(n==="click"||n==="preclick")&&this._draggableMoved(a)){P=!0;break}if(a&&a.listens(n,!0)&&(c&&!Rt(m,e)||(o.push(a),c))||m===this._container)break;m=m.parentNode}return!o.length&&!P&&!c&&this.listens(n,!0)&&(o=[this]),o},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var n=e.target||e.srcElement;if(!(!this._loaded||n._leaflet_disable_events||e.type==="click"&&this._isClickDisabled(n))){var o=e.type;o==="mousedown"&&bo(n),this._fireDOMEvent(e,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,n,o){if(e.type==="click"){var a=u({},e);a.type="preclick",this._fireDOMEvent(a,a.type,o)}var c=this._findEventTargets(e,n);if(o){for(var m=[],P=0;P0?Math.round(e-n)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(n))},_limitZoom:function(e){var n=this.getMinZoom(),o=this.getMaxZoom(),a=Le.any3d?this.options.zoomSnap:1;return a&&(e=Math.round(e/a)*a),Math.max(n,Math.min(o,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Tt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,n){var o=this._getCenterOffset(e)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(o)?!1:(this.panBy(o,n),!0)},_createAnimProxy:function(){var e=this._proxy=tt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(n){var o=on,a=this._proxy.style[o];_n(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),a===this._proxy.style[o]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){yt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),n=this.getZoom();_n(this._proxy,this.project(e,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,n,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||o.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var a=this.getZoomScale(n),c=this._getCenterOffset(e)._divideBy(1-1/a);return o.animate!==!0&&!this.getSize().contains(c)?!1:(ze(function(){this._moveStart(!0,o.noMoveStart||!1)._animateZoom(e,n,!0)},this),!0)},_animateZoom:function(e,n,o,a){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=n,qe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:n,noUpdate:a}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(h(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Tt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function as(e,n){return new nt(e,n)}var dn=ie.extend({options:{position:"topright"},initialize:function(e){F(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var n=this._map;return n&&n.removeControl(this),this.options.position=e,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var n=this._container=this.onAdd(e),o=this.getPosition(),a=e._controlCorners[o];return qe(n,"leaflet-control"),o.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(yt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Zi=function(e){return new dn(e)};nt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},n="leaflet-",o=this._controlContainer=tt("div",n+"control-container",this._container);function a(c,m){var P=n+c+" "+n+m;e[c+m]=tt("div",P,o)}a("top","left"),a("top","right"),a("bottom","left"),a("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)yt(this._controlCorners[e]);yt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ks=dn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,n,o,a){return o1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=n&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var n=this._getLayer(b(e.target)),o=n.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;o&&this._map.fire(o,n)},_createRadioElement:function(e,n){var o='",a=document.createElement("div");return a.innerHTML=o,a.firstChild},_addItem:function(e){var n=document.createElement("label"),o=this._map.hasLayer(e.layer),a;e.overlay?(a=document.createElement("input"),a.type="checkbox",a.className="leaflet-control-layers-selector",a.defaultChecked=o):a=this._createRadioElement("leaflet-base-layers_"+b(this),o),this._layerControlInputs.push(a),a.layerId=b(e.layer),Ke(a,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+e.name;var m=document.createElement("span");n.appendChild(m),m.appendChild(a),m.appendChild(c);var P=e.overlay?this._overlaysList:this._baseLayersList;return P.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,n,o,a=[],c=[];this._handlingClick=!0;for(var m=e.length-1;m>=0;m--)n=e[m],o=this._getLayer(n.layerId).layer,n.checked?a.push(o):n.checked||c.push(o);for(m=0;m=0;c--)n=e[c],o=this._getLayer(n.layerId).layer,n.disabled=o.options.minZoom!==void 0&&ao.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Ke(e,"click",Et),this.expand();var n=this;setTimeout(function(){mt(e,"click",Et),n._preventClick=!1})}}),ja=function(e,n,o){return new Ks(e,n,o)},ei=dn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(e){var n="leaflet-control-zoom",o=tt("div",n+" leaflet-bar"),a=this.options;return this._zoomInButton=this._createButton(a.zoomInText,a.zoomInTitle,n+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(a.zoomOutText,a.zoomOutTitle,n+"-out",o,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,n,o,a,c){var m=tt("a",o,a);return m.innerHTML=e,m.href="#",m.title=n,m.setAttribute("role","button"),m.setAttribute("aria-label",n),wi(m),Ke(m,"click",En),Ke(m,"click",c,this),Ke(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var e=this._map,n="leaflet-disabled";Tt(this._zoomInButton,n),Tt(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(qe(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(qe(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});nt.mergeOptions({zoomControl:!0}),nt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ei,this.addControl(this.zoomControl))});var Gs=function(e){return new ei(e)},Hi=dn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var n="leaflet-control-scale",o=tt("div",n),a=this.options;return this._addScales(a,n+"-line",o),e.on(a.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),o},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,n,o){e.metric&&(this._mScale=tt("div",n,o)),e.imperial&&(this._iScale=tt("div",n,o))},_update:function(){var e=this._map,n=e.getSize().y/2,o=e.distance(e.containerPointToLatLng([0,n]),e.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(o)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var n=this._getRoundNum(e),o=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,o,n/e)},_updateImperial:function(e){var n=e*3.2808399,o,a,c;n>5280?(o=n/5280,a=this._getRoundNum(o),this._updateScale(this._iScale,a+" mi",a/o)):(c=this._getRoundNum(n),this._updateScale(this._iScale,c+" ft",c/n))},_updateScale:function(e,n,o){e.style.width=Math.round(this.options.maxWidth*o)+"px",e.innerHTML=n},_getRoundNum:function(e){var n=Math.pow(10,(Math.floor(e)+"").length-1),o=e/n;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,n*o}}),ji=function(e){return new Hi(e)},ko='',Wi=dn.extend({options:{position:"bottomright",prefix:''+(Le.inlineSvg?ko+" ":"")+"Leaflet"},initialize:function(e){F(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=tt("div","leaflet-control-attribution"),wi(this._container);for(var n in e._layers)e._layers[n].getAttribution&&this.addAttribution(e._layers[n].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var n in this._attributions)this._attributions[n]&&e.push(n);var o=[];this.options.prefix&&o.push(this.options.prefix),e.length&&o.push(e.join(", ")),this._container.innerHTML=o.join(' ')}}});nt.mergeOptions({attributionControl:!0}),nt.addInitHook(function(){this.options.attributionControl&&new Wi().addTo(this)});var Wa=function(e){return new Wi(e)};dn.Layers=Ks,dn.Zoom=ei,dn.Scale=Hi,dn.Attribution=Wi,Zi.layers=ja,Zi.zoom=Gs,Zi.scale=ji,Zi.attribution=Wa;var xn=ie.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});xn.addTo=function(e,n){return e.addHandler(n,this),this};var Ka={Events:le},fn=Le.touch?"touchstart mousedown":"mousedown",Rn=ce.extend({options:{clickTolerance:3},initialize:function(e,n,o,a){F(this,a),this._element=e,this._dragStartTarget=n||e,this._preventOutline=o},enable:function(){this._enabled||(Ke(this._dragStartTarget,fn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Rn._dragging===this&&this.finishDrag(!0),mt(this._dragStartTarget,fn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!go(this._element,"leaflet-zoom-anim"))){if(e.touches&&e.touches.length!==1){Rn._dragging===this&&this.finishDrag();return}if(!(Rn._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(Rn._dragging=this,this._preventOutline&&bo(this._element),Ri(),bn(),!this._moving)){this.fire("down");var n=e.touches?e.touches[0]:e,o=js(this._element);this._startPoint=new se(n.clientX,n.clientY),this._startPos=Dt(this._element),this._parentScale=yo(o);var a=e.type==="mousedown";Ke(document,a?"mousemove":"touchmove",this._onMove,this),Ke(document,a?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var n=e.touches&&e.touches.length===1?e.touches[0]:e,o=new se(n.clientX,n.clientY)._subtract(this._startPoint);!o.x&&!o.y||Math.abs(o.x)+Math.abs(o.y)m&&(P=I,m=N);m>o&&(n[P]=1,ti(e,n,o,a,P),ti(e,n,o,P,c))}function Js(e,n){for(var o=[e[0]],a=1,c=0,m=e.length;an&&(o.push(e[a]),c=a);return cn.max.x&&(o|=2),e.yn.max.y&&(o|=8),o}function To(e,n){var o=n.x-e.x,a=n.y-e.y;return o*o+a*a}function Ji(e,n,o,a){var c=n.x,m=n.y,P=o.x-c,I=o.y-m,N=P*P+I*I,J;return N>0&&(J=((e.x-c)*P+(e.y-m)*I)/N,J>1?(c=o.x,m=o.y):J>0&&(c+=P*J,m+=I*J)),P=e.x-c,I=e.y-m,a?P*P+I*I:new se(c,m)}function rn(e){return!Te(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]<"u"}function st(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),rn(e)}function On(e,n){var o,a,c,m,P,I,N,J;if(!e||e.length===0)throw new Error("latlngs not passed");rn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var ge=Y([0,0]),Re=at(e),Qe=Re.getNorthWest().distanceTo(Re.getSouthWest())*Re.getNorthEast().distanceTo(Re.getNorthWest());Qe<1700&&(ge=Si(e));var qt=e.length,zt=[];for(o=0;oa){N=(m-a)/c,J=[I.x-N*(I.x-P.x),I.y-N*(I.y-P.y)];break}var ln=n.unproject(ee(J));return Y([ln.lat+ge.lat,ln.lng+ge.lng])}var Po={__proto__:null,simplify:Gi,pointToSegmentDistance:Ct,closestPointOnSegment:Ti,clipSegment:Pi,_getEdgeIntersection:Yi,_getBitCode:an,_sqClosestPointOnSegment:Ji,isFlat:rn,_flat:st,polylineCenter:On},Xi={project:function(e){return new se(e.lng,e.lat)},unproject:function(e){return new Ze(e.y,e.x)},bounds:new be([-180,-90],[180,90])},rs={R:6378137,R_MINOR:6356752314245179e-9,bounds:new be([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(e){var n=Math.PI/180,o=this.R,a=e.lat*n,c=this.R_MINOR/o,m=Math.sqrt(1-c*c),P=m*Math.sin(a),I=Math.tan(Math.PI/4-a/2)/Math.pow((1-P)/(1+P),m/2);return a=-o*Math.log(Math.max(I,1e-10)),new se(e.lng*n*o,a)},unproject:function(e){for(var n=180/Math.PI,o=this.R,a=this.R_MINOR/o,c=Math.sqrt(1-a*a),m=Math.exp(-e.y/o),P=Math.PI/2-2*Math.atan(m),I=0,N=.1,J;I<15&&Math.abs(N)>1e-7;I++)J=c*Math.sin(P),J=Math.pow((1-J)/(1+J),c/2),N=Math.PI/2-2*Math.atan(m*J)-P,P+=N;return new Ze(P*n,e.x*n/o)}},Xs={__proto__:null,LonLat:Xi,Mercator:rs,SphericalMercator:ut},Ga=u({},z,{code:"EPSG:3395",projection:rs,transformation:(function(){var e=.5/(Math.PI*rs.R);return y(e,.5,-e,.5)})()}),Qi=u({},z,{code:"EPSG:4326",projection:Xi,transformation:y(1/180,1,-1/180,.5)}),eo=u({},A,{projection:Xi,transformation:y(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,n){var o=n.lng-e.lng,a=n.lat-e.lat;return Math.sqrt(o*o+a*a)},infinite:!0});A.Earth=z,A.EPSG3395=Ga,A.EPSG3857=_,A.EPSG900913=w,A.EPSG4326=Qi,A.Simple=eo;var Ht=ce.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[b(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[b(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var n=e.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var o=this.getEvents();n.on(o,this),this.once("remove",function(){n.off(o,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});nt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var n=b(e);return this._layers[n]?this:(this._layers[n]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var n=b(e);return this._layers[n]?(this._loaded&&e.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return b(e)in this._layers},eachLayer:function(e,n){for(var o in this._layers)e.call(n,this._layers[o]);return this},_addLayers:function(e){e=e?Te(e)?e:[e]:[];for(var n=0,o=e.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof Ze&&n[0].equals(n[o-1])&&n.pop(),n},_setLatLngs:function(e){pn.prototype._setLatLngs.call(this,e),rn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return rn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,n=this.options.weight,o=new se(n,n);if(e=new be(e.min.subtract(o),e.max.add(o)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var a=0,c=this._rings.length,m;ae.y!=c.y>e.y&&e.x<(c.x-a.x)*(e.y-a.y)/(c.y-a.y)+a.x&&(n=!n);return n||pn.prototype._containsPoint.call(this,e,!0)}});function x(e,n){return new Li(e,n)}var f=Bt.extend({initialize:function(e,n){F(this,n),this._layers={},e&&this.addData(e)},addData:function(e){var n=Te(e)?e:e.features,o,a,c;if(n){for(o=0,a=n.length;o0&&c.push(c[0].slice()),c}function Mo(e,n){return e.feature?u({},e.feature,{geometry:n}):ta(n)}function ta(e){return e.type==="Feature"||e.type==="FeatureCollection"?e:{type:"Feature",properties:{},geometry:e}}var Qa={toGeoJSON:function(e){return Mo(this,{type:"Point",coordinates:Xa(this.getLatLng(),e)})}};Co.include(Qa),ii.include(Qa),Lo.include(Qa),pn.include({toGeoJSON:function(e){var n=!rn(this._latlngs),o=ea(this._latlngs,n?1:0,!1,e);return Mo(this,{type:(n?"Multi":"")+"LineString",coordinates:o})}}),Li.include({toGeoJSON:function(e){var n=!rn(this._latlngs),o=n&&!rn(this._latlngs[0]),a=ea(this._latlngs,o?2:n?1:0,!0,e);return n||(a=[a]),Mo(this,{type:(o?"Multi":"")+"Polygon",coordinates:a})}}),wn.include({toMultiPoint:function(e){var n=[];return this.eachLayer(function(o){n.push(o.toGeoJSON(e).geometry.coordinates)}),Mo(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(e){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(e);var o=n==="GeometryCollection",a=[];return this.eachLayer(function(c){if(c.toGeoJSON){var m=c.toGeoJSON(e);if(o)a.push(m.geometry);else{var P=ta(m);P.type==="FeatureCollection"?a.push.apply(a,P.features):a.push(P)}}}),o?Mo(this,{geometries:a,type:"GeometryCollection"}):{type:"FeatureCollection",features:a}}});function Xr(e,n){return new f(e,n)}var jc=Xr,na=Ht.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,n,o){this._url=e,this._bounds=at(n),F(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(qe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){yt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&bi(this._image),this},bringToBack:function(){return this._map&&yi(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=at(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName==="IMG",n=this._image=e?this._url:tt("img");if(qe(n,"leaflet-image-layer"),this._zoomAnimated&&qe(n,"leaflet-zoom-animated"),this.options.className&&qe(n,this.options.className),n.onselectstart=M,n.onmousemove=M,n.onload=h(this.fire,this,"load"),n.onerror=h(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(e){var n=this._map.getZoomScale(e.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;_n(this._image,o,n)},_reset:function(){var e=this._image,n=new be(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=n.getSize();xt(e,n.min),e.style.width=o.x+"px",e.style.height=o.y+"px"},_updateOpacity:function(){At(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Wc=function(e,n,o){return new na(e,n,o)},Qr=na.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName==="VIDEO",n=this._image=e?this._url:tt("video");if(qe(n,"leaflet-image-layer"),this._zoomAnimated&&qe(n,"leaflet-zoom-animated"),this.options.className&&qe(n,this.options.className),n.onselectstart=M,n.onmousemove=M,n.onloadeddata=h(this.fire,this,"load"),e){for(var o=n.getElementsByTagName("source"),a=[],c=0;c0?a:[n.src];return}Te(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var m=0;mc?(n.height=c+"px",qe(e,m)):Tt(e,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var n=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),o=this._getAnchor();xt(this._container,n.add(o))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,n=parseInt(_i(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+n,a=this._containerWidth,c=new se(this._containerLeft,-o-this._containerBottom);c._add(Dt(this._container));var m=e.layerPointToContainerPoint(c),P=ee(this.options.autoPanPadding),I=ee(this.options.autoPanPaddingTopLeft||P),N=ee(this.options.autoPanPaddingBottomRight||P),J=e.getSize(),ge=0,Re=0;m.x+a+N.x>J.x&&(ge=m.x+a-J.x+N.x),m.x-ge-I.x<0&&(ge=m.x-I.x),m.y+o+N.y>J.y&&(Re=m.y+o-J.y+N.y),m.y-Re-I.y<0&&(Re=m.y-I.y),(ge||Re)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([ge,Re]))}},_getAnchor:function(){return ee(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),qc=function(e,n){return new ia(e,n)};nt.mergeOptions({closePopupOnClick:!0}),nt.include({openPopup:function(e,n,o){return this._initOverlay(ia,e,n,o).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),Ht.include({bindPopup:function(e,n){return this._popup=this._initOverlay(ia,this._popup,e,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Bt||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){En(e);var n=e.layer||e.target;if(this._popup._source===n&&!(n instanceof hn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=n,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var oa=Bn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Bn.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Bn.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Bn.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip",n=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=tt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+b(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var n,o,a=this._map,c=this._container,m=a.latLngToContainerPoint(a.getCenter()),P=a.layerPointToContainerPoint(e),I=this.options.direction,N=c.offsetWidth,J=c.offsetHeight,ge=ee(this.options.offset),Re=this._getAnchor();I==="top"?(n=N/2,o=J):I==="bottom"?(n=N/2,o=0):I==="center"?(n=N/2,o=J/2):I==="right"?(n=0,o=J/2):I==="left"?(n=N,o=J/2):P.xthis.options.maxZoom||oa?this._retainParent(c,m,P,a):!1)},_retainChildren:function(e,n,o,a){for(var c=2*e;c<2*e+2;c++)for(var m=2*n;m<2*n+2;m++){var P=new se(c,m);P.z=o+1;var I=this._tileCoordsToKey(P),N=this._tiles[I];if(N&&N.active){N.retain=!0;continue}else N&&N.loaded&&(N.retain=!0);o+1this.options.maxZoom||this.options.minZoom!==void 0&&c1){this._setView(e,o);return}for(var Re=c.min.y;Re<=c.max.y;Re++)for(var Qe=c.min.x;Qe<=c.max.x;Qe++){var qt=new se(Qe,Re);if(qt.z=this._tileZoom,!!this._isValidTile(qt)){var zt=this._tiles[this._tileCoordsToKey(qt)];zt?zt.current=!0:P.push(qt)}}if(P.sort(function(ln,Eo){return ln.distanceTo(m)-Eo.distanceTo(m)}),P.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var kn=document.createDocumentFragment();for(Qe=0;Qeo.max.x)||!n.wrapLat&&(e.yo.max.y))return!1}if(!this.options.bounds)return!0;var a=this._tileCoordsToBounds(e);return at(this.options.bounds).overlaps(a)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var n=this._map,o=this.getTileSize(),a=e.scaleBy(o),c=a.add(o),m=n.unproject(a,e.z),P=n.unproject(c,e.z);return[m,P]},_tileCoordsToBounds:function(e){var n=this._tileCoordsToNwSe(e),o=new dt(n[0],n[1]);return this.options.noWrap||(o=this._map.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var n=e.split(":"),o=new se(+n[0],+n[1]);return o.z=+n[2],o},_removeTile:function(e){var n=this._tiles[e];n&&(yt(n.el),delete this._tiles[e],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){qe(e,"leaflet-tile");var n=this.getTileSize();e.style.width=n.x+"px",e.style.height=n.y+"px",e.onselectstart=M,e.onmousemove=M,Le.ielt9&&this.options.opacity<1&&At(e,this.options.opacity)},_addTile:function(e,n){var o=this._getTilePos(e),a=this._tileCoordsToKey(e),c=this.createTile(this._wrapCoords(e),h(this._tileReady,this,e));this._initTile(c),this.createTile.length<2&&ze(h(this._tileReady,this,e,null,c)),xt(c,o),this._tiles[a]={el:c,coords:e,current:!0},n.appendChild(c),this.fire("tileloadstart",{tile:c,coords:e})},_tileReady:function(e,n,o){n&&this.fire("tileerror",{error:n,tile:o,coords:e});var a=this._tileCoordsToKey(e);o=this._tiles[a],o&&(o.loaded=+new Date,this._map._fadeAnimated?(At(o.el,0),ne(this._fadeFrame),this._fadeFrame=ze(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),n||(qe(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Le.ielt9||!this._map._fadeAnimated?ze(this._pruneTiles,this):setTimeout(h(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var n=new se(this._wrapX?T(e.x,this._wrapX):e.x,this._wrapY?T(e.y,this._wrapY):e.y);return n.z=e.z,n},_pxBoundsToTileRange:function(e){var n=this.getTileSize();return new be(e.min.unscaleBy(n).floor(),e.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Xc(e){return new ds(e)}var Ao=ds.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,n){this._url=e,n=F(this,n),n.detectRetina&&Le.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,n){return this._url===e&&n===void 0&&(n=!0),this._url=e,n||this.redraw(),this},createTile:function(e,n){var o=document.createElement("img");return Ke(o,"load",h(this._tileOnLoad,this,n,o)),Ke(o,"error",h(this._tileOnError,this,n,o)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(e),o},getTileUrl:function(e){var n={r:Le.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(n.y=o),n["-y"]=o}return q(this._url,u(n,this.options))},_tileOnLoad:function(e,n){Le.ielt9?setTimeout(h(e,this,null,n),0):e(null,n)},_tileOnError:function(e,n,o){var a=this.options.errorTileUrl;a&&n.getAttribute("src")!==a&&(n.src=a),e(o,n)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,n=this.options.maxZoom,o=this.options.zoomReverse,a=this.options.zoomOffset;return o&&(e=n-e),e+a},_getSubdomain:function(e){var n=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var e,n;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(n=this._tiles[e].el,n.onload=M,n.onerror=M,!n.complete)){n.src=Ue;var o=this._tiles[e].coords;yt(n),delete this._tiles[e],this.fire("tileabort",{tile:n,coords:o})}},_removeTile:function(e){var n=this._tiles[e];if(n)return n.el.setAttribute("src",Ue),ds.prototype._removeTile.call(this,e)},_tileReady:function(e,n,o){if(!(!this._map||o&&o.getAttribute("src")===Ue))return ds.prototype._tileReady.call(this,e,n,o)}});function nl(e,n){return new Ao(e,n)}var il=Ao.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,n){this._url=e;var o=u({},this.defaultWmsParams);for(var a in n)a in this.options||(o[a]=n[a]);n=F(this,n);var c=n.detectRetina&&Le.retina?2:1,m=this.getTileSize();o.width=m.x*c,o.height=m.y*c,this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,Ao.prototype.onAdd.call(this,e)},getTileUrl:function(e){var n=this._tileCoordsToNwSe(e),o=this._crs,a=Ne(o.project(n[0]),o.project(n[1])),c=a.min,m=a.max,P=(this._wmsVersion>=1.3&&this._crs===Qi?[c.y,c.x,m.y,m.x]:[c.x,c.y,m.x,m.y]).join(","),I=Ao.prototype.getTileUrl.call(this,e);return I+he(this.wmsParams,I,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+P},setParams:function(e,n){return u(this.wmsParams,e),n||this.redraw(),this}});function Qc(e,n){return new il(e,n)}Ao.WMS=il,nl.wms=Qc;var oi=Ht.extend({options:{padding:.1},initialize:function(e){F(this,e),b(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),qe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,n){var o=this._map.getZoomScale(n,this._zoom),a=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,n),m=a.multiplyBy(-o).add(c).subtract(this._map._getNewPixelOrigin(e,n));Le.any3d?_n(this._container,m,o):xt(this._container,m)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,n=this._map.getSize(),o=this._map.containerPointToLayerPoint(n.multiplyBy(-e)).round();this._bounds=new be(o,o.add(n.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ol=oi.extend({options:{tolerance:0},getEvents:function(){var e=oi.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){oi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Ke(e,"mousemove",this._onMouseMove,this),Ke(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){ne(this._redrawRequest),delete this._ctx,yt(this._container),mt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;this._redrawBounds=null;for(var n in this._layers)e=this._layers[n],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){oi.prototype._update.call(this);var e=this._bounds,n=this._container,o=e.getSize(),a=Le.retina?2:1;xt(n,e.min),n.width=a*o.x,n.height=a*o.y,n.style.width=o.x+"px",n.style.height=o.y+"px",Le.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){oi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[b(e)]=e;var n=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var n=e._order,o=n.next,a=n.prev;o?o.prev=a:this._drawLast=a,a?a.next=o:this._drawFirst=o,delete e._order,delete this._layers[b(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray=="string"){var n=e.options.dashArray.split(/[, ]+/),o=[],a,c;for(c=0;c')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),ed={_initContainer:function(){this._container=tt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(oi.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var n=e._container=fs("shape");qe(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",e._path=fs("path"),n.appendChild(e._path),this._updateStyle(e),this._layers[b(e)]=e},_addPath:function(e){var n=e._container;this._container.appendChild(n),e.options.interactive&&e.addInteractiveTarget(n)},_removePath:function(e){var n=e._container;yt(n),e.removeInteractiveTarget(n),delete this._layers[b(e)]},_updateStyle:function(e){var n=e._stroke,o=e._fill,a=e.options,c=e._container;c.stroked=!!a.stroke,c.filled=!!a.fill,a.stroke?(n||(n=e._stroke=fs("stroke")),c.appendChild(n),n.weight=a.weight+"px",n.color=a.color,n.opacity=a.opacity,a.dashArray?n.dashStyle=Te(a.dashArray)?a.dashArray.join(" "):a.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=a.lineCap.replace("butt","flat"),n.joinstyle=a.lineJoin):n&&(c.removeChild(n),e._stroke=null),a.fill?(o||(o=e._fill=fs("fill")),c.appendChild(o),o.color=a.fillColor||a.color,o.opacity=a.fillOpacity):o&&(c.removeChild(o),e._fill=null)},_updateCircle:function(e){var n=e._point.round(),o=Math.round(e._radius),a=Math.round(e._radiusY||o);this._setPath(e,e._empty()?"M0 0":"AL "+n.x+","+n.y+" "+o+","+a+" 0,"+65535*360)},_setPath:function(e,n){e._path.v=n},_bringToFront:function(e){bi(e._container)},_bringToBack:function(e){yi(e._container)}},sa=Le.vml?fs:K,hs=oi.extend({_initContainer:function(){this._container=sa("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=sa("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){yt(this._container),mt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){oi.prototype._update.call(this);var e=this._bounds,n=e.getSize(),o=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,o.setAttribute("width",n.x),o.setAttribute("height",n.y)),xt(o,e.min),o.setAttribute("viewBox",[e.min.x,e.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(e){var n=e._path=sa("path");e.options.className&&qe(n,e.options.className),e.options.interactive&&qe(n,"leaflet-interactive"),this._updateStyle(e),this._layers[b(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){yt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[b(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var n=e._path,o=e.options;n&&(o.stroke?(n.setAttribute("stroke",o.color),n.setAttribute("stroke-opacity",o.opacity),n.setAttribute("stroke-width",o.weight),n.setAttribute("stroke-linecap",o.lineCap),n.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?n.setAttribute("stroke-dasharray",o.dashArray):n.removeAttribute("stroke-dasharray"),o.dashOffset?n.setAttribute("stroke-dashoffset",o.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),o.fill?(n.setAttribute("fill",o.fillColor||o.color),n.setAttribute("fill-opacity",o.fillOpacity),n.setAttribute("fill-rule",o.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(e,n){this._setPath(e,H(e._parts,n))},_updateCircle:function(e){var n=e._point,o=Math.max(Math.round(e._radius),1),a=Math.max(Math.round(e._radiusY),1)||o,c="a"+o+","+a+" 0 1,0 ",m=e._empty()?"M0 0":"M"+(n.x-o)+","+n.y+c+o*2+",0 "+c+-o*2+",0 ";this._setPath(e,m)},_setPath:function(e,n){e._path.setAttribute("d",n)},_bringToFront:function(e){bi(e._path)},_bringToBack:function(e){yi(e._path)}});Le.vml&&hs.include(ed);function al(e){return Le.svg||Le.vml?new hs(e):null}nt.include({getRenderer:function(e){var n=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(e){if(e==="overlayPane"||e===void 0)return!1;var n=this._paneRenderers[e];return n===void 0&&(n=this._createRenderer({pane:e}),this._paneRenderers[e]=n),n},_createRenderer:function(e){return this.options.preferCanvas&&sl(e)||al(e)}});var rl=Li.extend({initialize:function(e,n){Li.prototype.initialize.call(this,this._boundsToLatLngs(e),n)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=at(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function td(e,n){return new rl(e,n)}hs.create=sa,hs.pointsToPath=H,f.geometryToLayer=j,f.coordsToLatLng=Xe,f.coordsToLatLngs=Qs,f.latLngToCoords=Xa,f.latLngsToCoords=ea,f.getFeature=Mo,f.asFeature=ta,nt.mergeOptions({boxZoom:!0});var ll=xn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){mt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){yt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),bn(),Ri(),this._startPoint=this._map.mouseEventToContainerPoint(e),Ke(document,{contextmenu:En,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=tt("div","leaflet-zoom-box",this._container),qe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var n=new be(this._point,this._startPoint),o=n.getSize();xt(this._box,n.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(yt(this._box),Tt(this._container,"leaflet-crosshair")),An(),es(),mt(document,{contextmenu:En,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(h(this._resetState,this),0);var n=new dt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});nt.addInitHook("addHandler","boxZoom",ll),nt.mergeOptions({doubleClickZoom:!0});var ul=xn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var n=this._map,o=n.getZoom(),a=n.options.zoomDelta,c=e.originalEvent.shiftKey?o-a:o+a;n.options.doubleClickZoom==="center"?n.setZoom(c):n.setZoomAround(e.containerPoint,c)}});nt.addInitHook("addHandler","doubleClickZoom",ul),nt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var cl=xn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Rn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}qe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Tt(this._map._container,"leaflet-grab"),Tt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=at(this._map.options.maxBounds);this._offsetLimit=Ne(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var n=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(n),this._prunePositions(n)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,n){return e-(e-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;e.xn.max.x&&(e.x=this._viscousLimit(e.x,n.max.x)),e.y>n.max.y&&(e.y=this._viscousLimit(e.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,n=Math.round(e/2),o=this._initialWorldOffset,a=this._draggable._newPos.x,c=(a-n+o)%e+n-o,m=(a+n+o)%e-n-o,P=Math.abs(c+o)0?m:-m))-n;this._delta=0,this._startTime=null,P&&(e.options.scrollWheelZoom==="center"?e.setZoom(n+P):e.setZoomAround(this._lastMousePos,n+P))}});nt.addInitHook("addHandler","scrollWheelZoom",fl);var nd=600;nt.mergeOptions({tapHold:Le.touchNative&&Le.safari&&Le.mobile,tapTolerance:15});var hl=xn.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){mt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var n=e.touches[0];this._startPos=this._newPos=new se(n.clientX,n.clientY),this._holdTimeout=setTimeout(h(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Et),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),nd),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){mt(document,"touchend",Et),mt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),mt(document,"touchend touchcancel contextmenu",this._cancel,this),mt(document,"touchmove",this._onMove,this)},_onMove:function(e){var n=e.touches[0];this._newPos=new se(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,n){var o=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});o._simulated=!0,n.target.dispatchEvent(o)}});nt.addInitHook("addHandler","tapHold",hl),nt.mergeOptions({touchZoom:Le.touch,bounceAtZoomLimits:!0});var pl=xn.extend({addHooks:function(){qe(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Tt(this._map._container,"leaflet-touch-zoom"),mt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var n=this._map;if(!(!e.touches||e.touches.length!==2||n._animatingZoom||this._zooming)){var o=n.mouseEventToContainerPoint(e.touches[0]),a=n.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(o.add(a)._divideBy(2))),this._startDist=o.distanceTo(a),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Et(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var n=this._map,o=n.mouseEventToContainerPoint(e.touches[0]),a=n.mouseEventToContainerPoint(e.touches[1]),c=o.distanceTo(a)/this._startDist;if(this._zoom=n.getScaleZoom(c,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&c>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var m=o._add(a)._divideBy(2)._subtract(this._centerPoint);if(c===1&&m.x===0&&m.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),ne(this._animRequest);var P=h(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ze(P,this,!0),Et(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ne(this._animRequest),mt(document,"touchmove",this._onTouchMove,this),mt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});nt.addInitHook("addHandler","touchZoom",pl),nt.BoxZoom=ll,nt.DoubleClickZoom=ul,nt.Drag=cl,nt.Keyboard=dl,nt.ScrollWheelZoom=fl,nt.TapHold=hl,nt.TouchZoom=pl,s.Bounds=be,s.Browser=Le,s.CRS=A,s.Canvas=ol,s.Circle=ii,s.CircleMarker=Lo,s.Class=ie,s.Control=dn,s.DivIcon=tl,s.DivOverlay=Bn,s.DomEvent=ki,s.DomUtil=Ui,s.Draggable=Rn,s.Evented=ce,s.FeatureGroup=Bt,s.GeoJSON=f,s.GridLayer=ds,s.Handler=xn,s.Icon=ni,s.ImageOverlay=na,s.LatLng=Ze,s.LatLngBounds=dt,s.Layer=Ht,s.LayerGroup=wn,s.LineUtil=Po,s.Map=nt,s.Marker=Co,s.Mixin=Ka,s.Path=hn,s.Point=se,s.PolyUtil=Ki,s.Polygon=Li,s.Polyline=pn,s.Popup=ia,s.PosAnimation=ss,s.Projection=Xs,s.Rectangle=rl,s.Renderer=oi,s.SVG=hs,s.SVGOverlay=el,s.TileLayer=Ao,s.Tooltip=oa,s.Transformation=wt,s.Util=je,s.VideoOverlay=Qr,s.bind=h,s.bounds=Ne,s.canvas=sl,s.circle=cs,s.circleMarker=_t,s.control=Zi,s.divIcon=Jc,s.extend=u,s.featureGroup=ls,s.geoJSON=Xr,s.geoJson=jc,s.gridLayer=Xc,s.icon=qa,s.imageOverlay=Wc,s.latLng=Y,s.latLngBounds=at,s.layerGroup=zn,s.map=as,s.marker=Ya,s.point=ee,s.polygon=x,s.polyline=Ja,s.popup=qc,s.rectangle=td,s.setOptions=F,s.stamp=b,s.svg=al,s.svgOverlay=Gc,s.tileLayer=nl,s.tooltip=Yc,s.transformation=y,s.version=l,s.videoOverlay=Kc;var id=window.L;s.noConflict=function(){return window.L=id,this},window.L=s}))})(xs,xs.exports)),xs.exports}var sm=om();const Ai=nm(sm),mu={__name:"DeviceMap",props:{position:{type:Object,default:null},trail:{type:Array,default:()=>[]},aircraft:{type:Array,default:()=>[]}},setup(t){const i=t,s=W(null);let l,u,d,h;const v=new Map;function b(Z,F){const he=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0",pe=F?"#8a94a6":he,q=typeof Z=="number"?Z:0;return Ai.divIcon({className:"plane-marker",iconSize:[22,22],iconAnchor:[11,11],html:``})}function C(Z){const he=[`${Z.callsign||Z.icao24||"aircraft"}`];return Z.country&&he.push(Z.country),typeof Z.altitude=="number"&&he.push(`${Math.round(Z.altitude)} m`),typeof Z.velocity=="number"&&he.push(`${Math.round(Z.velocity*3.6)} km/h`),Z.onGround&&he.push("on ground"),he.join(" · ")}function T(){if(!l)return;h||(h=Ai.layerGroup().addTo(l));const Z=new Set;for(const F of i.aircraft){if(typeof F.lat!="number"||typeof F.lng!="number")continue;Z.add(F.icao24);const he=[F.lat,F.lng];let pe=v.get(F.icao24);pe?(pe.setLatLng(he),pe.setIcon(b(F.heading,F.onGround)),pe.setTooltipContent(C(F))):(pe=Ai.marker(he,{icon:b(F.heading,F.onGround)}).bindTooltip(C(F)),pe.addTo(h),v.set(F.icao24,pe))}for(const[F,he]of v)Z.has(F)||(h.removeLayer(he),v.delete(F))}function M(){if(!l)return;const Z=i.position;if(Z&&(Z.lat||Z.lng)){const F=[Z.lat,Z.lng];u?u.setLatLng(F):(u=Ai.marker(F).addTo(l),l.setView(F,17))}if(d&&d.remove(),i.trail.length){const F=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0";d=Ai.polyline(i.trail,{color:F,weight:3}).addTo(l)}}hi(()=>{l=Ai.map(s.value,{zoomControl:!0}).setView([20,0],2),Ai.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap",maxZoom:19}).addTo(l),setTimeout(()=>l.invalidateSize(),60),M(),T(),(!i.position||!i.position.lat&&!i.position.lng)&&i.aircraft.length&&B()});let R=!1;function B(){if(R||!l||!i.aircraft.length)return;const Z=i.aircraft.filter(F=>typeof F.lat=="number"&&typeof F.lng=="number").map(F=>[F.lat,F.lng]);Z.length&&(l.fitBounds(Ai.latLngBounds(Z).pad(.2)),R=!0)}return Ho(()=>{l&&l.remove(),l=null}),It(()=>i.position,M,{deep:!0}),It(()=>i.trail,M,{deep:!0}),It(()=>i.aircraft,()=>{T(),(!i.position||!i.position.lat&&!i.position.lng)&&B()},{deep:!0}),(Z,F)=>(p(),g("div",{ref_key:"el",ref:s,class:"h-[320px] w-full rounded-lg"},null,512))}},am=["width","height","stroke-width"],rm=["d"],X={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},stroke:{type:[Number,String],default:2}},setup(t){const l=({grid:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",radio:"M4.9 19.1a10 10 0 0 1 0-14.2M7.8 16.2a6 6 0 0 1 0-8.4M16.2 7.8a6 6 0 0 1 0 8.4M19.1 4.9a10 10 0 0 1 0 14.2M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2z",route:"M6 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 13V9a4 4 0 0 1 4-4h4",calendar:"M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",book:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z",fileText:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M16 13H8M16 17H8M10 9H8",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z",search:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.3-4.3",plus:"M12 5v14M5 12h14",battery:"M3 8h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zM22 11v2",signal:"M2 20h.01M7 20v-4M12 20v-8M17 20V8M22 20V4",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2",chevronRight:"M9 6l6 6-6 6",play:"M6 3l14 9-14 9V3z",logout:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9",wind:"M12.8 19.6A2 2 0 1 0 14 16H2M17.5 8a2.5 2.5 0 1 1 2 4H2M9.6 4.6A2 2 0 1 1 11 8H2",drone:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM6 6 4 4M18 6l2-2M6 18l-2 2M18 18l2 2",user:"M20 21a8 8 0 1 0-16 0M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",users:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75",shield:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",sliders:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6",alertTriangle:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01",download:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3",upload:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",trash:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6",check:"M20 6 9 17l-5-5",mail:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM22 6l-10 7L2 6",lock:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM7 11V7a5 5 0 0 1 10 0v4",monitor:"M3 4h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8 21h8M12 17v4",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18z",smartphone:"M7 2h10a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM11 18h2",image:"M4 4h16a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21",eye:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",type:"M4 7V4h16v3M9 20h6M12 4v16",sun:"M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM12 1v2M12 21v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M1 12h2M21 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4",moon:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z",x:"M18 6 6 18M6 6l12 12",server:"M20 4H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM20 13H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2zM6 7.5h.01M6 16.5h.01",cloud:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9z"}[t.name]||"").split(" M").map((u,d)=>d?"M"+u:u);return(u,d)=>(p(),g("svg",{width:t.size,height:t.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":t.stroke,"stroke-linecap":"round","stroke-linejoin":"round",style:{flex:"none"},"aria-hidden":"true"},[(p(!0),g(ue,null,Be(Oe(l),(h,v)=>(p(),g("path",{key:v,d:h},null,8,rm))),128))],8,am))}},lm=["aria-checked","disabled"],un={__name:"Toggle",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:i}){const s=i;return(l,u)=>(p(),g("button",{type:"button",role:"switch","aria-checked":t.modelValue,disabled:t.disabled,class:Ee(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-40",t.modelValue?"bg-accent":"bg-surface-2 border border-line-strong"]),onClick:u[0]||(u[0]=d=>s("update:modelValue",!t.modelValue))},[r("span",{class:Ee(["inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition",t.modelValue?"translate-x-6":"translate-x-1"])},null,2)],10,lm))}},um={class:"inline-flex rounded-[10px] border border-line bg-surface-2 p-0.5"},cm=["onClick"],Tn={__name:"Segmented",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:i}){const s=i;return(l,u)=>(p(),g("div",um,[(p(!0),g(ue,null,Be(t.options,d=>(p(),g("button",{key:d.value,type:"button",class:Ee(["inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[13px] font-semibold transition",t.modelValue===d.value?"bg-surface-1 text-ink shadow-xs":"text-ink-secondary hover:text-ink"]),onClick:h=>s("update:modelValue",d.value)},[d.icon?(p(),lt(X,{key:0,name:d.icon,size:15},null,8,["name"])):D("",!0),$(" "+k(d.label),1)],10,cm))),128))]))}},dm={class:"text-sm font-semibold text-ink"},fm={key:0,class:"mt-0.5 text-xs text-ink-muted"},Ae={__name:"Row",props:{title:{type:String,default:""},desc:{type:String,default:""},keywords:{type:String,default:""},block:{type:Boolean,default:!1}},setup(t){const i=t,s=Ts("settingsSearch",{value:""}),l=we(()=>{const u=(s.value||"").trim().toLowerCase();return u?`${i.title} ${i.desc} ${i.keywords}`.toLowerCase().includes(u):!0});return(u,d)=>l.value?(p(),g("div",{key:0,class:Ee(["border-b border-line py-4 last:border-0",t.block?"":"flex items-center justify-between gap-6"])},[r("div",{class:Ee(t.block?"mb-3":"min-w-0")},[r("div",dm,k(t.title),1),t.desc?(p(),g("div",fm,k(t.desc),1)):D("",!0)],2),r("div",{class:Ee(t.block?"":"shrink-0")},[kf(u.$slots,"default")],2)],2)):D("",!0)}},Ra=[{code:"AL",name:"Albania",continent:"EU",bbox:"39.6,19.3,42.7,21.1"},{code:"AD",name:"Andorra",continent:"EU",bbox:"42.4,1.4,42.7,1.8"},{code:"AT",name:"Austria",continent:"EU",bbox:"46.4,9.5,49.0,17.2"},{code:"BY",name:"Belarus",continent:"EU",bbox:"51.2,23.2,56.2,32.8"},{code:"BE",name:"Belgium",continent:"EU",bbox:"49.5,2.5,51.5,6.4"},{code:"BA",name:"Bosnia and Herzegovina",continent:"EU",bbox:"42.6,15.7,45.3,19.6"},{code:"BG",name:"Bulgaria",continent:"EU",bbox:"41.2,22.4,44.2,28.6"},{code:"HR",name:"Croatia",continent:"EU",bbox:"42.4,13.5,46.6,19.4"},{code:"CY",name:"Cyprus",continent:"EU",bbox:"34.6,32.3,35.7,34.6"},{code:"CZ",name:"Czechia",continent:"EU",bbox:"48.6,12.1,51.1,18.9"},{code:"DK",name:"Denmark",continent:"EU",bbox:"54.6,8.1,57.8,12.7"},{code:"EE",name:"Estonia",continent:"EU",bbox:"57.5,21.8,59.7,28.2"},{code:"FI",name:"Finland",continent:"EU",bbox:"59.8,20.6,70.1,31.6"},{code:"FR",name:"France",continent:"EU",bbox:"41.3,-5.2,51.1,9.6"},{code:"DE",name:"Germany",continent:"EU",bbox:"47.2,5.8,55.1,15.1"},{code:"GR",name:"Greece",continent:"EU",bbox:"34.8,19.4,41.8,28.3"},{code:"HU",name:"Hungary",continent:"EU",bbox:"45.7,16.1,48.6,22.9"},{code:"IS",name:"Iceland",continent:"EU",bbox:"63.3,-24.6,66.6,-13.5"},{code:"IE",name:"Ireland",continent:"EU",bbox:"51.4,-10.6,55.4,-6.0"},{code:"IT",name:"Italy",continent:"EU",bbox:"36.6,6.6,47.1,18.6"},{code:"XK",name:"Kosovo",continent:"EU",bbox:"41.8,20.0,43.3,21.8"},{code:"LV",name:"Latvia",continent:"EU",bbox:"55.7,20.9,58.1,28.2"},{code:"LI",name:"Liechtenstein",continent:"EU",bbox:"47.0,9.4,47.3,9.6"},{code:"LT",name:"Lithuania",continent:"EU",bbox:"53.9,20.9,56.5,26.9"},{code:"LU",name:"Luxembourg",continent:"EU",bbox:"49.4,5.7,50.2,6.5"},{code:"MT",name:"Malta",continent:"EU",bbox:"35.8,14.1,36.1,14.6"},{code:"MD",name:"Moldova",continent:"EU",bbox:"45.4,26.6,48.5,30.2"},{code:"MC",name:"Monaco",continent:"EU",bbox:"43.72,7.40,43.75,7.44"},{code:"ME",name:"Montenegro",continent:"EU",bbox:"41.8,18.4,43.6,20.4"},{code:"NL",name:"Netherlands",continent:"EU",bbox:"50.7,3.3,53.7,7.2"},{code:"MK",name:"North Macedonia",continent:"EU",bbox:"40.8,20.4,42.4,23.0"},{code:"NO",name:"Norway",continent:"EU",bbox:"57.9,4.6,71.2,31.1"},{code:"PL",name:"Poland",continent:"EU",bbox:"49.0,14.1,54.9,24.2"},{code:"PT",name:"Portugal",continent:"EU",bbox:"36.9,-9.5,42.2,-6.2"},{code:"RO",name:"Romania",continent:"EU",bbox:"43.6,20.2,48.3,29.7"},{code:"SM",name:"San Marino",continent:"EU",bbox:"43.89,12.40,43.99,12.52"},{code:"RS",name:"Serbia",continent:"EU",bbox:"42.2,18.8,46.2,23.0"},{code:"SK",name:"Slovakia",continent:"EU",bbox:"47.7,16.8,49.6,22.6"},{code:"SI",name:"Slovenia",continent:"EU",bbox:"45.4,13.4,46.9,16.6"},{code:"ES",name:"Spain",continent:"EU",bbox:"35.9,-9.4,43.8,3.4"},{code:"SE",name:"Sweden",continent:"EU",bbox:"55.3,11.1,69.1,24.2"},{code:"CH",name:"Switzerland",continent:"EU",bbox:"45.8,5.9,47.8,10.5"},{code:"UA",name:"Ukraine",continent:"EU",bbox:"44.4,22.1,52.4,40.2"},{code:"GB",name:"United Kingdom",continent:"EU",bbox:"49.9,-8.7,60.9,1.8"},{code:"VA",name:"Vatican City",continent:"EU",bbox:"41.900,12.445,41.908,12.458"},{code:"RU",name:"Russia",continent:"EU",bbox:"41.2,19.6,81.9,180"},{code:"TR",name:"Turkey",continent:"EU",bbox:"35.8,25.7,42.3,44.8"},{code:"AF",name:"Afghanistan",continent:"AS",bbox:"29.4,60.5,38.5,74.9"},{code:"AM",name:"Armenia",continent:"AS",bbox:"38.8,43.4,41.3,46.6"},{code:"AZ",name:"Azerbaijan",continent:"AS",bbox:"38.4,44.8,41.9,50.4"},{code:"BH",name:"Bahrain",continent:"AS",bbox:"25.8,50.4,26.3,50.7"},{code:"BD",name:"Bangladesh",continent:"AS",bbox:"20.7,88.0,26.6,92.7"},{code:"BT",name:"Bhutan",continent:"AS",bbox:"26.7,88.7,28.3,92.1"},{code:"BN",name:"Brunei",continent:"AS",bbox:"4.0,114.0,5.1,115.4"},{code:"KH",name:"Cambodia",continent:"AS",bbox:"10.4,102.3,14.7,107.6"},{code:"CN",name:"China",continent:"AS",bbox:"18.2,73.5,53.6,134.8"},{code:"GE",name:"Georgia",continent:"AS",bbox:"41.0,40.0,43.6,46.7"},{code:"IN",name:"India",continent:"AS",bbox:"6.7,68.1,35.5,97.4"},{code:"ID",name:"Indonesia",continent:"AS",bbox:"-11.0,95.0,6.1,141.0"},{code:"IR",name:"Iran",continent:"AS",bbox:"25.0,44.0,39.8,63.3"},{code:"IQ",name:"Iraq",continent:"AS",bbox:"29.1,38.8,37.4,48.6"},{code:"IL",name:"Israel",continent:"AS",bbox:"29.5,34.2,33.3,35.9"},{code:"JP",name:"Japan",continent:"AS",bbox:"24.0,122.9,45.5,145.8"},{code:"JO",name:"Jordan",continent:"AS",bbox:"29.2,34.9,33.4,39.3"},{code:"KZ",name:"Kazakhstan",continent:"AS",bbox:"40.6,46.5,55.4,87.3"},{code:"KW",name:"Kuwait",continent:"AS",bbox:"28.5,46.5,30.1,48.4"},{code:"KG",name:"Kyrgyzstan",continent:"AS",bbox:"39.2,69.3,43.3,80.3"},{code:"LA",name:"Laos",continent:"AS",bbox:"13.9,100.1,22.5,107.7"},{code:"LB",name:"Lebanon",continent:"AS",bbox:"33.0,35.1,34.7,36.6"},{code:"MY",name:"Malaysia",continent:"AS",bbox:"0.9,99.6,7.4,119.3"},{code:"MV",name:"Maldives",continent:"AS",bbox:"-0.7,72.7,7.1,73.7"},{code:"MN",name:"Mongolia",continent:"AS",bbox:"41.6,87.7,52.1,119.9"},{code:"MM",name:"Myanmar",continent:"AS",bbox:"9.8,92.2,28.5,101.2"},{code:"NP",name:"Nepal",continent:"AS",bbox:"26.3,80.1,30.4,88.2"},{code:"KP",name:"North Korea",continent:"AS",bbox:"37.7,124.2,43.0,130.7"},{code:"OM",name:"Oman",continent:"AS",bbox:"16.6,52.0,26.4,59.8"},{code:"PK",name:"Pakistan",continent:"AS",bbox:"23.7,60.9,37.1,77.8"},{code:"PH",name:"Philippines",continent:"AS",bbox:"4.6,116.9,21.1,126.6"},{code:"QA",name:"Qatar",continent:"AS",bbox:"24.5,50.7,26.2,51.6"},{code:"SA",name:"Saudi Arabia",continent:"AS",bbox:"16.4,34.6,32.2,55.7"},{code:"SG",name:"Singapore",continent:"AS",bbox:"1.2,103.6,1.5,104.1"},{code:"KR",name:"South Korea",continent:"AS",bbox:"33.1,125.9,38.6,129.6"},{code:"LK",name:"Sri Lanka",continent:"AS",bbox:"5.9,79.7,9.8,81.9"},{code:"SY",name:"Syria",continent:"AS",bbox:"32.3,35.7,37.3,42.4"},{code:"TW",name:"Taiwan",continent:"AS",bbox:"21.9,120.0,25.3,122.0"},{code:"TJ",name:"Tajikistan",continent:"AS",bbox:"36.7,67.4,41.0,75.2"},{code:"TH",name:"Thailand",continent:"AS",bbox:"5.6,97.3,20.5,105.6"},{code:"TL",name:"Timor-Leste",continent:"AS",bbox:"-9.5,124.0,-8.1,127.3"},{code:"TM",name:"Turkmenistan",continent:"AS",bbox:"35.1,52.4,42.8,66.7"},{code:"AE",name:"United Arab Emirates",continent:"AS",bbox:"22.6,51.5,26.1,56.4"},{code:"UZ",name:"Uzbekistan",continent:"AS",bbox:"37.2,55.9,45.6,73.1"},{code:"VN",name:"Vietnam",continent:"AS",bbox:"8.2,102.1,23.4,109.5"},{code:"YE",name:"Yemen",continent:"AS",bbox:"12.1,42.5,19.0,54.5"},{code:"DZ",name:"Algeria",continent:"AF",bbox:"18.9,-8.7,37.1,12.0"},{code:"AO",name:"Angola",continent:"AF",bbox:"-18.0,11.6,-4.4,24.1"},{code:"BJ",name:"Benin",continent:"AF",bbox:"6.2,0.8,12.4,3.9"},{code:"BW",name:"Botswana",continent:"AF",bbox:"-26.9,20.0,-17.8,29.4"},{code:"BF",name:"Burkina Faso",continent:"AF",bbox:"9.4,-5.5,15.1,2.4"},{code:"BI",name:"Burundi",continent:"AF",bbox:"-4.5,29.0,-2.3,30.8"},{code:"CV",name:"Cabo Verde",continent:"AF",bbox:"14.8,-25.4,17.2,-22.7"},{code:"CM",name:"Cameroon",continent:"AF",bbox:"1.7,8.5,13.1,16.2"},{code:"CF",name:"Central African Republic",continent:"AF",bbox:"2.2,14.4,11.0,27.5"},{code:"TD",name:"Chad",continent:"AF",bbox:"7.4,13.5,23.4,24.0"},{code:"KM",name:"Comoros",continent:"AF",bbox:"-12.4,43.2,-11.4,44.5"},{code:"CG",name:"Congo",continent:"AF",bbox:"-5.0,11.1,3.7,18.6"},{code:"CD",name:"DR Congo",continent:"AF",bbox:"-13.5,12.2,5.4,31.3"},{code:"DJ",name:"Djibouti",continent:"AF",bbox:"10.9,41.7,12.7,43.4"},{code:"EG",name:"Egypt",continent:"AF",bbox:"22.0,25.0,31.7,36.9"},{code:"GQ",name:"Equatorial Guinea",continent:"AF",bbox:"0.9,9.3,3.8,11.4"},{code:"ER",name:"Eritrea",continent:"AF",bbox:"12.4,36.4,18.0,43.1"},{code:"SZ",name:"Eswatini",continent:"AF",bbox:"-27.3,30.8,-25.7,32.1"},{code:"ET",name:"Ethiopia",continent:"AF",bbox:"3.4,33.0,14.9,48.0"},{code:"GA",name:"Gabon",continent:"AF",bbox:"-4.0,8.7,2.3,14.5"},{code:"GM",name:"Gambia",continent:"AF",bbox:"13.1,-16.8,13.8,-13.8"},{code:"GH",name:"Ghana",continent:"AF",bbox:"4.7,-3.3,11.2,1.2"},{code:"GN",name:"Guinea",continent:"AF",bbox:"7.2,-15.1,12.7,-7.6"},{code:"GW",name:"Guinea-Bissau",continent:"AF",bbox:"10.9,-16.7,12.7,-13.6"},{code:"CI",name:"Ivory Coast",continent:"AF",bbox:"4.4,-8.6,10.7,-2.5"},{code:"KE",name:"Kenya",continent:"AF",bbox:"-4.7,33.9,5.5,41.9"},{code:"LS",name:"Lesotho",continent:"AF",bbox:"-30.7,27.0,-28.6,29.5"},{code:"LR",name:"Liberia",continent:"AF",bbox:"4.3,-11.5,8.6,-7.4"},{code:"LY",name:"Libya",continent:"AF",bbox:"19.5,9.3,33.2,25.2"},{code:"MG",name:"Madagascar",continent:"AF",bbox:"-25.6,43.2,-11.9,50.5"},{code:"MW",name:"Malawi",continent:"AF",bbox:"-17.1,32.7,-9.4,35.9"},{code:"ML",name:"Mali",continent:"AF",bbox:"10.1,-12.3,25.0,4.3"},{code:"MR",name:"Mauritania",continent:"AF",bbox:"14.7,-17.1,27.3,-4.8"},{code:"MU",name:"Mauritius",continent:"AF",bbox:"-20.5,57.3,-19.9,57.8"},{code:"MA",name:"Morocco",continent:"AF",bbox:"27.7,-13.2,35.9,-1.0"},{code:"MZ",name:"Mozambique",continent:"AF",bbox:"-26.9,30.2,-10.5,40.8"},{code:"NA",name:"Namibia",continent:"AF",bbox:"-28.9,11.7,-16.9,25.3"},{code:"NE",name:"Niger",continent:"AF",bbox:"11.7,0.2,23.5,16.0"},{code:"NG",name:"Nigeria",continent:"AF",bbox:"4.3,2.7,13.9,14.7"},{code:"RW",name:"Rwanda",continent:"AF",bbox:"-2.8,28.9,-1.1,30.9"},{code:"SN",name:"Senegal",continent:"AF",bbox:"12.3,-17.5,16.7,-11.4"},{code:"SL",name:"Sierra Leone",continent:"AF",bbox:"6.9,-13.3,10.0,-10.3"},{code:"SO",name:"Somalia",continent:"AF",bbox:"-1.7,40.9,12.0,51.4"},{code:"ZA",name:"South Africa",continent:"AF",bbox:"-34.8,16.5,-22.1,32.9"},{code:"SS",name:"South Sudan",continent:"AF",bbox:"3.5,24.1,12.2,35.9"},{code:"SD",name:"Sudan",continent:"AF",bbox:"8.7,21.8,22.2,38.6"},{code:"TZ",name:"Tanzania",continent:"AF",bbox:"-11.7,29.3,-1.0,40.4"},{code:"TG",name:"Togo",continent:"AF",bbox:"6.1,-0.1,11.1,1.8"},{code:"TN",name:"Tunisia",continent:"AF",bbox:"30.2,7.5,37.5,11.6"},{code:"UG",name:"Uganda",continent:"AF",bbox:"-1.5,29.6,4.2,35.0"},{code:"ZM",name:"Zambia",continent:"AF",bbox:"-18.1,21.9,-8.2,33.7"},{code:"ZW",name:"Zimbabwe",continent:"AF",bbox:"-22.4,25.2,-15.6,33.1"},{code:"CA",name:"Canada",continent:"NA",bbox:"41.7,-141.0,83.1,-52.6"},{code:"US",name:"United States",continent:"NA",bbox:"24.4,-125.0,49.4,-66.9"},{code:"MX",name:"Mexico",continent:"NA",bbox:"14.5,-118.4,32.7,-86.7"},{code:"GT",name:"Guatemala",continent:"NA",bbox:"13.7,-92.2,17.8,-88.2"},{code:"BZ",name:"Belize",continent:"NA",bbox:"15.9,-89.2,18.5,-87.8"},{code:"SV",name:"El Salvador",continent:"NA",bbox:"13.1,-90.1,14.4,-87.7"},{code:"HN",name:"Honduras",continent:"NA",bbox:"12.9,-89.4,16.5,-83.1"},{code:"NI",name:"Nicaragua",continent:"NA",bbox:"10.7,-87.7,15.0,-83.1"},{code:"CR",name:"Costa Rica",continent:"NA",bbox:"8.0,-85.9,11.2,-82.5"},{code:"PA",name:"Panama",continent:"NA",bbox:"7.2,-83.1,9.6,-77.2"},{code:"CU",name:"Cuba",continent:"NA",bbox:"19.8,-85.0,23.3,-74.1"},{code:"DO",name:"Dominican Republic",continent:"NA",bbox:"17.5,-72.0,19.9,-68.3"},{code:"HT",name:"Haiti",continent:"NA",bbox:"18.0,-74.5,20.1,-71.6"},{code:"JM",name:"Jamaica",continent:"NA",bbox:"17.7,-78.4,18.5,-76.2"},{code:"BS",name:"Bahamas",continent:"NA",bbox:"20.9,-79.0,27.3,-72.7"},{code:"TT",name:"Trinidad and Tobago",continent:"NA",bbox:"10.0,-61.9,11.4,-60.5"},{code:"AR",name:"Argentina",continent:"SA",bbox:"-55.1,-73.6,-21.8,-53.6"},{code:"BO",name:"Bolivia",continent:"SA",bbox:"-22.9,-69.6,-9.7,-57.5"},{code:"BR",name:"Brazil",continent:"SA",bbox:"-33.8,-74.0,5.3,-34.8"},{code:"CL",name:"Chile",continent:"SA",bbox:"-55.9,-75.6,-17.5,-66.4"},{code:"CO",name:"Colombia",continent:"SA",bbox:"-4.2,-79.0,12.5,-66.9"},{code:"EC",name:"Ecuador",continent:"SA",bbox:"-5.0,-81.1,1.4,-75.2"},{code:"GY",name:"Guyana",continent:"SA",bbox:"1.2,-61.4,8.6,-56.5"},{code:"PY",name:"Paraguay",continent:"SA",bbox:"-27.6,-62.6,-19.3,-54.3"},{code:"PE",name:"Peru",continent:"SA",bbox:"-18.4,-81.3,0.0,-68.7"},{code:"SR",name:"Suriname",continent:"SA",bbox:"1.8,-58.1,6.0,-54.0"},{code:"UY",name:"Uruguay",continent:"SA",bbox:"-35.0,-58.4,-30.1,-53.1"},{code:"VE",name:"Venezuela",continent:"SA",bbox:"0.6,-73.4,12.2,-59.8"},{code:"AU",name:"Australia",continent:"OC",bbox:"-43.6,113.3,-10.7,153.6"},{code:"NZ",name:"New Zealand",continent:"OC",bbox:"-47.3,166.4,-34.4,178.6"},{code:"PG",name:"Papua New Guinea",continent:"OC",bbox:"-11.7,140.8,-1.3,155.9"},{code:"FJ",name:"Fiji",continent:"OC",bbox:"-19.2,177.0,-16.0,180.0"}],hm=new Map(Ra.map(t=>[t.code,t]));function pm(t){const i=String(t||"").split(",").map(s=>Number(s.trim()));return i.length!==4||i.some(s=>Number.isNaN(s))?null:i}function mm(t){const i=hm.get(t);return i?i.bbox:""}function pr(t,i){if(typeof t!="number"||typeof i!="number"||Number.isNaN(t)||Number.isNaN(i))return null;let s=null,l=1/0;for(const u of Ra){const d=pm(u.bbox);if(!d)continue;const[h,v,b,C]=d;if(tb||iC)continue;const T=Math.abs(b-h)*Math.abs(C-v);Tt.continent==="EU").slice().sort((t,i)=>t.name.localeCompare(i.name)).map(t=>({value:t.bbox,label:t.name}))}function vm(){return Ra.slice().sort((t,i)=>t.name.localeCompare(i.name)).map(t=>[t.code,t.name])}const _m=(t,i)=>{const s=t.__vccOpts||t;for(const[l,u]of i)s[l]=u;return s},bm={class:"mx-auto max-w-[1280px] p-7"},ym={class:"mb-5 flex flex-wrap items-end justify-between gap-4"},xm={class:"flex h-10 w-full max-w-[280px] items-center gap-2 rounded border border-line-strong bg-surface-1 px-3"},wm={class:"grid grid-cols-[210px_1fr] gap-6 max-[760px]:grid-cols-1"},km={class:"flex flex-col gap-0.5 max-[760px]:flex-row max-[760px]:overflow-x-auto"},Sm=["onClick"],Tm={class:"whitespace-nowrap"},Pm={class:"min-w-0"},Cm={key:0,class:"panel p-10 text-center text-sm text-ink-muted"},Lm={key:0,class:"eyebrow mb-2 mt-5 first:mt-0 flex items-center gap-2"},Mm={key:1,class:"panel mb-5 p-5"},Am={class:"flex items-center gap-1"},Em={class:"flex items-center gap-2"},Om={class:"font-mono text-sm text-ink"},zm={class:"inline-flex items-center gap-1 rounded-full bg-amber-soft px-2 py-0.5 text-[11px] font-semibold text-amber-fg"},Im={key:0,class:"mt-2 text-xs text-ink-muted"},$m={class:"grid max-w-[420px] gap-2"},Nm={class:"flex items-center gap-3"},Dm={key:2,class:"panel mb-5 p-5"},Fm=["value"],Rm=["value"],Bm=["value"],Um={class:"font-mono text-sm text-ink"},Vm={key:3},Zm={key:0,class:"mb-5 flex items-center gap-1 overflow-x-auto border-b border-line"},Hm=["onClick"],jm={key:1,class:"panel mb-5 p-5"},Wm={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Km={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Gm={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},qm={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Ym={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Jm={key:0},Xm={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Qm={class:"font-semibold text-ink-secondary"},eg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},tg={key:7,class:"my-4 rounded-lg border border-line bg-surface-2 p-4","data-keywords":"credits usage quota remaining daily allowance rate limit"},ng={class:"flex items-center justify-between gap-3"},ig={class:"flex items-center gap-2 text-sm font-semibold text-ink"},og={key:0,class:"text-[11px] text-ink-muted"},sg={class:"mt-2 flex items-baseline gap-1.5"},ag={class:"font-mono text-2xl font-semibold text-ink"},rg={class:"text-sm text-ink-muted"},lg={class:"mt-2 h-2 w-full overflow-hidden rounded-full bg-line"},ug={class:"mt-2 text-xs text-ink-muted"},cg={class:"mt-2 text-sm text-ink"},dg={class:"font-semibold"},fg={class:"mt-1 text-xs text-ink-muted"},hg={key:1,class:"mt-2 text-xs text-ink-muted"},pg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},mg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},gg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},vg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},_g={key:1,class:"flex flex-col items-end gap-2"},bg={key:0,value:"__auto__"},yg=["label"],xg=["value"],wg={key:0,class:"w-64 text-right text-[11px] leading-snug text-ink-muted"},kg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Sg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Tg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Pg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Cg={key:8,class:"border-b border-line py-3 text-xs text-amber-fg"},Lg={class:"mt-4 flex flex-wrap items-center gap-3"},Mg=["disabled"],Ag=["disabled"],Eg={key:2,class:"text-xs text-danger-fg"},Og={class:"panel mb-5 p-5"},zg={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Ig={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},$g={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Ng={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Dg={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Fg={key:0},Rg={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Bg={class:"font-semibold text-ink-secondary"},Ug={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Vg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Zg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Hg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},jg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Wg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Kg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Gg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},qg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Yg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Jg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Xg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Qg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},ev={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},tv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},nv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},iv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},ov={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},sv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},av={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},rv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},lv={class:"mt-4 flex flex-wrap items-center gap-3"},uv=["disabled"],cv=["disabled"],dv={key:2,class:"text-xs text-danger-fg"},fv={key:3,class:"text-[11px] text-ink-muted"},hv={class:"panel mb-5 p-5"},pv={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},mv={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},gv={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},vv={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},_v={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},bv={key:0},yv={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},xv={class:"font-semibold text-ink-secondary"},wv={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},kv={key:0,class:"inline-flex items-center gap-2 break-all font-mono text-sm text-ink"},Sv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Tv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Pv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Cv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Lv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Mv={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Av={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Ev={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Ov={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},zv={class:"mt-4 flex flex-wrap items-center gap-3"},Iv=["disabled"],$v=["disabled"],Nv={key:2,class:"text-xs text-danger-fg"},Dv={key:3,class:"text-[11px] text-ink-muted"},Fv={key:3,class:"panel mb-5 p-5"},Rv={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Bv={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Uv={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Vv={key:1,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Zv={key:2,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Hv={key:5,class:"border-b border-line py-3 text-xs text-amber-fg"},jv={key:0},Wv={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Kv={class:"font-semibold text-ink-secondary"},Gv={key:7,class:"border-b border-line py-3 text-xs text-ink-muted"},qv={class:"flex w-full flex-col gap-2"},Yv={class:"break-all font-mono text-sm text-ink"},Jv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Xv={key:1,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Qv={key:0,class:"text-xs text-ink-muted"},e_={key:1,class:"border-b border-line py-3 text-xs text-ink-muted"},t_={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},n_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},i_={class:"mt-4 flex flex-wrap items-center gap-3"},o_=["disabled"],s_=["disabled"],a_={key:2,class:"text-xs text-danger-fg"},r_={key:3,class:"text-[11px] text-ink-muted"},l_={key:4,class:"panel mb-5 p-5"},u_={class:"flex items-center gap-4"},c_=["src"],d_={key:1,class:"grid h-16 w-16 place-items-center rounded-full bg-[var(--navy-800)] text-lg font-bold text-white"},f_={class:"flex gap-2"},h_={class:"btn-ghost cursor-pointer"},p_={class:"mt-1 text-right text-[11px] text-ink-muted"},m_={key:5,class:"panel mb-5 p-5"},g_={class:"flex items-center gap-3"},v_={key:0,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},__={class:"flex flex-wrap items-center gap-4"},b_={class:"min-w-0"},y_={class:"mt-1 select-all font-mono text-sm font-bold text-ink"},x_={class:"mt-3 flex items-center gap-2"},w_={key:0,class:"mt-2 text-xs text-danger-fg"},k_={key:1,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},S_={class:"mt-2 grid grid-cols-2 gap-1 font-mono text-xs text-ink-secondary sm:grid-cols-4"},T_={class:"rounded-lg border border-line bg-surface-2 p-3"},P_={class:"flex items-center gap-3"},C_={class:"grid h-9 w-9 place-items-center rounded-full bg-accent-soft text-accent-soft-fg"},L_={class:"min-w-0 flex-1"},M_={class:"text-sm font-semibold text-ink"},A_={class:"font-mono text-[11px] text-ink-muted"},E_={key:6,class:"mb-5"},O_={key:0,class:"panel mb-5 p-5"},z_={class:"grid max-w-[520px] gap-2"},I_={class:"flex flex-wrap gap-2"},$_=["disabled","title"],N_=["value"],D_=["value"],F_={class:"flex items-center gap-2 py-1 text-sm text-ink-secondary"},R_={class:"flex items-center gap-3"},B_=["disabled"],U_={key:0,class:"text-xs text-danger-fg"},V_={key:1,class:"text-xs text-ink-muted"},Z_={key:1,class:"panel mb-5 p-5"},H_={class:"grid max-w-[520px] gap-2"},j_={class:"flex flex-wrap gap-2"},W_=["value"],K_=["value"],G_={key:1,class:"text-xs text-ink-muted"},q_={class:"font-semibold text-ink-secondary"},Y_={class:"flex items-center gap-3"},J_=["disabled"],X_={key:0,class:"text-xs text-danger-fg"},Q_={class:"panel overflow-hidden p-0"},e1={class:"flex items-center justify-between px-5 py-4"},t1=["disabled"],n1={key:0,class:"px-5 pb-5 text-sm text-danger-fg"},i1={key:1,class:"px-5 pb-8 text-sm text-ink-muted"},o1={key:2,class:"overflow-x-auto"},s1={class:"w-full border-collapse text-sm"},a1={class:"text-left"},r1={class:"px-5 py-3"},l1={class:"text-ink"},u1={key:0,class:"ml-1.5 text-[11px] text-ink-muted"},c1={class:"px-5 py-3"},d1={class:"px-5 py-3"},f1={class:"px-5 py-3"},h1={class:"px-5 py-3 text-right"},p1=["onClick"],m1={key:1,class:"inline-flex items-center gap-1.5"},g1=["onClick"],v1=["onClick"],_1={key:7,class:"mb-5"},b1={key:0,class:"panel mb-5 p-5"},y1={class:"grid max-w-[520px] gap-2"},x1={class:"flex items-center gap-3"},w1={key:0,class:"text-xs text-danger-fg"},k1={key:1,class:"panel mb-5 p-5"},S1={class:"grid max-w-[520px] gap-2"},T1={class:"flex items-center gap-3"},P1=["disabled"],C1={key:0,class:"text-xs text-danger-fg"},L1={class:"panel overflow-hidden p-0"},M1={key:0,class:"px-5 pb-8 text-sm text-ink-muted"},A1={key:1,class:"overflow-x-auto"},E1={class:"w-full border-collapse text-sm"},O1={class:"text-left"},z1={class:"px-5 py-3"},I1={class:"inline-flex items-center gap-2 text-ink"},$1={class:"px-5 py-3 text-ink-secondary"},N1={class:"px-5 py-3 text-right"},D1=["onClick"],F1={key:1,class:"inline-flex items-center gap-1.5"},R1=["onClick"],B1=["disabled","title","onClick"],U1={key:8,class:"mb-5"},V1={class:"panel mb-5 p-5"},Z1={class:"btn-ghost cursor-pointer"},H1={key:0,class:"mt-2 text-xs text-ink-muted"},j1={class:"rounded-lg border p-5",style:{"border-color":"color-mix(in srgb, var(--danger) 35%, transparent)",background:"var(--danger-soft)"}},W1={class:"flex items-center gap-2 text-danger-fg"},K1={class:"mt-4 rounded-lg border border-line bg-surface-1 p-4"},G1={class:"mt-3 flex items-start gap-2 text-sm text-ink-secondary"},q1={class:"mt-3"},Y1={class:"eyebrow mb-1 block"},J1={class:"text-ink"},X1=["placeholder"],Q1={class:"mt-4 flex flex-wrap items-center gap-3"},eb=["disabled"],tb=["disabled"],nb={key:2,class:"text-xs text-ink-muted"},ib={key:0,class:"mt-3 rounded border border-line bg-surface-2 px-3 py-2 text-xs text-ink-secondary"},ob={key:0,class:"fixed bottom-5 right-5 z-20 flex items-center gap-2 rounded-lg border border-line bg-surface-1 px-4 py-2.5 text-sm text-ink shadow-md"},gu="pv.opensky.health",vu="pv.filetransfer.health",_u="pv.webdav.health",bu="pv.localstorage.health",sb={__name:"Settings",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(t,{emit:i}){const s=t,l=i,u=we(()=>s.role==="superadmin"),d=we(()=>s.role==="admin"||s.role==="superadmin");function h(x){return x==="superadmin"?"Superadmin":x==="admin"?"Admin":"User"}function v(x){return x==="superadmin"||x==="admin"?"shield":"user"}function b(x){return x==="superadmin"||x==="admin"?C.accent:C.neutral}const C={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},T=we(()=>{const x=[{id:"account",label:"Account",icon:"user",kw:"name username email password verification login credentials role"},{id:"appearance",label:"Appearance",icon:"sliders",kw:"theme light dark system language region font size accessibility date time format motion"},{id:"integrations",label:"Integrations",icon:"radio",kw:"opensky flights adsb aircraft plugin oauth credentials bounding box plan connection ftp sftp ftps file transfer server host upload download local storage folder drive isolated private read only webdav nextcloud owncloud dav url https"},{id:"profile",label:"Profile",icon:"image",kw:"avatar photo display name bio public"},{id:"security",label:"Privacy & Security",icon:"shield",kw:"two factor authentication 2fa sessions devices logout security privacy"}];return d.value&&x.push({id:"team",label:"User management",icon:"users",kw:"users team members add remove create delete role admin permissions rights organization"}),u.value&&x.push({id:"organizations",label:"Organizations",icon:"grid",kw:"organization org tenant company create rename delete members"}),x.push({id:"advanced",label:"Advanced",icon:"alertTriangle",kw:"export import data delete account danger zone",danger:!0}),x}),M=W("account"),R=W("");Yu("settingsSearch",R);const B=we(()=>R.value.trim().length>0),Z=we(()=>R.value.trim().toLowerCase());function F(x){return Z.value?(x.label+" "+x.kw).toLowerCase().includes(Z.value)||pe(x.id):!0}const he={account:["full name","username","email address verification verify","password change current new"],appearance:["theme light dark system","language","region","font size accessibility","reduce motion","date format","time format clock"],integrations:["opensky live flights","enable plugin","oauth client id secret","plan credits","bounding box","test connection","file transfer ftp sftp ftps","server host port username password","private key passphrase","base path directory","local storage folder drive","private isolated folder","read only access mode","webdav nextcloud owncloud dav","server url username password tls","base path directory folder"],profile:["profile photo avatar","display name","bio about","show email public"],security:["two factor authentication","active sessions devices","sign out"],team:["add user create account","members list role admin remove delete","organization org assign"],organizations:["add organization create","rename organization","delete organization members"],advanced:["export data download","import data upload","delete account permanent danger"]};function pe(x){return Z.value?(he[x]||[]).some(f=>f.includes(Z.value)):!0}const q=we(()=>B.value?T.value.filter(F):T.value.filter(x=>x.id===M.value)),Te=we({get:()=>co.value,set:x=>Pa(x)}),fe=[{value:"light",label:"Light",icon:"sun"},{value:"dark",label:"Dark",icon:"moon"},{value:"system",label:"System",icon:"monitor"}],Ue=[{value:"sm",label:"Small"},{value:"md",label:"Default"},{value:"lg",label:"Large"}],$e=[{value:"12",label:"12-hour"},{value:"24",label:"24-hour"}],Ie=[["en","English"],["es","Español"],["de","Deutsch"],["fr","Français"],["pl","Polski"],["ja","日本語"]],Ge=vm(),_e=we(()=>(Ge.find(([x])=>x===ve.region)||[null,ve.region])[1]),ye=[["MDY","MM/DD/YYYY"],["DMY","DD/MM/YYYY"],["YMD","YYYY/MM/DD"],["ISO","YYYY-MM-DD"]],ze=W(Date.now());let ne=null;const je=we(()=>fu(ze.value)),ie=kt({loaded:!1,available:!1,orgEnabled:!0,allowAnonymous:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),We=W("user"),le=kt({clientId:"",clientSecret:"",plan:"",bbox:""}),ce=W(""),se=W(!1),ot=W(!1),ee=W(null),be=W(null),Ne=we(()=>ee.value&&ee.value.credits||null),dt=we(()=>{const x=Ne.value;return!x||!x.daily||x.remaining==null?null:Math.max(0,Math.min(100,Math.round(x.remaining/x.daily*100)))}),at=we(()=>{const x=dt.value;return x==null?"bg-accent":x<=10?"bg-danger":x<=30?"bg-amber":"bg-success"});function Ze(x){return typeof x=="number"?x.toLocaleString():x}function Y(){if(!be.value)return"";const x=Math.max(0,Math.round((Date.now()-be.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function A(){try{ee.value&&localStorage.setItem(gu,JSON.stringify({health:ee.value,ts:be.value}))}catch{}}function z(){try{const x=localStorage.getItem(gu);if(!x)return;const f=JSON.parse(x);f&&f.health&&(ee.value=f.health,be.value=f.ts||null)}catch{}}const gt=[{value:"",label:"Not set"},{value:"anonymous",label:"Anonymous"},{value:"standard",label:"Standard"},{value:"contributor",label:"Contributor"}],ut=[{value:"user",label:"My settings",icon:"user"},{value:"org",label:"Organization",icon:"users"}],wt=[{label:"World",options:[{value:"-90,-180,90,180",label:"World"}]},{label:"Continents",options:[{value:"34,-25,72,45",label:"Europe"},{value:"-35,-18,38,52",label:"Africa"},{value:"5,25,82,180",label:"Asia"},{value:"7,-168,72,-52",label:"North America"},{value:"-56,-82,13,-34",label:"South America"},{value:"-48,110,-10,180",label:"Oceania"}]},{label:"European countries",options:gm()},{label:"Other countries",options:[{value:"24,-125,49.5,-66.5",label:"United States"},{value:"41.7,-141,83.1,-52.6",label:"Canada"},{value:"-43.6,113.3,-10.7,153.6",label:"Australia"},{value:"24,122.9,45.5,145.8",label:"Japan"}]}],y=wt.flatMap(x=>x.options);function _(x){const f=String(x||"").split(",").map(S=>S.trim());if(f.length!==4)return"";const j=f.map(Number);return j.some(S=>Number.isNaN(S))?"":j.join(",")}function w(x){const f=_(x),j=f&&y.find(S=>_(S.value)===f);return j?j.label:""}const K=W(!1),H=we({get(){if(!me.value&&ve.autoBbox)return"__auto__";if(K.value)return"__custom__";const x=_(le.bbox),f=x&&y.find(j=>_(j.value)===x);return f?f.value:"__custom__"},set(x){if(x==="__auto__"){me.value||(ve.autoBbox=!0),K.value=!1;return}if(me.value||(ve.autoBbox=!1),x==="__custom__"){K.value=!0;return}K.value=!1,le.bbox=x}}),V=we(()=>H.value==="__custom__"),ae=we(()=>H.value==="__auto__"),te=we(()=>ie.isSuperadmin),Q=we(()=>ie.isSuperadmin?"user":We.value),G=we(()=>ie.scopes[Q.value]||{editableLayer:"user",fields:{}}),me=we(()=>Q.value==="org");function oe(x){return G.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function ke(x){return te.value||oe(x).locked}function Ce(x){const f=oe(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function He(){le.clientId=oe("clientId").own||"",le.clientSecret=oe("clientSecret").own||"",le.plan=oe("plan").own||"",le.bbox=oe("bbox").own||"",K.value=!1}function et(x){ie.available=!!x.available,ie.orgEnabled=x.orgEnabled!==!1,ie.allowAnonymous=!!x.allowAnonymous,ie.enabled=!!x.enabled,ie.canEditOrg=!!x.canEditOrg,ie.isSuperadmin=!!x.isSuperadmin,ie.scopes=x.scopes||{},We.value==="org"&&!ie.canEditOrg&&(We.value="user"),He(),ie.loaded=!0}It(We,()=>{ce.value="",He()});async function U(){z();const{ok:x,body:f}=await dp();x&&et(f)}async function O(x){const f=me.value;f?ie.orgEnabled=x:ie.enabled=x;const{ok:j,body:S}=await lu(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(et(S),it(f?x?"OpenSky enabled for your organization.":"OpenSky disabled for your organization.":x?"OpenSky enabled.":"OpenSky disabled.")):(f?ie.orgEnabled=!x:ie.enabled=!x,it(S.error||"Could not update."))}async function xe(){ce.value="",se.value=!0;const x={};for(const Xe of["clientId","clientSecret","plan","bbox"])ke(Xe)||(x[Xe]=le[Xe]);const f={scope:Q.value,config:x};me.value||(f.enabled=ie.enabled);const{ok:j,body:S}=await lu(f);if(se.value=!1,!j){ce.value=S.error||"Could not save settings.";return}et(S),it(me.value?"Organization OpenSky settings saved.":"OpenSky settings saved.")}async function Je(){ot.value=!0,ee.value=null;const{ok:x,body:f}=await fp();ot.value=!1,ee.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},be.value=Date.now(),A()}function pt(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const Ve=kt({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),Vt=W("user"),de=["protocol","host","port","username","password","privateKey","keyPassphrase","hostKeyFingerprint","insecureSkipVerify","basePath"],Fe=kt(Object.fromEntries(de.map(x=>[x,""]))),Nt=W(""),qn=W(!1),fo=W(!1),gn=W(null),Yn=W(null),jo=[{value:"sftp",label:"SFTP"},{value:"ftps",label:"FTPS"},{value:"ftp",label:"FTP"}],Ba=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Wo=we(()=>Ve.isSuperadmin),Ko=we(()=>Ve.isSuperadmin?"user":Vt.value),Ua=we(()=>Ve.scopes[Ko.value]||{editableLayer:"user",fields:{}}),vn=we(()=>Ko.value==="org"),ho=we(()=>(en("protocol")?Ot("protocol").effective:Fe.protocol)||"sftp");function Ot(x){return Ua.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function en(x){return Wo.value||Ot(x).locked}function Pt(x){const f=Ot(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function Va(x){return(jo.find(f=>f.value===x)||{}).label||x||"—"}function Bs(){for(const x of de)Fe[x]=Ot(x).own||"";Fe.protocol||(Fe.protocol="sftp"),Fe.insecureSkipVerify||(Fe.insecureSkipVerify="false")}function tn(x){Ve.available=!!x.available,Ve.orgEnabled=x.orgEnabled!==!1,Ve.enabled=!!x.enabled,Ve.canEditOrg=!!x.canEditOrg,Ve.isSuperadmin=!!x.isSuperadmin,Ve.scopes=x.scopes||{},Vt.value==="org"&&!Ve.canEditOrg&&(Vt.value="user"),Bs(),Ve.loaded=!0}It(Vt,()=>{Nt.value="",Bs()});function Le(){if(!Yn.value)return"";const x=Math.max(0,Math.round((Date.now()-Yn.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function Us(){try{gn.value&&localStorage.setItem(vu,JSON.stringify({health:gn.value,ts:Yn.value}))}catch{}}function Vs(){try{const x=localStorage.getItem(vu);if(!x)return;const f=JSON.parse(x);f&&f.health&&(gn.value=f.health,Yn.value=f.ts||null)}catch{}}async function Zs(){Vs();const{ok:x,body:f}=await pp();x&&tn(f)}async function Go(x){const f=vn.value;f?Ve.orgEnabled=x:Ve.enabled=x;const{ok:j,body:S}=await uu(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(tn(S),it(f?x?"File transfer enabled for your organization.":"File transfer disabled for your organization.":x?"File transfer enabled.":"File transfer disabled.")):(f?Ve.orgEnabled=!x:Ve.enabled=!x,it(S.error||"Could not update."))}async function qo(){Nt.value="",qn.value=!0;const x={};for(const Xe of de)en(Xe)||(x[Xe]=Fe[Xe]);const f={scope:Ko.value,config:x};vn.value||(f.enabled=Ve.enabled);const{ok:j,body:S}=await uu(f);if(qn.value=!1,!j){Nt.value=S.error||"Could not save settings.";return}tn(S),it(vn.value?"Organization file-transfer settings saved.":"File-transfer settings saved.")}async function Hs(){fo.value=!0,gn.value=null;const{ok:x,body:f}=await mp();fo.value=!1,gn.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},Yn.value=Date.now(),Us()}function mi(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const rt=kt({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),gi=W("user"),Yo=["baseURL","username","password","insecureSkipVerify","basePath"],Zt=kt(Object.fromEntries(Yo.map(x=>[x,""]))),Di=W(""),Fi=W(!1),po=W(!1),nn=W(null),vi=W(null),Za=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Jo=we(()=>rt.isSuperadmin),Xo=we(()=>rt.isSuperadmin?"user":gi.value),Ha=we(()=>rt.scopes[Xo.value]||{editableLayer:"user",fields:{}}),on=we(()=>Xo.value==="org");function sn(x){return Ha.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function Jn(x){return Jo.value||sn(x).locked}function cn(x){const f=sn(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function _i(){for(const x of Yo)Zt[x]=sn(x).own||"";Zt.insecureSkipVerify||(Zt.insecureSkipVerify="false")}function tt(x){rt.available=!!x.available,rt.orgEnabled=x.orgEnabled!==!1,rt.enabled=!!x.enabled,rt.canEditOrg=!!x.canEditOrg,rt.isSuperadmin=!!x.isSuperadmin,rt.scopes=x.scopes||{},gi.value==="org"&&!rt.canEditOrg&&(gi.value="user"),_i(),rt.loaded=!0}It(gi,()=>{Di.value="",_i()});function yt(){if(!vi.value)return"";const x=Math.max(0,Math.round((Date.now()-vi.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function mo(){try{nn.value&&localStorage.setItem(_u,JSON.stringify({health:nn.value,ts:vi.value}))}catch{}}function bi(){try{const x=localStorage.getItem(_u);if(!x)return;const f=JSON.parse(x);f&&f.health&&(nn.value=f.health,vi.value=f.ts||null)}catch{}}async function yi(){bi();const{ok:x,body:f}=await _p();x&&tt(f)}async function go(x){const f=on.value;f?rt.orgEnabled=x:rt.enabled=x;const{ok:j,body:S}=await cu(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(tt(S),it(f?x?"WebDAV enabled for your organization.":"WebDAV disabled for your organization.":x?"WebDAV enabled.":"WebDAV disabled.")):(f?rt.orgEnabled=!x:rt.enabled=!x,it(S.error||"Could not update."))}async function qe(){Di.value="",Fi.value=!0;const x={};for(const Xe of Yo)Jn(Xe)||(x[Xe]=Zt[Xe]);const f={scope:Xo.value,config:x};on.value||(f.enabled=rt.enabled);const{ok:j,body:S}=await cu(f);if(Fi.value=!1,!j){Di.value=S.error||"Could not save settings.";return}tt(S),it(on.value?"Organization WebDAV settings saved.":"WebDAV settings saved.")}async function Tt(){po.value=!0,nn.value=null;const{ok:x,body:f}=await bp();po.value=!1,nn.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},vi.value=Date.now(),mo()}function Qo(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const Me=kt({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,isOrgUser:!1,mounts:[],privateFolder:!1,privateEnabled:!1,allowPrivate:!0,rootConfigured:!1,scopes:{}}),At=W("user"),vo=W(""),Fn=W(""),_n=W(!1),xt=W(!1),Dt=W(null),bn=W(null),An=W({}),_o=[{value:"",label:"Inherit"},{value:"false",label:"Read-write"},{value:"true",label:"Read-only"}],Xn=we(()=>Me.isSuperadmin),Ri=we(()=>Me.isSuperadmin?"user":At.value),es=we(()=>Me.scopes[Ri.value]||{editableLayer:"user",fields:{}}),Ft=we(()=>Ri.value==="org");function xi(x){return es.value.fields[x]||{effective:"",own:"",source:"unset",locked:!1}}function bo(x){return Xn.value||xi(x).locked}function Bi(x){const f=xi(x).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function js(x){return(_o.find(f=>f.value===x)||{}).label||"Inherit"}function yo(){vo.value=xi("readOnly").own||""}function Ui(x){Me.available=!!x.available,Me.orgEnabled=x.orgEnabled!==!1,Me.enabled=!!x.enabled,Me.canEditOrg=!!x.canEditOrg,Me.isSuperadmin=!!x.isSuperadmin,Me.isOrgUser=!!x.isOrgUser,Me.mounts=Array.isArray(x.mounts)?x.mounts:[],Me.privateFolder=!!x.privateFolder,Me.privateEnabled=!!x.privateEnabled,Me.allowPrivate=x.allowPrivate!==!1,Me.rootConfigured=!!x.rootConfigured,Me.scopes=x.scopes||{},At.value==="org"&&!Me.canEditOrg&&(At.value="user"),yo(),Me.loaded=!0}It(At,()=>{Fn.value="",yo()});function Ke(){if(!bn.value)return"";const x=Math.max(0,Math.round((Date.now()-bn.value)/1e3));if(x<60)return"just now";const f=Math.round(x/60);if(f<60)return`${f} min ago`;const j=Math.round(f/60);return j<24?`${j} h ago`:`${Math.round(j/24)} d ago`}function yn(){try{Dt.value&&localStorage.setItem(bu,JSON.stringify({health:Dt.value,ts:bn.value}))}catch{}}function mt(){try{const x=localStorage.getItem(bu);if(!x)return;const f=JSON.parse(x);f&&f.health&&(Dt.value=f.health,bn.value=f.ts||null)}catch{}}async function Ws(){mt();const{ok:x,body:f}=await gp();x&&Ui(f)}async function xo(x){const f=Ft.value;f?Me.orgEnabled=x:Me.enabled=x;const{ok:j,body:S}=await fa(f?{scope:"org",enabled:x}:{scope:"user",enabled:x});j?(Ui(S),it(f?x?"Local storage enabled for your organization.":"Local storage disabled for your organization.":x?"Local storage enabled.":"Local storage disabled.")):(f?Me.orgEnabled=!x:Me.enabled=!x,it(S.error||"Could not update."))}async function ts(x){Me.privateFolder=x;const{ok:f,body:j}=await fa({scope:"user",privateFolder:x});f?(Ui(j),it(x?"Private folder enabled.":"Private folder disabled.")):(Me.privateFolder=!x,it(j.error||"Could not update."))}async function ns(x){Me.allowPrivate=x;const{ok:f,body:j}=await fa({scope:"org",allowPrivate:x});f?(Ui(j),it(x?"Members may now create private folders.":"Private folders disabled for your organization.")):(Me.allowPrivate=!x,it(j.error||"Could not update."))}async function Qn(){Fn.value="",_n.value=!0;const x={};bo("readOnly")||(x.readOnly=vo.value);const f={scope:Ri.value,config:x};Ft.value||(f.enabled=Me.enabled);const{ok:j,body:S}=await fa(f);if(_n.value=!1,!j){Fn.value=S.error||"Could not save settings.";return}Ui(S),it(Ft.value?"Organization local-storage settings saved.":"Local-storage settings saved.")}async function is(){xt.value=!0,Dt.value=null,An.value={};const{ok:x,body:f}=await vp();xt.value=!1,Dt.value=x&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."};const j={};if(Array.isArray(f.mounts))for(const S of f.mounts)j[S.id]={status:S.status,detail:S.detail};An.value=j,bn.value=Date.now(),yn()}function wi(x){return x==="ok"?C.success:x==="degraded"?C.warning:C.danger}const Et=[{id:"apis-external",label:"APIs — External",icon:"globe"},{id:"drives-external",label:"Drives — External",icon:"server"},{id:"drives-local",label:"Drives — Local",icon:"monitor"}],En=W("apis-external");function wo(x){return B.value||En.value===x}const Vi=W("");let os=null;function it(x){Vi.value=x,clearTimeout(os),os=setTimeout(()=>Vi.value="",2200)}const Rt=kt({current:"",next:"",confirm:""}),ki=W(""),ss=W(!1);function nt(){if(ss.value=!1,!Rt.current)return ki.value="Enter your current password.";if(Rt.next.length<8)return ki.value="New password must be at least 8 characters.";if(Rt.next!==Rt.confirm)return ki.value="New passwords do not match.";ki.value="Validated. Connecting to the account service is pending — no password endpoint yet.",Rt.current=Rt.next=Rt.confirm=""}const as=W("");function dn(){as.value="Verification link would be sent once the account service is wired up."}function Zi(x){const f=x.target.files&&x.target.files[0];if(!f)return;if(f.size>1.5*1024*1024){it("Image too large (max ~1.5 MB).");return}const j=new FileReader;j.onload=()=>{ve.avatar=String(j.result),it("Photo updated.")},j.readAsDataURL(f)}function Ks(){ve.avatar="",it("Photo removed.")}const ja=we(()=>{var j,S,Xe;const f=(ve.displayName||ve.name||s.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((j=f[0])==null?void 0:j[0])||"P")+(((S=f[1])==null?void 0:S[0])||((Xe=f[0])==null?void 0:Xe[1])||"V")).toUpperCase()}),ei=W(!1),Gs=W(""),Hi=W(""),ji=W(""),ko=W([]);function Wi(x){const f="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let j="";for(let S=0;SWi(4).toLowerCase()+"-"+Wi(4).toLowerCase()),ji.value=""}function Ka(){ve.twoFactor=!1,ko.value=[],ei.value=!1}const fn=navigator.userAgent;function Rn(){return/Edg\//.test(fn)?"Edge":/OPR\//.test(fn)?"Opera":/Chrome\//.test(fn)?"Chrome":/Firefox\//.test(fn)?"Firefox":/Safari\//.test(fn)?"Safari":"Browser"}function qs(){return/Windows/.test(fn)?"Windows":/Mac OS X/.test(fn)?"macOS":/Android/.test(fn)?"Android":/iPhone|iPad/.test(fn)?"iOS":/Linux/.test(fn)?"Linux":"Unknown OS"}const Ys=Date.now(),Si=W([]),Ki=W(!1),Gi=W(""),Ct=kt({email:"",password:"",role:"user",organization:""}),Ti=W(""),So=W(!1),ti=W(""),Js=we(()=>{const x=[{value:"user",label:"User"},{value:"admin",label:"Admin"}];return u.value&&x.push({value:"superadmin",label:"Superadmin"}),x}),qi=W([]);async function Pi(){if(!d.value)return;const x=await sp();x.ok&&(qi.value=x.organizations.slice().sort((f,j)=>f.name.localeCompare(j.name)))}const Yi=we(()=>{const x=qi.value.map(f=>({value:f.id,label:f.name}));return u.value&&x.unshift({value:"",label:"No organization"}),x});async function an(){if(!d.value)return;Ki.value=!0,Gi.value="";const x=await tp();if(Ki.value=!1,!x.ok){Gi.value=x.status===403?"Manager role required.":"Could not load users.";return}Si.value=x.users.slice().sort((f,j)=>f.email.localeCompare(j.email))}function To(x){try{const f=x.data||{},j=Object.keys(f)[0];return j&&f[j]&&f[j].message||x.message||x.error||"Invalid input."}catch{return x.error||"Could not create user."}}async function Ji(){Ti.value="";const x=Ct.email.trim().toLowerCase();if(!x.includes("@"))return Ti.value="Enter a valid email.";if(Ct.password.length<8)return Ti.value="Password must be at least 8 characters.";So.value=!0;const f=u.value?Ct.organization:s.organization,{ok:j,body:S}=await np(x,Ct.password,Ct.role,f);if(So.value=!1,!j)return Ti.value=To(S);Ct.email="",Ct.password="",Ct.role="user",Ct.organization="",it("User created."),an()}async function rn(x){const{ok:f,body:j}=await op(x.id);if(ti.value="",!f)return it(j.error||"Could not remove user.");it("User removed."),an()}const st=kt({id:"",email:"",role:"user",verified:!1,password:"",organization:""}),On=W(""),Po=W(!1),Xi=we(()=>!!st.id&&st.email===s.email);function rs(x){ti.value="",st.id=x.id,st.email=x.email,st.role=x.role||"user",st.verified=!!x.verified,st.password="",st.organization=x.organization||"",On.value=""}function Xs(){st.id="",On.value=""}async function Ga(){On.value="";const x=st.email.trim().toLowerCase();if(!x.includes("@"))return On.value="Enter a valid email.";if(st.password&&st.password.length<8)return On.value="New password must be at least 8 characters (or leave blank).";const f={email:x,role:st.role,verified:st.verified};u.value&&(f.organization=st.organization),st.password&&(f.password=st.password),Po.value=!0;const{ok:j,body:S}=await ip(st.id,f);if(Po.value=!1,!j)return On.value=To(S);it("User updated."),Xs(),an()}const Qi=kt({name:""}),eo=W(""),Ht=W(!1),wn=W(""),zn=kt({id:"",name:""}),Bt=W(""),ls=we(()=>{const x={};for(const f of Si.value)f.organization&&(x[f.organization]=(x[f.organization]||0)+1);return x});async function ni(){eo.value="";const x=Qi.name.trim();if(!x)return eo.value="Enter an organization name.";Ht.value=!0;const{ok:f,body:j}=await ap(x);if(Ht.value=!1,!f)return eo.value=To(j);Qi.name="",it("Organization created."),Pi()}function qa(x){wn.value="",zn.id=x.id,zn.name=x.name,Bt.value=""}function Ci(){zn.id="",Bt.value=""}async function us(){Bt.value="";const x=zn.name.trim();if(!x)return Bt.value="Enter an organization name.";const{ok:f,body:j}=await rp(zn.id,x);if(!f)return Bt.value=To(j);it("Organization renamed."),Ci(),Pi(),an()}async function Co(x){const{ok:f,body:j}=await lp(x.id);if(wn.value="",!f)return it(j.error||"Could not delete organization.");it("Organization deleted."),Pi()}function Ya(){const x={_app:"PilotVault",_kind:"settings-export",exportedAt:new Date().toISOString(),email:s.email,prefs:{...ve},themeMode:co.value},f=new Blob([JSON.stringify(x,null,2)],{type:"application/json"}),j=URL.createObjectURL(f),S=document.createElement("a");S.href=j,S.download=`pilotvault-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(S),S.click(),S.remove(),URL.revokeObjectURL(j),it("Settings exported.")}const hn=W("");function Lo(x){const f=x.target.files&&x.target.files[0];if(!f)return;const j=new FileReader;j.onload=()=>{try{const S=JSON.parse(String(j.result)),Xe=S.prefs||S;if(!Vc(Xe))throw new Error("bad shape");S.themeMode&&Pa(S.themeMode),Gr(ve.fontSize),qr(ve.reduceMotion),hn.value="Settings imported and applied."}catch{hn.value="That file is not a valid PilotVault settings export."}},j.readAsText(f),x.target.value=""}const _t=kt({understand:!1,typed:"",cooldown:0,armed:!1,msg:""});let ii=null;const cs=we(()=>s.email||"DELETE MY ACCOUNT"),pn=we(()=>_t.understand&&_t.typed===cs.value);function Ja(){pn.value&&(_t.armed=!0,_t.cooldown=5,clearInterval(ii),ii=setInterval(()=>{_t.cooldown--,_t.cooldown<=0&&clearInterval(ii)},1e3))}It(pn,x=>{!x&&_t.armed&&(_t.armed=!1,_t.cooldown=0,clearInterval(ii))});function Li(){if(!(!_t.armed||_t.cooldown>0)){try{localStorage.removeItem("pv_prefs")}catch{}_t.msg="Account deletion requires the account service. Local data was cleared and you were signed out.",setTimeout(()=>l("logout"),900)}}return hi(()=>{ne=setInterval(()=>ze.value=Date.now(),1e3),Pi(),an(),U(),Zs(),yi(),Ws()}),Ho(()=>{clearInterval(ne),clearInterval(ii),clearTimeout(os)}),(x,f)=>(p(),g("div",bm,[r("div",ym,[f[63]||(f[63]=r("div",null,[r("div",{class:"eyebrow"},"Preferences"),r("h2",{class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},"Settings")],-1)),r("div",xm,[E(X,{name:"search",size:16,class:"text-ink-muted"}),re(r("input",{"onUpdate:modelValue":f[0]||(f[0]=j=>R.value=j),placeholder:"Search settings…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Se,R.value]]),R.value?(p(),g("button",{key:0,class:"text-ink-muted hover:text-ink","aria-label":"Clear search",onClick:f[1]||(f[1]=j=>R.value="")},[E(X,{name:"x",size:15})])):D("",!0)])]),r("div",wm,[re(r("nav",km,[(p(!0),g(ue,null,Be(T.value,j=>(p(),g("button",{key:j.id,class:Ee(["flex items-center gap-2.5 rounded px-3 py-2.5 text-left text-sm transition",[M.value===j.id?j.danger?"bg-danger-soft font-semibold text-danger-fg":"bg-accent-soft font-semibold text-accent-soft-fg":j.danger?"font-medium text-danger-fg hover:bg-danger-soft":"font-medium text-ink-secondary hover:bg-surface-2"]]),onClick:S=>M.value=j.id},[E(X,{name:j.icon,size:17},null,8,["name"]),r("span",Tm,k(j.label),1)],10,Sm))),128))],512),[[xh,!B.value]]),r("div",Pm,[B.value&&!q.value.length?(p(),g("div",Cm," No settings match “"+k(R.value)+"”. ",1)):D("",!0),(p(!0),g(ue,null,Be(q.value,j=>(p(),g(ue,{key:j.id},[B.value?(p(),g("div",Lm,[E(X,{name:j.icon,size:14},null,8,["name"]),$(" "+k(j.label),1)])):D("",!0),j.id==="account"?(p(),g("div",Mm,[E(Ae,{title:"Full name",desc:"Shown to your team on flights and audit logs.",keywords:"full name account"},{default:Pe(()=>[re(r("input",{"onUpdate:modelValue":f[2]||(f[2]=S=>Oe(ve).name=S),class:"field w-56",placeholder:"Jane Operator",onBlur:f[3]||(f[3]=S=>it("Saved."))},null,544),[[Se,Oe(ve).name]])]),_:1}),E(Ae,{title:"Username",desc:"Your unique handle within PilotVault.",keywords:"username handle"},{default:Pe(()=>[r("div",Am,[f[64]||(f[64]=r("span",{class:"text-sm text-ink-muted"},"@",-1)),re(r("input",{"onUpdate:modelValue":f[4]||(f[4]=S=>Oe(ve).username=S),class:"field w-48",placeholder:"jane",onBlur:f[5]||(f[5]=S=>it("Saved."))},null,544),[[Se,Oe(ve).username]])])]),_:1}),E(Ae,{title:"Email address",desc:"Used for sign-in and notifications.",keywords:"email verification verify"},{default:Pe(()=>[r("div",Em,[r("span",Om,k(t.email||"—"),1),r("span",zm,[E(X,{name:"mail",size:12}),f[65]||(f[65]=$(" Unverified ",-1))])])]),_:1}),E(Ae,{title:"Role",desc:"Your access level in PilotVault.",keywords:"role admin user superadmin access rights permissions"},{default:Pe(()=>[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",b(t.role)])},[E(X,{name:v(t.role),size:12},null,8,["name"]),$(k(h(t.role)),1)],2)]),_:1}),E(Ae,{title:"Organization",desc:"The organization your account belongs to.",keywords:"organization org tenant company"},{default:Pe(()=>[r("span",{class:Ee(["text-sm",t.organizationName?"text-ink":"text-ink-muted"])},k(t.organizationName||(u.value?"All organizations":"None")),3)]),_:1}),E(Ae,{block:"",title:"Verify email",desc:"Confirm ownership to enable password resets and alerts.",keywords:"verify email resend"},{default:Pe(()=>[r("button",{class:"btn-ghost",onClick:dn},"Send verification link"),as.value?(p(),g("p",Im,k(as.value),1)):D("",!0)]),_:1}),E(Ae,{block:"",title:"Change password",desc:"Use at least 8 characters.",keywords:"password change current new"},{default:Pe(()=>[r("div",$m,[re(r("input",{"onUpdate:modelValue":f[6]||(f[6]=S=>Rt.current=S),type:"password",class:"field",placeholder:"Current password"},null,512),[[Se,Rt.current]]),re(r("input",{"onUpdate:modelValue":f[7]||(f[7]=S=>Rt.next=S),type:"password",class:"field",placeholder:"New password"},null,512),[[Se,Rt.next]]),re(r("input",{"onUpdate:modelValue":f[8]||(f[8]=S=>Rt.confirm=S),type:"password",class:"field",placeholder:"Confirm new password"},null,512),[[Se,Rt.confirm]]),r("div",Nm,[r("button",{class:"btn-accent",onClick:nt},"Update password"),ki.value?(p(),g("span",{key:0,class:Ee(["text-xs",ss.value?"text-success-fg":"text-ink-muted"])},k(ki.value),3)):D("",!0)])])]),_:1})])):j.id==="appearance"?(p(),g("div",Dm,[E(Ae,{title:"Theme",desc:"Light, dark, or follow your system.",keywords:"theme light dark system appearance"},{default:Pe(()=>[E(Tn,{modelValue:Te.value,"onUpdate:modelValue":f[9]||(f[9]=S=>Te.value=S),options:fe},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Font size",desc:"Scales the entire interface for readability.",keywords:"font size accessibility text"},{default:Pe(()=>[E(Tn,{modelValue:Oe(ve).fontSize,"onUpdate:modelValue":f[10]||(f[10]=S=>Oe(ve).fontSize=S),options:Ue},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Reduce motion",desc:"Minimise animations and transitions.",keywords:"reduce motion accessibility animation"},{default:Pe(()=>[E(un,{modelValue:Oe(ve).reduceMotion,"onUpdate:modelValue":f[11]||(f[11]=S=>Oe(ve).reduceMotion=S)},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Language",desc:"Interface language.",keywords:"language locale"},{default:Pe(()=>[re(r("select",{"onUpdate:modelValue":f[12]||(f[12]=S=>Oe(ve).language=S),class:"field w-48"},[(p(),g(ue,null,Be(Ie,([S,Xe])=>r("option",{key:S,value:S},k(Xe),9,Fm)),64))],512),[[Mt,Oe(ve).language]])]),_:1}),E(Ae,{title:"Region",desc:"Affects number, unit and date defaults.",keywords:"region country locale"},{default:Pe(()=>[re(r("select",{"onUpdate:modelValue":f[13]||(f[13]=S=>Oe(ve).region=S),class:"field w-48"},[(p(!0),g(ue,null,Be(Oe(Ge),([S,Xe])=>(p(),g("option",{key:S,value:S},k(Xe),9,Rm))),128))],512),[[Mt,Oe(ve).region]])]),_:1}),E(Ae,{title:"Date format",desc:"How calendar dates are displayed.",keywords:"date format"},{default:Pe(()=>[re(r("select",{"onUpdate:modelValue":f[14]||(f[14]=S=>Oe(ve).dateFormat=S),class:"field w-48"},[(p(),g(ue,null,Be(ye,([S,Xe])=>r("option",{key:S,value:S},k(Xe),9,Bm)),64))],512),[[Mt,Oe(ve).dateFormat]])]),_:1}),E(Ae,{title:"Time format",desc:"12- or 24-hour clock.",keywords:"time format clock 12 24 hour"},{default:Pe(()=>[E(Tn,{modelValue:Oe(ve).timeFormat,"onUpdate:modelValue":f[15]||(f[15]=S=>Oe(ve).timeFormat=S),options:$e},null,8,["modelValue"])]),_:1}),E(Ae,{title:"Preview",desc:"How timestamps appear across the app.",keywords:"preview date time"},{default:Pe(()=>[r("span",Um,k(je.value),1)]),_:1}),f[66]||(f[66]=r("p",{class:"mt-3 text-xs text-ink-muted"}," Language & region are stored now; full localisation ships with the account service. ",-1))])):j.id==="integrations"?(p(),g("div",Vm,[B.value?D("",!0):(p(),g("div",Zm,[(p(),g(ue,null,Be(Et,S=>r("button",{key:S.id,type:"button",class:Ee(["-mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",En.value===S.id?"border-accent text-ink":"border-transparent text-ink-secondary hover:text-ink"]),onClick:Xe=>En.value=S.id},[E(X,{name:S.icon,size:16},null,8,["name"]),$(k(S.label),1)],10,Hm)),64))])),wo("apis-external")?(p(),g("div",jm,[r("div",Wm,[r("div",Km,[E(X,{name:"radio",size:20})]),f[67]||(f[67]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"OpenSky Network"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Live ADS-B aircraft data. Configure your own OAuth2 credentials, plan and default bounding box. ")],-1))]),ie.loaded&&!ie.available?(p(),g("div",Gm,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[68]||(f[68]=$(" OpenSky is currently disabled by your administrator. Contact them to enable it. ",-1))])):D("",!0),ie.canEditOrg?(p(),g("div",qm,[f[69]||(f[69]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:We.value,"onUpdate:modelValue":f[16]||(f[16]=S=>We.value=S),options:ut},null,8,["modelValue"])])):D("",!0),me.value?(p(),lt(Ae,{key:2,title:"Enable OpenSky (organization-wide)",desc:"Turn OpenSky on or off for everyone in your organization.",keywords:"enable disable plugin opensky organization"},{default:Pe(()=>[E(un,{"model-value":ie.orgEnabled,disabled:!ie.available,"onUpdate:modelValue":O},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:3,title:"Enable OpenSky",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin opensky"},{default:Pe(()=>[E(un,{"model-value":ie.enabled,disabled:!ie.available||!ie.orgEnabled,"onUpdate:modelValue":O},null,8,["model-value","disabled"])]),_:1})),!me.value&&ie.available&&!ie.orgEnabled?(p(),g("div",Ym,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[71]||(f[71]=$("OpenSky is turned off for your organization",-1)),ie.canEditOrg?(p(),g("span",Jm,[...f[70]||(f[70]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[72]||(f[72]=$(". ",-1))])):D("",!0),me.value?(p(),g("div",Xm,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[73]||(f[73]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Qm,k(t.organizationName||"your organization"),1),f[74]||(f[74]=$(". Leave a field blank to let each user choose their own; a value set here overrides the user's. ",-1))])):te.value?(p(),g("div",eg," As a superadmin you manage the global OpenSky configuration in the API Server panel. The effective configuration is shown below. ")):D("",!0),ie.available&&!me.value?(p(),g("div",tg,[r("div",ng,[r("div",ig,[E(X,{name:"signal",size:15}),f[75]||(f[75]=$("Credit usage ",-1))]),be.value?(p(),g("span",og,"Checked "+k(Y()),1)):D("",!0)]),Ne.value?(p(),g(ue,{key:0},[Ne.value.remaining!=null?(p(),g(ue,{key:0},[r("div",sg,[r("span",ag,k(Ze(Ne.value.remaining)),1),r("span",rg,"/ "+k(Ze(Ne.value.daily))+" credits left today",1)]),r("div",lg,[r("div",{class:Ee(["h-full rounded-full transition-all",at.value]),style:Bo({width:dt.value+"%"})},null,6)]),r("div",ug," Used "+k(Ze(Ne.value.daily-Ne.value.remaining))+" today · "+k(Ne.value.probeCost)+" credit"+k(Ne.value.probeCost===1?"":"s")+" per query · "+k(Ne.value.mode),1)],64)):(p(),g(ue,{key:1},[r("div",cg,[f[76]||(f[76]=$("Daily allowance: ",-1)),r("span",dg,k(Ze(Ne.value.daily)),1),f[77]||(f[77]=$(" credits",-1))]),r("div",fg,k(Ne.value.probeCost)+" credit"+k(Ne.value.probeCost===1?"":"s")+" per query · "+k(Ne.value.mode)+". OpenSky only reports live remaining credits for authenticated requests — add OAuth2 credentials below to track usage. ",1)],64))],64)):(p(),g("div",hg,[...f[78]||(f[78]=[$(" Run ",-1),r("span",{class:"font-semibold text-ink-secondary"},"Test connection",-1),$(" below to fetch your live OpenSky credit balance. ",-1)])]))])):D("",!0),E(Ae,{title:"OpenSky plan",desc:"Your account tier — sets the daily credit allowance.",keywords:"plan tier credits"},{default:Pe(()=>[ke("plan")?(p(),g("span",pg,[$(k((gt.find(S=>S.value===oe("plan").effective)||{}).label||oe("plan").effective||"—")+" ",1),Ce("plan")?(p(),g("span",mg,[E(X,{name:"lock",size:10}),$(k(Ce("plan")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:le.plan,"onUpdate:modelValue":f[17]||(f[17]=S=>le.plan=S),options:gt},null,8,["modelValue"]))]),_:1}),E(Ae,{title:"Default bounding box",desc:"Automatic follows your location; or pick a region, or enter lamin,lomin,lamax,lomax by hand.",keywords:"bounding box bbox area region country continent world europe custom coordinates automatic location drone"},{default:Pe(()=>[ke("bbox")?(p(),g("span",gg,[$(k(w(oe("bbox").effective)||oe("bbox").effective||"—")+" ",1),Ce("bbox")?(p(),g("span",vg,[E(X,{name:"lock",size:10}),$(k(Ce("bbox")),1)])):D("",!0)])):(p(),g("div",_g,[re(r("select",{"onUpdate:modelValue":f[18]||(f[18]=S=>H.value=S),class:"field w-64"},[me.value?D("",!0):(p(),g("option",bg,"Automatic (by location)")),(p(),g(ue,null,Be(wt,S=>r("optgroup",{key:S.label,label:S.label},[(p(!0),g(ue,null,Be(S.options,Xe=>(p(),g("option",{key:Xe.value,value:Xe.value},k(Xe.label),9,xg))),128))],8,yg)),64)),f[79]||(f[79]=r("option",{value:"__custom__"},"Custom…",-1))],512),[[Mt,H.value]]),ae.value?(p(),g("p",wg," Live map follows drone location → your device location → your Region ("+k(_e.value)+"). ",1)):D("",!0),V.value?re((p(),g("input",{key:1,"onUpdate:modelValue":f[19]||(f[19]=S=>le.bbox=S),class:"field w-64 font-mono",placeholder:"50.5,3.2,53.7,7.3"},null,512)),[[Se,le.bbox]]):D("",!0)]))]),_:1}),E(Ae,{title:"OAuth2 client ID",desc:"Optional — leave blank for anonymous access (lower limits).",keywords:"oauth client id credentials"},{default:Pe(()=>[ke("clientId")?(p(),g("span",kg,[$(k(oe("clientId").effective||"—")+" ",1),Ce("clientId")?(p(),g("span",Sg,[E(X,{name:"lock",size:10}),$(k(Ce("clientId")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[20]||(f[20]=S=>le.clientId=S),class:"field w-64",placeholder:"your-api-client"},null,512)),[[Se,le.clientId]])]),_:1}),E(Ae,{title:"OAuth2 client secret",desc:"Paired with the client ID for authenticated access.",keywords:"oauth client secret credentials password"},{default:Pe(()=>[ke("clientSecret")?(p(),g("span",Tg,[$(k(oe("clientSecret").effective||"—")+" ",1),Ce("clientSecret")?(p(),g("span",Pg,[E(X,{name:"lock",size:10}),$(k(Ce("clientSecret")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[21]||(f[21]=S=>le.clientSecret=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,le.clientSecret]])]),_:1}),ie.available&&!ie.allowAnonymous?(p(),g("div",Cg," Anonymous access is disabled by the administrator — OpenSky needs OAuth2 credentials from some layer to work. ")):D("",!0),r("div",Lg,[te.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:se.value||!ie.available,onClick:xe},k(se.value?"Saving…":me.value?"Save organization settings":"Save settings"),9,Mg)),me.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:ot.value||!ie.available,onClick:Je},k(ot.value?"Testing…":"Test connection"),9,Ag)),ce.value?(p(),g("span",Eg,k(ce.value),1)):D("",!0),ee.value&&!me.value?(p(),g("span",{key:3,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",pt(ee.value.status)])},[f[80]||(f[80]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(ee.value.detail||ee.value.status),1)],2)):D("",!0)])])):D("",!0),wo("drives-external")?(p(),g(ue,{key:2},[r("div",Og,[r("div",zg,[r("div",Ig,[E(X,{name:"server",size:20})]),f[81]||(f[81]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"File Transfer (FTP / SFTP)"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to an FTP, FTPS or SFTP server. Configure the connection your account uses for file transfers. ")],-1))]),Ve.loaded&&!Ve.available?(p(),g("div",$g,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[82]||(f[82]=$(" File transfer is currently disabled by your administrator. Contact them to enable it. ",-1))])):D("",!0),Ve.canEditOrg?(p(),g("div",Ng,[f[83]||(f[83]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:Vt.value,"onUpdate:modelValue":f[22]||(f[22]=S=>Vt.value=S),options:ut},null,8,["modelValue"])])):D("",!0),vn.value?(p(),lt(Ae,{key:2,title:"Enable file transfer (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin ftp sftp organization"},{default:Pe(()=>[E(un,{"model-value":Ve.orgEnabled,disabled:!Ve.available,"onUpdate:modelValue":Go},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:3,title:"Enable file transfer",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin ftp sftp"},{default:Pe(()=>[E(un,{"model-value":Ve.enabled,disabled:!Ve.available||!Ve.orgEnabled,"onUpdate:modelValue":Go},null,8,["model-value","disabled"])]),_:1})),!vn.value&&Ve.available&&!Ve.orgEnabled?(p(),g("div",Dg,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[85]||(f[85]=$("File transfer is turned off for your organization",-1)),Ve.canEditOrg?(p(),g("span",Fg,[...f[84]||(f[84]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[86]||(f[86]=$(". ",-1))])):D("",!0),vn.value?(p(),g("div",Rg,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[87]||(f[87]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Bg,k(t.organizationName||"your organization"),1),f[88]||(f[88]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Wo.value?(p(),g("div",Ug," As a superadmin you manage the global file-transfer configuration in the API Server panel. The effective configuration is shown below. ")):D("",!0),E(Ae,{title:"Protocol",desc:"SFTP (over SSH), FTPS (FTP over TLS), or plain FTP.",keywords:"protocol sftp ftps ftp"},{default:Pe(()=>[en("protocol")?(p(),g("span",Vg,[$(k(Va(Ot("protocol").effective))+" ",1),Pt("protocol")?(p(),g("span",Zg,[E(X,{name:"lock",size:10}),$(k(Pt("protocol")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:Fe.protocol,"onUpdate:modelValue":f[23]||(f[23]=S=>Fe.protocol=S),options:jo},null,8,["modelValue"]))]),_:1}),E(Ae,{title:"Host",desc:"Server hostname or IP address.",keywords:"host server address"},{default:Pe(()=>[en("host")?(p(),g("span",Hg,[$(k(Ot("host").effective||"—")+" ",1),Pt("host")?(p(),g("span",jg,[E(X,{name:"lock",size:10}),$(k(Pt("host")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[24]||(f[24]=S=>Fe.host=S),class:"field w-64",placeholder:"files.example.com"},null,512)),[[Se,Fe.host]])]),_:1}),E(Ae,{title:"Port",desc:"Leave blank for the protocol default (22 for SFTP, 21 for FTP/FTPS).",keywords:"port"},{default:Pe(()=>[en("port")?(p(),g("span",Wg,[$(k(Ot("port").effective||"default")+" ",1),Pt("port")?(p(),g("span",Kg,[E(X,{name:"lock",size:10}),$(k(Pt("port")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[25]||(f[25]=S=>Fe.port=S),inputmode:"numeric",class:"field w-24 font-mono",placeholder:"22"},null,512)),[[Se,Fe.port]])]),_:1}),E(Ae,{title:"Username",desc:"Account used to authenticate.",keywords:"username login account"},{default:Pe(()=>[en("username")?(p(),g("span",Gg,[$(k(Ot("username").effective||"—")+" ",1),Pt("username")?(p(),g("span",qg,[E(X,{name:"lock",size:10}),$(k(Pt("username")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[26]||(f[26]=S=>Fe.username=S),class:"field w-64",placeholder:"user"},null,512)),[[Se,Fe.username]])]),_:1}),E(Ae,{title:"Password",desc:"Password auth for FTP/FTPS, or SFTP password login. Leave blank to use a key.",keywords:"password secret credentials"},{default:Pe(()=>[en("password")?(p(),g("span",Yg,[$(k(Ot("password").effective||"—")+" ",1),Pt("password")?(p(),g("span",Jg,[E(X,{name:"lock",size:10}),$(k(Pt("password")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[27]||(f[27]=S=>Fe.password=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,Fe.password]])]),_:1}),ho.value==="sftp"?(p(),lt(Ae,{key:7,block:"",title:"SSH private key",desc:"PEM key for SFTP key auth — used instead of, or alongside, a password.",keywords:"private key ssh pem identity"},{default:Pe(()=>[en("privateKey")?(p(),g("span",Xg,[$(k(Ot("privateKey").effective||"—")+" ",1),Pt("privateKey")?(p(),g("span",Qg,[E(X,{name:"lock",size:10}),$(k(Pt("privateKey")),1)])):D("",!0)])):re((p(),g("textarea",{key:1,"onUpdate:modelValue":f[28]||(f[28]=S=>Fe.privateKey=S),rows:"3",class:"field w-full font-mono text-xs",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----"},null,512)),[[Se,Fe.privateKey]])]),_:1})):D("",!0),ho.value==="sftp"?(p(),lt(Ae,{key:8,title:"Private key passphrase",desc:"Passphrase protecting the SSH private key, if any.",keywords:"passphrase key secret"},{default:Pe(()=>[en("keyPassphrase")?(p(),g("span",ev,[$(k(Ot("keyPassphrase").effective||"—")+" ",1),Pt("keyPassphrase")?(p(),g("span",tv,[E(X,{name:"lock",size:10}),$(k(Pt("keyPassphrase")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[29]||(f[29]=S=>Fe.keyPassphrase=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,Fe.keyPassphrase]])]),_:1})):D("",!0),ho.value==="sftp"?(p(),lt(Ae,{key:9,title:"Host key fingerprint",desc:"Optional SHA256:… fingerprint to pin the server's host key. Blank accepts any key.",keywords:"host key fingerprint verify trust"},{default:Pe(()=>[en("hostKeyFingerprint")?(p(),g("span",nv,[$(k(Ot("hostKeyFingerprint").effective||"—")+" ",1),Pt("hostKeyFingerprint")?(p(),g("span",iv,[E(X,{name:"lock",size:10}),$(k(Pt("hostKeyFingerprint")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[30]||(f[30]=S=>Fe.hostKeyFingerprint=S),class:"field w-full font-mono text-xs",placeholder:"SHA256:…"},null,512)),[[Se,Fe.hostKeyFingerprint]])]),_:1})):D("",!0),ho.value==="ftps"?(p(),lt(Ae,{key:10,title:"TLS verification",desc:"Skip only for self-signed test servers.",keywords:"tls certificate verify insecure ftps"},{default:Pe(()=>[en("insecureSkipVerify")?(p(),g("span",ov,[$(k(Ot("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),Pt("insecureSkipVerify")?(p(),g("span",sv,[E(X,{name:"lock",size:10}),$(k(Pt("insecureSkipVerify")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:Fe.insecureSkipVerify,"onUpdate:modelValue":f[31]||(f[31]=S=>Fe.insecureSkipVerify=S),options:Ba},null,8,["modelValue"]))]),_:1})):D("",!0),E(Ae,{title:"Base path",desc:"Working directory and health-check target, e.g. /uploads.",keywords:"base path directory folder root"},{default:Pe(()=>[en("basePath")?(p(),g("span",av,[$(k(Ot("basePath").effective||"—")+" ",1),Pt("basePath")?(p(),g("span",rv,[E(X,{name:"lock",size:10}),$(k(Pt("basePath")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[32]||(f[32]=S=>Fe.basePath=S),class:"field w-64 font-mono",placeholder:"/uploads"},null,512)),[[Se,Fe.basePath]])]),_:1}),r("div",lv,[Wo.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:qn.value||!Ve.available,onClick:qo},k(qn.value?"Saving…":vn.value?"Save organization settings":"Save settings"),9,uv)),vn.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:fo.value||!Ve.available,onClick:Hs},k(fo.value?"Testing…":"Test connection"),9,cv)),Nt.value?(p(),g("span",dv,k(Nt.value),1)):D("",!0),Yn.value&&!vn.value?(p(),g("span",fv,"Checked "+k(Le()),1)):D("",!0),gn.value&&!vn.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",mi(gn.value.status)])},[f[89]||(f[89]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(gn.value.detail||gn.value.status),1)],2)):D("",!0)])]),r("div",hv,[r("div",pv,[r("div",mv,[E(X,{name:"cloud",size:20})]),f[90]||(f[90]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"WebDAV"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to a WebDAV server (Nextcloud, ownCloud, IIS, …). Configure the connection your account uses. ")],-1))]),rt.loaded&&!rt.available?(p(),g("div",gv,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[91]||(f[91]=$(" WebDAV is currently disabled by your administrator. Contact them to enable it. ",-1))])):D("",!0),rt.canEditOrg?(p(),g("div",vv,[f[92]||(f[92]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:gi.value,"onUpdate:modelValue":f[33]||(f[33]=S=>gi.value=S),options:ut},null,8,["modelValue"])])):D("",!0),on.value?(p(),lt(Ae,{key:2,title:"Enable WebDAV (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin webdav organization"},{default:Pe(()=>[E(un,{"model-value":rt.orgEnabled,disabled:!rt.available,"onUpdate:modelValue":go},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:3,title:"Enable WebDAV",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin webdav"},{default:Pe(()=>[E(un,{"model-value":rt.enabled,disabled:!rt.available||!rt.orgEnabled,"onUpdate:modelValue":go},null,8,["model-value","disabled"])]),_:1})),!on.value&&rt.available&&!rt.orgEnabled?(p(),g("div",_v,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[94]||(f[94]=$("WebDAV is turned off for your organization",-1)),rt.canEditOrg?(p(),g("span",bv,[...f[93]||(f[93]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[95]||(f[95]=$(". ",-1))])):D("",!0),on.value?(p(),g("div",yv,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[96]||(f[96]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",xv,k(t.organizationName||"your organization"),1),f[97]||(f[97]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Jo.value?(p(),g("div",wv," As a superadmin you manage the global WebDAV configuration in the API Server panel. The effective configuration is shown below. ")):D("",!0),E(Ae,{block:"",title:"Server URL",desc:"WebDAV endpoint including scheme, e.g. https://cloud.example.com/remote.php/dav/files/alice/.",keywords:"url server address endpoint webdav host"},{default:Pe(()=>[Jn("baseURL")?(p(),g("span",kv,[$(k(sn("baseURL").effective||"—")+" ",1),cn("baseURL")?(p(),g("span",Sv,[E(X,{name:"lock",size:10}),$(k(cn("baseURL")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[34]||(f[34]=S=>Zt.baseURL=S),class:"field w-full font-mono text-xs",placeholder:"https://cloud.example.com/remote.php/dav/files/alice/"},null,512)),[[Se,Zt.baseURL]])]),_:1}),E(Ae,{title:"Username",desc:"Account used to authenticate (leave blank for a public share).",keywords:"username login account"},{default:Pe(()=>[Jn("username")?(p(),g("span",Tv,[$(k(sn("username").effective||"—")+" ",1),cn("username")?(p(),g("span",Pv,[E(X,{name:"lock",size:10}),$(k(cn("username")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[35]||(f[35]=S=>Zt.username=S),class:"field w-64",placeholder:"user"},null,512)),[[Se,Zt.username]])]),_:1}),E(Ae,{title:"Password",desc:"Password or app-specific token for HTTP Basic auth.",keywords:"password secret credentials token"},{default:Pe(()=>[Jn("password")?(p(),g("span",Cv,[$(k(sn("password").effective||"—")+" ",1),cn("password")?(p(),g("span",Lv,[E(X,{name:"lock",size:10}),$(k(cn("password")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[36]||(f[36]=S=>Zt.password=S),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,Zt.password]])]),_:1}),E(Ae,{title:"TLS verification",desc:"Only affects HTTPS. Skip only for self-signed test servers.",keywords:"tls certificate verify insecure https"},{default:Pe(()=>[Jn("insecureSkipVerify")?(p(),g("span",Mv,[$(k(sn("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),cn("insecureSkipVerify")?(p(),g("span",Av,[E(X,{name:"lock",size:10}),$(k(cn("insecureSkipVerify")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:Zt.insecureSkipVerify,"onUpdate:modelValue":f[37]||(f[37]=S=>Zt.insecureSkipVerify=S),options:Za},null,8,["modelValue"]))]),_:1}),E(Ae,{title:"Base path",desc:"Working directory under the server URL and health-check target, e.g. /Documents.",keywords:"base path directory folder root"},{default:Pe(()=>[Jn("basePath")?(p(),g("span",Ev,[$(k(sn("basePath").effective||"—")+" ",1),cn("basePath")?(p(),g("span",Ov,[E(X,{name:"lock",size:10}),$(k(cn("basePath")),1)])):D("",!0)])):re((p(),g("input",{key:1,"onUpdate:modelValue":f[38]||(f[38]=S=>Zt.basePath=S),class:"field w-64 font-mono",placeholder:"/Documents"},null,512)),[[Se,Zt.basePath]])]),_:1}),r("div",zv,[Jo.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:Fi.value||!rt.available,onClick:qe},k(Fi.value?"Saving…":on.value?"Save organization settings":"Save settings"),9,Iv)),on.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:po.value||!rt.available,onClick:Tt},k(po.value?"Testing…":"Test connection"),9,$v)),Di.value?(p(),g("span",Nv,k(Di.value),1)):D("",!0),vi.value&&!on.value?(p(),g("span",Dv,"Checked "+k(yt()),1)):D("",!0),nn.value&&!on.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Qo(nn.value.status)])},[f[98]||(f[98]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(nn.value.detail||nn.value.status),1)],2)):D("",!0)])])],64)):D("",!0),wo("drives-local")?(p(),g("div",Fv,[r("div",Rv,[r("div",Bv,[E(X,{name:"monitor",size:20})]),f[99]||(f[99]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"Local Storage"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," A private folder on the server for your files. Each user has their own; members of an organization share one. ")],-1))]),Me.loaded&&!Me.available?(p(),g("div",Uv,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[100]||(f[100]=$(" Local storage is currently disabled by your administrator. Contact them to enable it. ",-1))])):Me.loaded&&!Me.rootConfigured?(p(),g("div",Vv,[E(X,{name:"alertTriangle",size:14,class:"mr-1 inline"}),f[101]||(f[101]=$(" No storage root has been configured by your administrator yet. ",-1))])):D("",!0),Me.canEditOrg?(p(),g("div",Zv,[f[102]||(f[102]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:At.value,"onUpdate:modelValue":f[39]||(f[39]=S=>At.value=S),options:ut},null,8,["modelValue"])])):D("",!0),Ft.value?(p(),lt(Ae,{key:3,title:"Enable local storage (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin local storage folder organization"},{default:Pe(()=>[E(un,{"model-value":Me.orgEnabled,disabled:!Me.available,"onUpdate:modelValue":xo},null,8,["model-value","disabled"])]),_:1})):(p(),lt(Ae,{key:4,title:"Enable local storage",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin local storage folder"},{default:Pe(()=>[E(un,{"model-value":Me.enabled,disabled:!Me.available||!Me.orgEnabled,"onUpdate:modelValue":xo},null,8,["model-value","disabled"])]),_:1})),!Ft.value&&Me.available&&!Me.orgEnabled?(p(),g("div",Hv,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[104]||(f[104]=$("Local storage is turned off for your organization",-1)),Me.canEditOrg?(p(),g("span",jv,[...f[103]||(f[103]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):D("",!0),f[105]||(f[105]=$(". ",-1))])):D("",!0),Ft.value?(p(),g("div",Wv,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[106]||(f[106]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Kv,k(t.organizationName||"your organization"),1),f[107]||(f[107]=$(", who all share the organization folder. Members can additionally enable a private folder inside it. ",-1))])):Xn.value?(p(),g("div",Gv," As a superadmin you manage the global storage root in the API Server panel. The effective configuration is shown below. ")):D("",!0),Ft.value?(p(),lt(Ae,{key:8,title:"Private folders",desc:"Let members create a private folder inside the organization folder, reachable only by them.",keywords:"private folder members allow policy organization"},{default:Pe(()=>[E(un,{"model-value":Me.allowPrivate,disabled:!Me.available,"onUpdate:modelValue":ns},null,8,["model-value","disabled"])]),_:1})):D("",!0),Ft.value?D("",!0):(p(),g(ue,{key:9},[E(Ae,{block:"",title:"Your folders",desc:"Assigned automatically and isolated — no one else can reach your private folder.",keywords:"folder directory path storage location isolated private shared"},{default:Pe(()=>[r("div",qv,[(p(!0),g(ue,null,Be(Me.mounts,S=>(p(),g("div",{key:S.id,class:"flex flex-wrap items-center gap-2"},[r("span",Yv,k(S.path),1),S.kind==="shared"?(p(),g("span",Jv,[E(X,{name:"users",size:10}),f[108]||(f[108]=$("Shared with your organization",-1))])):(p(),g("span",Xv,[E(X,{name:"lock",size:10}),f[109]||(f[109]=$("Private to you",-1))])),An.value[S.id]?(p(),g("span",{key:2,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-semibold",wi(An.value[S.id].status)])},[f[110]||(f[110]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(An.value[S.id].status),1)],2)):D("",!0)]))),128)),Me.mounts.length?D("",!0):(p(),g("div",Qv,k(Me.rootConfigured?"No folder assigned yet.":"Waiting for the administrator to configure a storage root."),1))])]),_:1}),Me.isOrgUser&&Me.allowPrivate?(p(),lt(Ae,{key:0,title:"My private folder",desc:"Add a private folder inside the organization folder, reachable only by you — you keep the shared folder too.",keywords:"private folder personal isolated organization inside"},{default:Pe(()=>[E(un,{"model-value":Me.privateFolder,disabled:!Me.available||!Me.orgEnabled,"onUpdate:modelValue":ts},null,8,["model-value","disabled"])]),_:1})):Me.isOrgUser&&!Me.allowPrivate?(p(),g("div",e_,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[111]||(f[111]=$("Private folders are turned off by your organization. ",-1))])):D("",!0)],64)),E(Ae,{title:"Access mode",desc:"Read-only prevents uploads, deletes and folder creation.",keywords:"read only write access mode permission"},{default:Pe(()=>[bo("readOnly")?(p(),g("span",t_,[$(k(js(xi("readOnly").effective))+" ",1),Bi("readOnly")?(p(),g("span",n_,[E(X,{name:"lock",size:10}),$(k(Bi("readOnly")),1)])):D("",!0)])):(p(),lt(Tn,{key:1,modelValue:vo.value,"onUpdate:modelValue":f[40]||(f[40]=S=>vo.value=S),options:_o},null,8,["modelValue"]))]),_:1}),r("div",i_,[Xn.value?D("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:_n.value||!Me.available,onClick:Qn},k(_n.value?"Saving…":Ft.value?"Save organization settings":"Save settings"),9,o_)),Ft.value?D("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:xt.value||!Me.available,onClick:is},k(xt.value?"Testing…":"Test folder"),9,s_)),Fn.value?(p(),g("span",a_,k(Fn.value),1)):D("",!0),bn.value&&!Ft.value?(p(),g("span",r_,"Checked "+k(Ke()),1)):D("",!0),Dt.value&&!Ft.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",wi(Dt.value.status)])},[f[112]||(f[112]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(Dt.value.detail||Dt.value.status),1)],2)):D("",!0)])])):D("",!0)])):j.id==="profile"?(p(),g("div",l_,[E(Ae,{block:"",title:"Profile photo",desc:"PNG or JPG, up to ~1.5 MB. Stored on this device.",keywords:"avatar photo picture"},{default:Pe(()=>[r("div",u_,[Oe(ve).avatar?(p(),g("img",{key:0,src:Oe(ve).avatar,alt:"Avatar",class:"h-16 w-16 rounded-full object-cover"},null,8,c_)):(p(),g("div",d_,k(ja.value),1)),r("div",f_,[r("label",h_,[E(X,{name:"upload",size:15,class:"mr-1.5 inline"}),f[113]||(f[113]=$("Upload ",-1)),r("input",{type:"file",accept:"image/*",class:"hidden",onChange:Zi},null,32)]),Oe(ve).avatar?(p(),g("button",{key:0,class:"btn-ghost",onClick:Ks},"Remove")):D("",!0)])])]),_:1}),E(Ae,{title:"Display name",desc:"The name shown on your public profile.",keywords:"display name profile"},{default:Pe(()=>[re(r("input",{"onUpdate:modelValue":f[41]||(f[41]=S=>Oe(ve).displayName=S),class:"field w-56",placeholder:"Jane O.",onBlur:f[42]||(f[42]=S=>it("Saved."))},null,544),[[Se,Oe(ve).displayName]])]),_:1}),E(Ae,{block:"",title:"Bio",desc:"A short description others can see.",keywords:"bio about description"},{default:Pe(()=>[re(r("textarea",{"onUpdate:modelValue":f[43]||(f[43]=S=>Oe(ve).bio=S),rows:"3",maxlength:"240",class:"field w-full resize-none",placeholder:"Flight director, North yard operations…",onBlur:f[44]||(f[44]=S=>it("Saved."))},null,544),[[Se,Oe(ve).bio]]),r("div",p_,k((Oe(ve).bio||"").length)+"/240",1)]),_:1}),E(Ae,{title:"Show email on profile",desc:"Let teammates see your email address.",keywords:"show email public visibility"},{default:Pe(()=>[E(un,{modelValue:Oe(ve).showEmail,"onUpdate:modelValue":f[45]||(f[45]=S=>Oe(ve).showEmail=S)},null,8,["modelValue"])]),_:1})])):j.id==="security"?(p(),g("div",m_,[E(Ae,{block:"",title:"Two-factor authentication",desc:"Require a one-time code at sign-in.",keywords:"two factor 2fa authentication security"},{default:Pe(()=>[r("div",g_,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Oe(ve).twoFactor?"bg-success-soft text-success-fg":"bg-surface-2 text-ink-secondary"])},[f[114]||(f[114]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(Oe(ve).twoFactor?"Enabled":"Disabled"),1)],2),!Oe(ve).twoFactor&&!ei.value?(p(),g("button",{key:0,class:"btn-accent",onClick:Wa},"Enable 2FA")):Oe(ve).twoFactor?(p(),g("button",{key:1,class:"btn-ghost",onClick:Ka},"Disable")):D("",!0)]),ei.value?(p(),g("div",v_,[r("div",__,[f[116]||(f[116]=r("div",{class:"grid h-28 w-28 place-items-center rounded bg-white p-2"},[r("svg",{viewBox:"0 0 100 100",class:"h-full w-full"},[r("rect",{width:"100",height:"100",fill:"#fff"}),r("g",{fill:"#0F1E3D"},[r("rect",{x:"6",y:"6",width:"24",height:"24"}),r("rect",{x:"70",y:"6",width:"24",height:"24"}),r("rect",{x:"6",y:"70",width:"24",height:"24"}),r("rect",{x:"12",y:"12",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"76",y:"12",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"12",y:"76",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"40",y:"10",width:"8",height:"8"}),r("rect",{x:"52",y:"20",width:"8",height:"8"}),r("rect",{x:"40",y:"40",width:"8",height:"8"}),r("rect",{x:"60",y:"44",width:"8",height:"8"}),r("rect",{x:"44",y:"60",width:"8",height:"8"}),r("rect",{x:"70",y:"60",width:"8",height:"8"}),r("rect",{x:"80",y:"72",width:"8",height:"8"}),r("rect",{x:"60",y:"80",width:"8",height:"8"})])])],-1)),r("div",b_,[f[115]||(f[115]=r("div",{class:"text-xs text-ink-secondary"},"Scan with an authenticator app, or enter this secret:",-1)),r("div",y_,k(Gs.value),1),r("div",x_,[re(r("input",{"onUpdate:modelValue":f[46]||(f[46]=S=>Hi.value=S),inputmode:"numeric",maxlength:"6",class:"field w-28 font-mono tracking-[0.3em]",placeholder:"000000"},null,512),[[Se,Hi.value]]),r("button",{class:"btn-accent",onClick:xn},"Verify & enable")]),ji.value?(p(),g("p",w_,k(ji.value),1)):D("",!0)])])])):D("",!0),Oe(ve).twoFactor&&ko.value.length?(p(),g("div",k_,[f[117]||(f[117]=r("div",{class:"text-xs font-semibold text-ink"},"Recovery codes",-1)),f[118]||(f[118]=r("div",{class:"mt-0.5 text-xs text-ink-muted"},"Store these somewhere safe — each works once.",-1)),r("div",S_,[(p(!0),g(ue,null,Be(ko.value,S=>(p(),g("span",{key:S,class:"select-all"},k(S),1))),128))])])):D("",!0),f[119]||(f[119]=r("p",{class:"mt-2 text-xs text-ink-muted"},"Prototype — codes are generated locally until the account service verifies them.",-1))]),_:1}),E(Ae,{block:"",title:"Active sessions",desc:"Devices currently signed in to your account.",keywords:"sessions devices logout sign out remote"},{default:Pe(()=>[r("div",T_,[r("div",P_,[r("div",C_,[E(X,{name:"monitor",size:18})]),r("div",L_,[r("div",M_,[$(k(Rn())+" on "+k(qs())+" ",1),f[120]||(f[120]=r("span",{class:"ml-1 rounded-full bg-success-soft px-2 py-0.5 text-[10px] font-semibold text-success-fg"},"This device",-1))]),r("div",A_,"Signed in "+k(Oe(fu)(Oe(Ys))),1)]),r("button",{class:"btn-ghost",onClick:f[47]||(f[47]=S=>l("logout"))},"Log out")])]),f[121]||(f[121]=r("button",{class:"btn-ghost mt-2 opacity-60",disabled:"",title:"Requires the account service"}," Log out all other devices ",-1)),f[122]||(f[122]=r("p",{class:"mt-2 text-xs text-ink-muted"}," Only this session is visible from the browser; enumerating and revoking remote sessions needs the account service. ",-1))]),_:1})])):j.id==="team"?(p(),g("div",E_,[st.id?(p(),g("div",O_,[E(Ae,{block:"",title:`Edit user — ${st.email}`,desc:"Update details, change role, reset password, or set verified.",keywords:"edit user update role password verified organization"},{default:Pe(()=>[r("div",z_,[r("div",I_,[re(r("input",{"onUpdate:modelValue":f[48]||(f[48]=S=>st.email=S),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Se,st.email]]),re(r("select",{"onUpdate:modelValue":f[49]||(f[49]=S=>st.role=S),class:"field w-32",disabled:Xi.value,title:Xi.value?"You cannot change your own role":""},[(p(!0),g(ue,null,Be(Js.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,N_))),128))],8,$_),[[Mt,st.role]])]),u.value?re((p(),g("select",{key:0,"onUpdate:modelValue":f[50]||(f[50]=S=>st.organization=S),class:"field",title:"Organization"},[(p(!0),g(ue,null,Be(Yi.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,D_))),128))],512)),[[Mt,st.organization]]):D("",!0),re(r("input",{"onUpdate:modelValue":f[51]||(f[51]=S=>st.password=S),type:"password",class:"field",placeholder:"New password (leave blank to keep current)"},null,512),[[Se,st.password]]),r("label",F_,[E(un,{modelValue:st.verified,"onUpdate:modelValue":f[52]||(f[52]=S=>st.verified=S)},null,8,["modelValue"]),f[123]||(f[123]=$(" Email verified ",-1))]),r("div",R_,[r("button",{class:"btn-accent",disabled:Po.value,onClick:Ga},k(Po.value?"Saving…":"Save changes"),9,B_),r("button",{class:"btn-ghost",onClick:Xs},"Cancel"),On.value?(p(),g("span",U_,k(On.value),1)):D("",!0),Xi.value?(p(),g("span",V_,"Editing your own account — role locked.")):D("",!0)])])]),_:1},8,["title"])])):(p(),g("div",Z_,[E(Ae,{block:"",title:"Add user",desc:"Create a new account. Admins add users within their organization; superadmins can target any.",keywords:"add user create account role admin organization"},{default:Pe(()=>[r("div",H_,[r("div",j_,[re(r("input",{"onUpdate:modelValue":f[53]||(f[53]=S=>Ct.email=S),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Se,Ct.email]]),re(r("select",{"onUpdate:modelValue":f[54]||(f[54]=S=>Ct.role=S),class:"field w-32"},[(p(!0),g(ue,null,Be(Js.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,W_))),128))],512),[[Mt,Ct.role]])]),u.value?re((p(),g("select",{key:0,"onUpdate:modelValue":f[55]||(f[55]=S=>Ct.organization=S),class:"field",title:"Organization"},[(p(!0),g(ue,null,Be(Yi.value,S=>(p(),g("option",{key:S.value,value:S.value},k(S.label),9,K_))),128))],512)),[[Mt,Ct.organization]]):(p(),g("div",G_,[f[124]||(f[124]=$(" New users join your organization: ",-1)),r("span",q_,k(t.organizationName||"—"),1)])),re(r("input",{"onUpdate:modelValue":f[56]||(f[56]=S=>Ct.password=S),type:"password",class:"field",placeholder:"Temporary password (min 8 chars)"},null,512),[[Se,Ct.password]]),r("div",Y_,[r("button",{class:"btn-accent",disabled:So.value,onClick:Ji},k(So.value?"Creating…":"Create user"),9,J_),Ti.value?(p(),g("span",X_,k(Ti.value),1)):D("",!0)])])]),_:1})])),r("div",Q_,[r("div",e1,[f[125]||(f[125]=r("div",null,[r("div",{class:"eyebrow"},"Team"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All users")],-1)),r("button",{class:"btn-ghost",disabled:Ki.value,onClick:an},k(Ki.value?"Loading…":"Refresh"),9,t1)]),Gi.value?(p(),g("div",n1,k(Gi.value),1)):!Si.value.length&&!Ki.value?(p(),g("div",i1,"No users yet.")):(p(),g("div",o1,[r("table",s1,[r("thead",null,[r("tr",a1,[(p(),g(ue,null,Be(["User","Role","Organization","Status",""],S=>r("th",{key:S,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(S),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(Si.value,S=>(p(),g("tr",{key:S.id,class:Ee(["border-b border-line last:border-0",st.id===S.id?"bg-accent-soft":""])},[r("td",r1,[r("span",l1,k(S.email),1),S.email===t.email?(p(),g("span",u1,"(you)")):D("",!0)]),r("td",c1,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",b(S.role||"user")])},[E(X,{name:v(S.role||"user"),size:12},null,8,["name"]),$(k(h(S.role||"user")),1)],2)]),r("td",d1,[r("span",{class:Ee(["text-sm",S.organizationName?"text-ink-secondary":"text-ink-muted"])},k(S.organizationName||"—"),3)]),r("td",f1,[r("span",{class:Ee(["text-xs",S.verified?"text-success-fg":"text-ink-muted"])},k(S.verified?"Verified":"Unverified"),3)]),r("td",h1,[ti.value===S.id?(p(),g(ue,{key:0},[f[126]||(f[126]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Remove?",-1)),r("button",{class:"btn-ghost mr-1",onClick:f[57]||(f[57]=Xe=>ti.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Xe=>rn(S)}," Remove ",8,p1)],64)):(p(),g("div",m1,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Xe=>rs(S)},[E(X,{name:"settings",size:14}),f[127]||(f[127]=$(" Edit ",-1))],8,g1),S.email!==t.email?(p(),g("button",{key:0,class:"btn-ghost inline-flex items-center gap-1.5",onClick:Xe=>ti.value=S.id},[E(X,{name:"trash",size:14}),f[128]||(f[128]=$(" Remove ",-1))],8,v1)):D("",!0)]))])],2))),128))])])]))])])):j.id==="organizations"?(p(),g("div",_1,[zn.id?(p(),g("div",b1,[E(Ae,{block:"",title:"Rename organization",desc:"Update the organization's display name.",keywords:"rename organization edit"},{default:Pe(()=>[r("div",y1,[re(r("input",{"onUpdate:modelValue":f[58]||(f[58]=S=>zn.name=S),class:"field",placeholder:"Organization name",onKeyup:iu(us,["enter"])},null,544),[[Se,zn.name]]),r("div",x1,[r("button",{class:"btn-accent",onClick:us},"Save changes"),r("button",{class:"btn-ghost",onClick:Ci},"Cancel"),Bt.value?(p(),g("span",w1,k(Bt.value),1)):D("",!0)])])]),_:1})])):(p(),g("div",k1,[E(Ae,{block:"",title:"Add organization",desc:"Create a new organization. Assign admins and users to it from User management.",keywords:"add organization create tenant company"},{default:Pe(()=>[r("div",S1,[re(r("input",{"onUpdate:modelValue":f[59]||(f[59]=S=>Qi.name=S),class:"field",placeholder:"e.g. Northwind Aerial",onKeyup:iu(ni,["enter"])},null,544),[[Se,Qi.name]]),r("div",T1,[r("button",{class:"btn-accent",disabled:Ht.value,onClick:ni},k(Ht.value?"Creating…":"Create organization"),9,P1),eo.value?(p(),g("span",C1,k(eo.value),1)):D("",!0)])])]),_:1})])),r("div",L1,[r("div",{class:"flex items-center justify-between px-5 py-4"},[f[129]||(f[129]=r("div",null,[r("div",{class:"eyebrow"},"Tenancy"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All organizations")],-1)),r("button",{class:"btn-ghost",onClick:Pi},"Refresh")]),qi.value.length?(p(),g("div",A1,[r("table",E1,[r("thead",null,[r("tr",O1,[(p(),g(ue,null,Be(["Organization","Members",""],S=>r("th",{key:S,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(S),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(qi.value,S=>(p(),g("tr",{key:S.id,class:Ee(["border-b border-line last:border-0",zn.id===S.id?"bg-accent-soft":""])},[r("td",z1,[r("span",I1,[E(X,{name:"grid",size:14,class:"text-ink-muted"}),$(k(S.name),1)])]),r("td",$1,k(ls.value[S.id]||0),1),r("td",N1,[wn.value===S.id?(p(),g(ue,{key:0},[f[130]||(f[130]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:f[60]||(f[60]=Xe=>wn.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Xe=>Co(S)}," Delete ",8,D1)],64)):(p(),g("div",F1,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Xe=>qa(S)},[E(X,{name:"settings",size:14}),f[131]||(f[131]=$(" Rename ",-1))],8,R1),r("button",{class:"btn-ghost inline-flex items-center gap-1.5",disabled:(ls.value[S.id]||0)>0,title:(ls.value[S.id]||0)>0?"Reassign or remove members first":"",onClick:Xe=>wn.value=S.id},[E(X,{name:"trash",size:14}),f[132]||(f[132]=$(" Delete ",-1))],8,B1)]))])],2))),128))])])])):(p(),g("div",M1,"No organizations yet."))])])):j.id==="advanced"?(p(),g("div",U1,[r("div",V1,[E(Ae,{title:"Export data",desc:"Download your settings and profile as JSON.",keywords:"export data download backup"},{default:Pe(()=>[r("button",{class:"btn-ghost",onClick:Ya},[E(X,{name:"download",size:15,class:"mr-1.5 inline"}),f[133]||(f[133]=$("Export",-1))])]),_:1}),E(Ae,{block:"",title:"Import data",desc:"Restore settings from a previous export.",keywords:"import data upload restore"},{default:Pe(()=>[r("label",Z1,[E(X,{name:"upload",size:15,class:"mr-1.5 inline"}),f[134]||(f[134]=$("Choose file… ",-1)),r("input",{type:"file",accept:"application/json,.json",class:"hidden",onChange:Lo},null,32)]),hn.value?(p(),g("p",H1,k(hn.value),1)):D("",!0)]),_:1})]),r("div",j1,[r("div",W1,[E(X,{name:"alertTriangle",size:18}),f[135]||(f[135]=r("h3",{class:"text-sm font-bold uppercase tracking-caps"},"Danger zone",-1))]),f[140]||(f[140]=r("p",{class:"mt-1 text-xs text-ink-secondary"},"Deleting your account is permanent and cannot be undone.",-1)),r("div",K1,[f[139]||(f[139]=r("div",{class:"text-sm font-semibold text-ink"},"Delete account",-1)),r("label",G1,[re(r("input",{"onUpdate:modelValue":f[61]||(f[61]=S=>_t.understand=S),type:"checkbox",class:"mt-0.5 h-4 w-4 accent-[var(--danger)]"},null,512),[[Sa,_t.understand]]),f[136]||(f[136]=$(" I understand this permanently deletes my account and all associated data. ",-1))]),r("div",q1,[r("label",Y1,[f[137]||(f[137]=$("Type ",-1)),r("span",J1,k(cs.value),1),f[138]||(f[138]=$(" to confirm",-1))]),re(r("input",{"onUpdate:modelValue":f[62]||(f[62]=S=>_t.typed=S),class:"field w-full max-w-[360px] font-mono",placeholder:cs.value},null,8,X1),[[Se,_t.typed]])]),r("div",Q1,[_t.armed?(p(),g("button",{key:1,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",disabled:_t.cooldown>0,onClick:Li},k(_t.cooldown>0?`Confirm in ${_t.cooldown}s…`:"Permanently delete account"),9,tb)):(p(),g("button",{key:0,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-40",disabled:!pn.value,onClick:Ja}," Delete account… ",8,eb)),_t.armed&&_t.cooldown>0?(p(),g("span",nb,"Cooling-off period — read once more.")):D("",!0)]),_t.msg?(p(),g("p",ib,k(_t.msg),1)):D("",!0)])])])):D("",!0)],64))),128))])]),E(mh,{name:"fade"},{default:Pe(()=>[Vi.value?(p(),g("div",ob,[E(X,{name:"check",size:16,class:"text-success-fg"}),$(k(Vi.value),1)])):D("",!0)]),_:1})]))}},ab=_m(sb,[["__scopeId","data-v-977256e5"]]),rb={class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},lb={class:"flex flex-wrap items-center gap-3"},ub={class:"inline-flex rounded-lg border border-line bg-surface-1 p-0.5"},cb=["onClick"],db={class:"ml-auto flex items-center gap-2"},fb=["href"],hb={class:"grid grid-cols-4 gap-4 max-[900px]:grid-cols-2"},pb={class:"eyebrow"},mb={key:0,class:"panel border-danger/40 p-4 text-sm text-danger-fg"},gb={key:0,class:"panel p-5"},vb={class:"mb-4 flex items-center justify-between"},_b={class:"eyebrow"},bb={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},yb={class:"block"},xb={class:"block"},wb={class:"block"},kb={class:"block"},Sb={key:0,value:""},Tb=["value"],Pb={class:"block"},Cb={class:"block"},Lb={class:"block"},Mb={class:"block"},Ab={class:"block"},Eb=["value"],Ob={class:"block"},zb=["value"],Ib={class:"block"},$b=["value"],Nb={class:"block"},Db={class:"mt-3 block"},Fb={key:0,class:"mt-3 grid grid-cols-2 gap-3 max-[760px]:grid-cols-1"},Rb={class:"block"},Bb={class:"block"},Ub={class:"block"},Vb={class:"block"},Zb={class:"col-span-2 block max-[760px]:col-span-1"},Hb={class:"mt-4 flex items-center gap-3"},jb=["disabled"],Wb={key:0,class:"text-sm text-danger-fg"},Kb={class:"panel overflow-hidden p-0"},Gb={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},qb={key:1,class:"grid place-items-center px-5 py-16 text-center"},Yb={key:2,class:"overflow-x-auto"},Jb={class:"w-full border-collapse text-sm"},Xb={class:"text-left"},Qb={class:"whitespace-nowrap px-5 py-3 font-mono text-ink"},ey={key:0,class:"text-ink-muted"},ty={class:"px-5 py-3 text-ink-secondary"},ny=["title"],iy={class:"px-5 py-3 font-mono text-ink-secondary"},oy={class:"px-5 py-3 text-ink-secondary"},sy={class:"px-5 py-3"},ay=["onClick"],ry={class:"whitespace-nowrap px-5 py-3 text-right"},ly=["onClick"],uy=["onClick"],cy=["onClick"],dy={key:0,class:"border-b border-line bg-surface-2"},fy={colspan:"7",class:"px-5 py-3"},hy={class:"flex flex-wrap gap-x-8 gap-y-1.5 text-xs"},py={class:"text-ink-secondary"},my={class:"text-ink"},gy={class:"text-ink-secondary"},vy={class:"text-ink"},_y={class:"text-ink-secondary"},by={class:"font-mono text-ink"},yy={key:0,class:"text-ink-secondary"},xy={class:"text-ink"},wy={key:0,class:"mt-2 space-y-1"},ky={key:1,class:"mt-2 text-xs text-success-fg"},Sy={key:0,class:"panel p-5"},Ty={class:"mb-4 flex items-center justify-between"},Py={class:"eyebrow"},Cy={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},Ly={class:"block"},My={class:"block"},Ay={class:"block"},Ey={class:"block"},Oy={class:"block"},zy={class:"block"},Iy=["value"],$y={class:"mt-3 flex flex-wrap gap-6"},Ny={class:"flex items-center gap-2 text-sm text-ink-secondary"},Dy={class:"flex items-center gap-2 text-sm text-ink-secondary"},Fy={class:"mt-4 flex items-center gap-3"},Ry=["disabled"],By={key:0,class:"text-sm text-danger-fg"},Uy={class:"panel overflow-hidden p-0"},Vy={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Zy={key:1,class:"grid place-items-center px-5 py-16 text-center"},Hy={key:2,class:"overflow-x-auto"},jy={class:"w-full border-collapse text-sm"},Wy={class:"text-left"},Ky={class:"px-5 py-3 font-semibold text-ink"},Gy={class:"px-5 py-3 text-ink-secondary"},qy={class:"px-5 py-3 font-mono text-ink-secondary"},Yy={class:"px-5 py-3"},Jy={key:1,class:"text-ink-muted"},Xy={class:"px-5 py-3"},Qy={class:"whitespace-nowrap px-5 py-3 text-right"},ex=["onClick"],tx=["onClick"],nx=["onClick"],ix={__name:"Logbook",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},setup(t){const i=t,s={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},l=W("flights"),u=W([]),d=W([]),h=W(!1),v=W("");async function b(){h.value=!0,v.value="";const[Y,A]=await Promise.all([Rc(),kp()]);(!Y.ok||!A.ok)&&(v.value=Y.status===503||A.status===503?"Logbook storage is not configured on the API Server (service account missing).":"Could not load the logbook."),u.value=Y.drones,d.value=A.flights,h.value=!1}hi(b);function C(Y){const A=Y.compliance||{};return A.exempt?{tone:"neutral",label:"Exempt"}:(A.redFlags||[]).length?{tone:"danger",label:`${A.redFlags.length} issue${A.redFlags.length>1?"s":""}`}:{tone:"success",label:"Compliant"}}const T=W("");function M(Y){T.value=T.value===Y?"":Y}const R=[{value:"open",label:"Open"},{value:"specific",label:"Specific"},{value:"certified",label:"Certified"}],B=[{value:"commercial",label:"Commercial"},{value:"research",label:"Research"},{value:"public",label:"Public-benefit"},{value:"hobby",label:"Private hobby"},{value:"club_area",label:"Model-club area"}],Z=[{value:"",label:"Auto (from drone)"},{value:"manual",label:"Manual"},{value:"automatic",label:"Automatic (FDR)"}];function F(){var Y;return{operationDate:new Date().toISOString().slice(0,10),startTime:"",endTime:"",drone:((Y=u.value[0])==null?void 0:Y.id)||"",areaRoute:"",maxAltitudeAgl:"",pilotName:i.email,certificateRef:"",category:"open",purpose:"commercial",loggingPath:"",rawFdrLogUrl:"",authorisationRef:"",weather:"",airspaceRef:"",observer:"",incidents:"",notes:""}}const he=W(!1),pe=W(""),q=kt(F()),Te=W(""),fe=W(!1),Ue=W(!1);function $e(){Object.assign(q,F()),pe.value="",Te.value="",Ue.value=!1,he.value=!0}function Ie(Y){Object.assign(q,{operationDate:(Y.operationDate||"").slice(0,10),startTime:Y.startTime||"",endTime:Y.endTime||"",drone:Y.drone||"",areaRoute:Y.areaRoute||"",maxAltitudeAgl:Y.maxAltitudeAgl||"",pilotName:Y.pilotName||"",certificateRef:Y.certificateRef||"",category:Y.category||"open",purpose:Y.purpose||"commercial",loggingPath:Y.loggingPath||"",rawFdrLogUrl:Y.rawFdrLogUrl||"",authorisationRef:Y.authorisationRef||"",weather:Y.weather||"",airspaceRef:Y.airspaceRef||"",observer:Y.observer||"",incidents:Y.incidents||"",notes:Y.notes||""}),pe.value=Y.id,Te.value="",Ue.value=!!(Y.weather||Y.airspaceRef||Y.observer||Y.incidents||Y.notes),he.value=!0}function Ge(){he.value=!1,pe.value=""}async function _e(){var z;if(Te.value="",!q.drone){Te.value="Select a drone first (add one on the Drones tab).";return}fe.value=!0;const Y={...q,maxAltitudeAgl:Number(q.maxAltitudeAgl)||0},A=pe.value?await Tp(pe.value,Y):await Sp(Y);if(fe.value=!1,!A.ok){Te.value=((z=A.body)==null?void 0:z.error)||"Could not save the flight.";return}he.value=!1,await b()}const ye=W("");async function ze(Y){const A=await Pp(Y.id);ye.value="",A.ok&&await b()}const ne=["","C0","C1","C2","C3","C4","C5","C6"];function je(){return{name:"",model:"",serial:"",operatorNumber:"",mtomGrams:"",isToy:!1,autologsFlights:!1,cClass:""}}const ie=W(!1),We=W(""),le=kt(je()),ce=W(""),se=W(!1);function ot(){Object.assign(le,je()),We.value="",ce.value="",ie.value=!0}function ee(Y){Object.assign(le,{name:Y.name||"",model:Y.model||"",serial:Y.serial||"",operatorNumber:Y.operatorNumber||"",mtomGrams:Y.mtomGrams||"",isToy:!!Y.isToy,autologsFlights:!!Y.autologsFlights,cClass:Y.cClass||""}),We.value=Y.id,ce.value="",ie.value=!0}function be(){ie.value=!1,We.value=""}async function Ne(){var z;if(ce.value="",!le.name.trim()){ce.value="Give the drone a name.";return}se.value=!0;const Y={...le,mtomGrams:Number(le.mtomGrams)||0},A=We.value?await xp(We.value,Y):await yp(Y);if(se.value=!1,!A.ok){ce.value=((z=A.body)==null?void 0:z.error)||"Could not save the drone.";return}ie.value=!1,await b()}const dt=W("");async function at(Y){var z;const A=await wp(Y.id);dt.value="",A.ok?await b():ce.value=((z=A.body)==null?void 0:z.error)||"Could not delete the drone."}const Ze=we(()=>{const Y=d.value.length,A=d.value.filter(gt=>{var ut;return(((ut=gt.compliance)==null?void 0:ut.redFlags)||[]).length}).length,z=d.value.filter(gt=>{var ut;return(ut=gt.compliance)==null?void 0:ut.required}).length;return{total:Y,flagged:A,required:z,fleet:u.value.length}});return(Y,A)=>(p(),g("div",rb,[r("div",lb,[r("div",ub,[(p(),g(ue,null,Be([["flights","Flights"],["drones","Drones"]],z=>r("button",{key:z[0],class:Ee(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",l.value===z[0]?"bg-accent-soft text-accent-soft-fg":"text-ink-secondary hover:text-ink"]),onClick:gt=>l.value=z[0]},k(z[1]),11,cb)),64))]),r("div",db,[r("a",{href:Oe(Cp)(),class:"btn-ghost inline-flex items-center gap-2",title:"Download a compliance CSV (Trafikstyrelsen / police disclosure)"},[E(X,{name:"download",size:15}),A[29]||(A[29]=$(" Export CSV ",-1))],8,fb),l.value==="flights"?(p(),g("button",{key:0,class:"btn-accent inline-flex items-center gap-2",onClick:$e},[E(X,{name:"plus",size:15}),A[30]||(A[30]=$(" Log flight ",-1))])):(p(),g("button",{key:1,class:"btn-accent inline-flex items-center gap-2",onClick:ot},[E(X,{name:"plus",size:15}),A[31]||(A[31]=$(" Add drone ",-1))]))])]),r("div",hb,[(p(!0),g(ue,null,Be([{label:"Flights logged",value:Ze.value.total,tone:"neutral"},{label:"Require logbook",value:Ze.value.required,tone:"neutral"},{label:"Compliance flags",value:Ze.value.flagged,tone:Ze.value.flagged?"danger":"success"},{label:"Registered drones",value:Ze.value.fleet,tone:"neutral"}],z=>(p(),g("div",{key:z.label,class:"panel p-5"},[r("div",pb,k(z.label),1),r("div",{class:Ee(["mt-2 text-[30px] font-bold leading-none tracking-tightest",z.tone==="danger"?"text-danger-fg":z.tone==="success"?"text-success-fg":"text-ink"])},k(z.value),3)]))),128))]),v.value?(p(),g("div",mb,k(v.value),1)):D("",!0),l.value==="flights"?(p(),g(ue,{key:1},[he.value?(p(),g("div",gb,[r("div",vb,[r("div",null,[r("div",_b,k(pe.value?"Edit entry":"New entry"),1),A[32]||(A[32]=r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Logbook flight (BEK 1649 §5)",-1))]),r("button",{class:"btn-icon",onClick:Ge},[E(X,{name:"x",size:16})])]),r("div",bb,[r("label",yb,[A[33]||(A[33]=r("span",{class:"eyebrow mb-1 block"},"Date",-1)),re(r("input",{"onUpdate:modelValue":A[0]||(A[0]=z=>q.operationDate=z),type:"date",class:"field"},null,512),[[Se,q.operationDate]])]),r("label",xb,[A[34]||(A[34]=r("span",{class:"eyebrow mb-1 block"},"Start",-1)),re(r("input",{"onUpdate:modelValue":A[1]||(A[1]=z=>q.startTime=z),type:"time",class:"field"},null,512),[[Se,q.startTime]])]),r("label",wb,[A[35]||(A[35]=r("span",{class:"eyebrow mb-1 block"},"End",-1)),re(r("input",{"onUpdate:modelValue":A[2]||(A[2]=z=>q.endTime=z),type:"time",class:"field"},null,512),[[Se,q.endTime]])]),r("label",kb,[A[36]||(A[36]=r("span",{class:"eyebrow mb-1 block"},"Drone",-1)),re(r("select",{"onUpdate:modelValue":A[3]||(A[3]=z=>q.drone=z),class:"field"},[u.value.length?D("",!0):(p(),g("option",Sb,"— add a drone first —")),(p(!0),g(ue,null,Be(u.value,z=>(p(),g("option",{key:z.id,value:z.id},k(z.name)+k(z.model?` · ${z.model}`:""),9,Tb))),128))],512),[[Mt,q.drone]])]),r("label",Pb,[A[37]||(A[37]=r("span",{class:"eyebrow mb-1 block"},"Max altitude (m AGL)",-1)),re(r("input",{"onUpdate:modelValue":A[4]||(A[4]=z=>q.maxAltitudeAgl=z),type:"number",min:"0",class:"field",placeholder:"120"},null,512),[[Se,q.maxAltitudeAgl]])]),r("label",Cb,[A[38]||(A[38]=r("span",{class:"eyebrow mb-1 block"},"Area / route",-1)),re(r("input",{"onUpdate:modelValue":A[5]||(A[5]=z=>q.areaRoute=z),class:"field",placeholder:"Field N of Roskilde, grid survey"},null,512),[[Se,q.areaRoute]])]),r("label",Lb,[A[39]||(A[39]=r("span",{class:"eyebrow mb-1 block"},"Remote pilot name",-1)),re(r("input",{"onUpdate:modelValue":A[6]||(A[6]=z=>q.pilotName=z),class:"field",placeholder:"Full name"},null,512),[[Se,q.pilotName]])]),r("label",Mb,[A[40]||(A[40]=r("span",{class:"eyebrow mb-1 block"},"Certificate ref",-1)),re(r("input",{"onUpdate:modelValue":A[7]||(A[7]=z=>q.certificateRef=z),class:"field",placeholder:"A2 / STS cert no."},null,512),[[Se,q.certificateRef]])]),r("label",Ab,[A[41]||(A[41]=r("span",{class:"eyebrow mb-1 block"},"Logging path",-1)),re(r("select",{"onUpdate:modelValue":A[8]||(A[8]=z=>q.loggingPath=z),class:"field"},[(p(),g(ue,null,Be(Z,z=>r("option",{key:z.value,value:z.value},k(z.label),9,Eb)),64))],512),[[Mt,q.loggingPath]])]),r("label",Ob,[A[42]||(A[42]=r("span",{class:"eyebrow mb-1 block"},"Category",-1)),re(r("select",{"onUpdate:modelValue":A[9]||(A[9]=z=>q.category=z),class:"field"},[(p(),g(ue,null,Be(R,z=>r("option",{key:z.value,value:z.value},k(z.label),9,zb)),64))],512),[[Mt,q.category]])]),r("label",Ib,[A[43]||(A[43]=r("span",{class:"eyebrow mb-1 block"},"Purpose",-1)),re(r("select",{"onUpdate:modelValue":A[10]||(A[10]=z=>q.purpose=z),class:"field"},[(p(),g(ue,null,Be(B,z=>r("option",{key:z.value,value:z.value},k(z.label),9,$b)),64))],512),[[Mt,q.purpose]])]),r("label",Nb,[A[44]||(A[44]=r("span",{class:"eyebrow mb-1 block"},"Authorisation ref",-1)),re(r("input",{"onUpdate:modelValue":A[11]||(A[11]=z=>q.authorisationRef=z),class:"field",placeholder:"Specific-category ref"},null,512),[[Se,q.authorisationRef]])])]),r("label",Db,[A[45]||(A[45]=r("span",{class:"eyebrow mb-1 block"},"FDR log URL (automatic path)",-1)),re(r("input",{"onUpdate:modelValue":A[12]||(A[12]=z=>q.rawFdrLogUrl=z),class:"field",placeholder:"Link to the stored flight-data-recorder export"},null,512),[[Se,q.rawFdrLogUrl]])]),r("button",{class:"mt-4 flex items-center gap-1.5 text-sm font-semibold text-accent",onClick:A[13]||(A[13]=z=>Ue.value=!Ue.value)},[E(X,{name:Ue.value?"x":"plus",size:14},null,8,["name"]),A[46]||(A[46]=$(" Operational details (weather, airspace, incidents) ",-1))]),Ue.value?(p(),g("div",Fb,[r("label",Rb,[A[47]||(A[47]=r("span",{class:"eyebrow mb-1 block"},"Weather / wind",-1)),re(r("input",{"onUpdate:modelValue":A[14]||(A[14]=z=>q.weather=z),class:"field",placeholder:"6 m/s NW, CAVOK"},null,512),[[Se,q.weather]])]),r("label",Bb,[A[48]||(A[48]=r("span",{class:"eyebrow mb-1 block"},"Airspace / NOTAM ref",-1)),re(r("input",{"onUpdate:modelValue":A[15]||(A[15]=z=>q.airspaceRef=z),class:"field"},null,512),[[Se,q.airspaceRef]])]),r("label",Ub,[A[49]||(A[49]=r("span",{class:"eyebrow mb-1 block"},"Observer",-1)),re(r("input",{"onUpdate:modelValue":A[16]||(A[16]=z=>q.observer=z),class:"field"},null,512),[[Se,q.observer]])]),r("label",Vb,[A[50]||(A[50]=r("span",{class:"eyebrow mb-1 block"},"Incidents / anomalies",-1)),re(r("input",{"onUpdate:modelValue":A[17]||(A[17]=z=>q.incidents=z),class:"field",placeholder:"RTH trigger, GPS dropout…"},null,512),[[Se,q.incidents]])]),r("label",Zb,[A[51]||(A[51]=r("span",{class:"eyebrow mb-1 block"},"Notes",-1)),re(r("textarea",{"onUpdate:modelValue":A[18]||(A[18]=z=>q.notes=z),rows:"2",class:"field"},null,512),[[Se,q.notes]])])])):D("",!0),r("div",Hb,[r("button",{class:"btn-accent",disabled:fe.value,onClick:_e},k(fe.value?"Saving…":pe.value?"Save changes":"Log flight"),9,jb),r("button",{class:"btn-ghost",onClick:Ge},"Cancel"),Te.value?(p(),g("span",Wb,k(Te.value),1)):D("",!0)])])):D("",!0),r("div",Kb,[h.value?(p(),g("div",Gb,"Loading…")):d.value.length?(p(),g("div",Yb,[r("table",Jb,[r("thead",null,[r("tr",Xb,[(p(),g(ue,null,Be(["Date","Drone","Area / route","Alt","Pilot","Compliance",""],z=>r("th",{key:z,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(z),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(d.value,z=>{var gt,ut,wt,y;return p(),g(ue,{key:z.id},[r("tr",{class:Ee(["border-b border-line last:border-0",pe.value===z.id?"bg-accent-soft":""])},[r("td",Qb,[$(k((z.operationDate||"").slice(0,10))+" ",1),z.startTime?(p(),g("span",ey,k(z.startTime),1)):D("",!0)]),r("td",ty,k(z.droneName||"—"),1),r("td",{class:"max-w-[220px] truncate px-5 py-3 text-ink-secondary",title:z.areaRoute},k(z.areaRoute||"—"),9,ny),r("td",iy,k(z.maxAltitudeAgl?z.maxAltitudeAgl+" m":"—"),1),r("td",oy,k(z.pilotName||"—"),1),r("td",sy,[r("button",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",s[C(z).tone]]),onClick:_=>M(z.id)},[C(z).tone==="danger"?(p(),lt(X,{key:0,name:"alertTriangle",size:12})):C(z).tone==="success"?(p(),lt(X,{key:1,name:"check",size:12})):D("",!0),$(" "+k(C(z).label),1)],10,ay)]),r("td",ry,[ye.value===z.id?(p(),g(ue,{key:0},[A[54]||(A[54]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:A[19]||(A[19]=_=>ye.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:_=>ze(z)},"Delete",8,ly)],64)):(p(),g(ue,{key:1},[r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:_=>Ie(z)},[E(X,{name:"sliders",size:13}),A[55]||(A[55]=$(" Edit",-1))],8,uy),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:_=>ye.value=z.id},[E(X,{name:"trash",size:13})],8,cy)],64))])],2),T.value===z.id?(p(),g("tr",dy,[r("td",fy,[r("div",hy,[r("span",py,[A[56]||(A[56]=$("Logging path: ",-1)),r("b",my,k(((gt=z.compliance)==null?void 0:gt.loggingPath)||"—"),1)]),r("span",gy,[A[57]||(A[57]=$("Category: ",-1)),r("b",vy,k(z.category||"—"),1)]),r("span",_y,[A[58]||(A[58]=$("Retain until: ",-1)),r("b",by,k((z.retentionUntil||"").slice(0,10)||"—"),1)]),(ut=z.compliance)!=null&&ut.exempt?(p(),g("span",yy,[A[59]||(A[59]=$("Exempt: ",-1)),r("b",xy,k(z.compliance.exemptReason),1)])):D("",!0)]),(((wt=z.compliance)==null?void 0:wt.redFlags)||[]).length?(p(),g("ul",wy,[(p(!0),g(ue,null,Be(z.compliance.redFlags,(_,w)=>(p(),g("li",{key:w,class:"flex items-start gap-2 text-xs text-danger-fg"},[E(X,{name:"alertTriangle",size:13,class:"mt-px shrink-0"}),$(" "+k(_),1)]))),128))])):(y=z.compliance)!=null&&y.exempt?D("",!0):(p(),g("div",ky,"No compliance gaps detected."))])])):D("",!0)],64)}),128))])])])):(p(),g("div",qb,[E(X,{name:"book",size:26,class:"text-ink-muted"}),A[52]||(A[52]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No flights logged yet",-1)),A[53]||(A[53]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Log your first operation to start the 5-year retention record.",-1))]))])],64)):(p(),g(ue,{key:2},[ie.value?(p(),g("div",Sy,[r("div",Ty,[r("div",null,[r("div",Py,k(We.value?"Edit drone":"New drone"),1),A[60]||(A[60]=r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft registry",-1))]),r("button",{class:"btn-icon",onClick:be},[E(X,{name:"x",size:16})])]),r("div",Cy,[r("label",Ly,[A[61]||(A[61]=r("span",{class:"eyebrow mb-1 block"},"Name",-1)),re(r("input",{"onUpdate:modelValue":A[20]||(A[20]=z=>le.name=z),class:"field",placeholder:"Mavic-01"},null,512),[[Se,le.name]])]),r("label",My,[A[62]||(A[62]=r("span",{class:"eyebrow mb-1 block"},"Model",-1)),re(r("input",{"onUpdate:modelValue":A[21]||(A[21]=z=>le.model=z),class:"field",placeholder:"DJI Mavic 3 Enterprise"},null,512),[[Se,le.model]])]),r("label",Ay,[A[63]||(A[63]=r("span",{class:"eyebrow mb-1 block"},"Serial",-1)),re(r("input",{"onUpdate:modelValue":A[22]||(A[22]=z=>le.serial=z),class:"field"},null,512),[[Se,le.serial]])]),r("label",Ey,[A[64]||(A[64]=r("span",{class:"eyebrow mb-1 block"},"Operator no.",-1)),re(r("input",{"onUpdate:modelValue":A[23]||(A[23]=z=>le.operatorNumber=z),class:"field",placeholder:"DNK…"},null,512),[[Se,le.operatorNumber]])]),r("label",Oy,[A[65]||(A[65]=r("span",{class:"eyebrow mb-1 block"},"MTOM (grams)",-1)),re(r("input",{"onUpdate:modelValue":A[24]||(A[24]=z=>le.mtomGrams=z),type:"number",min:"0",class:"field",placeholder:"920"},null,512),[[Se,le.mtomGrams]])]),r("label",zy,[A[66]||(A[66]=r("span",{class:"eyebrow mb-1 block"},"C-class",-1)),re(r("select",{"onUpdate:modelValue":A[25]||(A[25]=z=>le.cClass=z),class:"field"},[(p(),g(ue,null,Be(ne,z=>r("option",{key:z,value:z},k(z||"— none —"),9,Iy)),64))],512),[[Mt,le.cClass]])])]),r("div",$y,[r("label",Ny,[re(r("input",{"onUpdate:modelValue":A[26]||(A[26]=z=>le.autologsFlights=z),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[Sa,le.autologsFlights]]),A[67]||(A[67]=$(" Auto-logs flights (onboard FDR) ",-1))]),r("label",Dy,[re(r("input",{"onUpdate:modelValue":A[27]||(A[27]=z=>le.isToy=z),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[Sa,le.isToy]]),A[68]||(A[68]=$(" Toy drone (logbook-exempt) ",-1))])]),r("div",Fy,[r("button",{class:"btn-accent",disabled:se.value,onClick:Ne},k(se.value?"Saving…":We.value?"Save changes":"Add drone"),9,Ry),r("button",{class:"btn-ghost",onClick:be},"Cancel"),ce.value?(p(),g("span",By,k(ce.value),1)):D("",!0)])])):D("",!0),r("div",Uy,[h.value?(p(),g("div",Vy,"Loading…")):u.value.length?(p(),g("div",Hy,[r("table",jy,[r("thead",null,[r("tr",Wy,[(p(),g(ue,null,Be(["Name","Model","MTOM","Class","FDR",""],z=>r("th",{key:z,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(z),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(u.value,z=>(p(),g("tr",{key:z.id,class:Ee(["border-b border-line last:border-0",We.value===z.id?"bg-accent-soft":""])},[r("td",Ky,k(z.name),1),r("td",Gy,k(z.model||"—"),1),r("td",qy,k(z.mtomGrams?z.mtomGrams+" g":"—"),1),r("td",Yy,[z.cClass?(p(),g("span",{key:0,class:Ee(["inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",s.accent])},k(z.cClass),3)):(p(),g("span",Jy,"—")),z.isToy?(p(),g("span",{key:2,class:Ee(["ml-1 inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",s.neutral])},"toy",2)):D("",!0)]),r("td",Xy,[r("span",{class:Ee(["text-xs",z.autologsFlights?"text-success-fg":"text-ink-muted"])},k(z.autologsFlights?"yes":"no"),3)]),r("td",Qy,[dt.value===z.id?(p(),g(ue,{key:0},[A[71]||(A[71]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:A[28]||(A[28]=gt=>dt.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:gt=>at(z)},"Delete",8,ex)],64)):(p(),g(ue,{key:1},[r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:gt=>ee(z)},[E(X,{name:"sliders",size:13}),A[72]||(A[72]=$(" Edit",-1))],8,tx),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:gt=>dt.value=z.id},[E(X,{name:"trash",size:13})],8,nx)],64))])],2))),128))])])])):(p(),g("div",Zy,[E(X,{name:"drone",size:26,class:"text-ink-muted"}),A[69]||(A[69]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No drones registered",-1)),A[70]||(A[70]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Register the airframes you fly to log flights against them.",-1))]))])],64))]))}},ox={class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},sx={class:"flex flex-wrap items-center gap-3"},ax={class:"inline-flex flex-wrap rounded-lg border border-line bg-surface-1 p-0.5"},rx=["onClick"],lx={class:"ml-auto"},ux={class:"grid grid-cols-4 gap-4 max-[900px]:grid-cols-2"},cx={class:"eyebrow"},dx={key:0,class:"panel border-danger/40 p-4 text-sm text-danger-fg"},fx={key:1,class:"panel p-5"},hx={class:"mb-4 flex items-center justify-between"},px={class:"eyebrow"},mx={class:"mt-0.5 text-base font-semibold text-ink"},gx={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},vx={class:"col-span-2 block max-[760px]:col-span-1"},_x={class:"block"},bx=["value"],yx={class:"block"},xx=["value"],wx={class:"block"},kx=["value"],Sx={class:"block"},Tx={class:"block"},Px={class:"block"},Cx={class:"block"},Lx=["value"],Mx={class:"block"},Ax={class:"block"},Ex={class:"block"},Ox=["value"],zx={class:"mt-3 block"},Ix={key:0,class:"mt-3"},$x={class:"eyebrow mb-1 block"},Nx={key:1,class:"mt-3 text-xs text-ink-muted"},Dx={class:"mt-4 flex items-center gap-3"},Fx=["disabled"],Rx={key:0,class:"text-sm text-danger-fg"},Bx={class:"panel overflow-hidden p-0"},Ux={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Vx={key:1,class:"grid place-items-center px-5 py-16 text-center"},Zx={class:"mt-3 text-sm font-medium text-ink-secondary"},Hx={class:"mt-1 text-xs text-ink-muted"},jx={key:2,class:"overflow-x-auto"},Wx={class:"w-full border-collapse text-sm"},Kx={class:"text-left"},Gx={class:"px-5 py-3"},qx={class:"font-semibold text-ink"},Yx={key:0,class:"font-mono text-[11px] text-ink-muted"},Jx={class:"px-5 py-3 text-ink-secondary"},Xx={class:"px-5 py-3 text-ink-secondary"},Qx={class:"px-5 py-3"},e0=["onClick"],t0={key:0,class:"mt-0.5 font-mono text-[10.5px] text-ink-muted"},n0={class:"px-5 py-3 font-mono text-ink-secondary"},i0={class:"whitespace-nowrap px-5 py-3 text-right"},o0=["onClick"],s0=["onClick"],a0=["href"],r0=["onClick"],l0=["onClick"],u0=["onClick"],c0={key:0,class:"border-b border-line bg-surface-2"},d0={colspan:"6",class:"px-5 py-3"},f0={class:"flex flex-wrap gap-x-8 gap-y-1.5 text-xs"},h0={class:"text-ink-secondary"},p0={class:"text-ink"},m0={class:"text-ink-secondary"},g0={class:"text-ink"},v0={key:0,class:"text-ink-secondary"},_0={class:"text-ink"},b0={key:1,class:"text-ink-secondary"},y0={class:"font-mono text-ink"},x0={key:2,class:"text-ink-secondary"},w0={class:"font-mono text-ink"},k0={class:"text-ink-secondary"},S0={class:"text-ink"},T0={key:0,class:"mt-2 space-y-1"},P0={key:1,class:"mt-2 text-xs text-success-fg"},C0={key:2,class:"mt-2 text-xs text-ink-secondary"},L0={class:"flex max-h-[90vh] w-full max-w-[920px] flex-col overflow-hidden rounded-lg border border-line bg-surface-1 shadow-2xl"},M0={class:"flex items-center gap-3 border-b border-line px-5 py-3"},A0={class:"min-w-0"},E0={class:"truncate text-sm font-semibold text-ink"},O0={class:"truncate font-mono text-[11px] text-ink-muted"},z0={class:"ml-auto flex items-center gap-2"},I0=["href"],$0=["href"],N0={class:"flex-1 overflow-auto bg-surface-2"},D0=["src","alt"],F0=["src","title"],R0={key:2,class:"grid place-items-center px-6 py-16 text-center"},B0={class:"mt-1 text-xs text-ink-muted"},U0=["href"],V0={__name:"Documents",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},setup(t){const i={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},s=[{value:"certificate",label:"Pilot certificate"},{value:"medical",label:"Medical / training"},{value:"insurance",label:"Insurance / liability"},{value:"background_check",label:"Background check / waiver"},{value:"registration",label:"Aircraft registration"},{value:"maintenance",label:"Maintenance log"},{value:"conformity",label:"Conformity / compliance"},{value:"firmware",label:"Firmware / software"},{value:"incident",label:"Incident / repair report"},{value:"flight_log",label:"Flight log"},{value:"checklist",label:"Pre-flight checklist"},{value:"airspace_auth",label:"Airspace authorisation"},{value:"mission_plan",label:"Mission plan / flight path"},{value:"risk_assessment",label:"Risk assessment / survey"},{value:"contract",label:"Contract / SOW"},{value:"client_insurance",label:"Client insurance cert"},{value:"delivery_report",label:"Delivery / media handoff"},{value:"other",label:"Other"}],l=Object.fromEntries(s.map(y=>[y.value,y.label])),u=[{value:"pilot",label:"Pilot"},{value:"aircraft",label:"Aircraft"},{value:"organization",label:"Organization"},{value:"client",label:"Client"},{value:"other",label:"Other"}],d=[{value:"active",label:"Active"},{value:"pending_review",label:"Pending review"},{value:"archived",label:"Archived"}],h=[{value:"pilot",label:"Pilot"},{value:"ops",label:"Ops manager"},{value:"admin",label:"Admin"},{value:"client",label:"Client-facing"}],v=W([]),b=W([]),C=W(!1),T=W("");async function M(){C.value=!0,T.value="";const[y,_]=await Promise.all([Lp(),Rc()]);y.ok||(T.value=y.status===503?"Document storage is not configured on the API Server (service account missing).":"Could not load documents."),v.value=y.documents,b.value=_.drones||[],C.value=!1}hi(M);const R=W("all"),B=[["all","All"],["expiring","Expiring soon"],["expired","Expired"],["pending","Pending review"],["archived","Archived"]],Z=we(()=>{const y=v.value;switch(R.value){case"expiring":return y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expiring_soon"&&_.status!=="archived"});case"expired":return y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expired"&&_.status!=="archived"});case"pending":return y.filter(_=>_.status==="pending_review");case"archived":return y.filter(_=>_.status==="archived");default:return y.filter(_=>_.status!=="archived")}});function F(y){if(y.status==="archived")return{tone:"neutral",label:"Superseded",icon:""};const _=y.expiry||{};return _.state==="expired"?{tone:"danger",label:"Expired",icon:"alertTriangle"}:_.state==="expiring_soon"?{tone:"warning",label:`Expires in ${_.daysUntilExpiry}d`,icon:"clock"}:_.state==="valid"?{tone:"success",label:"Valid",icon:"check"}:{tone:"neutral",label:"No expiry",icon:""}}const he=W("");function pe(y){he.value=he.value===y?"":y}function q(y){return y.ownerDrone?y.ownerDroneName||"Aircraft":y.ownerRef?y.ownerRef:y.ownerType==="pilot"?"Pilot":y.ownerType?y.ownerType.charAt(0).toUpperCase()+y.ownerType.slice(1):"—"}const Te=["png","jpg","jpeg","gif","webp","svg","bmp","avif"],fe=["pdf","txt","csv","log","json","md","html","htm","xml"];function Ue(y){const _=(y||"").split(".").pop().toLowerCase();return Te.includes(_)?"image":fe.includes(_)?"frame":"none"}const $e=W(null),Ie=we(()=>$e.value?Ue($e.value.fileName):"none"),Ge=we(()=>$e.value?Op($e.value.id):"");function _e(y){$e.value=y}function ye(){$e.value=null}function ze(y){y.key==="Escape"&&$e.value&&ye()}hi(()=>window.addEventListener("keydown",ze)),Ho(()=>window.removeEventListener("keydown",ze));function ne(){return{title:"",docType:"certificate",ownerType:"pilot",ownerDrone:"",ownerRef:"",reference:"",jurisdiction:"",issueDate:"",expiryDate:"",status:"active",accessTier:"ops",notes:""}}const je=W(!1),ie=W(""),We=W(""),le=W(""),ce=kt(ne()),se=W(null),ot=W(null),ee=W(""),be=W(!1);function Ne(){se.value=null,ot.value&&(ot.value.value="")}function dt(){Object.assign(ce,ne()),ie.value="",We.value="",le.value="",Ne(),ee.value="",je.value=!0}function at(y){Object.assign(ce,{title:y.title||"",docType:y.docType||"certificate",ownerType:y.ownerType||"pilot",ownerDrone:y.ownerDrone||"",ownerRef:y.ownerRef||"",reference:y.reference||"",jurisdiction:y.jurisdiction||"",issueDate:y.issueDate||"",expiryDate:y.expiryDate||"",status:y.status||"active",accessTier:y.accessTier||"ops",notes:y.notes||""}),ie.value=y.id,We.value="",le.value="",Ne(),ee.value="",je.value=!0}function Ze(y){at(y),ie.value="",We.value=y.id,le.value=y.title,ce.status="active"}function Y(){je.value=!1,ie.value="",We.value=""}function A(y){var _;se.value=((_=y.target.files)==null?void 0:_[0])||null}async function z(){var _;if(ee.value="",!ce.title.trim()){ee.value="Give the document a title.";return}be.value=!0;let y;if(ie.value)y=await Ap(ie.value,{...ce});else{const w={...ce};We.value&&(w.replaces=We.value),y=await Mp(w,se.value)}if(be.value=!1,!y.ok){ee.value=((_=y.body)==null?void 0:_.error)||"Could not save the document.";return}je.value=!1,ie.value="",We.value="",await M()}const gt=W("");async function ut(y){var w;const _=await Ep(y.id);gt.value="",_.ok?await M():ee.value=((w=_.body)==null?void 0:w.error)||"Could not delete the document."}const wt=we(()=>{const y=v.value.filter(_=>_.status!=="archived");return{total:y.length,expiring:y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expiring_soon"}).length,expired:y.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expired"}).length,pending:v.value.filter(_=>_.status==="pending_review").length}});return(y,_)=>(p(),g("div",ox,[r("div",sx,[r("div",ax,[(p(),g(ue,null,Be(B,w=>r("button",{key:w[0],class:Ee(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",R.value===w[0]?"bg-accent-soft text-accent-soft-fg":"text-ink-secondary hover:text-ink"]),onClick:K=>R.value=w[0]},k(w[1]),11,rx)),64))]),r("div",lx,[r("button",{class:"btn-accent inline-flex items-center gap-2",onClick:dt},[E(X,{name:"upload",size:15}),_[13]||(_[13]=$(" Add document ",-1))])])]),r("div",ux,[(p(!0),g(ue,null,Be([{label:"Documents on file",value:wt.value.total,tone:"neutral"},{label:"Expiring soon",value:wt.value.expiring,tone:wt.value.expiring?"warning":"neutral"},{label:"Expired",value:wt.value.expired,tone:wt.value.expired?"danger":"success"},{label:"Pending review",value:wt.value.pending,tone:wt.value.pending?"accent":"neutral"}],w=>(p(),g("div",{key:w.label,class:"panel p-5"},[r("div",cx,k(w.label),1),r("div",{class:Ee(["mt-2 text-[30px] font-bold leading-none tracking-tightest",w.tone==="danger"?"text-danger-fg":w.tone==="warning"?"text-amber-fg":w.tone==="success"?"text-success-fg":w.tone==="accent"?"text-accent-soft-fg":"text-ink"])},k(w.value),3)]))),128))]),T.value?(p(),g("div",dx,k(T.value),1)):D("",!0),je.value?(p(),g("div",fx,[r("div",hx,[r("div",null,[r("div",px,k(ie.value?"Edit document":We.value?"New version":"New document"),1),r("div",mx,k(We.value?`Supersedes “${le.value}”`:"Compliance & operational document"),1)]),r("button",{class:"btn-icon",onClick:Y},[E(X,{name:"x",size:16})])]),r("div",gx,[r("label",vx,[_[14]||(_[14]=r("span",{class:"eyebrow mb-1 block"},"Title",-1)),re(r("input",{"onUpdate:modelValue":_[0]||(_[0]=w=>ce.title=w),class:"field",placeholder:"A2 Remote Pilot Certificate — J. Dariusz"},null,512),[[Se,ce.title]])]),r("label",_x,[_[15]||(_[15]=r("span",{class:"eyebrow mb-1 block"},"Type",-1)),re(r("select",{"onUpdate:modelValue":_[1]||(_[1]=w=>ce.docType=w),class:"field"},[(p(),g(ue,null,Be(s,w=>r("option",{key:w.value,value:w.value},k(w.label),9,bx)),64))],512),[[Mt,ce.docType]])]),r("label",yx,[_[16]||(_[16]=r("span",{class:"eyebrow mb-1 block"},"Owner type",-1)),re(r("select",{"onUpdate:modelValue":_[2]||(_[2]=w=>ce.ownerType=w),class:"field"},[(p(),g(ue,null,Be(u,w=>r("option",{key:w.value,value:w.value},k(w.label),9,xx)),64))],512),[[Mt,ce.ownerType]])]),r("label",wx,[_[18]||(_[18]=r("span",{class:"eyebrow mb-1 block"},"Aircraft (if any)",-1)),re(r("select",{"onUpdate:modelValue":_[3]||(_[3]=w=>ce.ownerDrone=w),class:"field"},[_[17]||(_[17]=r("option",{value:""},"— none —",-1)),(p(!0),g(ue,null,Be(b.value,w=>(p(),g("option",{key:w.id,value:w.id},k(w.name)+k(w.model?` · ${w.model}`:""),9,kx))),128))],512),[[Mt,ce.ownerDrone]])]),r("label",Sx,[_[19]||(_[19]=r("span",{class:"eyebrow mb-1 block"},"Owner reference",-1)),re(r("input",{"onUpdate:modelValue":_[4]||(_[4]=w=>ce.ownerRef=w),class:"field",placeholder:"Client name / serial / site"},null,512),[[Se,ce.ownerRef]])]),r("label",Tx,[_[20]||(_[20]=r("span",{class:"eyebrow mb-1 block"},"Reference / number",-1)),re(r("input",{"onUpdate:modelValue":_[5]||(_[5]=w=>ce.reference=w),class:"field",placeholder:"Cert / registration / policy no."},null,512),[[Se,ce.reference]])]),r("label",Px,[_[21]||(_[21]=r("span",{class:"eyebrow mb-1 block"},"Jurisdiction",-1)),re(r("input",{"onUpdate:modelValue":_[6]||(_[6]=w=>ce.jurisdiction=w),class:"field",placeholder:"DK / EASA / FAA"},null,512),[[Se,ce.jurisdiction]])]),r("label",Cx,[_[22]||(_[22]=r("span",{class:"eyebrow mb-1 block"},"Access tier",-1)),re(r("select",{"onUpdate:modelValue":_[7]||(_[7]=w=>ce.accessTier=w),class:"field"},[(p(),g(ue,null,Be(h,w=>r("option",{key:w.value,value:w.value},k(w.label),9,Lx)),64))],512),[[Mt,ce.accessTier]])]),r("label",Mx,[_[23]||(_[23]=r("span",{class:"eyebrow mb-1 block"},"Issue date",-1)),re(r("input",{"onUpdate:modelValue":_[8]||(_[8]=w=>ce.issueDate=w),type:"date",class:"field"},null,512),[[Se,ce.issueDate]])]),r("label",Ax,[_[24]||(_[24]=r("span",{class:"eyebrow mb-1 block"},"Expiry date",-1)),re(r("input",{"onUpdate:modelValue":_[9]||(_[9]=w=>ce.expiryDate=w),type:"date",class:"field"},null,512),[[Se,ce.expiryDate]])]),r("label",Ex,[_[25]||(_[25]=r("span",{class:"eyebrow mb-1 block"},"Status",-1)),re(r("select",{"onUpdate:modelValue":_[10]||(_[10]=w=>ce.status=w),class:"field"},[(p(),g(ue,null,Be(d,w=>r("option",{key:w.value,value:w.value},k(w.label),9,Ox)),64))],512),[[Mt,ce.status]])])]),r("label",zx,[_[26]||(_[26]=r("span",{class:"eyebrow mb-1 block"},"Notes",-1)),re(r("textarea",{"onUpdate:modelValue":_[11]||(_[11]=w=>ce.notes=w),rows:"2",class:"field",placeholder:"Conditions, renewal contacts, anything worth recording"},null,512),[[Se,ce.notes]])]),ie.value?(p(),g("div",Nx,[..._[28]||(_[28]=[$(" Editing updates metadata only. To replace the file, close this and use ",-1),r("b",{class:"text-ink-secondary"},"New version",-1),$(" on the document — the old version is kept for audit. ",-1)])])):(p(),g("div",Ix,[r("span",$x,"File "+k(We.value?"(new version)":"(optional)"),1),r("input",{ref_key:"fileInput",ref:ot,type:"file",class:"field",onChange:A},null,544),_[27]||(_[27]=r("p",{class:"mt-1 text-xs text-ink-muted"}," Stored in PocketBase for now (object storage later). Max 50 MB. ",-1))])),r("div",Dx,[r("button",{class:"btn-accent",disabled:be.value,onClick:z},k(be.value?"Saving…":ie.value?"Save changes":We.value?"Upload new version":"Add document"),9,Fx),r("button",{class:"btn-ghost",onClick:Y},"Cancel"),ee.value?(p(),g("span",Rx,k(ee.value),1)):D("",!0)])])):D("",!0),r("div",Bx,[C.value?(p(),g("div",Ux,"Loading…")):Z.value.length?(p(),g("div",jx,[r("table",Wx,[r("thead",null,[r("tr",Kx,[(p(),g(ue,null,Be(["Title","Type","Owner","Expiry","Ver",""],w=>r("th",{key:w,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(w),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(Z.value,w=>{var K,H;return p(),g(ue,{key:w.id},[r("tr",{class:Ee(["border-b border-line last:border-0",ie.value===w.id?"bg-accent-soft":""])},[r("td",Gx,[r("div",qx,k(w.title),1),w.reference?(p(),g("div",Yx,k(w.reference),1)):D("",!0)]),r("td",Jx,k(Oe(l)[w.docType]||w.docType||"—"),1),r("td",Xx,k(q(w)),1),r("td",Qx,[r("button",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",i[F(w).tone]]),onClick:V=>pe(w.id)},[F(w).icon?(p(),lt(X,{key:0,name:F(w).icon,size:12},null,8,["name"])):D("",!0),$(" "+k(F(w).label),1)],10,e0),w.expiryDate?(p(),g("div",t0,k(w.expiryDate),1)):D("",!0)]),r("td",n0,"v"+k(w.version||1),1),r("td",i0,[gt.value===w.id?(p(),g(ue,{key:0},[_[29]||(_[29]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:_[12]||(_[12]=V=>gt.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:V=>ut(w)},"Delete",8,o0)],64)):(p(),g(ue,{key:1},[w.hasFile?(p(),g("button",{key:0,class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Preview",onClick:V=>_e(w)},[E(X,{name:"eye",size:13})],8,s0)):D("",!0),w.hasFile?(p(),g("a",{key:1,href:Oe(hr)(w.id),class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Download file"},[E(X,{name:"download",size:13})],8,a0)):D("",!0),r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Upload new version",onClick:V=>Ze(w)},[E(X,{name:"upload",size:13})],8,r0),r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:V=>at(w)},[E(X,{name:"sliders",size:13}),_[30]||(_[30]=$(" Edit",-1))],8,l0),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:V=>gt.value=w.id},[E(X,{name:"trash",size:13})],8,u0)],64))])],2),he.value===w.id?(p(),g("tr",c0,[r("td",d0,[r("div",f0,[r("span",h0,[_[31]||(_[31]=$("Status: ",-1)),r("b",p0,k(w.status||"—"),1)]),r("span",m0,[_[32]||(_[32]=$("Access: ",-1)),r("b",g0,k(w.accessTier||"—"),1)]),w.jurisdiction?(p(),g("span",v0,[_[33]||(_[33]=$("Jurisdiction: ",-1)),r("b",_0,k(w.jurisdiction),1)])):D("",!0),w.issueDate?(p(),g("span",b0,[_[34]||(_[34]=$("Issued: ",-1)),r("b",y0,k(w.issueDate),1)])):D("",!0),w.expiryDate?(p(),g("span",x0,[_[35]||(_[35]=$("Expires: ",-1)),r("b",w0,k(w.expiryDate),1)])):D("",!0),r("span",k0,[_[36]||(_[36]=$("File: ",-1)),r("b",S0,k(w.hasFile?w.fileName:"none"),1)])]),(((K=w.expiry)==null?void 0:K.flags)||[]).length?(p(),g("ul",T0,[(p(!0),g(ue,null,Be(w.expiry.flags,(V,ae)=>(p(),g("li",{key:ae,class:Ee(["flex items-start gap-2 text-xs",w.expiry.state==="expired"?"text-danger-fg":w.expiry.state==="expiring_soon"?"text-amber-fg":"text-ink-secondary"])},[E(X,{name:"alertTriangle",size:13,class:"mt-px shrink-0"}),$(" "+k(V),1)],2))),128))])):((H=w.expiry)==null?void 0:H.state)==="valid"?(p(),g("div",P0,"In force — no action needed.")):D("",!0),w.notes?(p(),g("div",C0,[_[37]||(_[37]=r("span",{class:"text-ink-muted"},"Notes:",-1)),$(" "+k(w.notes),1)])):D("",!0)])])):D("",!0)],64)}),128))])])])):(p(),g("div",Vx,[E(X,{name:"fileText",size:26,class:"text-ink-muted"}),r("div",Zx,k(R.value==="all"?"No documents on file yet":"Nothing in this view"),1),r("div",Hx,k(R.value==="all"?"Add certificates, registrations, insurance and authorisations to track their expiry.":"Try a different filter."),1)]))]),(p(),lt(lf,{to:"body"},[$e.value?(p(),g("div",{key:0,class:"fixed inset-0 z-50 grid place-items-center p-4",style:{background:"color-mix(in srgb, black 60%, transparent)"},onClick:Kr(ye,["self"])},[r("div",L0,[r("div",M0,[r("div",A0,[r("div",E0,k($e.value.title),1),r("div",O0,k($e.value.fileName),1)]),r("div",z0,[r("a",{href:Ge.value,target:"_blank",rel:"noopener",class:"btn-ghost inline-flex items-center gap-1.5",title:"Open in new tab"},[E(X,{name:"globe",size:14}),_[38]||(_[38]=$(" New tab ",-1))],8,I0),r("a",{href:Oe(hr)($e.value.id),class:"btn-ghost inline-flex items-center gap-1.5",title:"Download"},[E(X,{name:"download",size:14}),_[39]||(_[39]=$(" Download ",-1))],8,$0),r("button",{class:"btn-icon",title:"Close",onClick:ye},[E(X,{name:"x",size:16})])])]),r("div",N0,[Ie.value==="image"?(p(),g("img",{key:0,src:Ge.value,alt:$e.value.title,class:"mx-auto block max-w-full"},null,8,D0)):Ie.value==="frame"?(p(),g("iframe",{key:1,src:Ge.value,class:"h-[74vh] w-full border-0 bg-white",title:$e.value.title},null,8,F0)):(p(),g("div",R0,[E(X,{name:"fileText",size:28,class:"text-ink-muted"}),_[41]||(_[41]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"Preview isn't available for this file type",-1)),r("div",B0,k($e.value.fileName),1),r("a",{href:Oe(hr)($e.value.id),class:"btn-accent mt-4 inline-flex items-center gap-2"},[E(X,{name:"download",size:15}),_[40]||(_[40]=$(" Download instead ",-1))],8,U0)]))])])])):D("",!0)]))]))}},Z0={class:"grid h-full grid-cols-[248px_1fr] max-[900px]:grid-cols-1"},H0={class:"flex flex-col border-r border-line bg-surface-1 px-4 py-5 max-[900px]:hidden"},j0={class:"flex items-center gap-2.5 px-2 pb-5"},W0={class:"flex flex-col gap-0.5"},K0=["onClick"],G0={class:"mt-auto flex flex-col gap-2.5"},q0={class:"rounded-lg bg-surface-2 p-3"},Y0={class:"flex items-center gap-2"},J0={class:"text-xs font-semibold text-ink"},X0={class:"mt-1.5 block font-mono text-[10.5px] text-ink-muted"},Q0={class:"flex items-center gap-2.5 px-2 py-1"},ew={class:"grid h-8 w-8 place-items-center rounded-full bg-[var(--navy-800)] text-xs font-bold text-white"},tw={class:"min-w-0 flex-1"},nw={class:"truncate text-[13px] font-semibold text-ink"},iw={class:"flex items-center gap-1.5 text-[11px] text-ink-muted"},ow=["title"],sw={class:"overflow-y-auto"},aw={class:"sticky top-0 z-10 flex items-center gap-4 border-b border-line px-7 py-3.5",style:{background:"color-mix(in srgb, var(--bg-app) 82%, transparent)","backdrop-filter":"blur(10px)"}},rw={class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},lw={class:"ml-auto flex items-center gap-3"},uw={class:"flex h-10 w-60 items-center gap-2 rounded border border-line-strong bg-surface-1 px-3 max-[1100px]:hidden"},cw={key:0,class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},dw={class:"grid grid-cols-4 gap-4 max-[1100px]:grid-cols-2 max-[560px]:grid-cols-1"},fw={class:"flex items-center justify-between"},hw={class:"eyebrow"},pw={class:"mt-2.5 text-[34px] font-bold leading-none tracking-tightest text-ink"},mw={class:"grid grid-cols-[1.6fr_1fr] gap-5 max-[1100px]:grid-cols-1"},gw={class:"panel p-5"},vw={class:"mb-3.5 flex items-center justify-between"},_w={class:"flex items-center gap-2"},bw={class:"relative z-[1200]"},yw={class:"panel absolute right-0 z-[1200] mt-1.5 w-72 p-3.5 shadow-lg"},xw={class:"flex items-center justify-between gap-3"},ww={class:"mb-1.5 flex items-center justify-between"},kw={class:"font-mono text-[11px] text-ink-muted"},Sw=["value"],Tw={key:0,class:"mt-1.5 text-[11px] text-ink-muted"},Pw={key:0,class:"mt-2.5 text-xs text-ink-muted"},Cw={key:1,class:"mt-2.5 text-xs text-ink-muted"},Lw={key:2,class:"mt-2.5 text-xs text-ink-muted"},Mw={class:"panel p-5"},Aw={class:"mb-3.5 flex items-center justify-between"},Ew={class:"grid place-items-center py-10 text-center"},Ow={class:"panel overflow-hidden p-0"},zw={class:"flex items-center justify-between px-5 py-4"},Iw={class:"flex gap-2"},$w={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Nw={key:1,class:"overflow-x-auto"},Dw={class:"w-full border-collapse text-sm"},Fw={class:"text-left"},Rw=["onClick"],Bw={class:"px-5 py-3 font-mono font-bold text-ink"},Uw={class:"px-5 py-3 text-ink-secondary"},Vw={class:"px-5 py-3"},Zw={class:"px-5 py-3 font-mono text-ink-secondary"},Hw={class:"px-5 py-3"},jw={key:0,class:"flex items-center gap-2"},Ww={class:"h-1.5 w-12 overflow-hidden rounded bg-surface-2"},Kw={class:"font-mono text-xs text-ink-secondary"},Gw={key:1,class:"font-mono text-xs text-ink-muted"},qw={class:"px-5 py-3 font-mono text-ink-secondary"},Yw={class:"px-5 py-3 text-right"},Jw=["onClick"],Xw={key:1,class:"p-7"},Qw={class:"mb-4 flex flex-wrap items-center gap-3"},e2={class:"font-mono text-mode font-bold text-ink"},t2={key:0,class:"rounded-full bg-danger-soft px-2.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-caps text-danger-fg"},n2={key:1,class:"ml-auto flex flex-wrap gap-1.5"},i2=["onClick"],o2={key:0,class:"panel grid place-items-center p-16 text-center"},s2={class:"pill"},a2={class:"pill"},r2={class:"pill"},l2={class:"mt-1 text-sm font-semibold text-ink"},u2={class:"pill"},c2={class:"mt-1 font-mono text-sm font-bold tabular text-ink"},d2={class:"grid grid-cols-2 gap-4 max-[820px]:grid-cols-1"},f2={class:"panel p-4"},h2={class:"flex items-center gap-4"},p2={class:"h-9 flex-1 overflow-hidden rounded border border-line bg-surface-2"},m2={class:"readout"},g2={class:"panel p-4"},v2={class:"readout"},_2={class:"panel p-4"},b2={class:"space-y-1.5 text-sm"},y2={class:"flex justify-between"},x2={class:"text-ink"},w2={class:"flex justify-between"},k2={class:"text-ink"},S2={class:"flex justify-between"},T2={class:"font-mono tabular text-ink"},P2={class:"flex justify-between"},C2={class:"font-mono tabular text-ink"},L2={class:"panel p-4"},M2={class:"space-y-1.5 text-sm"},A2={class:"flex justify-between"},E2={class:"font-mono tabular text-ink"},O2={class:"flex justify-between"},z2={class:"font-mono tabular text-ink"},I2={class:"flex justify-between"},$2={class:"font-mono tabular text-ink"},N2={class:"panel col-span-2 p-4 max-[820px]:col-span-1"},D2={class:"panel p-4"},F2={class:"flex flex-wrap gap-2"},R2={class:"mt-2 min-h-[16px] text-xs text-ink-muted"},B2={class:"panel p-4"},U2={class:"h-[180px] overflow-y-auto font-mono text-xs"},V2={class:"text-ink-muted"},Z2={class:"font-semibold text-accent"},H2={class:"break-all text-ink"},j2={key:5,class:"p-7"},W2={class:"panel grid place-items-center p-16 text-center"},K2={class:"mt-3 text-sm font-medium text-ink-secondary"},G2={key:0,class:"mt-1 text-xs text-ink-muted"},q2={key:1,class:"mt-1 text-xs text-ink-muted"},Y2="34,-25,72,45",J2={__name:"Dashboard",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(t,{emit:i}){const s=t,l=i,u=kt({}),d=kt({}),h=W(null),v=W(!1),b=kt([]),C=W(""),T=W([]),M=kt({unavailable:!1,detail:"",loaded:!1,plan:"",recommendedInterval:30}),R=we(()=>T.value.filter(U=>!U.onGround).length),B=W(!1);let Z=null;const F=[{value:"auto",label:"Auto"},{value:15,label:"15s"},{value:30,label:"30s"},{value:60,label:"60s"},{value:120,label:"120s"}],he=we(()=>{if(ve.airTrafficInterval==="auto")return M.recommendedInterval||30;const U=Number(ve.airTrafficInterval);return Number.isFinite(U)&&U>0?U:30}),pe=W(null);let q=!1;function Te(){if(!(q||pe.value!==null)){if(typeof navigator>"u"||!navigator.geolocation){pe.value=!1;return}q=!0,navigator.geolocation.getCurrentPosition(U=>{pe.value={lat:U.coords.latitude,lng:U.coords.longitude},q=!1},()=>{pe.value=!1,q=!1},{timeout:8e3,maximumAge:6e5})}}function fe(U,O,xe){const Je=U&&U.telemetry||{},pt=Je[O],Ve=Je[xe];return typeof pt=="number"&&typeof Ve=="number"&&(pt||Ve)?{lat:pt,lng:Ve}:null}function Ue(){const U=fe(ee.value,"latitude","longitude")||ot.value.map(Je=>fe(u[Je],"latitude","longitude")).find(Boolean);if(U){const Je=pr(U.lat,U.lng);if(Je)return Je.bbox}const O=fe(ee.value,"phoneLatitude","phoneLongitude")||ot.value.map(Je=>fe(u[Je],"phoneLatitude","phoneLongitude")).find(Boolean);if(O){const Je=pr(O.lat,O.lng);if(Je)return Je.bbox}if(Te(),pe.value){const Je=pr(pe.value.lat,pe.value.lng);if(Je)return Je.bbox}const xe=mm(ve.region);return xe||Y2}async function $e(){if(!ve.showAirTraffic)return;const U=ve.autoBbox?Ue():void 0,{states:O,unavailable:xe,detail:Je,plan:pt,recommendedInterval:Ve}=await hp(U);T.value=O,M.unavailable=xe,M.detail=Je,M.plan=pt||"",Ve&&(M.recommendedInterval=Ve),M.loaded=!0}function Ie(){Z&&clearInterval(Z),Z=setInterval(()=>{ye.value==="Overview"&&ve.showAirTraffic&&$e()},he.value*1e3)}function Ge(){$e(),Ie()}function _e(){Z&&clearInterval(Z),Z=null}const ye=W("Overview"),ze=[["grid","Overview"],["radio","Live flights"],["route","Routes"],["calendar","Schedule"],["book","Logbook"],["fileText","Documents"],["server","Drives"],["settings","Settings"]],ne=we(()=>(ze.find(([,U])=>U===ye.value)||["grid"])[0]),je=W(""),ie=W(""),We=W("");let le=null,ce=null,se=!1;const ot=we(()=>Object.keys(u).sort((U,O)=>(u[O].online?1:0)-(u[U].online?1:0)||U.localeCompare(O))),ee=we(()=>h.value?u[h.value]:null),be=we(()=>ee.value&&ee.value.telemetry||{}),Ne=we(()=>!!(ee.value&&ee.value.online)),dt=we(()=>{const U=be.value;return typeof U.latitude=="number"&&typeof U.longitude=="number"&&(U.latitude||U.longitude)?{lat:U.latitude,lng:U.longitude}:null}),at=we(()=>h.value&&d[h.value]||[]),Ze=we(()=>{const U=be.value;return typeof U.velocityX=="number"&&typeof U.velocityY=="number"?Math.hypot(U.velocityX,U.velocityY):null});function Y(U){return U.online?U.connected?["In flight","success"]:["Standby","accent"]:["Offline","neutral"]}function A(U){const O=U&&U.telemetry||{};return typeof O.velocityX=="number"&&typeof O.velocityY=="number"?Math.hypot(O.velocityX,O.velocityY):null}const z=we(()=>ot.value.map(U=>{const O=u[U],xe=O.telemetry||{},[Je,pt]=Y(O);return{id:U,mission:O.model||(O.connected?"Drone linked":O.online?"App online":"No signal"),status:Je,tone:pt,alt:typeof xe.altitude=="number"?xe.altitude.toFixed(0)+" m":"—",battery:typeof xe.batteryPercent=="number"?xe.batteryPercent:null,speed:A(O)}})),gt=we(()=>ot.value.filter(U=>u[U].online).length),ut=we(()=>ot.value.filter(U=>u[U].online&&u[U].connected).length),wt=we(()=>ot.value.filter(U=>!u[U].online).length),y=we(()=>{const U=ot.value.map(O=>{var xe;return(xe=u[O].telemetry)==null?void 0:xe.batteryPercent}).filter(O=>typeof O=="number");return U.length?Math.round(U.reduce((O,xe)=>O+xe,0)/U.length):null}),_=we(()=>[{label:"Active flights",value:String(ut.value),delta:`${gt.value} online`,tone:"success",icon:"radio"},{label:"Avg battery",value:y.value==null?"—":y.value+"%",delta:y.value==null?"no telemetry":y.value<40?"low — watch":"nominal",tone:y.value!=null&&y.value<40?"danger":"neutral",icon:"battery"},{label:"Fleet size",value:String(ot.value.length),delta:`${ut.value} in flight`,tone:"neutral",icon:"grid"},{label:"Offline",value:String(wt.value),delta:wt.value?"needs attention":"all reachable",tone:wt.value?"warning":"success",icon:"signal"}]),w={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},K={success:"text-success-fg",danger:"text-danger-fg",warning:"text-amber-fg",neutral:"text-ink-muted",accent:"text-accent-soft-fg"},H=we(()=>{var xe,Je,pt;const O=(s.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((xe=O[0])==null?void 0:xe[0])||"P")+(((Je=O[1])==null?void 0:Je[0])||((pt=O[0])==null?void 0:pt[1])||"V")).toUpperCase()}),V={superadmin:"Superadmin",admin:"Admin",user:"Operator"},ae=we(()=>V[s.role]||"Operator"),te=we(()=>s.organizationName||(s.role==="superadmin"?"All organizations":"No organization"));function Q(U){var xe;u[U.deviceId]=U;const O=U.telemetry||{};typeof O.latitude=="number"&&typeof O.longitude=="number"&&(O.latitude||O.longitude)&&(d[U.deviceId]||(d[U.deviceId]=[]),d[U.deviceId].push([O.latitude,O.longitude]),d[U.deviceId].length>1e3&&d[U.deviceId].shift()),(!h.value||U.online&&!((xe=u[h.value])!=null&&xe.online))&&(h.value=U.deviceId)}function G(U){delete u[U],delete d[U],h.value===U&&(h.value=ot.value[0]||null)}function me(U){b.unshift({t:du(Date.now()),tag:U.type||"?",text:JSON.stringify(oe(U))}),b.length>200&&b.pop()}function oe(U){const O={...U};return delete O.type,O}function ke(){const U=location.protocol==="https:"?"wss":"ws";le=new WebSocket(`${U}://${location.host}/bff/ws`),le.onopen=()=>v.value=!0,le.onclose=()=>{v.value=!1,se||(ce=setTimeout(ke,1500))},le.onerror=()=>le&&le.close(),le.onmessage=O=>{let xe;try{xe=JSON.parse(O.data)}catch{return}xe.type==="snapshot"?(xe.devices||[]).forEach(Q):xe.type==="update"&&xe.device?(Q(xe.device),xe.event&&xe.device.deviceId===h.value&&me(xe.event)):xe.type==="removed"&&xe.deviceId&&G(xe.deviceId)}}async function Ce(){if(!h.value)return We.value="No device selected.";if(!je.value.trim())return We.value="Enter a command name.";let U;if(ie.value.trim())try{U=JSON.parse(ie.value)}catch{return We.value="Payload is not valid JSON."}const{ok:O,body:xe}=await zp(h.value,je.value.trim(),U);We.value=O?`Sent "${je.value.trim()}".`:`Error: ${xe.error||"failed"}`}function He(U,O,xe=""){return typeof U=="number"?U.toFixed(O)+xe:"—"}function et(U){h.value=U,ye.value="Live flights"}return It(ye,U=>{U==="Overview"&&$e()}),It(()=>ve.showAirTraffic,U=>{U?$e():T.value=[]}),It(he,Ie),hi(async()=>{(await ep()).forEach(Q),ke(),Ge()}),Ho(()=>{se=!0,ce&&clearTimeout(ce),le&&le.close(),_e()}),(U,O)=>{var xe,Je,pt,Ve,Vt;return p(),g("div",Z0,[r("aside",H0,[r("div",j0,[E(Hc,{size:26}),O[11]||(O[11]=r("span",{class:"text-[19px] tracking-tightest"},[r("span",{class:"font-medium text-ink-secondary"},"Pilot"),r("span",{class:"font-bold text-ink"},"Vault")],-1))]),r("nav",W0,[(p(),g(ue,null,Be(ze,([de,Fe])=>r("button",{key:Fe,class:Ee(["flex items-center gap-3 rounded px-3 py-2.5 text-left text-sm transition",ye.value===Fe?"bg-accent-soft font-semibold text-accent-soft-fg":"font-medium text-ink-secondary hover:bg-surface-2"]),onClick:Nt=>ye.value=Fe},[E(X,{name:de,size:18,stroke:ye.value===Fe?2.2:1.8},null,8,["name","stroke"]),$(" "+k(Fe),1)],10,K0)),64))]),r("div",G0,[r("div",q0,[r("div",Y0,[r("span",{class:Ee(["h-2 w-2 rounded-full",v.value?"bg-ready":"bg-caution"])},null,2),r("span",J0,k(v.value?"Link healthy":"Reconnecting…"),1)]),r("span",X0,"API gateway · "+k(v.value?"streaming":"retrying"),1)]),r("div",Q0,[r("div",ew,k(H.value),1),r("div",tw,[r("div",nw,k(t.email||"Operator"),1),r("div",iw,[E(X,{name:"grid",size:11,class:"shrink-0"}),r("span",{class:"truncate",title:`${ae.value} · ${te.value}`},k(ae.value)+" · "+k(te.value),9,ow)])]),r("button",{class:"text-ink-muted transition hover:text-ink",title:"Log out","aria-label":"Log out",onClick:O[0]||(O[0]=de=>l("logout"))},[E(X,{name:"logout",size:16})])])])]),r("main",sw,[r("header",aw,[r("div",null,[O[12]||(O[12]=r("div",{class:"eyebrow"},"Live operations",-1)),r("h1",rw,k(ye.value),1)]),r("div",lw,[r("div",uw,[E(X,{name:"search",size:16,class:"text-ink-muted"}),re(r("input",{"onUpdate:modelValue":O[1]||(O[1]=de=>C.value=de),placeholder:"Search drones, routes…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Se,C.value]])]),r("button",{class:"btn-accent flex items-center gap-2",onClick:O[2]||(O[2]=de=>ye.value="Live flights")},[E(X,{name:"radio",size:16}),O[13]||(O[13]=$(" Live flights ",-1))])])]),ye.value==="Overview"?(p(),g("div",cw,[r("div",dw,[(p(!0),g(ue,null,Be(_.value,de=>(p(),g("div",{key:de.label,class:"panel p-5"},[r("div",fw,[r("span",hw,k(de.label),1),E(X,{name:de.icon,size:16,class:"text-ink-muted"},null,8,["name"])]),r("div",pw,k(de.value),1),r("span",{class:Ee(["mt-2 block font-mono text-[11px]",K[de.tone]])},k(de.delta),3)]))),128))]),r("div",mw,[r("div",gw,[r("div",vw,[O[18]||(O[18]=r("div",null,[r("div",{class:"eyebrow"},"Airspace"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Live map")],-1)),r("div",_w,[Oe(ve).showAirTraffic&&R.value?(p(),g("span",{key:0,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.accent]),title:"Live aircraft from OpenSky Network"},[E(X,{name:"radio",size:12}),$(k(R.value)+" aircraft ",1)],2)):D("",!0),ut.value?(p(),g("span",{key:1,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.success])},[O[14]||(O[14]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(ut.value)+" drones ",1)],2)):D("",!0),r("div",bw,[r("button",{type:"button",class:Ee(["grid h-7 w-7 place-items-center rounded-md text-ink-muted transition hover:bg-surface-2 hover:text-ink",B.value?"bg-surface-2 text-ink":""]),title:"Map settings","aria-label":"Map settings",onClick:O[3]||(O[3]=de=>B.value=!B.value)},[E(X,{name:"settings",size:16})],2),B.value?(p(),g(ue,{key:0},[r("div",{class:"fixed inset-0 z-[1190]",onClick:O[4]||(O[4]=de=>B.value=!1)}),r("div",yw,[O[17]||(O[17]=r("div",{class:"eyebrow mb-2.5"},"Map settings",-1)),r("label",xw,[O[15]||(O[15]=r("span",{class:"text-sm text-ink-secondary"},"Show live air traffic",-1)),E(un,{modelValue:Oe(ve).showAirTraffic,"onUpdate:modelValue":O[5]||(O[5]=de=>Oe(ve).showAirTraffic=de)},null,8,["modelValue"])]),r("div",{class:Ee(["mt-3.5",Oe(ve).showAirTraffic?"":"pointer-events-none opacity-40"])},[r("div",ww,[O[16]||(O[16]=r("span",{class:"text-sm text-ink-secondary"},"Refresh interval",-1)),r("span",kw,"every "+k(he.value)+"s",1)]),re(r("select",{"onUpdate:modelValue":O[6]||(O[6]=de=>Oe(ve).airTrafficInterval=de),class:"field"},[(p(),g(ue,null,Be(F,de=>r("option",{key:de.value,value:de.value},k(de.label)+k(de.value==="auto"?` (plan: ${M.recommendedInterval}s)`:""),9,Sw)),64))],512),[[Mt,Oe(ve).airTrafficInterval]]),M.plan?(p(),g("p",Tw," OpenSky plan: "+k(M.plan),1)):D("",!0)],2)])],64)):D("",!0)])])]),E(mu,{position:dt.value,trail:at.value,aircraft:Oe(ve).showAirTraffic?T.value:[]},null,8,["position","trail","aircraft"]),Oe(ve).showAirTraffic?M.loaded&&M.unavailable?(p(),g("p",Cw,k(M.detail||"Live air traffic is unavailable."),1)):(p(),g("p",Lw," Live air traffic from OpenSky Network · updates every "+k(he.value)+"s ",1)):(p(),g("p",Pw," Live air traffic hidden · enable it in Map settings "))]),r("div",Mw,[r("div",Aw,[O[19]||(O[19]=r("div",null,[r("div",{class:"eyebrow"},"Today"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Schedule")],-1)),E(X,{name:"clock",size:16,class:"text-ink-muted"})]),r("div",Ew,[E(X,{name:"calendar",size:24,class:"text-ink-muted"}),O[20]||(O[20]=r("div",{class:"mt-2 text-sm font-medium text-ink-secondary"},"No missions scheduled",-1)),O[21]||(O[21]=r("div",{class:"mt-0.5 text-xs text-ink-muted"},"Scheduling is not wired to a backend yet.",-1))])])]),r("div",Ow,[r("div",zw,[O[24]||(O[24]=r("div",null,[r("div",{class:"eyebrow"},"Fleet"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft status")],-1)),r("div",Iw,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.success])},[O[22]||(O[22]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(ut.value)+" in flight ",1)],2),wt.value?(p(),g("span",{key:0,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.warning])},[O[23]||(O[23]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(wt.value)+" offline ",1)],2)):D("",!0)])]),z.value.length?(p(),g("div",Nw,[r("table",Dw,[r("thead",null,[r("tr",Fw,[(p(),g(ue,null,Be(["Aircraft","Mission","Status","Alt","Battery","Speed",""],de=>r("th",{key:de,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},k(de),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Be(z.value,(de,Fe)=>(p(),g("tr",{key:de.id,class:Ee(["cursor-pointer transition hover:bg-surface-2",Feet(de.id)},[r("td",Bw,k(de.id),1),r("td",Uw,k(de.mission),1),r("td",Vw,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w[de.tone]])},[O[25]||(O[25]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(k(de.status),1)],2)]),r("td",Zw,k(de.alt),1),r("td",Hw,[de.battery!=null?(p(),g("div",jw,[r("div",Ww,[r("div",{class:Ee(["h-full",de.battery<40?"bg-caution":"bg-ready"]),style:Bo({width:de.battery+"%"})},null,6)]),r("span",Kw,k(de.battery)+"%",1)])):(p(),g("span",Gw,"—"))]),r("td",qw,[$(k(de.speed==null?"—":de.speed.toFixed(1))+" ",1),O[26]||(O[26]=r("span",{class:"text-ink-muted"},"m/s",-1))]),r("td",Yw,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5 whitespace-nowrap",onClick:Kr(Nt=>et(de.id),["stop"])},[E(X,{name:"play",size:14}),O[27]||(O[27]=$(" Track ",-1))],8,Jw)])],10,Rw))),128))])])])):(p(),g("div",$w," No aircraft connected yet. Devices appear here as they come online. "))])])):ye.value==="Live flights"?(p(),g("div",Xw,[r("div",Qw,[r("span",e2,k(h.value||"No device selected"),1),ee.value&&!Ne.value?(p(),g("span",t2,"Offline")):D("",!0),ot.value.length?(p(),g("div",n2,[(p(!0),g(ue,null,Be(ot.value,de=>(p(),g("button",{key:de,class:Ee(["flex items-center gap-2 rounded border px-3 py-1.5 font-mono text-xs font-bold transition",de===h.value?"border-accent bg-accent-soft text-accent-soft-fg":"border-line bg-surface-1 text-ink-secondary hover:border-line-strong"]),onClick:Fe=>h.value=de},[r("span",{class:Ee(["h-2 w-2 rounded-full",u[de].online?"bg-ready":"bg-ink-muted"])},null,2),$(" "+k(de),1)],10,i2))),128))])):D("",!0)]),ot.value.length?(p(),g(ue,{key:1},[r("div",{class:Ee(["mb-4 grid gap-3",!Ne.value&&ee.value?"opacity-60":""]),style:{"grid-template-columns":"repeat(auto-fit, minmax(150px, 1fr))"}},[r("div",s2,[O[30]||(O[30]=r("div",{class:"eyebrow"},"Registration",-1)),r("div",{class:Ee(["mt-1 text-sm font-semibold",Ne.value?((xe=ee.value)==null?void 0:xe.registration)==="success"?"text-success-fg":"text-danger-fg":"text-ink"])},k(Ne.value&&((Je=ee.value)!=null&&Je.registration)?ee.value.registration:"—"),3)]),r("div",a2,[O[31]||(O[31]=r("div",{class:"eyebrow"},"Drone link",-1)),r("div",{class:Ee(["mt-1 text-sm font-semibold",Ne.value?(pt=ee.value)!=null&&pt.connected?"text-success-fg":"text-danger-fg":"text-ink"])},k(ee.value?Ne.value?ee.value.connected?"connected":"no drone":"app offline":"—"),3)]),r("div",r2,[O[32]||(O[32]=r("div",{class:"eyebrow"},"Model",-1)),r("div",l2,k(((Ve=ee.value)==null?void 0:Ve.model)||"—"),1)]),r("div",u2,[O[33]||(O[33]=r("div",{class:"eyebrow"},"Last update",-1)),r("div",c2,k((Vt=ee.value)!=null&&Vt.lastSeenMs?Oe(du)(ee.value.lastSeenMs):"—"),1)])],2),r("div",d2,[r("div",f2,[O[35]||(O[35]=r("div",{class:"mb-3 eyebrow"},"Battery",-1)),r("div",h2,[r("div",p2,[r("div",{class:Ee(["h-full transition-all",typeof be.value.batteryPercent=="number"?be.value.batteryPercent<20?"bg-warning":be.value.batteryPercent<40?"bg-caution":"bg-ready":""]),style:Bo({width:(typeof be.value.batteryPercent=="number"?be.value.batteryPercent:0)+"%"})},null,6)]),r("div",m2,[$(k(typeof be.value.batteryPercent=="number"?be.value.batteryPercent:"—"),1),O[34]||(O[34]=r("span",{class:"text-sm text-ink-secondary"},"%",-1))])])]),r("div",g2,[O[37]||(O[37]=r("div",{class:"mb-3 eyebrow"},"Altitude",-1)),r("div",v2,[$(k(He(be.value.altitude,1)),1),O[36]||(O[36]=r("span",{class:"text-sm text-ink-secondary"}," m",-1))])]),r("div",_2,[O[42]||(O[42]=r("div",{class:"mb-3 eyebrow"},"Flight",-1)),r("div",b2,[r("div",y2,[O[38]||(O[38]=r("span",{class:"text-ink-secondary"},"Mode",-1)),r("b",x2,k(be.value.flightMode||"—"),1)]),r("div",w2,[O[39]||(O[39]=r("span",{class:"text-ink-secondary"},"Flying",-1)),r("b",k2,k(be.value.isFlying==null?"—":be.value.isFlying?"yes":"no"),1)]),r("div",S2,[O[40]||(O[40]=r("span",{class:"text-ink-secondary"},"GPS sats",-1)),r("b",T2,k(be.value.satelliteCount==null?"—":be.value.satelliteCount),1)]),r("div",P2,[O[41]||(O[41]=r("span",{class:"text-ink-secondary"},"Speed (H)",-1)),r("b",C2,k(Ze.value==null?"—":He(Ze.value,2," m/s")),1)])])]),r("div",L2,[O[46]||(O[46]=r("div",{class:"mb-3 eyebrow"},"Position",-1)),r("div",M2,[r("div",A2,[O[43]||(O[43]=r("span",{class:"text-ink-secondary"},"Latitude",-1)),r("b",E2,k(He(be.value.latitude,6)),1)]),r("div",O2,[O[44]||(O[44]=r("span",{class:"text-ink-secondary"},"Longitude",-1)),r("b",z2,k(He(be.value.longitude,6)),1)]),r("div",I2,[O[45]||(O[45]=r("span",{class:"text-ink-secondary"},"Vert. speed",-1)),r("b",$2,k(He(typeof be.value.velocityZ=="number"?-be.value.velocityZ:void 0,2," m/s")),1)])])]),r("div",N2,[O[47]||(O[47]=r("div",{class:"mb-3 eyebrow"},"Track",-1)),E(mu,{position:dt.value,trail:at.value},null,8,["position","trail"])]),r("div",D2,[O[48]||(O[48]=r("div",{class:"mb-3 eyebrow"},"Send command",-1)),r("div",F2,[re(r("input",{"onUpdate:modelValue":O[7]||(O[7]=de=>je.value=de),class:"field flex-1",placeholder:"command (e.g. startConnection)"},null,512),[[Se,je.value]]),re(r("input",{"onUpdate:modelValue":O[8]||(O[8]=de=>ie.value=de),class:"field flex-1",placeholder:"payload JSON (optional)"},null,512),[[Se,ie.value]]),r("button",{class:"btn-accent",onClick:Ce},"Send")]),r("div",R2,k(We.value),1)]),r("div",B2,[O[49]||(O[49]=r("div",{class:"mb-3 eyebrow"},"Event log",-1)),r("div",U2,[(p(!0),g(ue,null,Be(b,(de,Fe)=>(p(),g("div",{key:Fe,class:"border-b border-line py-1"},[r("span",V2,k(de.t),1),r("span",Z2,k(de.tag),1),r("span",H2,k(de.text),1)]))),128))])])])],64)):(p(),g("div",o2,[E(X,{name:"radio",size:28,class:"text-ink-muted"}),O[28]||(O[28]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No aircraft online",-1)),O[29]||(O[29]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Live telemetry appears here once a drone connects.",-1))]))])):ye.value==="Logbook"?(p(),lt(ix,{key:2,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName},null,8,["email","role","organization","organization-name"])):ye.value==="Documents"?(p(),lt(V0,{key:3,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName},null,8,["email","role","organization","organization-name"])):ye.value==="Settings"?(p(),lt(ab,{key:4,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName,onLogout:O[9]||(O[9]=de=>l("logout"))},null,8,["email","role","organization","organization-name"])):(p(),g("div",j2,[r("div",W2,[E(X,{name:ne.value,size:28,class:"text-ink-muted"},null,8,["name"]),r("div",K2,k(ye.value),1),ye.value==="Drives"?(p(),g("div",G2,[O[50]||(O[50]=$(" Browse and transfer files here once a drive is connected. Configure drives in ",-1)),r("button",{class:"font-semibold text-accent hover:underline",onClick:O[10]||(O[10]=de=>ye.value="Settings")},"Settings → Integrations"),O[51]||(O[51]=$(". ",-1))])):(p(),g("div",q2,"This section is part of the console shell and has no backend yet."))])]))])])}}},X2={key:0,class:"h-full"},Q2={key:1,class:"grid h-full place-items-center text-ink-muted text-sm"},ek={__name:"App",setup(t){const i=W(!1),s=W(null),l=W("user"),u=W(""),d=W(""),h=W("");function v(T){l.value=T&&T.role||"user",u.value=T&&T.organization||"",d.value=T&&T.organizationName||""}hi(async()=>{h.value=(await Jh()).apiBase||"";const T=await ru();T&&(s.value=T.email,v(T),await hu()),i.value=!0});async function b(T){s.value=T,v(await ru()),await hu()}async function C(){Fp(),await Qh(),s.value=null,l.value="user",u.value="",d.value=""}return(T,M)=>i.value?(p(),g("div",X2,[s.value?(p(),lt(J2,{key:0,email:s.value,role:l.value,organization:u.value,"organization-name":d.value,onLogout:C},null,8,["email","role","organization","organization-name"])):(p(),lt(tm,{key:1,"default-api-base":h.value,onSignedIn:b},null,8,["default-api-base"]))])):(p(),g("div",Q2,"Loading…"))}};Kh(ek).mount("#app"); diff --git a/Web App/server/dist/assets/index-BfiNicZk.js b/Web App/server/dist/assets/index-BfiNicZk.js new file mode 100644 index 0000000..f8aa294 --- /dev/null +++ b/Web App/server/dist/assets/index-BfiNicZk.js @@ -0,0 +1,20 @@ +(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))l(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&l(h)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Or(t){const i=Object.create(null);for(const s of t.split(","))i[s]=1;return s=>s in i}const _t={},Io=[],Jn=()=>{},yu=()=>!1,Ma=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ea=t=>t.startsWith("onUpdate:"),Nt=Object.assign,zr=(t,i)=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)},fd=Object.prototype.hasOwnProperty,ht=(t,i)=>fd.call(t,i),De=Array.isArray,$o=t=>Fs(t)==="[object Map]",Zo=t=>Fs(t)==="[object Set]",_l=t=>Fs(t)==="[object Date]",Je=t=>typeof t=="function",Tt=t=>typeof t=="string",Un=t=>typeof t=="symbol",pt=t=>t!==null&&typeof t=="object",xu=t=>(pt(t)||Je(t))&&Je(t.then)&&Je(t.catch),wu=Object.prototype.toString,Fs=t=>wu.call(t),hd=t=>Fs(t).slice(8,-1),ku=t=>Fs(t)==="[object Object]",Ir=t=>Tt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ks=Or(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Oa=t=>{const i=Object.create(null);return(s=>i[s]||(i[s]=t(s)))},pd=/-\w/g,Rn=Oa(t=>t.replace(pd,i=>i.slice(1).toUpperCase())),md=/\B([A-Z])/g,Bi=Oa(t=>t.replace(md,"-$1").toLowerCase()),Su=Oa(t=>t.charAt(0).toUpperCase()+t.slice(1)),tr=Oa(t=>t?`on${Su(t)}`:""),Yn=(t,i)=>!Object.is(t,i),ga=(t,...i)=>{for(let s=0;s{Object.defineProperty(t,i,{configurable:!0,enumerable:!1,writable:l,value:s})},za=t=>{const i=parseFloat(t);return isNaN(i)?t:i},gd=t=>{const i=Tt(t)?Number(t):NaN;return isNaN(i)?t:i};let bl;const Ia=()=>bl||(bl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bo(t){if(De(t)){const i={};for(let s=0;s{if(s){const l=s.split(_d);l.length>1&&(i[l[0].trim()]=l[1].trim())}}),i}function Ee(t){let i="";if(Tt(t))i=t;else if(De(t))for(let s=0;sDi(s,i))}const Cu=t=>!!(t&&t.__v_isRef===!0),S=t=>Tt(t)?t:t==null?"":De(t)||pt(t)&&(t.toString===wu||!Je(t.toString))?Cu(t)?S(t.value):JSON.stringify(t,Lu,2):String(t),Lu=(t,i)=>Cu(i)?Lu(t,i.value):$o(i)?{[`Map(${i.size})`]:[...i.entries()].reduce((s,[l,u],d)=>(s[nr(l,d)+" =>"]=u,s),{})}:Zo(i)?{[`Set(${i.size})`]:[...i.values()].map(s=>nr(s))}:Un(i)?nr(i):pt(i)&&!De(i)&&!ku(i)?String(i):i,nr=(t,i="")=>{var s;return Un(t)?`Symbol(${(s=t.description)!=null?s:i})`:t};/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Rt;class Sd{constructor(i=!1){this.detached=i,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!i&&Rt&&(Rt.active?(this.parent=Rt,this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,s;if(this.scopes)for(i=0,s=this.scopes.length;i0&&--this._on===0){if(Rt===this)Rt=this.prevScope;else{let i=Rt;for(;i;){if(i.prevScope===this){i.prevScope=this.prevScope;break}i=i.prevScope}}this.prevScope=void 0}}stop(i){if(this._active){this._active=!1;let s,l;for(s=0,l=this.effects.length;s0)return;if(Ts){let i=Ts;for(Ts=void 0;i;){const s=i.next;i.next=void 0,i.flags&=-9,i=s}}let t;for(;Ss;){let i=Ss;for(Ss=void 0;i;){const s=i.next;if(i.next=void 0,i.flags&=-9,i.flags&1)try{i.trigger()}catch(l){t||(t=l)}i=s}}if(t)throw t}function Ou(t){for(let i=t.deps;i;i=i.nextDep)i.version=-1,i.prevActiveLink=i.dep.activeLink,i.dep.activeLink=i}function zu(t){let i,s=t.depsTail,l=s;for(;l;){const u=l.prevDep;l.version===-1?(l===s&&(s=u),Fr(l),Pd(l)):i=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=u}t.deps=i,t.depsTail=s}function mr(t){for(let i=t.deps;i;i=i.nextDep)if(i.dep.version!==i.version||i.dep.computed&&(Iu(i.dep.computed)||i.dep.version!==i.version))return!0;return!!t._dirty}function Iu(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Ms)||(t.globalVersion=Ms,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!mr(t))))return;t.flags|=2;const i=t.dep,s=xt,l=Bn;xt=t,Bn=!0;try{Ou(t);const u=t.fn(t._value);(i.version===0||Yn(u,t._value))&&(t.flags|=128,t._value=u,i.version++)}catch(u){throw i.version++,u}finally{xt=s,Bn=l,zu(t),t.flags&=-3}}function Fr(t,i=!1){const{dep:s,prevSub:l,nextSub:u}=t;if(l&&(l.nextSub=u,t.prevSub=void 0),u&&(u.prevSub=l,t.nextSub=void 0),s.subs===t&&(s.subs=l,!l&&s.computed)){s.computed.flags&=-5;for(let d=s.computed.deps;d;d=d.nextDep)Fr(d,!0)}!i&&!--s.sc&&s.map&&s.map.delete(s.key)}function Pd(t){const{prevDep:i,nextDep:s}=t;i&&(i.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=i,t.nextDep=void 0)}let Bn=!0;const $u=[];function Xn(){$u.push(Bn),Bn=!1}function Qn(){const t=$u.pop();Bn=t===void 0?!0:t}function yl(t){const{cleanup:i}=t;if(t.cleanup=void 0,i){const s=xt;xt=void 0;try{i()}finally{xt=s}}}let Ms=0;class Cd{constructor(i,s){this.sub=i,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rr{constructor(i){this.computed=i,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(i){if(!xt||!Bn||xt===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==xt)s=this.activeLink=new Cd(xt,this),xt.deps?(s.prevDep=xt.depsTail,xt.depsTail.nextDep=s,xt.depsTail=s):xt.deps=xt.depsTail=s,Nu(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const l=s.nextDep;l.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=l),s.prevDep=xt.depsTail,s.nextDep=void 0,xt.depsTail.nextDep=s,xt.depsTail=s,xt.deps===s&&(xt.deps=l)}return s}trigger(i){this.version++,Ms++,this.notify(i)}notify(i){Nr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Dr()}}}function Nu(t){if(t.dep.sc++,t.sub.flags&4){const i=t.dep.computed;if(i&&!t.dep.subs){i.flags|=20;for(let l=i.deps;l;l=l.nextDep)Nu(l)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const gr=new WeakMap,no=Symbol(""),vr=Symbol(""),Es=Symbol("");function Ut(t,i,s){if(Bn&&xt){let l=gr.get(t);l||gr.set(t,l=new Map);let u=l.get(s);u||(l.set(s,u=new Rr),u.map=l,u.key=s),u.track()}}function pi(t,i,s,l,u,d){const h=gr.get(t);if(!h){Ms++;return}const v=b=>{b&&b.trigger()};if(Nr(),i==="clear")h.forEach(v);else{const b=De(t),C=b&&Ir(s);if(b&&s==="length"){const T=Number(l);h.forEach((A,R)=>{(R==="length"||R===Es||!Un(R)&&R>=T)&&v(A)})}else switch((s!==void 0||h.has(void 0))&&v(h.get(s)),C&&v(h.get(Es)),i){case"add":b?C&&v(h.get("length")):(v(h.get(no)),$o(t)&&v(h.get(vr)));break;case"delete":b||(v(h.get(no)),$o(t)&&v(h.get(vr)));break;case"set":$o(t)&&v(h.get(no));break}}Dr()}function Oo(t){const i=ct(t);return i===t?i:(Ut(i,"iterate",Es),Cn(t)?i:i.map(Vn))}function $a(t){return Ut(t=ct(t),"iterate",Es),t}function Gn(t,i){return vi(t)?Uo(io(t)?Vn(i):i):Vn(i)}const Ld={__proto__:null,[Symbol.iterator](){return or(this,Symbol.iterator,t=>Gn(this,t))},concat(...t){return Oo(this).concat(...t.map(i=>De(i)?Oo(i):i))},entries(){return or(this,"entries",t=>(t[1]=Gn(this,t[1]),t))},every(t,i){return ci(this,"every",t,i,void 0,arguments)},filter(t,i){return ci(this,"filter",t,i,s=>s.map(l=>Gn(this,l)),arguments)},find(t,i){return ci(this,"find",t,i,s=>Gn(this,s),arguments)},findIndex(t,i){return ci(this,"findIndex",t,i,void 0,arguments)},findLast(t,i){return ci(this,"findLast",t,i,s=>Gn(this,s),arguments)},findLastIndex(t,i){return ci(this,"findLastIndex",t,i,void 0,arguments)},forEach(t,i){return ci(this,"forEach",t,i,void 0,arguments)},includes(...t){return sr(this,"includes",t)},indexOf(...t){return sr(this,"indexOf",t)},join(t){return Oo(this).join(t)},lastIndexOf(...t){return sr(this,"lastIndexOf",t)},map(t,i){return ci(this,"map",t,i,void 0,arguments)},pop(){return ms(this,"pop")},push(...t){return ms(this,"push",t)},reduce(t,...i){return xl(this,"reduce",t,i)},reduceRight(t,...i){return xl(this,"reduceRight",t,i)},shift(){return ms(this,"shift")},some(t,i){return ci(this,"some",t,i,void 0,arguments)},splice(...t){return ms(this,"splice",t)},toReversed(){return Oo(this).toReversed()},toSorted(t){return Oo(this).toSorted(t)},toSpliced(...t){return Oo(this).toSpliced(...t)},unshift(...t){return ms(this,"unshift",t)},values(){return or(this,"values",t=>Gn(this,t))}};function or(t,i,s){const l=$a(t),u=l[i]();return l!==t&&!Cn(t)&&(u._next=u.next,u.next=()=>{const d=u._next();return d.done||(d.value=s(d.value)),d}),u}const Ad=Array.prototype;function ci(t,i,s,l,u,d){const h=$a(t),v=h!==t&&!Cn(t),b=h[i];if(b!==Ad[i]){const A=b.apply(t,d);return v?Vn(A):A}let C=s;h!==t&&(v?C=function(A,R){return s.call(this,Gn(t,A),R,t)}:s.length>2&&(C=function(A,R){return s.call(this,A,R,t)}));const T=b.call(h,C,l);return v&&u?u(T):T}function xl(t,i,s,l){const u=$a(t),d=u!==t&&!Cn(t);let h=s,v=!1;u!==t&&(d?(v=l.length===0,h=function(C,T,A){return v&&(v=!1,C=Gn(t,C)),s.call(this,C,Gn(t,T),A,t)}):s.length>3&&(h=function(C,T,A){return s.call(this,C,T,A,t)}));const b=u[i](h,...l);return v?Gn(t,b):b}function sr(t,i,s){const l=ct(t);Ut(l,"iterate",Es);const u=l[i](...s);return(u===-1||u===!1)&&Vr(s[0])?(s[0]=ct(s[0]),l[i](...s)):u}function ms(t,i,s=[]){Xn(),Nr();const l=ct(t)[i].apply(t,s);return Dr(),Qn(),l}const Md=Or("__proto__,__v_isRef,__isVue"),Du=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Un));function Ed(t){Un(t)||(t=String(t));const i=ct(this);return Ut(i,"has",t),i.hasOwnProperty(t)}class Fu{constructor(i=!1,s=!1){this._isReadonly=i,this._isShallow=s}get(i,s,l){if(s==="__v_skip")return i.__v_skip;const u=this._isReadonly,d=this._isShallow;if(s==="__v_isReactive")return!u;if(s==="__v_isReadonly")return u;if(s==="__v_isShallow")return d;if(s==="__v_raw")return l===(u?d?Ud:Vu:d?Uu:Bu).get(i)||Object.getPrototypeOf(i)===Object.getPrototypeOf(l)?i:void 0;const h=De(i);if(!u){let b;if(h&&(b=Ld[s]))return b;if(s==="hasOwnProperty")return Ed}const v=Reflect.get(i,s,Ht(i)?i:l);if((Un(s)?Du.has(s):Md(s))||(u||Ut(i,"get",s),d))return v;if(Ht(v)){const b=h&&Ir(s)?v:v.value;return u&&pt(b)?br(b):b}return pt(v)?u?br(v):St(v):v}}class Ru extends Fu{constructor(i=!1){super(!1,i)}set(i,s,l,u){let d=i[s];const h=De(i)&&Ir(s);if(!this._isShallow){const C=vi(d);if(!Cn(l)&&!vi(l)&&(d=ct(d),l=ct(l)),!h&&Ht(d)&&!Ht(l))return C||(d.value=l),!0}const v=h?Number(s)t,ca=t=>Reflect.getPrototypeOf(t);function Nd(t,i,s){return function(...l){const u=this.__v_raw,d=ct(u),h=$o(d),v=t==="entries"||t===Symbol.iterator&&h,b=t==="keys"&&h,C=u[t](...l),T=s?_r:i?Uo:Vn;return!i&&Ut(d,"iterate",b?vr:no),Nt(Object.create(C),{next(){const{value:A,done:R}=C.next();return R?{value:A,done:R}:{value:v?[T(A[0]),T(A[1])]:T(A),done:R}}})}}function da(t){return function(...i){return t==="delete"?!1:t==="clear"?void 0:this}}function Dd(t,i){const s={get(u){const d=this.__v_raw,h=ct(d),v=ct(u);t||(Yn(u,v)&&Ut(h,"get",u),Ut(h,"get",v));const{has:b}=ca(h),C=i?_r:t?Uo:Vn;if(b.call(h,u))return C(d.get(u));if(b.call(h,v))return C(d.get(v));d!==h&&d.get(u)},get size(){const u=this.__v_raw;return!t&&Ut(ct(u),"iterate",no),u.size},has(u){const d=this.__v_raw,h=ct(d),v=ct(u);return t||(Yn(u,v)&&Ut(h,"has",u),Ut(h,"has",v)),u===v?d.has(u):d.has(u)||d.has(v)},forEach(u,d){const h=this,v=h.__v_raw,b=ct(v),C=i?_r:t?Uo:Vn;return!t&&Ut(b,"iterate",no),v.forEach((T,A)=>u.call(d,C(T),C(A),h))}};return Nt(s,t?{add:da("add"),set:da("set"),delete:da("delete"),clear:da("clear")}:{add(u){const d=ct(this),h=ca(d),v=ct(u),b=!i&&!Cn(u)&&!vi(u)?v:u;return h.has.call(d,b)||Yn(u,b)&&h.has.call(d,u)||Yn(v,b)&&h.has.call(d,v)||(d.add(b),pi(d,"add",b,b)),this},set(u,d){!i&&!Cn(d)&&!vi(d)&&(d=ct(d));const h=ct(this),{has:v,get:b}=ca(h);let C=v.call(h,u);C||(u=ct(u),C=v.call(h,u));const T=b.call(h,u);return h.set(u,d),C?Yn(d,T)&&pi(h,"set",u,d):pi(h,"add",u,d),this},delete(u){const d=ct(this),{has:h,get:v}=ca(d);let b=h.call(d,u);b||(u=ct(u),b=h.call(d,u)),v&&v.call(d,u);const C=d.delete(u);return b&&pi(d,"delete",u,void 0),C},clear(){const u=ct(this),d=u.size!==0,h=u.clear();return d&&pi(u,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(u=>{s[u]=Nd(u,t,i)}),s}function Br(t,i){const s=Dd(t,i);return(l,u,d)=>u==="__v_isReactive"?!t:u==="__v_isReadonly"?t:u==="__v_raw"?l:Reflect.get(ht(s,u)&&u in l?s:l,u,d)}const Fd={get:Br(!1,!1)},Rd={get:Br(!1,!0)},Bd={get:Br(!0,!1)};const Bu=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,Ud=new WeakMap;function Vd(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function St(t){return vi(t)?t:Ur(t,!1,zd,Fd,Bu)}function Zd(t){return Ur(t,!1,$d,Rd,Uu)}function br(t){return Ur(t,!0,Id,Bd,Vu)}function Ur(t,i,s,l,u){if(!pt(t)||t.__v_raw&&!(i&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const d=u.get(t);if(d)return d;const h=Vd(hd(t));if(h===0)return t;const v=new Proxy(t,h===2?l:s);return u.set(t,v),v}function io(t){return vi(t)?io(t.__v_raw):!!(t&&t.__v_isReactive)}function vi(t){return!!(t&&t.__v_isReadonly)}function Cn(t){return!!(t&&t.__v_isShallow)}function Vr(t){return t?!!t.__v_raw:!1}function ct(t){const i=t&&t.__v_raw;return i?ct(i):t}function Hd(t){return!ht(t,"__v_skip")&&Object.isExtensible(t)&&Tu(t,"__v_skip",!0),t}const Vn=t=>pt(t)?St(t):t,Uo=t=>pt(t)?br(t):t;function Ht(t){return t?t.__v_isRef===!0:!1}function j(t){return jd(t,!1)}function jd(t,i){return Ht(t)?t:new Wd(t,i)}class Wd{constructor(i,s){this.dep=new Rr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?i:ct(i),this._value=s?i:Vn(i),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(i){const s=this._rawValue,l=this.__v_isShallow||Cn(i)||vi(i);i=l?i:ct(i),Yn(i,s)&&(this._rawValue=i,this._value=l?i:Vn(i),this.dep.trigger())}}function Oe(t){return Ht(t)?t.value:t}const Kd={get:(t,i,s)=>i==="__v_raw"?t:Oe(Reflect.get(t,i,s)),set:(t,i,s,l)=>{const u=t[i];return Ht(u)&&!Ht(s)?(u.value=s,!0):Reflect.set(t,i,s,l)}};function Zu(t){return io(t)?t:new Proxy(t,Kd)}class Gd{constructor(i,s,l){this.fn=i,this.setter=s,this._value=void 0,this.dep=new Rr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ms-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&xt!==this)return Eu(this,!0),!0}get value(){const i=this.dep.track();return Iu(this),i&&(i.version=this.dep.version),this._value}set value(i){this.setter&&this.setter(i)}}function qd(t,i,s=!1){let l,u;return Je(t)?l=t:(l=t.get,u=t.set),new Gd(l,u,s)}const fa={},_a=new WeakMap;let Qi;function Yd(t,i=!1,s=Qi){if(s){let l=_a.get(s);l||_a.set(s,l=[]),l.push(t)}}function Jd(t,i,s=_t){const{immediate:l,deep:u,once:d,scheduler:h,augmentJob:v,call:b}=s,C=fe=>u?fe:Cn(fe)||u===!1||u===0?mi(fe,1):mi(fe);let T,A,R,B,Z=!1,F=!1;if(Ht(t)?(A=()=>t.value,Z=Cn(t)):io(t)?(A=()=>C(t),Z=!0):De(t)?(F=!0,Z=t.some(fe=>io(fe)||Cn(fe)),A=()=>t.map(fe=>{if(Ht(fe))return fe.value;if(io(fe))return C(fe);if(Je(fe))return b?b(fe,2):fe()})):Je(t)?i?A=b?()=>b(t,2):t:A=()=>{if(R){Xn();try{R()}finally{Qn()}}const fe=Qi;Qi=T;try{return b?b(t,3,[B]):t(B)}finally{Qi=fe}}:A=Jn,i&&u){const fe=A,Be=u===!0?1/0:u;A=()=>mi(fe(),Be)}const he=Td(),pe=()=>{T.stop(),he&&he.active&&zr(he.effects,T)};if(d&&i){const fe=i;i=(...Be)=>{const $e=fe(...Be);return pe(),$e}}let q=F?new Array(t.length).fill(fa):fa;const Ce=fe=>{if(!(!(T.flags&1)||!T.dirty&&!fe))if(i){const Be=T.run();if(fe||u||Z||(F?Be.some(($e,Ie)=>Yn($e,q[Ie])):Yn(Be,q))){R&&R();const $e=Qi;Qi=T;try{const Ie=[Be,q===fa?void 0:F&&q[0]===fa?[]:q,B];q=Be,b?b(i,3,Ie):i(...Ie)}finally{Qi=$e}}}else T.run()};return v&&v(Ce),T=new Au(A),T.scheduler=h?()=>h(Ce,!1):Ce,B=fe=>Yd(fe,!1,T),R=T.onStop=()=>{const fe=_a.get(T);if(fe){if(b)b(fe,4);else for(const Be of fe)Be();_a.delete(T)}},i?l?Ce(!0):q=T.run():h?h(Ce.bind(null,!0),!0):T.run(),pe.pause=T.pause.bind(T),pe.resume=T.resume.bind(T),pe.stop=pe,pe}function mi(t,i=1/0,s){if(i<=0||!pt(t)||t.__v_skip||(s=s||new Map,(s.get(t)||0)>=i))return t;if(s.set(t,i),i--,Ht(t))mi(t.value,i,s);else if(De(t))for(let l=0;l{mi(l,i,s)});else if(ku(t)){for(const l in t)mi(t[l],i,s);for(const l of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,l)&&mi(t[l],i,s)}return t}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Rs(t,i,s,l){try{return l?t(...l):t()}catch(u){Na(u,i,s)}}function An(t,i,s,l){if(Je(t)){const u=Rs(t,i,s,l);return u&&xu(u)&&u.catch(d=>{Na(d,i,s)}),u}if(De(t)){const u=[];for(let d=0;d>>1,u=Xt[l],d=Os(u);d=Os(s)?Xt.push(t):Xt.splice(Qd(i),0,t),t.flags|=1,Wu()}}function Wu(){ba||(ba=Hu.then(Gu))}function ef(t){De(t)?No.push(...t):Ni&&t.id===-1?Ni.splice(zo+1,0,t):t.flags&1||(No.push(t),t.flags|=1),Wu()}function wl(t,i,s=Kn+1){for(;sOs(s)-Os(l));if(No.length=0,Ni){Ni.push(...i);return}for(Ni=i,zo=0;zot.id==null?t.flags&2?-1:1/0:t.id;function Gu(t){try{for(Kn=0;Kn{l._d&&ka(-1);const d=ya(i);let h;try{h=t(...u)}finally{ya(d),l._d&&ka(1)}return h};return l._n=!0,l._c=!0,l._d=!0,l}function ne(t,i){if(Zt===null)return t;const s=Ua(Zt),l=t.dirs||(t.dirs=[]);for(let u=0;u1)return s&&Je(i)?i.call(l&&l.proxy):i}}const tf=Symbol.for("v-scx"),nf=()=>Ps(tf);function $t(t,i,s){return Ju(t,i,s)}function Ju(t,i,s=_t){const{immediate:l,deep:u,flush:d,once:h}=s,v=Nt({},s),b=i&&l||!i&&d!=="post";let C;if(Ns){if(d==="sync"){const B=nf();C=B.__watcherHandles||(B.__watcherHandles=[])}else if(!b){const B=()=>{};return B.stop=Jn,B.resume=Jn,B.pause=Jn,B}}const T=Qt;v.call=(B,Z,F)=>An(B,T,Z,F);let A=!1;d==="post"?v.scheduler=B=>{Jt(B,T&&T.suspense)}:d!=="sync"&&(A=!0,v.scheduler=(B,Z)=>{Z?B():Zr(B)}),v.augmentJob=B=>{i&&(B.flags|=4),A&&(B.flags|=2,T&&(B.id=T.uid,B.i=T))};const R=Jd(t,i,v);return Ns&&(C?C.push(R):b&&R()),R}function of(t,i,s){const l=this.proxy,u=Tt(t)?t.includes(".")?Xu(l,t):()=>l[t]:t.bind(l,l);let d;Je(i)?d=i:(d=i.handler,s=i);const h=Bs(this),v=Ju(u,d.bind(l),s);return h(),v}function Xu(t,i){const s=i.split(".");return()=>{let l=t;for(let u=0;ut.__isTeleport,eo=t=>t&&(t.disabled||t.disabled===""),sf=t=>t&&(t.defer||t.defer===""),kl=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Sl=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,yr=(t,i)=>{const s=t&&t.to;return Tt(s)?i?i(s):null:s},af={name:"Teleport",__isTeleport:!0,process(t,i,s,l,u,d,h,v,b,C){const{mc:T,pc:A,pbc:R,o:{insert:B,querySelector:Z,createText:F,createComment:he,parentNode:pe}}=C,q=eo(i.props);let{dynamicChildren:Ce}=i;const fe=(Ie,Ge,be)=>{Ie.shapeFlag&16&&T(Ie.children,Ge,be,u,d,h,v,b)},Be=(Ie=i)=>{const Ge=eo(Ie.props),be=Ie.target=yr(Ie.props,Z),we=xr(be,Ie,F,B);be&&(h!=="svg"&&kl(be)?h="svg":h!=="mathml"&&Sl(be)&&(h="mathml"),u&&u.isCE&&(u.ce._teleportTargets||(u.ce._teleportTargets=new Set)).add(be),Ge||(fe(Ie,be,we),bs(Ie,!1)))},$e=Ie=>{const Ge=()=>{if($i.get(Ie)===Ge){if($i.delete(Ie),eo(Ie.props)){const be=pe(Ie.el)||s;fe(Ie,be,Ie.anchor),bs(Ie,!0)}Be(Ie)}};$i.set(Ie,Ge),Jt(Ge,d)};if(t==null){const Ie=i.el=F(""),Ge=i.anchor=F("");if(B(Ie,s,l),B(Ge,s,l),sf(i.props)||d&&d.pendingBranch){$e(i);return}q&&(fe(i,s,Ge),bs(i,!0)),Be()}else{i.el=t.el;const Ie=i.anchor=t.anchor,Ge=$i.get(t);if(Ge){Ge.flags|=8,$i.delete(t),$e(i);return}i.targetStart=t.targetStart;const be=i.target=t.target,we=i.targetAnchor=t.targetAnchor,ze=eo(t.props),ie=ze?s:be,He=ze?Ie:we;if(h==="svg"||kl(be)?h="svg":(h==="mathml"||Sl(be))&&(h="mathml"),Ce?(R(t.dynamicChildren,Ce,ie,u,d,h,v),Wr(t,i,!0)):b||A(t,i,ie,He,u,d,h,v,!1),q)ze?i.props&&t.props&&i.props.to!==t.props.to&&(i.props.to=t.props.to):ha(i,s,Ie,C,1);else if((i.props&&i.props.to)!==(t.props&&t.props.to)){const oe=yr(i.props,Z);oe&&(i.target=oe,ha(i,oe,null,C,0))}else ze&&ha(i,be,we,C,1);bs(i,q)}},remove(t,i,s,{um:l,o:{remove:u}},d){const{shapeFlag:h,children:v,anchor:b,targetStart:C,targetAnchor:T,target:A,props:R}=t,B=eo(R),Z=d||!B,F=$i.get(t);if(F&&(F.flags|=8,$i.delete(t)),A&&(u(C),u(T)),d&&u(b),!F&&(B||A)&&h&16)for(let he=0;he{t.isMounted=!0}),Ho(()=>{t.isUnmounting=!0}),t}const Sn=[Function,Array],tc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Sn,onEnter:Sn,onAfterEnter:Sn,onEnterCancelled:Sn,onBeforeLeave:Sn,onLeave:Sn,onAfterLeave:Sn,onLeaveCancelled:Sn,onBeforeAppear:Sn,onAppear:Sn,onAfterAppear:Sn,onAppearCancelled:Sn},nc=t=>{const i=t.subTree;return i.component?nc(i.component):i},cf={name:"BaseTransition",props:tc,setup(t,{slots:i}){const s=Lc(),l=uf();return()=>{const u=i.default&&sc(i.default(),!0),d=u&&u.length?ic(u):s.subTree?N():void 0;if(!d)return;const h=ct(t),{mode:v}=h;if(l.isLeaving)return ar(d);const b=Tl(d);if(!b)return ar(d);let C=wr(b,h,l,s,A=>C=A);b.type!==Vt&&zs(b,C);let T=s.subTree&&Tl(s.subTree);if(T&&T.type!==Vt&&!to(T,b)&&nc(s).type!==Vt){let A=wr(T,h,l,s);if(zs(T,A),v==="out-in"&&b.type!==Vt)return l.isLeaving=!0,A.afterLeave=()=>{l.isLeaving=!1,s.job.flags&8||s.update(),delete A.afterLeave,T=void 0},ar(d);v==="in-out"&&b.type!==Vt?A.delayLeave=(R,B,Z)=>{const F=oc(l,T);F[String(T.key)]=T,R[Pn]=()=>{B(),R[Pn]=void 0,delete C.delayedLeave,T=void 0},C.delayedLeave=()=>{Z(),delete C.delayedLeave,T=void 0}}:T=void 0}else T&&(T=void 0);return d}}};function ic(t){let i=t[0];if(t.length>1){for(const s of t)if(s.type!==Vt){i=s;break}}return i}const df=cf;function oc(t,i){const{leavingVNodes:s}=t;let l=s.get(i.type);return l||(l=Object.create(null),s.set(i.type,l)),l}function wr(t,i,s,l,u){const{appear:d,mode:h,persisted:v=!1,onBeforeEnter:b,onEnter:C,onAfterEnter:T,onEnterCancelled:A,onBeforeLeave:R,onLeave:B,onAfterLeave:Z,onLeaveCancelled:F,onBeforeAppear:he,onAppear:pe,onAfterAppear:q,onAppearCancelled:Ce}=i,fe=String(t.key),Be=oc(s,t),$e=(be,we)=>{be&&An(be,l,9,we)},Ie=(be,we)=>{const ze=we[1];$e(be,we),De(be)?be.every(ie=>ie.length<=1)&&ze():be.length<=1&&ze()},Ge={mode:h,persisted:v,beforeEnter(be){let we=b;if(!s.isMounted)if(d)we=he||b;else return;be[Pn]&&be[Pn](!0);const ze=Be[fe];ze&&to(t,ze)&&ze.el[Pn]&&ze.el[Pn](),$e(we,[be])},enter(be){if(Be[fe]===t)return;let we=C,ze=T,ie=A;if(!s.isMounted)if(d)we=pe||C,ze=q||T,ie=Ce||A;else return;let He=!1;be[gs]=je=>{He||(He=!0,je?$e(ie,[be]):$e(ze,[be]),Ge.delayedLeave&&Ge.delayedLeave(),be[gs]=void 0)};const oe=be[gs].bind(null,!1);we?Ie(we,[be,oe]):oe()},leave(be,we){const ze=String(t.key);if(be[gs]&&be[gs](!0),s.isUnmounting)return we();$e(R,[be]);let ie=!1;be[Pn]=oe=>{ie||(ie=!0,we(),oe?$e(F,[be]):$e(Z,[be]),be[Pn]=void 0,Be[ze]===t&&delete Be[ze])};const He=be[Pn].bind(null,!1);Be[ze]=t,B?Ie(B,[be,He]):He()},clone(be){const we=wr(be,i,s,l,u);return u&&u(we),we}};return Ge}function ar(t){if(Da(t))return t=Fi(t),t.children=null,t}function Tl(t){if(!Da(t))return ec(t.type)&&t.children?ic(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:i,children:s}=t;if(s){if(i&16)return s[0];if(i&32&&Je(s.default))return s.default()}}function zs(t,i){t.shapeFlag&6&&t.component?(t.transition=i,zs(t.component.subTree,i)):t.shapeFlag&128?(t.ssContent.transition=i.clone(t.ssContent),t.ssFallback.transition=i.clone(t.ssFallback)):t.transition=i}function sc(t,i=!1,s){let l=[],u=0;for(let d=0;d1)for(let d=0;dCs(F,i&&(De(i)?i[he]:i),s,l,u));return}if(Do(l)&&!u){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&Cs(t,i,s,l.component.subTree);return}const d=l.shapeFlag&4?Ua(l.component):l.el,h=u?null:d,{i:v,r:b}=t,C=i&&i.r,T=v.refs===_t?v.refs={}:v.refs,A=v.setupState,R=ct(A),B=A===_t?yu:F=>Pl(T,F)?!1:ht(R,F),Z=(F,he)=>!(he&&Pl(T,he));if(C!=null&&C!==b){if(Cl(i),Tt(C))T[C]=null,B(C)&&(A[C]=null);else if(Ht(C)){const F=i;Z(C,F.k)&&(C.value=null),F.k&&(T[F.k]=null)}}if(Je(b)){Xn();try{Rs(b,v,12,[h,T])}finally{Qn()}}else{const F=Tt(b),he=Ht(b);if(F||he){const pe=()=>{if(t.f){const q=F?B(b)?A[b]:T[b]:Z()||!t.k?b.value:T[t.k];if(u)De(q)&&zr(q,d);else if(De(q))q.includes(d)||q.push(d);else if(F)T[b]=[d],B(b)&&(A[b]=T[b]);else{const Ce=[d];Z(b,t.k)&&(b.value=Ce),t.k&&(T[t.k]=Ce)}}else F?(T[b]=h,B(b)&&(A[b]=h)):he&&(Z(b,t.k)&&(b.value=h),t.k&&(T[t.k]=h))};if(h){const q=()=>{pe(),xa.delete(t)};q.id=-1,xa.set(t,q),Jt(q,s)}else Cl(t),pe()}}}function Cl(t){const i=xa.get(t);i&&(i.flags|=8,xa.delete(t))}Ia().requestIdleCallback;Ia().cancelIdleCallback;const Do=t=>!!t.type.__asyncLoader,Da=t=>t.type.__isKeepAlive;function ff(t,i){rc(t,"a",i)}function hf(t,i){rc(t,"da",i)}function rc(t,i,s=Qt){const l=t.__wdc||(t.__wdc=()=>{let u=s;for(;u;){if(u.isDeactivated)return;u=u.parent}return t()});if(Fa(i,l,s),s){let u=s.parent;for(;u&&u.parent;)Da(u.parent.vnode)&&pf(l,i,s,u),u=u.parent}}function pf(t,i,s,l){const u=Fa(i,t,l,!0);lc(()=>{zr(l[i],u)},s)}function Fa(t,i,s=Qt,l=!1){if(s){const u=s[t]||(s[t]=[]),d=i.__weh||(i.__weh=(...h)=>{Xn();const v=Bs(s),b=An(i,s,t,h);return v(),Qn(),b});return l?u.unshift(d):u.push(d),d}}const bi=t=>(i,s=Qt)=>{(!Ns||t==="sp")&&Fa(t,(...l)=>i(...l),s)},mf=bi("bm"),_i=bi("m"),gf=bi("bu"),vf=bi("u"),Ho=bi("bum"),lc=bi("um"),_f=bi("sp"),bf=bi("rtg"),yf=bi("rtc");function xf(t,i=Qt){Fa("ec",t,i)}const wf=Symbol.for("v-ndc");function Fe(t,i,s,l){let u;const d=s,h=De(t);if(h||Tt(t)){const v=h&&io(t);let b=!1,C=!1;v&&(b=!Cn(t),C=vi(t),t=$a(t)),u=new Array(t.length);for(let T=0,A=t.length;Ti(v,b,void 0,d));else{const v=Object.keys(t);u=new Array(v.length);for(let b=0,C=v.length;b0;return p(),at(ue,null,[E("slot",s,l)],C?-2:64)}let d=t[i];d&&d._c&&(d._d=!1),p();const h=d&&uc(d(s)),v=s.key||h&&h.key,b=at(ue,{key:(v&&!Un(v)?v:`_${i}`)+(!h&&l?"_fb":"")},h||[],h&&t._===1?64:-2);return b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function uc(t){return t.some(i=>$s(i)?!(i.type===Vt||i.type===ue&&!uc(i.children)):!0)?t:null}const kr=t=>t?Ac(t)?Ua(t):kr(t.parent):null,Ls=Nt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>kr(t.parent),$root:t=>kr(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>dc(t),$forceUpdate:t=>t.f||(t.f=()=>{Zr(t.update)}),$nextTick:t=>t.n||(t.n=ju.bind(t.proxy)),$watch:t=>of.bind(t)}),rr=(t,i)=>t!==_t&&!t.__isScriptSetup&&ht(t,i),Sf={get({_:t},i){if(i==="__v_skip")return!0;const{ctx:s,setupState:l,data:u,props:d,accessCache:h,type:v,appContext:b}=t;if(i[0]!=="$"){const R=h[i];if(R!==void 0)switch(R){case 1:return l[i];case 2:return u[i];case 4:return s[i];case 3:return d[i]}else{if(rr(l,i))return h[i]=1,l[i];if(u!==_t&&ht(u,i))return h[i]=2,u[i];if(ht(d,i))return h[i]=3,d[i];if(s!==_t&&ht(s,i))return h[i]=4,s[i];Sr&&(h[i]=0)}}const C=Ls[i];let T,A;if(C)return i==="$attrs"&&Ut(t.attrs,"get",""),C(t);if((T=v.__cssModules)&&(T=T[i]))return T;if(s!==_t&&ht(s,i))return h[i]=4,s[i];if(A=b.config.globalProperties,ht(A,i))return A[i]},set({_:t},i,s){const{data:l,setupState:u,ctx:d}=t;return rr(u,i)?(u[i]=s,!0):l!==_t&&ht(l,i)?(l[i]=s,!0):ht(t.props,i)||i[0]==="$"&&i.slice(1)in t?!1:(d[i]=s,!0)},has({_:{data:t,setupState:i,accessCache:s,ctx:l,appContext:u,props:d,type:h}},v){let b;return!!(s[v]||t!==_t&&v[0]!=="$"&&ht(t,v)||rr(i,v)||ht(d,v)||ht(l,v)||ht(Ls,v)||ht(u.config.globalProperties,v)||(b=h.__cssModules)&&b[v])},defineProperty(t,i,s){return s.get!=null?t._.accessCache[i]=0:ht(s,"value")&&this.set(t,i,s.value,null),Reflect.defineProperty(t,i,s)}};function Ll(t){return De(t)?t.reduce((i,s)=>(i[s]=null,i),{}):t}let Sr=!0;function Tf(t){const i=dc(t),s=t.proxy,l=t.ctx;Sr=!1,i.beforeCreate&&Al(i.beforeCreate,t,"bc");const{data:u,computed:d,methods:h,watch:v,provide:b,inject:C,created:T,beforeMount:A,mounted:R,beforeUpdate:B,updated:Z,activated:F,deactivated:he,beforeDestroy:pe,beforeUnmount:q,destroyed:Ce,unmounted:fe,render:Be,renderTracked:$e,renderTriggered:Ie,errorCaptured:Ge,serverPrefetch:be,expose:we,inheritAttrs:ze,components:ie,directives:He,filters:oe}=i;if(C&&Pf(C,l,null),h)for(const ce in h){const ae=h[ce];Je(ae)&&(l[ce]=ae.bind(s))}if(u){const ce=u.call(s,s);pt(ce)&&(t.data=St(ce))}if(Sr=!0,d)for(const ce in d){const ae=d[ce],tt=Je(ae)?ae.bind(s,s):Je(ae.get)?ae.get.bind(s,s):Jn,ee=!Je(ae)&&Je(ae.set)?ae.set.bind(s):Jn,xe=ye({get:tt,set:ee});Object.defineProperty(l,ce,{enumerable:!0,configurable:!0,get:()=>xe.value,set:Ne=>xe.value=Ne})}if(v)for(const ce in v)cc(v[ce],l,s,ce);if(b){const ce=Je(b)?b.call(s):b;Reflect.ownKeys(ce).forEach(ae=>{Yu(ae,ce[ae])})}T&&Al(T,t,"c");function le(ce,ae){De(ae)?ae.forEach(tt=>ce(tt.bind(s))):ae&&ce(ae.bind(s))}if(le(mf,A),le(_i,R),le(gf,B),le(vf,Z),le(ff,F),le(hf,he),le(xf,Ge),le(yf,$e),le(bf,Ie),le(Ho,q),le(lc,fe),le(_f,be),De(we))if(we.length){const ce=t.exposed||(t.exposed={});we.forEach(ae=>{Object.defineProperty(ce,ae,{get:()=>s[ae],set:tt=>s[ae]=tt,enumerable:!0})})}else t.exposed||(t.exposed={});Be&&t.render===Jn&&(t.render=Be),ze!=null&&(t.inheritAttrs=ze),ie&&(t.components=ie),He&&(t.directives=He),be&&ac(t)}function Pf(t,i,s=Jn){De(t)&&(t=Tr(t));for(const l in t){const u=t[l];let d;pt(u)?"default"in u?d=Ps(u.from||l,u.default,!0):d=Ps(u.from||l):d=Ps(u),Ht(d)?Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>d.value,set:h=>d.value=h}):i[l]=d}}function Al(t,i,s){An(De(t)?t.map(l=>l.bind(i.proxy)):t.bind(i.proxy),i,s)}function cc(t,i,s,l){let u=l.includes(".")?Xu(s,l):()=>s[l];if(Tt(t)){const d=i[t];Je(d)&&$t(u,d)}else if(Je(t))$t(u,t.bind(s));else if(pt(t))if(De(t))t.forEach(d=>cc(d,i,s,l));else{const d=Je(t.handler)?t.handler.bind(s):i[t.handler];Je(d)&&$t(u,d,t)}}function dc(t){const i=t.type,{mixins:s,extends:l}=i,{mixins:u,optionsCache:d,config:{optionMergeStrategies:h}}=t.appContext,v=d.get(i);let b;return v?b=v:!u.length&&!s&&!l?b=i:(b={},u.length&&u.forEach(C=>wa(b,C,h,!0)),wa(b,i,h)),pt(i)&&d.set(i,b),b}function wa(t,i,s,l=!1){const{mixins:u,extends:d}=i;d&&wa(t,d,s,!0),u&&u.forEach(h=>wa(t,h,s,!0));for(const h in i)if(!(l&&h==="expose")){const v=Cf[h]||s&&s[h];t[h]=v?v(t[h],i[h]):i[h]}return t}const Cf={data:Ml,props:El,emits:El,methods:ys,computed:ys,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:ys,directives:ys,watch:Af,provide:Ml,inject:Lf};function Ml(t,i){return i?t?function(){return Nt(Je(t)?t.call(this,this):t,Je(i)?i.call(this,this):i)}:i:t}function Lf(t,i){return ys(Tr(t),Tr(i))}function Tr(t){if(De(t)){const i={};for(let s=0;si==="modelValue"||i==="model-value"?t.modelModifiers:t[`${i}Modifiers`]||t[`${Rn(i)}Modifiers`]||t[`${Bi(i)}Modifiers`];function zf(t,i,...s){if(t.isUnmounted)return;const l=t.vnode.props||_t;let u=s;const d=i.startsWith("update:"),h=d&&Of(l,i.slice(7));h&&(h.trim&&(u=s.map(T=>Tt(T)?T.trim():T)),h.number&&(u=s.map(za)));let v,b=l[v=tr(i)]||l[v=tr(Rn(i))];!b&&d&&(b=l[v=tr(Bi(i))]),b&&An(b,t,6,u);const C=l[v+"Once"];if(C){if(!t.emitted)t.emitted={};else if(t.emitted[v])return;t.emitted[v]=!0,An(C,t,6,u)}}const If=new WeakMap;function hc(t,i,s=!1){const l=s?If:i.emitsCache,u=l.get(t);if(u!==void 0)return u;const d=t.emits;let h={},v=!1;if(!Je(t)){const b=C=>{const T=hc(C,i,!0);T&&(v=!0,Nt(h,T))};!s&&i.mixins.length&&i.mixins.forEach(b),t.extends&&b(t.extends),t.mixins&&t.mixins.forEach(b)}return!d&&!v?(pt(t)&&l.set(t,null),null):(De(d)?d.forEach(b=>h[b]=null):Nt(h,d),pt(t)&&l.set(t,h),h)}function Ra(t,i){return!t||!Ma(i)?!1:(i=i.slice(2),i=i==="Once"?i:i.replace(/Once$/,""),ht(t,i[0].toLowerCase()+i.slice(1))||ht(t,Bi(i))||ht(t,i))}function Ol(t){const{type:i,vnode:s,proxy:l,withProxy:u,propsOptions:[d],slots:h,attrs:v,emit:b,render:C,renderCache:T,props:A,data:R,setupState:B,ctx:Z,inheritAttrs:F}=t,he=ya(t);let pe,q;try{if(s.shapeFlag&4){const fe=u||l,Be=fe;pe=qn(C.call(Be,fe,T,A,B,R,Z)),q=v}else{const fe=i;pe=qn(fe.length>1?fe(A,{attrs:v,slots:h,emit:b}):fe(A,null)),q=i.props?v:$f(v)}}catch(fe){As.length=0,Na(fe,t,1),pe=E(Vt)}let Ce=pe;if(q&&F!==!1){const fe=Object.keys(q),{shapeFlag:Be}=Ce;fe.length&&Be&7&&(d&&fe.some(Ea)&&(q=Nf(q,d)),Ce=Fi(Ce,q,!1,!0))}return s.dirs&&(Ce=Fi(Ce,null,!1,!0),Ce.dirs=Ce.dirs?Ce.dirs.concat(s.dirs):s.dirs),s.transition&&zs(Ce,s.transition),pe=Ce,ya(he),pe}const $f=t=>{let i;for(const s in t)(s==="class"||s==="style"||Ma(s))&&((i||(i={}))[s]=t[s]);return i},Nf=(t,i)=>{const s={};for(const l in t)(!Ea(l)||!(l.slice(9)in i))&&(s[l]=t[l]);return s};function Df(t,i,s){const{props:l,children:u,component:d}=t,{props:h,children:v,patchFlag:b}=i,C=d.emitsOptions;if(i.dirs||i.transition)return!0;if(s&&b>=0){if(b&1024)return!0;if(b&16)return l?zl(l,h,C):!!h;if(b&8){const T=i.dynamicProps;for(let A=0;AObject.create(mc),vc=t=>Object.getPrototypeOf(t)===mc;function Rf(t,i,s,l=!1){const u={},d=gc();t.propsDefaults=Object.create(null),_c(t,i,u,d);for(const h in t.propsOptions[0])h in u||(u[h]=void 0);s?t.props=l?u:Zd(u):t.type.props?t.props=u:t.props=d,t.attrs=d}function Bf(t,i,s,l){const{props:u,attrs:d,vnode:{patchFlag:h}}=t,v=ct(u),[b]=t.propsOptions;let C=!1;if((l||h>0)&&!(h&16)){if(h&8){const T=t.vnode.dynamicProps;for(let A=0;A{b=!0;const[R,B]=bc(A,i,!0);Nt(h,R),B&&v.push(...B)};!s&&i.mixins.length&&i.mixins.forEach(T),t.extends&&T(t.extends),t.mixins&&t.mixins.forEach(T)}if(!d&&!b)return pt(t)&&l.set(t,Io),Io;if(De(d))for(let T=0;Tt==="_"||t==="_ctx"||t==="$stable",jr=t=>De(t)?t.map(qn):[qn(t)],Vf=(t,i,s)=>{if(i._n)return i;const l=Le((...u)=>jr(i(...u)),s);return l._c=!1,l},yc=(t,i,s)=>{const l=t._ctx;for(const u in t){if(Hr(u))continue;const d=t[u];if(Je(d))i[u]=Vf(u,d,l);else if(d!=null){const h=jr(d);i[u]=()=>h}}},xc=(t,i)=>{const s=jr(i);t.slots.default=()=>s},wc=(t,i,s)=>{for(const l in i)(s||!Hr(l))&&(t[l]=i[l])},Zf=(t,i,s)=>{const l=t.slots=gc();if(t.vnode.shapeFlag&32){const u=i._;u?(wc(l,i,s),s&&Tu(l,"_",u,!0)):yc(i,l)}else i&&xc(t,i)},Hf=(t,i,s)=>{const{vnode:l,slots:u}=t;let d=!0,h=_t;if(l.shapeFlag&32){const v=i._;v?s&&v===1?d=!1:wc(u,i,s):(d=!i.$stable,yc(i,u)),h=i}else i&&(xc(t,i),h={default:1});if(d)for(const v in u)!Hr(v)&&h[v]==null&&delete u[v]},Jt=qf;function jf(t){return Wf(t)}function Wf(t,i){const s=Ia();s.__VUE__=!0;const{insert:l,remove:u,patchProp:d,createElement:h,createText:v,createComment:b,setText:C,setElementText:T,parentNode:A,nextSibling:R,setScopeId:B=Jn,insertStaticContent:Z}=t,F=(x,_,w,K=null,W=null,V=null,re=void 0,te=null,Q=!!_.dynamicChildren)=>{if(x===_)return;x&&!to(x,_)&&(K=M(x),Ne(x,W,V,!0),x=null),_.patchFlag===-2&&(Q=!1,_.dynamicChildren=null);const{type:G,ref:me,shapeFlag:se}=_;switch(G){case Ba:he(x,_,w,K);break;case Vt:pe(x,_,w,K);break;case ur:x==null&&q(_,w,K,re);break;case ue:ie(x,_,w,K,W,V,re,te,Q);break;default:se&1?Be(x,_,w,K,W,V,re,te,Q):se&6?He(x,_,w,K,W,V,re,te,Q):(se&64||se&128)&&G.process(x,_,w,K,W,V,re,te,Q,rt)}me!=null&&W?Cs(me,x&&x.ref,V,_||x,!_):me==null&&x&&x.ref!=null&&Cs(x.ref,null,V,x,!0)},he=(x,_,w,K)=>{if(x==null)l(_.el=v(_.children),w,K);else{const W=_.el=x.el;_.children!==x.children&&C(W,_.children)}},pe=(x,_,w,K)=>{x==null?l(_.el=b(_.children||""),w,K):_.el=x.el},q=(x,_,w,K)=>{[x.el,x.anchor]=Z(x.children,_,w,K,x.el,x.anchor)},Ce=({el:x,anchor:_},w,K)=>{let W;for(;x&&x!==_;)W=R(x),l(x,w,K),x=W;l(_,w,K)},fe=({el:x,anchor:_})=>{let w;for(;x&&x!==_;)w=R(x),u(x),x=w;u(_)},Be=(x,_,w,K,W,V,re,te,Q)=>{if(_.type==="svg"?re="svg":_.type==="math"&&(re="mathml"),x==null)$e(_,w,K,W,V,re,te,Q);else{const G=x.el&&x.el._isVueCE?x.el:null;try{G&&G._beginPatch(),be(x,_,W,V,re,te,Q)}finally{G&&G._endPatch()}}},$e=(x,_,w,K,W,V,re,te)=>{let Q,G;const{props:me,shapeFlag:se,transition:Te,dirs:Ae}=x;if(Q=x.el=h(x.type,V,me&&me.is,me),se&8?T(Q,x.children):se&16&&Ge(x.children,Q,null,K,W,lr(x,V),re,te),Ae&&qi(x,null,K,"created"),Ie(Q,x,x.scopeId,re,K),me){for(const et in me)et!=="value"&&!ks(et)&&d(Q,et,null,me[et],V,K);"value"in me&&d(Q,"value",null,me.value,V),(G=me.onVnodeBeforeMount)&&Wn(G,K,x)}Ae&&qi(x,null,K,"beforeMount");const Ze=Kf(W,Te);Ze&&Te.beforeEnter(Q),l(Q,_,w),((G=me&&me.onVnodeMounted)||Ze||Ae)&&Jt(()=>{try{G&&Wn(G,K,x),Ze&&Te.enter(Q),Ae&&qi(x,null,K,"mounted")}finally{}},W)},Ie=(x,_,w,K,W)=>{if(w&&B(x,w),K)for(let V=0;V{for(let G=Q;G{const te=_.el=x.el;let{patchFlag:Q,dynamicChildren:G,dirs:me}=_;Q|=x.patchFlag&16;const se=x.props||_t,Te=_.props||_t;let Ae;if(w&&Yi(w,!1),(Ae=Te.onVnodeBeforeUpdate)&&Wn(Ae,w,_,x),me&&qi(_,x,w,"beforeUpdate"),w&&Yi(w,!0),G&&(!x.dynamicChildren||x.dynamicChildren.length!==G.length)&&(Q=0,re=!1,G=null),(se.innerHTML&&Te.innerHTML==null||se.textContent&&Te.textContent==null)&&T(te,""),G?we(x.dynamicChildren,G,te,w,K,lr(_,W),V):re||ae(x,_,te,null,w,K,lr(_,W),V,!1),Q>0){if(Q&16)ze(te,se,Te,w,W);else if(Q&2&&se.class!==Te.class&&d(te,"class",null,Te.class,W),Q&4&&d(te,"style",se.style,Te.style,W),Q&8){const Ze=_.dynamicProps;for(let et=0;et{Ae&&Wn(Ae,w,_,x),me&&qi(_,x,w,"updated")},K)},we=(x,_,w,K,W,V,re)=>{for(let te=0;te<_.length;te++){const Q=x[te],G=_[te],me=Q.el&&(Q.type===ue||!to(Q,G)||Q.shapeFlag&198)?A(Q.el):w;F(Q,G,me,null,K,W,V,re,!0)}},ze=(x,_,w,K,W)=>{if(_!==w){if(_!==_t)for(const V in _)!ks(V)&&!(V in w)&&d(x,V,_[V],null,W,K);for(const V in w){if(ks(V))continue;const re=w[V],te=_[V];re!==te&&V!=="value"&&d(x,V,te,re,W,K)}"value"in w&&d(x,"value",_.value,w.value,W)}},ie=(x,_,w,K,W,V,re,te,Q)=>{const G=_.el=x?x.el:v(""),me=_.anchor=x?x.anchor:v("");let{patchFlag:se,dynamicChildren:Te,slotScopeIds:Ae}=_;Ae&&(te=te?te.concat(Ae):Ae),x==null?(l(G,w,K),l(me,w,K),Ge(_.children||[],w,me,W,V,re,te,Q)):se>0&&se&64&&Te&&x.dynamicChildren&&x.dynamicChildren.length===Te.length?(we(x.dynamicChildren,Te,w,W,V,re,te),(_.key!=null||W&&_===W.subTree)&&Wr(x,_,!0)):ae(x,_,w,me,W,V,re,te,Q)},He=(x,_,w,K,W,V,re,te,Q)=>{_.slotScopeIds=te,x==null?_.shapeFlag&512?W.ctx.activate(_,w,K,re,Q):oe(_,w,K,W,V,re,Q):je(x,_,Q)},oe=(x,_,w,K,W,V,re)=>{const te=x.component=nh(x,K,W);if(Da(x)&&(te.ctx.renderer=rt),ih(te,!1,re),te.asyncDep){if(W&&W.registerDep(te,le,re),!x.el){const Q=te.subTree=E(Vt);pe(null,Q,_,w),x.placeholder=Q.el}}else le(te,x,_,w,W,V,re)},je=(x,_,w)=>{const K=_.component=x.component;if(Df(x,_,w))if(K.asyncDep&&!K.asyncResolved){ce(K,_,w);return}else K.next=_,K.update();else _.el=x.el,K.vnode=_},le=(x,_,w,K,W,V,re)=>{const te=()=>{if(x.isMounted){let{next:se,bu:Te,u:Ae,parent:Ze,vnode:et}=x;{const gt=kc(x);if(gt){se&&(se.el=et.el,ce(x,se,re)),gt.asyncDep.then(()=>{Jt(()=>{x.isUnmounted||G()},W)});return}}let U=se,O;Yi(x,!1),se?(se.el=et.el,ce(x,se,re)):se=et,Te&&ga(Te),(O=se.props&&se.props.onVnodeBeforeUpdate)&&Wn(O,Ze,se,et),Yi(x,!0);const ke=Ol(x),Ye=x.subTree;x.subTree=ke,F(Ye,ke,A(Ye.el),M(Ye),x,W,V),se.el=ke.el,U===null&&Ff(x,ke.el),Ae&&Jt(Ae,W),(O=se.props&&se.props.onVnodeUpdated)&&Jt(()=>Wn(O,Ze,se,et),W)}else{let se;const{el:Te,props:Ae}=_,{bm:Ze,m:et,parent:U,root:O,type:ke}=x,Ye=Do(_);Yi(x,!1),Ze&&ga(Ze),!Ye&&(se=Ae&&Ae.onVnodeBeforeMount)&&Wn(se,U,_),Yi(x,!0);{O.ce&&O.ce._hasShadowRoot()&&O.ce._injectChildStyle(ke,x.parent?x.parent.type:void 0);const gt=x.subTree=Ol(x);F(null,gt,w,K,x,W,V),_.el=gt.el}if(et&&Jt(et,W),!Ye&&(se=Ae&&Ae.onVnodeMounted)){const gt=_;Jt(()=>Wn(se,U,gt),W)}(_.shapeFlag&256||U&&Do(U.vnode)&&U.vnode.shapeFlag&256)&&x.a&&Jt(x.a,W),x.isMounted=!0,_=w=K=null}};x.scope.on();const Q=x.effect=new Au(te);x.scope.off();const G=x.update=Q.run.bind(Q),me=x.job=Q.runIfDirty.bind(Q);me.i=x,me.id=x.uid,Q.scheduler=()=>Zr(me),Yi(x,!0),G()},ce=(x,_,w)=>{_.component=x;const K=x.vnode.props;x.vnode=_,x.next=null,Bf(x,_.props,K,w),Hf(x,_.children,w),Xn(),wl(x),Qn()},ae=(x,_,w,K,W,V,re,te,Q=!1)=>{const G=x&&x.children,me=x?x.shapeFlag:0,se=_.children,{patchFlag:Te,shapeFlag:Ae}=_;if(Te>0){if(Te&128){ee(G,se,w,K,W,V,re,te,Q);return}else if(Te&256){tt(G,se,w,K,W,V,re,te,Q);return}}Ae&8?(me&16&&Y(G,W,V),se!==G&&T(w,se)):me&16?Ae&16?ee(G,se,w,K,W,V,re,te,Q):Y(G,W,V,!0):(me&8&&T(w,""),Ae&16&&Ge(se,w,K,W,V,re,te,Q))},tt=(x,_,w,K,W,V,re,te,Q)=>{x=x||Io,_=_||Io;const G=x.length,me=_.length,se=Math.min(G,me);let Te;for(Te=0;Teme?Y(x,W,V,!0,!1,se):Ge(_,w,K,W,V,re,te,Q,se)},ee=(x,_,w,K,W,V,re,te,Q)=>{let G=0;const me=_.length;let se=x.length-1,Te=me-1;for(;G<=se&&G<=Te;){const Ae=x[G],Ze=_[G]=Q?hi(_[G]):qn(_[G]);if(to(Ae,Ze))F(Ae,Ze,w,null,W,V,re,te,Q);else break;G++}for(;G<=se&&G<=Te;){const Ae=x[se],Ze=_[Te]=Q?hi(_[Te]):qn(_[Te]);if(to(Ae,Ze))F(Ae,Ze,w,null,W,V,re,te,Q);else break;se--,Te--}if(G>se){if(G<=Te){const Ae=Te+1,Ze=AeTe)for(;G<=se;)Ne(x[G],W,V,!0),G++;else{const Ae=G,Ze=G,et=new Map;for(G=Ze;G<=Te;G++){const de=_[G]=Q?hi(_[G]):qn(_[G]);de.key!=null&&et.set(de.key,G)}let U,O=0;const ke=Te-Ze+1;let Ye=!1,gt=0;const bt=new Array(ke);for(G=0;G=ke){Ne(de,W,V,!0);continue}let wt;if(de.key!=null)wt=et.get(de.key);else for(U=Ze;U<=Te;U++)if(bt[U-Ze]===0&&to(de,_[U])){wt=U;break}wt===void 0?Ne(de,W,V,!0):(bt[wt-Ze]=G+1,wt>=gt?gt=wt:Ye=!0,F(de,_[wt],w,null,W,V,re,te,Q),O++)}const en=Ye?Gf(bt):Io;for(U=en.length-1,G=ke-1;G>=0;G--){const de=Ze+G,wt=_[de],an=_[de+1],so=de+1{const{el:V,type:re,transition:te,children:Q,shapeFlag:G}=x;if(G&6){xe(x.component.subTree,_,w,K);return}if(G&128){x.suspense.move(_,w,K);return}if(G&64){re.move(x,_,w,rt);return}if(re===ue){l(V,_,w);for(let se=0;sete.enter(V),W));else{const{leave:se,delayLeave:Te,afterLeave:Ae}=te,Ze=()=>{x.ctx.isUnmounted?u(V):l(V,_,w)},et=()=>{const U=V._isLeaving||!!V[Pn];V._isLeaving&&V[Pn](!0),te.persisted&&!U?Ze():se(V,()=>{Ze(),Ae&&Ae()})};Te?Te(V,Ze,et):et()}else l(V,_,w)},Ne=(x,_,w,K=!1,W=!1)=>{const{type:V,props:re,ref:te,children:Q,dynamicChildren:G,shapeFlag:me,patchFlag:se,dirs:Te,cacheIndex:Ae,memo:Ze}=x;if(se===-2&&(W=!1),te!=null&&(Xn(),Cs(te,null,w,x,!0),Qn()),Ae!=null&&(_.renderCache[Ae]=void 0),me&256){_.ctx.deactivate(x);return}const et=me&1&&Te,U=!Do(x);let O;if(U&&(O=re&&re.onVnodeBeforeUnmount)&&Wn(O,_,x),me&6)Ve(x.component,w,K);else{if(me&128){x.suspense.unmount(w,K);return}et&&qi(x,null,_,"beforeUnmount"),me&64?x.type.remove(x,_,w,rt,K):G&&!G.hasOnce&&(V!==ue||se>0&&se&64)?Y(G,_,w,!1,!0):(V===ue&&se&384||!W&&me&16)&&Y(Q,_,w),K&&dt(x)}const ke=Ze!=null&&Ae==null;(U&&(O=re&&re.onVnodeUnmounted)||et||ke)&&Jt(()=>{O&&Wn(O,_,x),et&&qi(x,null,_,"unmounted"),ke&&(x.el=null)},w)},dt=x=>{const{type:_,el:w,anchor:K,transition:W}=x;if(_===ue){st(w,K);return}if(_===ur){fe(x);return}const V=()=>{u(w),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(x.shapeFlag&1&&W&&!W.persisted){const{leave:re,delayLeave:te}=W,Q=()=>re(w,V);te?te(x.el,V,Q):Q()}else V()},st=(x,_)=>{let w;for(;x!==_;)w=R(x),u(x),x=w;u(_)},Ve=(x,_,w)=>{const{bum:K,scope:W,job:V,subTree:re,um:te,m:Q,a:G}=x;$l(Q),$l(G),K&&ga(K),W.stop(),V&&(V.flags|=8,Ne(re,x,_,w)),te&&Jt(te,_),Jt(()=>{x.isUnmounted=!0},_)},Y=(x,_,w,K=!1,W=!1,V=0)=>{for(let re=V;re{if(x.shapeFlag&6)return M(x.component.subTree);if(x.shapeFlag&128)return x.suspense.next();const _=R(x.anchor||x.el),w=_&&_[Qu];return w?R(w):_};let z=!1;const vt=(x,_,w)=>{let K;x==null?_._vnode&&(Ne(_._vnode,null,null,!0),K=_._vnode.component):F(_._vnode||null,x,_,null,null,null,w),_._vnode=x,z||(z=!0,wl(K),Ku(),z=!1)},rt={p:F,um:Ne,m:xe,r:dt,mt:oe,mc:Ge,pc:ae,pbc:we,n:M,o:t};return{render:vt,hydrate:void 0,createApp:Ef(vt)}}function lr({type:t,props:i},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&i&&i.encoding&&i.encoding.includes("html")?void 0:s}function Yi({effect:t,job:i},s){s?(t.flags|=32,i.flags|=4):(t.flags&=-33,i.flags&=-5)}function Kf(t,i){return(!t||t&&!t.pendingBranch)&&i&&!i.persisted}function Wr(t,i,s=!1){const l=t.children,u=i.children;if(De(l)&&De(u))for(let d=0;d>1,t[s[v]]0&&(i[l]=s[d-1]),s[d]=l)}}for(d=s.length,h=s[d-1];d-- >0;)s[d]=h,h=i[h];return s}function kc(t){const i=t.subTree.component;if(i)return i.asyncDep&&!i.asyncResolved?i:kc(i)}function $l(t){if(t)for(let i=0;it.__isSuspense;function qf(t,i){i&&i.pendingBranch?De(t)?i.effects.push(...t):i.effects.push(t):ef(t)}const ue=Symbol.for("v-fgt"),Ba=Symbol.for("v-txt"),Vt=Symbol.for("v-cmt"),ur=Symbol.for("v-stc"),As=[];let mn=null;function p(t=!1){As.push(mn=t?null:[])}function Yf(){As.pop(),mn=As[As.length-1]||null}let Is=1;function ka(t,i=!1){Is+=t,t<0&&mn&&i&&(mn.hasOnce=!0)}function Pc(t){return t.dynamicChildren=Is>0?mn||Io:null,Yf(),Is>0&&mn&&mn.push(t),t}function g(t,i,s,l,u,d){return Pc(r(t,i,s,l,u,d,!0))}function at(t,i,s,l,u){return Pc(E(t,i,s,l,u,!0))}function $s(t){return t?t.__v_isVNode===!0:!1}function to(t,i){return t.type===i.type&&t.key===i.key}const Cc=({key:t})=>t??null,va=({ref:t,ref_key:i,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?Tt(t)||Ht(t)||Je(t)?{i:Zt,r:t,k:i,f:!!s}:t:null);function r(t,i=null,s=null,l=0,u=null,d=t===ue?0:1,h=!1,v=!1){const b={__v_isVNode:!0,__v_skip:!0,type:t,props:i,key:i&&Cc(i),ref:i&&va(i),scopeId:qu,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:l,dynamicProps:u,dynamicChildren:null,appContext:null,ctx:Zt};return v?(Sa(b,s),d&128&&t.normalize(b)):s&&(b.shapeFlag|=Tt(s)?8:16),Is>0&&!h&&mn&&(b.patchFlag>0||d&6)&&b.patchFlag!==32&&mn.push(b),b}const E=Jf;function Jf(t,i=null,s=null,l=0,u=null,d=!1){if((!t||t===wf)&&(t=Vt),$s(t)){const v=Fi(t,i,!0);return s&&Sa(v,s),Is>0&&!d&&mn&&(v.shapeFlag&6?mn[mn.indexOf(t)]=v:mn.push(v)),v.patchFlag=-2,v}if(rh(t)&&(t=t.__vccOpts),i){i=Xf(i);let{class:v,style:b}=i;v&&!Tt(v)&&(i.class=Ee(v)),pt(b)&&(Vr(b)&&!De(b)&&(b=Nt({},b)),i.style=Bo(b))}const h=Tt(t)?1:Tc(t)?128:ec(t)?64:pt(t)?4:Je(t)?2:0;return r(t,i,s,l,u,h,d,!0)}function Xf(t){return t?Vr(t)||vc(t)?Nt({},t):t:null}function Fi(t,i,s=!1,l=!1){const{props:u,ref:d,patchFlag:h,children:v,transition:b}=t,C=i?Qf(u||{},i):u,T={__v_isVNode:!0,__v_skip:!0,type:t.type,props:C,key:C&&Cc(C),ref:i&&i.ref?s&&d?De(d)?d.concat(va(i)):[d,va(i)]:va(i):d,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:v,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:i&&t.type!==ue?h===-1?16:h|16:h,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:b,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Fi(t.ssContent),ssFallback:t.ssFallback&&Fi(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return b&&l&&zs(T,b.clone(T)),T}function $(t=" ",i=0){return E(Ba,null,t,i)}function N(t="",i=!1){return i?(p(),at(Vt,null,t)):E(Vt,null,t)}function qn(t){return t==null||typeof t=="boolean"?E(Vt):De(t)?E(ue,null,t.slice()):$s(t)?hi(t):E(Ba,null,String(t))}function hi(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Fi(t)}function Sa(t,i){let s=0;const{shapeFlag:l}=t;if(i==null)i=null;else if(De(i))s=16;else if(typeof i=="object")if(l&65){const u=i.default;u&&(u._c&&(u._d=!1),Sa(t,u()),u._c&&(u._d=!0));return}else{s=32;const u=i._;!u&&!vc(i)?i._ctx=Zt:u===3&&Zt&&(Zt.slots._===1?i._=1:(i._=2,t.patchFlag|=1024))}else if(Je(i)){if(l&65){Sa(t,{default:i});return}i={default:i,_ctx:Zt},s=32}else i=String(i),l&64?(s=16,i=[$(i)]):s=8;t.children=i,t.shapeFlag|=s}function Qf(...t){const i={};for(let s=0;sQt||Zt;let Ta,Cr;{const t=Ia(),i=(s,l)=>{let u;return(u=t[s])||(u=t[s]=[]),u.push(l),d=>{u.length>1?u.forEach(h=>h(d)):u[0](d)}};Ta=i("__VUE_INSTANCE_SETTERS__",s=>Qt=s),Cr=i("__VUE_SSR_SETTERS__",s=>Ns=s)}const Bs=t=>{const i=Qt;return Ta(t),t.scope.on(),()=>{t.scope.off(),Ta(i)}},Nl=()=>{Qt&&Qt.scope.off(),Ta(null)};function Ac(t){return t.vnode.shapeFlag&4}let Ns=!1;function ih(t,i=!1,s=!1){i&&Cr(i);const{props:l,children:u}=t.vnode,d=Ac(t);Rf(t,l,d,i),Zf(t,u,s||i);const h=d?oh(t,i):void 0;return i&&Cr(!1),h}function oh(t,i){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Sf);const{setup:l}=s;if(l){Xn();const u=t.setupContext=l.length>1?ah(t):null,d=Bs(t),h=Rs(l,t,0,[t.props,u]),v=xu(h);if(Qn(),d(),(v||t.sp)&&!Do(t)&&ac(t),v){if(h.then(Nl,Nl),i)return h.then(b=>{Dl(t,b)}).catch(b=>{Na(b,t,0)});t.asyncDep=h}else Dl(t,h)}else Mc(t)}function Dl(t,i,s){Je(i)?t.type.__ssrInlineRender?t.ssrRender=i:t.render=i:pt(i)&&(t.setupState=Zu(i)),Mc(t)}function Mc(t,i,s){const l=t.type;t.render||(t.render=l.render||Jn);{const u=Bs(t);Xn();try{Tf(t)}finally{Qn(),u()}}}const sh={get(t,i){return Ut(t,"get",""),t[i]}};function ah(t){const i=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,sh),slots:t.slots,emit:t.emit,expose:i}}function Ua(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Zu(Hd(t.exposed)),{get(i,s){if(s in i)return i[s];if(s in Ls)return Ls[s](t)},has(i,s){return s in i||s in Ls}})):t.proxy}function rh(t){return Je(t)&&"__vccOpts"in t}const ye=(t,i)=>qd(t,i,Ns);function lh(t,i,s){try{ka(-1);const l=arguments.length;return l===2?pt(i)&&!De(i)?$s(i)?E(t,null,[i]):E(t,i):E(t,null,i):(l>3?s=Array.prototype.slice.call(arguments,2):l===3&&$s(s)&&(s=[s]),E(t,i,s))}finally{ka(1)}}const uh="3.5.39";/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Lr;const Fl=typeof window<"u"&&window.trustedTypes;if(Fl)try{Lr=Fl.createPolicy("vue",{createHTML:t=>t})}catch{}const Ec=Lr?t=>Lr.createHTML(t):t=>t,ch="http://www.w3.org/2000/svg",dh="http://www.w3.org/1998/Math/MathML",fi=typeof document<"u"?document:null,Rl=fi&&fi.createElement("template"),fh={insert:(t,i,s)=>{i.insertBefore(t,s||null)},remove:t=>{const i=t.parentNode;i&&i.removeChild(t)},createElement:(t,i,s,l)=>{const u=i==="svg"?fi.createElementNS(ch,t):i==="mathml"?fi.createElementNS(dh,t):s?fi.createElement(t,{is:s}):fi.createElement(t);return t==="select"&&l&&l.multiple!=null&&u.setAttribute("multiple",l.multiple),u},createText:t=>fi.createTextNode(t),createComment:t=>fi.createComment(t),setText:(t,i)=>{t.nodeValue=i},setElementText:(t,i)=>{t.textContent=i},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>fi.querySelector(t),setScopeId(t,i){t.setAttribute(i,"")},insertStaticContent(t,i,s,l,u,d){const h=s?s.previousSibling:i.lastChild;if(u&&(u===d||u.nextSibling))for(;i.insertBefore(u.cloneNode(!0),s),!(u===d||!(u=u.nextSibling)););else{Rl.innerHTML=Ec(l==="svg"?`${t}`:l==="mathml"?`${t}`:t);const v=Rl.content;if(l==="svg"||l==="mathml"){const b=v.firstChild;for(;b.firstChild;)v.appendChild(b.firstChild);v.removeChild(b)}i.insertBefore(v,s)}return[h?h.nextSibling:i.firstChild,s?s.previousSibling:i.lastChild]}},zi="transition",vs="animation",Ds=Symbol("_vtc"),Oc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hh=Nt({},tc,Oc),ph=t=>(t.displayName="Transition",t.props=hh,t),mh=ph((t,{slots:i})=>lh(df,gh(t),i)),Ji=(t,i=[])=>{De(t)?t.forEach(s=>s(...i)):t&&t(...i)},Bl=t=>t?De(t)?t.some(i=>i.length>1):t.length>1:!1;function gh(t){const i={};for(const ie in t)ie in Oc||(i[ie]=t[ie]);if(t.css===!1)return i;const{name:s="v",type:l,duration:u,enterFromClass:d=`${s}-enter-from`,enterActiveClass:h=`${s}-enter-active`,enterToClass:v=`${s}-enter-to`,appearFromClass:b=d,appearActiveClass:C=h,appearToClass:T=v,leaveFromClass:A=`${s}-leave-from`,leaveActiveClass:R=`${s}-leave-active`,leaveToClass:B=`${s}-leave-to`}=t,Z=vh(u),F=Z&&Z[0],he=Z&&Z[1],{onBeforeEnter:pe,onEnter:q,onEnterCancelled:Ce,onLeave:fe,onLeaveCancelled:Be,onBeforeAppear:$e=pe,onAppear:Ie=q,onAppearCancelled:Ge=Ce}=i,be=(ie,He,oe,je)=>{ie._enterCancelled=je,Xi(ie,He?T:v),Xi(ie,He?C:h),oe&&oe()},we=(ie,He)=>{ie._isLeaving=!1,Xi(ie,A),Xi(ie,B),Xi(ie,R),He&&He()},ze=ie=>(He,oe)=>{const je=ie?Ie:q,le=()=>be(He,ie,oe);Ji(je,[He,le]),Ul(()=>{Xi(He,ie?b:d),di(He,ie?T:v),Bl(je)||Vl(He,l,F,le)})};return Nt(i,{onBeforeEnter(ie){Ji(pe,[ie]),di(ie,d),di(ie,h)},onBeforeAppear(ie){Ji($e,[ie]),di(ie,b),di(ie,C)},onEnter:ze(!1),onAppear:ze(!0),onLeave(ie,He){ie._isLeaving=!0;const oe=()=>we(ie,He);di(ie,A),ie._enterCancelled?(di(ie,R),jl(ie)):(jl(ie),di(ie,R)),Ul(()=>{ie._isLeaving&&(Xi(ie,A),di(ie,B),Bl(fe)||Vl(ie,l,he,oe))}),Ji(fe,[ie,oe])},onEnterCancelled(ie){be(ie,!1,void 0,!0),Ji(Ce,[ie])},onAppearCancelled(ie){be(ie,!0,void 0,!0),Ji(Ge,[ie])},onLeaveCancelled(ie){we(ie),Ji(Be,[ie])}})}function vh(t){if(t==null)return null;if(pt(t))return[cr(t.enter),cr(t.leave)];{const i=cr(t);return[i,i]}}function cr(t){return gd(t)}function di(t,i){i.split(/\s+/).forEach(s=>s&&t.classList.add(s)),(t[Ds]||(t[Ds]=new Set)).add(i)}function Xi(t,i){i.split(/\s+/).forEach(l=>l&&t.classList.remove(l));const s=t[Ds];s&&(s.delete(i),s.size||(t[Ds]=void 0))}function Ul(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let _h=0;function Vl(t,i,s,l){const u=t._endId=++_h,d=()=>{u===t._endId&&l()};if(s!=null)return setTimeout(d,s);const{type:h,timeout:v,propCount:b}=bh(t,i);if(!h)return l();const C=h+"end";let T=0;const A=()=>{t.removeEventListener(C,R),d()},R=B=>{B.target===t&&++T>=b&&A()};setTimeout(()=>{T(s[Z]||"").split(", "),u=l(`${zi}Delay`),d=l(`${zi}Duration`),h=Zl(u,d),v=l(`${vs}Delay`),b=l(`${vs}Duration`),C=Zl(v,b);let T=null,A=0,R=0;i===zi?h>0&&(T=zi,A=h,R=d.length):i===vs?C>0&&(T=vs,A=C,R=b.length):(A=Math.max(h,C),T=A>0?h>C?zi:vs:null,R=T?T===zi?d.length:b.length:0);const B=T===zi&&/\b(?:transform|all)(?:,|$)/.test(l(`${zi}Property`).toString());return{type:T,timeout:A,propCount:R,hasTransform:B}}function Zl(t,i){for(;t.lengthHl(s)+Hl(t[l])))}function Hl(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function jl(t){return(t?t.ownerDocument:document).body.offsetHeight}function yh(t,i,s){const l=t[Ds];l&&(i=(i?[i,...l]:[...l]).join(" ")),i==null?t.removeAttribute("class"):s?t.setAttribute("class",i):t.className=i}const Pa=Symbol("_vod"),zc=Symbol("_vsh"),xh={name:"show",beforeMount(t,{value:i},{transition:s}){t[Pa]=t.style.display==="none"?"":t.style.display,s&&i?s.beforeEnter(t):_s(t,i)},mounted(t,{value:i},{transition:s}){s&&i&&s.enter(t)},updated(t,{value:i,oldValue:s},{transition:l}){!i!=!s&&(l?i?(l.beforeEnter(t),_s(t,!0),l.enter(t)):l.leave(t,()=>{_s(t,!1)}):_s(t,i))},beforeUnmount(t,{value:i}){_s(t,i)}};function _s(t,i){t.style.display=i?t[Pa]:"none",t[zc]=!i}const wh=Symbol(""),kh=/(?:^|;)\s*display\s*:/;function Sh(t,i,s){const l=t.style,u=Tt(s);let d=!1;if(s&&!u){if(i)if(Tt(i))for(const h of i.split(";")){const v=h.slice(0,h.indexOf(":")).trim();s[v]==null&&xs(l,v,"")}else for(const h in i)s[h]==null&&xs(l,h,"");for(const h in s){h==="display"&&(d=!0);const v=s[h];v!=null?Ph(t,h,!Tt(i)&&i?i[h]:void 0,v)||xs(l,h,v):xs(l,h,"")}}else if(u){if(i!==s){const h=l[wh];h&&(s+=";"+h),l.cssText=s,d=kh.test(s)}}else i&&t.removeAttribute("style");Pa in t&&(t[Pa]=d?l.display:"",t[zc]&&(l.display="none"))}const Wl=/\s*!important$/;function xs(t,i,s){if(De(s))s.forEach(l=>xs(t,i,l));else if(s==null&&(s=""),i.startsWith("--"))t.setProperty(i,s);else{const l=Th(t,i);Wl.test(s)?t.setProperty(Bi(l),s.replace(Wl,""),"important"):t[l]=s}}const Kl=["Webkit","Moz","ms"],dr={};function Th(t,i){const s=dr[i];if(s)return s;let l=Rn(i);if(l!=="filter"&&l in t)return dr[i]=l;l=Su(l);for(let u=0;ufr||(Oh.then(()=>fr=0),fr=Date.now());function Ih(t,i){const s=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=s.attached)return;const u=s.value;if(De(u)){const d=l.stopImmediatePropagation;l.stopImmediatePropagation=()=>{d.call(l),l._stopped=!0};const h=u.slice(),v=[l];for(let b=0;bt.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,$h=(t,i,s,l,u,d)=>{const h=u==="svg";i==="class"?yh(t,l,h):i==="style"?Sh(t,s,l):Ma(i)?Ea(i)||Lh(t,i,s,l,d):(i[0]==="."?(i=i.slice(1),!0):i[0]==="^"?(i=i.slice(1),!1):Nh(t,i,l,h))?(Yl(t,i,l),!t.tagName.includes("-")&&(i==="value"||i==="checked"||i==="selected")&&ql(t,i,l,h,d,i!=="value")):t._isVueCE&&(Dh(t,i)||t._def.__asyncLoader&&(/[A-Z]/.test(i)||!Tt(l)))?Yl(t,Rn(i),l,d,i):(i==="true-value"?t._trueValue=l:i==="false-value"&&(t._falseValue=l),ql(t,i,l,h))};function Nh(t,i,s,l){if(l)return!!(i==="innerHTML"||i==="textContent"||i in t&&Xl(i)&&Je(s));if(i==="spellcheck"||i==="draggable"||i==="translate"||i==="autocorrect"||i==="sandbox"&&t.tagName==="IFRAME"||i==="form"||i==="list"&&t.tagName==="INPUT"||i==="type"&&t.tagName==="TEXTAREA")return!1;if(i==="width"||i==="height"){const u=t.tagName;if(u==="IMG"||u==="VIDEO"||u==="CANVAS"||u==="SOURCE")return!1}return Xl(i)&&Tt(s)?!1:i in t}function Dh(t,i){const s=t._def.props;if(!s)return!1;const l=Rn(i);return Array.isArray(s)?s.some(u=>Rn(u)===l):Object.keys(s).some(u=>Rn(u)===l)}const Ri=t=>{const i=t.props["onUpdate:modelValue"]||!1;return De(i)?s=>ga(i,s):i};function Fh(t){t.target.composing=!0}function Ql(t){const i=t.target;i.composing&&(i.composing=!1,i.dispatchEvent(new Event("input")))}const Ln=Symbol("_assign");function eu(t,i,s){return i&&(t=t.trim()),s&&(t=za(t)),t}const Se={created(t,{modifiers:{lazy:i,trim:s,number:l}},u){t[Ln]=Ri(u);const d=l||u.props&&u.props.type==="number";gi(t,i?"change":"input",h=>{h.target.composing||t[Ln](eu(t.value,s,d))}),(s||d)&&gi(t,"change",()=>{t.value=eu(t.value,s,d)}),i||(gi(t,"compositionstart",Fh),gi(t,"compositionend",Ql),gi(t,"change",Ql))},mounted(t,{value:i}){t.value=i??""},beforeUpdate(t,{value:i,oldValue:s,modifiers:{lazy:l,trim:u,number:d}},h){if(t[Ln]=Ri(h),t.composing)return;const v=(d||t.type==="number")&&!/^0\d/.test(t.value)?za(t.value):t.value,b=i??"";if(v===b)return;const C=t.getRootNode();(C instanceof Document||C instanceof ShadowRoot)&&C.activeElement===t&&t.type!=="range"&&(l&&i===s||u&&t.value.trim()===b)||(t.value=b)}},Ca={deep:!0,created(t,i,s){t[Ln]=Ri(s),gi(t,"change",()=>{const l=t._modelValue,u=Vo(t),d=t.checked,h=t[Ln];if(De(l)){const v=$r(l,u),b=v!==-1;if(d&&!b)h(l.concat(u));else if(!d&&b){const C=[...l];C.splice(v,1),h(C)}}else if(Zo(l)){const v=new Set(l);d?v.add(u):v.delete(u),h(v)}else h(Ic(t,d))})},mounted:tu,beforeUpdate(t,i,s){t[Ln]=Ri(s),tu(t,i,s)}};function tu(t,{value:i,oldValue:s},l){t._modelValue=i;let u;if(De(i))u=$r(i,l.props.value)>-1;else if(Zo(i))u=i.has(l.props.value);else{if(i===s)return;u=Di(i,Ic(t,!0))}t.checked!==u&&(t.checked=u)}const Rh={created(t,{value:i},s){t.checked=Di(i,s.props.value),t[Ln]=Ri(s),gi(t,"change",()=>{t[Ln](Vo(t))})},beforeUpdate(t,{value:i,oldValue:s},l){t[Ln]=Ri(l),i!==s&&(t.checked=Di(i,l.props.value))}},At={deep:!0,created(t,{value:i,modifiers:{number:s}},l){const u=Zo(i);gi(t,"change",()=>{const d=Array.prototype.filter.call(t.options,h=>h.selected).map(h=>s?za(Vo(h)):Vo(h));t[Ln](t.multiple?u?new Set(d):d:d[0]),t._assigning=!0,ju(()=>{t._assigning=!1})}),t[Ln]=Ri(l)},mounted(t,{value:i}){nu(t,i)},beforeUpdate(t,i,s){t[Ln]=Ri(s)},updated(t,{value:i}){t._assigning||nu(t,i)}};function nu(t,i){const s=t.multiple,l=De(i);if(!(s&&!l&&!Zo(i))){for(let u=0,d=t.options.length;uString(C)===String(v)):h.selected=$r(i,v)>-1}else h.selected=i.has(v);else if(Di(Vo(h),i)){t.selectedIndex!==u&&(t.selectedIndex=u);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Vo(t){return"_value"in t?t._value:t.value}function Ic(t,i){const s=i?"_trueValue":"_falseValue";return s in t?t[s]:i}const Bh={created(t,i,s){pa(t,i,s,null,"created")},mounted(t,i,s){pa(t,i,s,null,"mounted")},beforeUpdate(t,i,s,l){pa(t,i,s,l,"beforeUpdate")},updated(t,i,s,l){pa(t,i,s,l,"updated")}};function Uh(t,i){switch(t){case"SELECT":return At;case"TEXTAREA":return Se;default:switch(i){case"checkbox":return Ca;case"radio":return Rh;default:return Se}}}function pa(t,i,s,l,u){const h=Uh(t.tagName,s.props&&s.props.type)[u];h&&h(t,i,s,l)}const Vh=["ctrl","shift","alt","meta"],Zh={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,i)=>Vh.some(s=>t[`${s}Key`]&&!i.includes(s))},Kr=(t,i)=>{if(!t)return t;const s=t._withMods||(t._withMods={}),l=i.join(".");return s[l]||(s[l]=((u,...d)=>{for(let h=0;h{const s=t._withKeys||(t._withKeys={}),l=i.join(".");return s[l]||(s[l]=(u=>{if(!("key"in u))return;const d=Bi(u.key);if(i.some(h=>h===d||Hh[h]===d))return t(u)}))},jh=Nt({patchProp:$h},fh);let ou;function Wh(){return ou||(ou=jf(jh))}const Kh=((...t)=>{const i=Wh().createApp(...t),{mount:s}=i;return i.mount=l=>{const u=qh(l);if(!u)return;const d=i._component;!Je(d)&&!d.render&&!d.template&&(d.template=u.innerHTML),u.nodeType===1&&(u.textContent="");const h=s(u,!1,Gh(u));return u instanceof Element&&(u.removeAttribute("v-cloak"),u.setAttribute("data-v-app","")),h},i});function Gh(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function qh(t){return Tt(t)?document.querySelector(t):t}const $c="pv_theme",su={light:"#EEF0F3",dark:"#0B1730"},La=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;function Nc(){return La&&La.matches?"dark":"light"}function Yh(){try{return localStorage.getItem($c)||"light"}catch{return"light"}}function Dc(t){return t==="system"?Nc():t}function Fc(t){const i=document.documentElement;i.setAttribute("data-theme",t),i.style.backgroundColor=su[t]||su.light}const oo=j(Yh()),Ro=j(Dc(oo.value));function Aa(t){oo.value=t;const i=Dc(t);Ro.value=i,Fc(i);try{localStorage.setItem($c,t)}catch{}}function au(){Aa(Ro.value==="dark"?"light":"dark")}La&&La.addEventListener("change",()=>{if(oo.value==="system"){const t=Nc();Ro.value=t,Fc(t)}});async function Jh(){try{const t=await fetch("/bff/config");return t.ok?await t.json():{apiBase:""}}catch{return{apiBase:""}}}async function ru(){try{const t=await fetch("/bff/me");return t.ok?await t.json():null}catch{return null}}async function Xh(t,i,s){const l=await fetch("/bff/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:i,apiBase:s})});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Qh(){try{await fetch("/bff/logout",{method:"POST"})}catch{}}async function ep(){try{const t=await fetch("/bff/devices");return t.ok?await t.json():[]}catch{return[]}}async function tp(){try{const t=await fetch("/bff/users");return t.ok?{ok:!0,status:200,users:(await t.json()).users||[]}:{ok:!1,status:t.status,users:[]}}catch{return{ok:!1,status:0,users:[]}}}async function np(t,i,s,l){const u=await fetch("/bff/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:i,role:s,organization:l})});return{ok:u.ok,status:u.status,body:await u.json().catch(()=>({}))}}async function ip(t,i){const s=await fetch(`/bff/users/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function op(t){const i=await fetch(`/bff/users/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function sp(){try{const t=await fetch("/bff/orgs");return t.ok?{ok:!0,status:200,organizations:(await t.json()).organizations||[]}:{ok:!1,status:t.status,organizations:[]}}catch{return{ok:!1,status:0,organizations:[]}}}async function ap(t){const i=await fetch("/bff/orgs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function rp(t,i){const s=await fetch(`/bff/orgs/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function lp(t){const i=await fetch(`/bff/orgs/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function up(){try{const t=await fetch("/bff/preferences");if(!t.ok)return null;const i=await t.json();return i&&typeof i.preferences=="object"?i.preferences:null}catch{return null}}async function cp(t){try{return(await fetch("/bff/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:t})})).ok}catch{return!1}}async function dp(){try{const t=await fetch("/bff/integrations/opensky");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function lu(t){const i=await fetch("/bff/integrations/opensky",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function fp(t){const i=t?`?bbox=${encodeURIComponent(t)}`:"",s=await fetch(`/bff/integrations/opensky/health${i}`,{method:"POST"});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function hp(t){try{const i=t?`?bbox=${encodeURIComponent(t)}`:"",s=await fetch(`/bff/integrations/opensky/states${i}`);if(!s.ok)return{states:[],unavailable:!0,detail:"OpenSky unavailable"};const l=await s.json();return{states:l.states||[],time:l.time,unavailable:!!l.unavailable,detail:l.detail||"",plan:l.plan||"",recommendedInterval:l.recommendedInterval||0}}catch{return{states:[],unavailable:!0,detail:"OpenSky unavailable"}}}async function pp(){try{const t=await fetch("/bff/integrations/filetransfer");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function uu(t){const i=await fetch("/bff/integrations/filetransfer",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function mp(){const t=await fetch("/bff/integrations/filetransfer/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function gp(){try{const t=await fetch("/bff/integrations/localstorage");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function ma(t){const i=await fetch("/bff/integrations/localstorage",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function vp(){const t=await fetch("/bff/integrations/localstorage/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function _p(){try{const t=await fetch("/bff/integrations/webdav");return t.ok?{ok:!0,status:200,body:await t.json()}:{ok:!1,status:t.status,body:await t.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function cu(t){const i=await fetch("/bff/integrations/webdav",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function bp(){const t=await fetch("/bff/integrations/webdav/health",{method:"POST"});return{ok:t.ok,status:t.status,body:await t.json().catch(()=>({}))}}async function Rc(){try{const t=await fetch("/bff/drones");return t.ok?{ok:!0,status:200,drones:(await t.json()).drones||[]}:{ok:!1,status:t.status,drones:[]}}catch{return{ok:!1,status:0,drones:[]}}}async function yp(t){const i=await fetch("/bff/drones",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function xp(t,i){const s=await fetch(`/bff/drones/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function wp(t){const i=await fetch(`/bff/drones/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function kp(){try{const t=await fetch("/bff/flights");return t.ok?{ok:!0,status:200,flights:(await t.json()).flights||[]}:{ok:!1,status:t.status,flights:[]}}catch{return{ok:!1,status:0,flights:[]}}}async function Sp(t){const i=await fetch("/bff/flights",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Tp(t,i){const s=await fetch(`/bff/flights/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function Pp(t){const i=await fetch(`/bff/flights/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}function Cp(){return"/bff/logbook/export"}async function Lp(t){try{const i=t!=null&&t!==""?`?expiring=${encodeURIComponent(t)}`:"",s=await fetch(`/bff/documents${i}`);return s.ok?{ok:!0,status:200,documents:(await s.json()).documents||[]}:{ok:!1,status:s.status,documents:[]}}catch{return{ok:!1,status:0,documents:[]}}}async function Ap(t,i){const s=new FormData;Object.entries(t).forEach(([u,d])=>{d!=null&&d!==""&&s.append(u,d)}),i&&s.append("file",i);const l=await fetch("/bff/documents",{method:"POST",body:s});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Mp(t,i){const s=await fetch(`/bff/documents/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:s.ok,status:s.status,body:await s.json().catch(()=>({}))}}async function Ep(t){const i=await fetch(`/bff/documents/${encodeURIComponent(t)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}function hr(t){return`/bff/documents/${encodeURIComponent(t)}/file`}function Op(t){return`/bff/documents/${encodeURIComponent(t)}/file?inline=1`}async function zp(t,i,s){const l=await fetch(`/bff/devices/${encodeURIComponent(t)}/command`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:i,payload:s})});return{ok:l.ok,body:await l.json().catch(()=>({}))}}const Bc="pv_prefs",Ar={name:"",username:"",displayName:"",bio:"",avatar:"",showEmail:!1,fontSize:"md",language:"en",region:"US",dateFormat:"MDY",timeFormat:"24",reduceMotion:!1,showAirTraffic:!0,autoBbox:!0,airTrafficInterval:"auto",twoFactor:!1};function Ip(){try{return{...Ar,...JSON.parse(localStorage.getItem(Bc)||"{}")||{}}}catch{return{...Ar}}}const _e=St(Ip());function Uc(){try{localStorage.setItem(Bc,JSON.stringify(_e))}catch{}}function Vc(t){if(!t||typeof t!="object")return!1;for(const i of Object.keys(Ar))i in t&&(_e[i]=t[i]);return!0}const $p={sm:15,md:16,lg:18};function Gr(t){document.documentElement.style.fontSize=($p[t]||16)+"px"}function qr(t){document.documentElement.classList.toggle("reduce-motion",!!t)}function Zc(t){const i=new Date(t),s=i.getFullYear(),l=String(i.getMonth()+1).padStart(2,"0"),u=String(i.getDate()).padStart(2,"0");let d;switch(_e.dateFormat){case"DMY":d=`${u}/${l}/${s}`;break;case"YMD":d=`${s}/${l}/${u}`;break;case"ISO":d=`${s}-${l}-${u}`;break;default:d=`${l}/${u}/${s}`}let h;return _e.timeFormat==="12"?h=i.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):h=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}:${String(i.getSeconds()).padStart(2,"0")}`,{date:d,time:h}}function du(t){return Zc(t).time}function fu(t){const i=Zc(t);return`${i.date} ${i.time}`}let Yr=!1,Mr=!1,Er=null;function Np(){return{...JSON.parse(JSON.stringify(_e)),themeMode:oo.value}}function Jr(){!Yr||Mr||(clearTimeout(Er),Er=setTimeout(()=>{cp(Np())},600))}function Dp(t){Mr=!0;try{Vc(t),t.themeMode&&Aa(t.themeMode),Gr(_e.fontSize),qr(_e.reduceMotion),Uc()}finally{Mr=!1}}async function hu(){Yr=!0;const t=await up();t&&Object.keys(t).length?Dp(t):Jr()}function Fp(){Yr=!1,clearTimeout(Er)}$t(_e,()=>{Uc(),Jr()},{deep:!0});$t(oo,Jr);$t(()=>_e.fontSize,Gr,{immediate:!0});$t(()=>_e.reduceMotion,qr,{immediate:!0});const Rp=["width","height"],Hc={__name:"BrandMark",props:{size:{type:[Number,String],default:28}},setup(t){return(i,s)=>(p(),g("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},[...s[0]||(s[0]=[r("g",{"stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},[r("polyline",{points:"8,30 19,17 30,30",stroke:"var(--accent)"}),r("polyline",{points:"18,33 29,20 40,33",stroke:"currentColor"})],-1)])],8,Rp))}},Bp=["title","aria-label"],Up={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Vp={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Zp={__name:"ThemeToggle",setup(t){return(i,s)=>(p(),g("button",{class:"btn-icon",type:"button",title:Oe(Ro)==="dark"?"Switch to light":"Switch to dark","aria-label":Oe(Ro)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:s[0]||(s[0]=(...l)=>Oe(au)&&Oe(au)(...l))},[Oe(Ro)==="dark"?(p(),g("svg",Up,[...s[1]||(s[1]=[r("circle",{cx:"12",cy:"12",r:"4"},null,-1),r("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(p(),g("svg",Vp,[...s[2]||(s[2]=[r("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z"},null,-1)])]))],8,Bp))}},Hp={class:"relative grid h-full place-items-center p-5"},jp={class:"absolute right-5 top-5"},Wp={class:"mb-6 flex items-center gap-3 text-ink"},Kp={class:"relative mb-1"},Gp=["type"],qp=["aria-label","title"],Yp={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Jp={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-[18px] w-[18px]"},Xp={key:0,class:"mt-4"},Qp={key:1,class:"mt-4 rounded border border-line bg-danger-soft px-3 py-2 text-sm text-danger-fg"},em=["disabled"],tm={__name:"LoginView",props:{defaultApiBase:{type:String,default:""}},emits:["signed-in"],setup(t,{emit:i}){const s=t,l=i,u=j(""),d=j(""),h=j(localStorage.getItem("api_url")||s.defaultApiBase||"http://localhost:8080"),v=j(!1),b=j(!1),C=j(!1),T=j("");async function A(){C.value=!0,T.value="",localStorage.setItem("api_url",h.value.trim());const{ok:R,status:B,body:Z}=await Xh(u.value.trim(),d.value,h.value.trim());if(C.value=!1,R){l("signed-in",Z.email);return}T.value=B===400?"Invalid email or password.":B===502?"API server can't reach PocketBase.":Z.message||Z.error||"Cannot reach the API server."}return(R,B)=>(p(),g("div",Hp,[r("div",jp,[E(Zp)]),r("form",{class:"panel w-[380px] p-8 shadow-md",onSubmit:Kr(A,["prevent"])},[r("div",Wp,[E(Hc,{size:34}),B[5]||(B[5]=r("div",{class:"leading-tight"},[r("div",{class:"text-mode"},"PilotVault"),r("div",{class:"eyebrow mt-0.5"},"Control panel")],-1))]),B[9]||(B[9]=r("label",{class:"eyebrow mb-1.5 block"},"Email",-1)),ne(r("input",{"onUpdate:modelValue":B[0]||(B[0]=Z=>u.value=Z),type:"email",autocomplete:"username",required:"",class:"field mb-4",placeholder:"you@example.com"},null,512),[[Se,u.value]]),B[10]||(B[10]=r("label",{class:"eyebrow mb-1.5 block"},"Password",-1)),r("div",Kp,[ne(r("input",{"onUpdate:modelValue":B[1]||(B[1]=Z=>d.value=Z),type:b.value?"text":"password",autocomplete:"current-password",required:"",class:"field w-full pr-10",placeholder:"••••••••"},null,8,Gp),[[Bh,d.value]]),r("button",{type:"button",class:"absolute inset-y-0 right-0 grid w-10 place-items-center text-ink-muted transition hover:text-ink-secondary","aria-label":b.value?"Hide password":"Show password",title:b.value?"Hide password":"Show password",onClick:B[2]||(B[2]=Z=>b.value=!b.value)},[b.value?(p(),g("svg",Yp,[...B[6]||(B[6]=[r("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"},null,-1),r("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])])):(p(),g("svg",Jp,[...B[7]||(B[7]=[r("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},null,-1),r("circle",{cx:"12",cy:"12",r:"3"},null,-1)])]))],8,qp)]),v.value?(p(),g("div",Xp,[B[8]||(B[8]=r("label",{class:"eyebrow mb-1.5 block"},"API Server",-1)),ne(r("input",{"onUpdate:modelValue":B[3]||(B[3]=Z=>h.value=Z),type:"text",class:"field font-mono",placeholder:"10.2.1.101:8080"},null,512),[[Se,h.value]])])):N("",!0),T.value?(p(),g("p",Qp,S(T.value),1)):N("",!0),r("button",{type:"submit",class:"btn-accent mt-6 w-full",disabled:C.value},S(C.value?"Signing in…":"Sign in"),9,em),r("button",{type:"button",class:"mx-auto mt-3 block text-xs text-ink-muted transition hover:text-ink-secondary",onClick:B[4]||(B[4]=Z=>v.value=!v.value)},S(v.value?"Hide server settings":"Server settings"),1)],32)]))}};function nm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ws={exports:{}};/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */var im=ws.exports,pu;function om(){return pu||(pu=1,(function(t,i){(function(s,l){l(i)})(im,(function(s){var l="1.9.4";function u(e){var n,o,a,c;for(o=1,a=arguments.length;o"u"||!L||!L.Mixin)){e=Ce(e)?e:[e];for(var n=0;n0?Math.floor(e):Math.ceil(e)};ae.prototype={clone:function(){return new ae(this.x,this.y)},add:function(e){return this.clone()._add(ee(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(ee(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new ae(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new ae(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=tt(this.x),this.y=tt(this.y),this},distanceTo:function(e){e=ee(e);var n=e.x-this.x,o=e.y-this.y;return Math.sqrt(n*n+o*o)},equals:function(e){return e=ee(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=ee(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+R(this.x)+", "+R(this.y)+")"}};function ee(e,n,o){return e instanceof ae?e:Ce(e)?new ae(e[0],e[1]):e==null?e:typeof e=="object"&&"x"in e&&"y"in e?new ae(e.x,e.y):new ae(e,n,o)}function xe(e,n){if(e)for(var o=n?[e,n]:e,a=0,c=o.length;a=this.min.x&&o.x<=this.max.x&&n.y>=this.min.y&&o.y<=this.max.y},intersects:function(e){e=Ne(e);var n=this.min,o=this.max,a=e.min,c=e.max,m=c.x>=n.x&&a.x<=o.x,P=c.y>=n.y&&a.y<=o.y;return m&&P},overlaps:function(e){e=Ne(e);var n=this.min,o=this.max,a=e.min,c=e.max,m=c.x>n.x&&a.xn.y&&a.y=n.lat&&c.lat<=o.lat&&a.lng>=n.lng&&c.lng<=o.lng},intersects:function(e){e=st(e);var n=this._southWest,o=this._northEast,a=e.getSouthWest(),c=e.getNorthEast(),m=c.lat>=n.lat&&a.lat<=o.lat,P=c.lng>=n.lng&&a.lng<=o.lng;return m&&P},overlaps:function(e){e=st(e);var n=this._southWest,o=this._northEast,a=e.getSouthWest(),c=e.getNorthEast(),m=c.lat>n.lat&&a.latn.lng&&a.lng1,yi=(function(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",A,n),window.removeEventListener("testPassiveEventSupport",A,n)}catch{}return e})(),Vs=(function(){return!!document.createElement("canvas").getContext})(),jo=!!(document.createElementNS&&K("svg").createSVGRect),Wo=!!jo&&(function(){var e=document.createElement("div");return e.innerHTML="",(e.firstChild&&e.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Ko=!jo&&(function(){try{var e=document.createElement("div");e.innerHTML='';var n=e.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}})(),Va=navigator.platform.indexOf("Mac")===0,gn=navigator.platform.indexOf("Linux")===0;function jt(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var ge={ie:re,ielt9:te,edge:Q,webkit:G,android:me,android23:se,androidStock:Ae,opera:Ze,chrome:et,gecko:U,safari:O,phantom:ke,opera12:Ye,win:gt,ie3d:bt,webkit3d:en,gecko3d:de,any3d:wt,mobile:an,mobileWebkit:so,mobileWebkit3d:lt,msPointer:ei,pointer:ao,touch:Ui,touchNative:ft,mobileOpera:ro,mobileGecko:lo,retina:Mn,passiveEvents:yi,canvas:Vs,svg:jo,vml:Ko,inlineSvg:Wo,mac:Va,linux:gn},Wt=ge.msPointer?"MSPointerDown":"pointerdown",Pt=ge.msPointer?"MSPointerMove":"pointermove",Zs=ge.msPointer?"MSPointerUp":"pointerup",Go=ge.msPointer?"MSPointerCancel":"pointercancel",Vi={touchstart:Wt,touchmove:Pt,touchend:Zs,touchcancel:Go},Hs={touchstart:qo,touchmove:En,touchend:En,touchcancel:En},xi={},js=!1;function Za(e,n,o){return n==="touchstart"&&ut(),Hs[n]?(o=Hs[n].bind(this,o),e.addEventListener(Vi[n],o,!1),o):(console.warn("wrong event specified:",n),A)}function Ws(e,n,o){if(!Vi[n]){console.warn("wrong event specified:",n);return}e.removeEventListener(Vi[n],o,!1)}function Ha(e){xi[e.pointerId]=e}function ja(e){xi[e.pointerId]&&(xi[e.pointerId]=e)}function Ks(e){delete xi[e.pointerId]}function ut(){js||(document.addEventListener(Wt,Ha,!0),document.addEventListener(Pt,ja,!0),document.addEventListener(Zs,Ks,!0),document.addEventListener(Go,Ks,!0),js=!0)}function En(e,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var o in xi)n.touches.push(xi[o]);n.changedTouches=[n],e(n)}}function qo(e,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Mt(n),En(e,n)}function Bt(e){var n={},o,a;for(a in e)o=e[a],n[a]=o&&o.bind?o.bind(e):o;return e=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var Zi=200;function uo(e,n){e.addEventListener("dblclick",n);var o=0,a;function c(m){if(m.detail!==1){a=m.detail;return}if(!(m.pointerType==="mouse"||m.sourceCapabilities&&!m.sourceCapabilities.firesTouchEvents)){var P=Js(m);if(!(P.some(function(D){return D instanceof HTMLLabelElement&&D.attributes.for})&&!P.some(function(D){return D instanceof HTMLInputElement||D instanceof HTMLSelectElement}))){var I=Date.now();I-o<=Zi?(a++,a===2&&n(Bt(m))):a=1,o=I}}}return e.addEventListener("click",c),{dblclick:n,simDblclick:c}}function co(e,n){e.removeEventListener("dblclick",n.dblclick),e.removeEventListener("click",n.simDblclick)}var rn=mo(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),vn=mo(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Gs=vn==="webkitTransition"||vn==="OTransition"?vn+"End":"transitionend";function fo(e){return typeof e=="string"?document.getElementById(e):e}function ti(e,n){var o=e.style[n]||e.currentStyle&&e.currentStyle[n];if((!o||o==="auto")&&document.defaultView){var a=document.defaultView.getComputedStyle(e,null);o=a?a[n]:null}return o==="auto"?null:o}function nt(e,n,o){var a=document.createElement(e);return a.className=n||"",o&&o.appendChild(a),a}function it(e){var n=e.parentNode;n&&n.removeChild(e)}function ln(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function un(e){var n=e.parentNode;n&&n.lastChild!==e&&n.appendChild(e)}function Dt(e){var n=e.parentNode;n&&n.firstChild!==e&&n.insertBefore(e,n.firstChild)}function ho(e,n){if(e.classList!==void 0)return e.classList.contains(n);var o=po(e);return o.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(o)}function We(e,n){if(e.classList!==void 0)for(var o=Z(n),a=0,c=o.length;a0?2*window.devicePixelRatio:1;function es(e){return ge.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/Wa:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function ts(e,n){var o=n.relatedTarget;if(!o)return!0;try{for(;o&&o!==e;)o=o.parentNode}catch{return!1}return o!==e}var ns={__proto__:null,on:Ue,off:mt,stopPropagation:ai,disableScrollPropagation:Qo,disableClickPropagation:Hi,preventDefault:Mt,stop:ri,getPropagationPath:Js,getMousePosition:Xs,getWheelDelta:es,isExternalTarget:ts,addListener:Ue,removeListener:mt},bo=ce.extend({run:function(e,n,o,a){this.stop(),this._el=e,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(a||.5,.2),this._startPos=Pe(e),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ze(this._animate,this),this._step()},_step:function(e){var n=+new Date-this._startTime,o=this._duration*1e3;nthis.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,n){this._enforcingBounds=!0;var o=this.getCenter(),a=this._limitCenter(o,this._zoom,st(e));return o.equals(a)||this.panTo(a,n),this._enforcingBounds=!1,this},panInside:function(e,n){n=n||{};var o=ee(n.paddingTopLeft||n.padding||[0,0]),a=ee(n.paddingBottomRight||n.padding||[0,0]),c=this.project(this.getCenter()),m=this.project(e),P=this.getPixelBounds(),I=Ne([P.min.add(o),P.max.subtract(a)]),D=I.getSize();if(!I.contains(m)){this._enforcingBounds=!0;var J=m.subtract(I.getCenter()),ve=I.extend(m).getSize().subtract(D);c.x+=J.x<0?-ve.x:ve.x,c.y+=J.y<0?-ve.y:ve.y,this.panTo(this.unproject(c),n),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=u({animate:!1,pan:!0},e===!0?{animate:!0}:e);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),a=n.divideBy(2).round(),c=o.divideBy(2).round(),m=a.subtract(c);return!m.x&&!m.y?this:(e.animate&&e.pan?this.panBy(m):(e.pan&&this._rawPanBy(m),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=u({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=h(this._handleGeolocationResponse,this),o=h(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,e):navigator.geolocation.getCurrentPosition(n,o,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var n=e.code,o=e.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+o+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var n=e.coords.latitude,o=e.coords.longitude,a=new Ve(n,o),c=a.toBounds(e.coords.accuracy*2),m=this._locateOptions;if(m.setView){var P=this.getBoundsZoom(c);this.setView(a,m.maxZoom?Math.min(P,m.maxZoom):P)}var I={latlng:a,bounds:c,timestamp:e.timestamp};for(var D in e.coords)typeof e.coords[D]=="number"&&(I[D]=e.coords[D]);this.fire("locationfound",I)}},addHandler:function(e,n){if(!n)return this;var o=this[e]=new n(this);return this._handlers.push(o),this.options[e]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),it(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ie(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)it(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,n){var o="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),a=nt("div",o,n||this._mapPane);return e&&(this._panes[e]=a),a},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),n=this.unproject(e.getBottomLeft()),o=this.unproject(e.getTopRight());return new dt(n,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,n,o){e=st(e),o=ee(o||[0,0]);var a=this.getZoom()||0,c=this.getMinZoom(),m=this.getMaxZoom(),P=e.getNorthWest(),I=e.getSouthEast(),D=this.getSize().subtract(o),J=Ne(this.project(I,a),this.project(P,a)).getSize(),ve=ge.any3d?this.options.zoomSnap:1,Re=D.x/J.x,Qe=D.y/J.y,qt=n?Math.max(Re,Qe):Math.min(Re,Qe);return a=this.getScaleZoom(qt,a),ve&&(a=Math.round(a/(ve/100))*(ve/100),a=n?Math.ceil(a/ve)*ve:Math.floor(a/ve)*ve),Math.max(c,Math.min(m,a))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new ae(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,n){var o=this._getTopLeftPoint(e,n);return new xe(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e=="string"?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,n){var o=this.options.crs;return n=n===void 0?this._zoom:n,o.scale(e)/o.scale(n)},getScaleZoom:function(e,n){var o=this.options.crs;n=n===void 0?this._zoom:n;var a=o.zoom(e*o.scale(n));return isNaN(a)?1/0:a},project:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(Y(e),n)},unproject:function(e,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(ee(e),n)},layerPointToLatLng:function(e){var n=ee(e).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(e){var n=this.project(Y(e))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(Y(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(st(e))},distance:function(e,n){return this.options.crs.distance(Y(e),Y(n))},containerPointToLayerPoint:function(e){return ee(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return ee(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var n=this.containerPointToLayerPoint(ee(e));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Y(e)))},mouseEventToContainerPoint:function(e){return Xs(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var n=this._container=fo(e);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ue(n,"scroll",this._onScroll,this),this._containerId=b(n)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&ge.any3d,We(e,"leaflet-container"+(ge.touch?" leaflet-touch":"")+(ge.retina?" leaflet-retina":"")+(ge.ielt9?" leaflet-oldie":"")+(ge.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=ti(e,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Lt(this._mapPane,new ae(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(We(e.markerPane,"leaflet-zoom-hide"),We(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,n,o){Lt(this._mapPane,new ae(0,0));var a=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var c=this._zoom!==n;this._moveStart(c,o)._move(e,n)._moveEnd(c),this.fire("viewreset"),a&&this.fire("load")},_moveStart:function(e,n){return e&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(e,n,o,a){n===void 0&&(n=this._zoom);var c=this._zoom!==n;return this._zoom=n,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),a?o&&o.pinch&&this.fire("zoom",o):((c||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ie(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Lt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[b(this._container)]=this;var n=e?mt:Ue;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),ge.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ie(this._resizeRequest),this._resizeRequest=ze(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,n){for(var o=[],a,c=n==="mouseout"||n==="mouseover",m=e.target||e.srcElement,P=!1;m;){if(a=this._targets[b(m)],a&&(n==="click"||n==="preclick")&&this._draggableMoved(a)){P=!0;break}if(a&&a.listens(n,!0)&&(c&&!ts(m,e)||(o.push(a),c))||m===this._container)break;m=m.parentNode}return!o.length&&!P&&!c&&this.listens(n,!0)&&(o=[this]),o},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var n=e.target||e.srcElement;if(!(!this._loaded||n._leaflet_disable_events||e.type==="click"&&this._isClickDisabled(n))){var o=e.type;o==="mousedown"&&go(n),this._fireDOMEvent(e,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,n,o){if(e.type==="click"){var a=u({},e);a.type="preclick",this._fireDOMEvent(a,a.type,o)}var c=this._findEventTargets(e,n);if(o){for(var m=[],P=0;P0?Math.round(e-n)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(n))},_limitZoom:function(e){var n=this.getMinZoom(),o=this.getMaxZoom(),a=ge.any3d?this.options.zoomSnap:1;return a&&(e=Math.round(e/a)*a),Math.max(n,Math.min(o,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ct(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,n){var o=this._getCenterOffset(e)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(o)?!1:(this.panBy(o,n),!0)},_createAnimProxy:function(){var e=this._proxy=nt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(n){var o=rn,a=this._proxy.style[o];ni(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),a===this._proxy.style[o]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){it(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),n=this.getZoom();ni(this._proxy,this.project(e,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,n,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||o.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var a=this.getZoomScale(n),c=this._getCenterOffset(e)._divideBy(1-1/a);return o.animate!==!0&&!this.getSize().contains(c)?!1:(ze(function(){this._moveStart(!0,o.noMoveStart||!1)._animateZoom(e,n,!0)},this),!0)},_animateZoom:function(e,n,o,a){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=n,We(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:n,noUpdate:a}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(h(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ct(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function is(e,n){return new Xe(e,n)}var Ke=oe.extend({options:{position:"topright"},initialize:function(e){F(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var n=this._map;return n&&n.removeControl(this),this.options.position=e,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var n=this._container=this.onAdd(e),o=this.getPosition(),a=e._controlCorners[o];return We(n,"leaflet-control"),o.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(it(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),zt=function(e){return new Ke(e)};Xe.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},n="leaflet-",o=this._controlContainer=nt("div",n+"control-container",this._container);function a(c,m){var P=n+c+" "+n+m;e[c+m]=nt("div",P,o)}a("top","left"),a("top","right"),a("bottom","left"),a("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)it(this._controlCorners[e]);it(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=Ke.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,n,o,a){return o1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=n&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var n=this._getLayer(b(e.target)),o=n.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;o&&this._map.fire(o,n)},_createRadioElement:function(e,n){var o='",a=document.createElement("div");return a.innerHTML=o,a.firstChild},_addItem:function(e){var n=document.createElement("label"),o=this._map.hasLayer(e.layer),a;e.overlay?(a=document.createElement("input"),a.type="checkbox",a.className="leaflet-control-layers-selector",a.defaultChecked=o):a=this._createRadioElement("leaflet-base-layers_"+b(this),o),this._layerControlInputs.push(a),a.layerId=b(e.layer),Ue(a,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+e.name;var m=document.createElement("span");n.appendChild(m),m.appendChild(a),m.appendChild(c);var P=e.overlay?this._overlaysList:this._baseLayersList;return P.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,n,o,a=[],c=[];this._handlingClick=!0;for(var m=e.length-1;m>=0;m--)n=e[m],o=this._getLayer(n.layerId).layer,n.checked?a.push(o):n.checked||c.push(o);for(m=0;m=0;c--)n=e[c],o=this._getLayer(n.layerId).layer,n.disabled=o.options.minZoom!==void 0&&ao.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Ue(e,"click",Mt),this.expand();var n=this;setTimeout(function(){mt(e,"click",Mt),n._preventClick=!1})}}),Qs=function(e,n,o){return new li(e,n,o)},os=Ke.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(e){var n="leaflet-control-zoom",o=nt("div",n+" leaflet-bar"),a=this.options;return this._zoomInButton=this._createButton(a.zoomInText,a.zoomInTitle,n+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(a.zoomOutText,a.zoomOutTitle,n+"-out",o,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,n,o,a,c){var m=nt("a",o,a);return m.innerHTML=e,m.href="#",m.title=n,m.setAttribute("role","button"),m.setAttribute("aria-label",n),Hi(m),Ue(m,"click",ri),Ue(m,"click",c,this),Ue(m,"click",this._refocusOnMap,this),m},_updateDisabled:function(){var e=this._map,n="leaflet-disabled";Ct(this._zoomInButton,n),Ct(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(We(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(We(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});Xe.mergeOptions({zoomControl:!0}),Xe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new os,this.addControl(this.zoomControl))});var ss=function(e){return new os(e)},ea=Ke.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var n="leaflet-control-scale",o=nt("div",n),a=this.options;return this._addScales(a,n+"-line",o),e.on(a.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),o},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,n,o){e.metric&&(this._mScale=nt("div",n,o)),e.imperial&&(this._iScale=nt("div",n,o))},_update:function(){var e=this._map,n=e.getSize().y/2,o=e.distance(e.containerPointToLatLng([0,n]),e.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(o)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var n=this._getRoundNum(e),o=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,o,n/e)},_updateImperial:function(e){var n=e*3.2808399,o,a,c;n>5280?(o=n/5280,a=this._getRoundNum(o),this._updateScale(this._iScale,a+" mi",a/o)):(c=this._getRoundNum(n),this._updateScale(this._iScale,c+" ft",c/n))},_updateScale:function(e,n,o){e.style.width=Math.round(this.options.maxWidth*o)+"px",e.innerHTML=n},_getRoundNum:function(e){var n=Math.pow(10,(Math.floor(e)+"").length-1),o=e/n;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,n*o}}),Ka=function(e){return new ea(e)},Ga='',as=Ke.extend({options:{position:"bottomright",prefix:''+(ge.inlineSvg?Ga+" ":"")+"Leaflet"},initialize:function(e){F(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=nt("div","leaflet-control-attribution"),Hi(this._container);for(var n in e._layers)e._layers[n].getAttribution&&this.addAttribution(e._layers[n].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var n in this._attributions)this._attributions[n]&&e.push(n);var o=[];this.options.prefix&&o.push(this.options.prefix),e.length&&o.push(e.join(", ")),this._container.innerHTML=o.join(' ')}}});Xe.mergeOptions({attributionControl:!0}),Xe.addInitHook(function(){this.options.attributionControl&&new as().addTo(this)});var ji=function(e){return new as(e)};Ke.Layers=li,Ke.Zoom=os,Ke.Scale=ea,Ke.Attribution=as,zt.layers=Qs,zt.zoom=ss,zt.scale=Ka,zt.attribution=ji;var fn=oe.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});fn.addTo=function(e,n){return e.addHandler(n,this),this};var yo={Events:le},Si=ge.touch?"touchstart mousedown":"mousedown",hn=ce.extend({options:{clickTolerance:3},initialize:function(e,n,o,a){F(this,a),this._element=e,this._dragStartTarget=n||e,this._preventOutline=o},enable:function(){this._enabled||(Ue(this._dragStartTarget,Si,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(hn._dragging===this&&this.finishDrag(!0),mt(this._dragStartTarget,Si,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!ho(this._element,"leaflet-zoom-anim"))){if(e.touches&&e.touches.length!==1){hn._dragging===this&&this.finishDrag();return}if(!(hn._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(hn._dragging=this,this._preventOutline&&go(this._element),wi(),_n(),!this._moving)){this.fire("down");var n=e.touches?e.touches[0]:e,o=vo(this._element);this._startPoint=new ae(n.clientX,n.clientY),this._startPos=Pe(this._element),this._parentScale=Jo(o);var a=e.type==="mousedown";Ue(document,a?"mousemove":"touchmove",this._onMove,this),Ue(document,a?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var n=e.touches&&e.touches.length===1?e.touches[0]:e,o=new ae(n.clientX,n.clientY)._subtract(this._startPoint);!o.x&&!o.y||Math.abs(o.x)+Math.abs(o.y)m&&(P=I,m=D);m>o&&(n[P]=1,Ti(e,n,o,a,P),Ti(e,n,o,P,c))}function Wi(e,n){for(var o=[e[0]],a=1,c=0,m=e.length;an&&(o.push(e[a]),c=a);return cn.max.x&&(o|=2),e.yn.max.y&&(o|=8),o}function Gi(e,n){var o=n.x-e.x,a=n.y-e.y;return o*o+a*a}function Pi(e,n,o,a){var c=n.x,m=n.y,P=o.x-c,I=o.y-m,D=P*P+I*I,J;return D>0&&(J=((e.x-c)*P+(e.y-m)*I)/D,J>1?(c=o.x,m=o.y):J>0&&(c+=P*J,m+=I*J)),P=e.x-c,I=e.y-m,a?P*P+I*I:new ae(c,m)}function Ft(e){return!Ce(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]<"u"}function Ci(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ft(e)}function ls(e,n){var o,a,c,m,P,I,D,J;if(!e||e.length===0)throw new Error("latlngs not passed");Ft(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var ve=Y([0,0]),Re=st(e),Qe=Re.getNorthWest().distanceTo(Re.getSouthWest())*Re.getNorthEast().distanceTo(Re.getNorthWest());Qe<1700&&(ve=rs(e));var qt=e.length,It=[];for(o=0;oa){D=(m-a)/c,J=[I.x-D*(I.x-P.x),I.y-D*(I.y-P.y)];break}var on=n.unproject(ee(J));return Y([on.lat+ve.lat,on.lng+ve.lng])}var Li={__proto__:null,simplify:pn,pointToSegmentDistance:na,closestPointOnSegment:Ya,clipSegment:Et,_getEdgeIntersection:zn,_getBitCode:bn,_sqClosestPointOnSegment:Pi,isFlat:Ft,_flat:Ci,polylineCenter:ls},Ai={project:function(e){return new ae(e.lng,e.lat)},unproject:function(e){return new Ve(e.y,e.x)},bounds:new xe([-180,-90],[180,90])},us={R:6378137,R_MINOR:6356752314245179e-9,bounds:new xe([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(e){var n=Math.PI/180,o=this.R,a=e.lat*n,c=this.R_MINOR/o,m=Math.sqrt(1-c*c),P=m*Math.sin(a),I=Math.tan(Math.PI/4-a/2)/Math.pow((1-P)/(1+P),m/2);return a=-o*Math.log(Math.max(I,1e-10)),new ae(e.lng*n*o,a)},unproject:function(e){for(var n=180/Math.PI,o=this.R,a=this.R_MINOR/o,c=Math.sqrt(1-a*a),m=Math.exp(-e.y/o),P=Math.PI/2-2*Math.atan(m),I=0,D=.1,J;I<15&&Math.abs(D)>1e-7;I++)J=c*Math.sin(P),J=Math.pow((1-J)/(1+J),c/2),D=Math.PI/2-2*Math.atan(m*J)-P,P+=D;return new Ve(P*n,e.x*n/o)}},Xa={__proto__:null,LonLat:Ai,Mercator:us,SphericalMercator:rt},ot=u({},z,{code:"EPSG:3395",projection:us,transformation:(function(){var e=.5/(Math.PI*us.R);return x(e,.5,-e,.5)})()}),In=u({},z,{code:"EPSG:4326",projection:Ai,transformation:x(1/180,1,-1/180,.5)}),wo=u({},M,{projection:Ai,transformation:x(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,n){var o=n.lng-e.lng,a=n.lat-e.lat;return Math.sqrt(o*o+a*a)},infinite:!0});M.Earth=z,M.EPSG3395=ot,M.EPSG3857=_,M.EPSG900913=w,M.EPSG4326=In,M.Simple=wo;var Kt=ce.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[b(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[b(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var n=e.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var o=this.getEvents();n.on(o,this),this.once("remove",function(){n.off(o,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});Xe.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var n=b(e);return this._layers[n]?this:(this._layers[n]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var n=b(e);return this._layers[n]?(this._loaded&&e.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return b(e)in this._layers},eachLayer:function(e,n){for(var o in this._layers)e.call(n,this._layers[o]);return this},_addLayers:function(e){e=e?Ce(e)?e:[e]:[];for(var n=0,o=e.length;nthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&n[0]instanceof Ve&&n[0].equals(n[o-1])&&n.pop(),n},_setLatLngs:function(e){Fn.prototype._setLatLngs.call(this,e),Ft(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ft(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,n=this.options.weight,o=new ae(n,n);if(e=new xe(e.min.subtract(o),e.max.add(o)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var a=0,c=this._rings.length,m;ae.y!=c.y>e.y&&e.x<(c.x-a.x)*(e.y-a.y)/(c.y-a.y)+a.x&&(n=!n);return n||Fn.prototype._containsPoint.call(this,e,!0)}});function yt(e,n){return new Ei(e,n)}var Gt=$n.extend({initialize:function(e,n){F(this,n),this._layers={},e&&this.addData(e)},addData:function(e){var n=Ce(e)?e:e.features,o,a,c;if(n){for(o=0,a=n.length;o0&&c.push(c[0].slice()),c}function H(e,n){return e.feature?u({},e.feature,{geometry:n}):k(n)}function k(e){return e.type==="Feature"||e.type==="FeatureCollection"?e:{type:"Feature",properties:{},geometry:e}}var qe={toGeoJSON:function(e){return H(this,{type:"Point",coordinates:y(this.getLatLng(),e)})}};wn.include(qe),Po.include(qe),To.include(qe),Fn.include({toGeoJSON:function(e){var n=!Ft(this._latlngs),o=f(this._latlngs,n?1:0,!1,e);return H(this,{type:(n?"Multi":"")+"LineString",coordinates:o})}}),Ei.include({toGeoJSON:function(e){var n=!Ft(this._latlngs),o=n&&!Ft(this._latlngs[0]),a=f(this._latlngs,o?2:n?1:0,!0,e);return n||(a=[a]),H(this,{type:(o?"Multi":"")+"Polygon",coordinates:a})}}),Mi.include({toMultiPoint:function(e){var n=[];return this.eachLayer(function(o){n.push(o.toGeoJSON(e).geometry.coordinates)}),H(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(e){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(e);var o=n==="GeometryCollection",a=[];return this.eachLayer(function(c){if(c.toGeoJSON){var m=c.toGeoJSON(e);if(o)a.push(m.geometry);else{var P=k(m);P.type==="FeatureCollection"?a.push.apply(a,P.features):a.push(P)}}}),o?H(this,{geometries:a,type:"GeometryCollection"}):{type:"FeatureCollection",features:a}}});function Xr(e,n){return new Gt(e,n)}var jc=Xr,sa=Kt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,n,o){this._url=e,this._bounds=st(n),F(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(We(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){it(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&un(this._image),this},bringToBack:function(){return this._map&&Dt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=st(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName==="IMG",n=this._image=e?this._url:nt("img");if(We(n,"leaflet-image-layer"),this._zoomAnimated&&We(n,"leaflet-zoom-animated"),this.options.className&&We(n,this.options.className),n.onselectstart=A,n.onmousemove=A,n.onload=h(this.fire,this,"load"),n.onerror=h(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(e){var n=this._map.getZoomScale(e.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;ni(this._image,o,n)},_reset:function(){var e=this._image,n=new xe(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=n.getSize();Lt(e,n.min),e.style.width=o.x+"px",e.style.height=o.y+"px"},_updateOpacity:function(){tn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Wc=function(e,n,o){return new sa(e,n,o)},Qr=sa.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName==="VIDEO",n=this._image=e?this._url:nt("video");if(We(n,"leaflet-image-layer"),this._zoomAnimated&&We(n,"leaflet-zoom-animated"),this.options.className&&We(n,this.options.className),n.onselectstart=A,n.onmousemove=A,n.onloadeddata=h(this.fire,this,"load"),e){for(var o=n.getElementsByTagName("source"),a=[],c=0;c0?a:[n.src];return}Ce(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var m=0;mc?(n.height=c+"px",We(e,m)):Ct(e,m),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var n=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),o=this._getAnchor();Lt(this._container,n.add(o))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,n=parseInt(ti(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+n,a=this._containerWidth,c=new ae(this._containerLeft,-o-this._containerBottom);c._add(Pe(this._container));var m=e.layerPointToContainerPoint(c),P=ee(this.options.autoPanPadding),I=ee(this.options.autoPanPaddingTopLeft||P),D=ee(this.options.autoPanPaddingBottomRight||P),J=e.getSize(),ve=0,Re=0;m.x+a+D.x>J.x&&(ve=m.x+a-J.x+D.x),m.x-ve-I.x<0&&(ve=m.x-I.x),m.y+o+D.y>J.y&&(Re=m.y+o-J.y+D.y),m.y-Re-I.y<0&&(Re=m.y-I.y),(ve||Re)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([ve,Re]))}},_getAnchor:function(){return ee(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),qc=function(e,n){return new aa(e,n)};Xe.mergeOptions({closePopupOnClick:!0}),Xe.include({openPopup:function(e,n,o){return this._initOverlay(aa,e,n,o).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),Kt.include({bindPopup:function(e,n){return this._popup=this._initOverlay(aa,this._popup,e,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof $n||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){ri(e);var n=e.layer||e.target;if(this._popup._source===n&&!(n instanceof Dn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=n,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var ra=jn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){jn.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){jn.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=jn.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip",n=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=nt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+b(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var n,o,a=this._map,c=this._container,m=a.latLngToContainerPoint(a.getCenter()),P=a.layerPointToContainerPoint(e),I=this.options.direction,D=c.offsetWidth,J=c.offsetHeight,ve=ee(this.options.offset),Re=this._getAnchor();I==="top"?(n=D/2,o=J):I==="bottom"?(n=D/2,o=0):I==="center"?(n=D/2,o=J/2):I==="right"?(n=0,o=J/2):I==="left"?(n=D,o=J/2):P.xthis.options.maxZoom||oa?this._retainParent(c,m,P,a):!1)},_retainChildren:function(e,n,o,a){for(var c=2*e;c<2*e+2;c++)for(var m=2*n;m<2*n+2;m++){var P=new ae(c,m);P.z=o+1;var I=this._tileCoordsToKey(P),D=this._tiles[I];if(D&&D.active){D.retain=!0;continue}else D&&D.loaded&&(D.retain=!0);o+1this.options.maxZoom||this.options.minZoom!==void 0&&c1){this._setView(e,o);return}for(var Re=c.min.y;Re<=c.max.y;Re++)for(var Qe=c.min.x;Qe<=c.max.x;Qe++){var qt=new ae(Qe,Re);if(qt.z=this._tileZoom,!!this._isValidTile(qt)){var It=this._tiles[this._tileCoordsToKey(qt)];It?It.current=!0:P.push(qt)}}if(P.sort(function(on,Eo){return on.distanceTo(m)-Eo.distanceTo(m)}),P.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var kn=document.createDocumentFragment();for(Qe=0;Qeo.max.x)||!n.wrapLat&&(e.yo.max.y))return!1}if(!this.options.bounds)return!0;var a=this._tileCoordsToBounds(e);return st(this.options.bounds).overlaps(a)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var n=this._map,o=this.getTileSize(),a=e.scaleBy(o),c=a.add(o),m=n.unproject(a,e.z),P=n.unproject(c,e.z);return[m,P]},_tileCoordsToBounds:function(e){var n=this._tileCoordsToNwSe(e),o=new dt(n[0],n[1]);return this.options.noWrap||(o=this._map.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var n=e.split(":"),o=new ae(+n[0],+n[1]);return o.z=+n[2],o},_removeTile:function(e){var n=this._tiles[e];n&&(it(n.el),delete this._tiles[e],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){We(e,"leaflet-tile");var n=this.getTileSize();e.style.width=n.x+"px",e.style.height=n.y+"px",e.onselectstart=A,e.onmousemove=A,ge.ielt9&&this.options.opacity<1&&tn(e,this.options.opacity)},_addTile:function(e,n){var o=this._getTilePos(e),a=this._tileCoordsToKey(e),c=this.createTile(this._wrapCoords(e),h(this._tileReady,this,e));this._initTile(c),this.createTile.length<2&&ze(h(this._tileReady,this,e,null,c)),Lt(c,o),this._tiles[a]={el:c,coords:e,current:!0},n.appendChild(c),this.fire("tileloadstart",{tile:c,coords:e})},_tileReady:function(e,n,o){n&&this.fire("tileerror",{error:n,tile:o,coords:e});var a=this._tileCoordsToKey(e);o=this._tiles[a],o&&(o.loaded=+new Date,this._map._fadeAnimated?(tn(o.el,0),ie(this._fadeFrame),this._fadeFrame=ze(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),n||(We(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ge.ielt9||!this._map._fadeAnimated?ze(this._pruneTiles,this):setTimeout(h(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var n=new ae(this._wrapX?T(e.x,this._wrapX):e.x,this._wrapY?T(e.y,this._wrapY):e.y);return n.z=e.z,n},_pxBoundsToTileRange:function(e){var n=this.getTileSize();return new xe(e.min.unscaleBy(n).floor(),e.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Xc(e){return new fs(e)}var Mo=fs.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,n){this._url=e,n=F(this,n),n.detectRetina&&ge.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,n){return this._url===e&&n===void 0&&(n=!0),this._url=e,n||this.redraw(),this},createTile:function(e,n){var o=document.createElement("img");return Ue(o,"load",h(this._tileOnLoad,this,n,o)),Ue(o,"error",h(this._tileOnError,this,n,o)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(e),o},getTileUrl:function(e){var n={r:ge.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(n.y=o),n["-y"]=o}return q(this._url,u(n,this.options))},_tileOnLoad:function(e,n){ge.ielt9?setTimeout(h(e,this,null,n),0):e(null,n)},_tileOnError:function(e,n,o){var a=this.options.errorTileUrl;a&&n.getAttribute("src")!==a&&(n.src=a),e(o,n)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,n=this.options.maxZoom,o=this.options.zoomReverse,a=this.options.zoomOffset;return o&&(e=n-e),e+a},_getSubdomain:function(e){var n=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var e,n;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(n=this._tiles[e].el,n.onload=A,n.onerror=A,!n.complete)){n.src=Be;var o=this._tiles[e].coords;it(n),delete this._tiles[e],this.fire("tileabort",{tile:n,coords:o})}},_removeTile:function(e){var n=this._tiles[e];if(n)return n.el.setAttribute("src",Be),fs.prototype._removeTile.call(this,e)},_tileReady:function(e,n,o){if(!(!this._map||o&&o.getAttribute("src")===Be))return fs.prototype._tileReady.call(this,e,n,o)}});function nl(e,n){return new Mo(e,n)}var il=Mo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,n){this._url=e;var o=u({},this.defaultWmsParams);for(var a in n)a in this.options||(o[a]=n[a]);n=F(this,n);var c=n.detectRetina&&ge.retina?2:1,m=this.getTileSize();o.width=m.x*c,o.height=m.y*c,this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,Mo.prototype.onAdd.call(this,e)},getTileUrl:function(e){var n=this._tileCoordsToNwSe(e),o=this._crs,a=Ne(o.project(n[0]),o.project(n[1])),c=a.min,m=a.max,P=(this._wmsVersion>=1.3&&this._crs===In?[c.y,c.x,m.y,m.x]:[c.x,c.y,m.x,m.y]).join(","),I=Mo.prototype.getTileUrl.call(this,e);return I+he(this.wmsParams,I,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+P},setParams:function(e,n){return u(this.wmsParams,e),n||this.redraw(),this}});function Qc(e,n){return new il(e,n)}Mo.WMS=il,nl.wms=Qc;var ui=Kt.extend({options:{padding:.1},initialize:function(e){F(this,e),b(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),We(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,n){var o=this._map.getZoomScale(n,this._zoom),a=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,n),m=a.multiplyBy(-o).add(c).subtract(this._map._getNewPixelOrigin(e,n));ge.any3d?ni(this._container,m,o):Lt(this._container,m)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,n=this._map.getSize(),o=this._map.containerPointToLayerPoint(n.multiplyBy(-e)).round();this._bounds=new xe(o,o.add(n.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ol=ui.extend({options:{tolerance:0},getEvents:function(){var e=ui.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ui.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Ue(e,"mousemove",this._onMouseMove,this),Ue(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ue(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){ie(this._redrawRequest),delete this._ctx,it(this._container),mt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;this._redrawBounds=null;for(var n in this._layers)e=this._layers[n],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ui.prototype._update.call(this);var e=this._bounds,n=this._container,o=e.getSize(),a=ge.retina?2:1;Lt(n,e.min),n.width=a*o.x,n.height=a*o.y,n.style.width=o.x+"px",n.style.height=o.y+"px",ge.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){ui.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[b(e)]=e;var n=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var n=e._order,o=n.next,a=n.prev;o?o.prev=a:this._drawLast=a,a?a.next=o:this._drawFirst=o,delete e._order,delete this._layers[b(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray=="string"){var n=e.options.dashArray.split(/[, ]+/),o=[],a,c;for(c=0;c')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),ed={_initContainer:function(){this._container=nt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ui.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var n=e._container=hs("shape");We(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",e._path=hs("path"),n.appendChild(e._path),this._updateStyle(e),this._layers[b(e)]=e},_addPath:function(e){var n=e._container;this._container.appendChild(n),e.options.interactive&&e.addInteractiveTarget(n)},_removePath:function(e){var n=e._container;it(n),e.removeInteractiveTarget(n),delete this._layers[b(e)]},_updateStyle:function(e){var n=e._stroke,o=e._fill,a=e.options,c=e._container;c.stroked=!!a.stroke,c.filled=!!a.fill,a.stroke?(n||(n=e._stroke=hs("stroke")),c.appendChild(n),n.weight=a.weight+"px",n.color=a.color,n.opacity=a.opacity,a.dashArray?n.dashStyle=Ce(a.dashArray)?a.dashArray.join(" "):a.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=a.lineCap.replace("butt","flat"),n.joinstyle=a.lineJoin):n&&(c.removeChild(n),e._stroke=null),a.fill?(o||(o=e._fill=hs("fill")),c.appendChild(o),o.color=a.fillColor||a.color,o.opacity=a.fillOpacity):o&&(c.removeChild(o),e._fill=null)},_updateCircle:function(e){var n=e._point.round(),o=Math.round(e._radius),a=Math.round(e._radiusY||o);this._setPath(e,e._empty()?"M0 0":"AL "+n.x+","+n.y+" "+o+","+a+" 0,"+65535*360)},_setPath:function(e,n){e._path.v=n},_bringToFront:function(e){un(e._container)},_bringToBack:function(e){Dt(e._container)}},la=ge.vml?hs:K,ps=ui.extend({_initContainer:function(){this._container=la("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=la("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){it(this._container),mt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ui.prototype._update.call(this);var e=this._bounds,n=e.getSize(),o=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,o.setAttribute("width",n.x),o.setAttribute("height",n.y)),Lt(o,e.min),o.setAttribute("viewBox",[e.min.x,e.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(e){var n=e._path=la("path");e.options.className&&We(n,e.options.className),e.options.interactive&&We(n,"leaflet-interactive"),this._updateStyle(e),this._layers[b(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){it(e._path),e.removeInteractiveTarget(e._path),delete this._layers[b(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var n=e._path,o=e.options;n&&(o.stroke?(n.setAttribute("stroke",o.color),n.setAttribute("stroke-opacity",o.opacity),n.setAttribute("stroke-width",o.weight),n.setAttribute("stroke-linecap",o.lineCap),n.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?n.setAttribute("stroke-dasharray",o.dashArray):n.removeAttribute("stroke-dasharray"),o.dashOffset?n.setAttribute("stroke-dashoffset",o.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),o.fill?(n.setAttribute("fill",o.fillColor||o.color),n.setAttribute("fill-opacity",o.fillOpacity),n.setAttribute("fill-rule",o.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(e,n){this._setPath(e,W(e._parts,n))},_updateCircle:function(e){var n=e._point,o=Math.max(Math.round(e._radius),1),a=Math.max(Math.round(e._radiusY),1)||o,c="a"+o+","+a+" 0 1,0 ",m=e._empty()?"M0 0":"M"+(n.x-o)+","+n.y+c+o*2+",0 "+c+-o*2+",0 ";this._setPath(e,m)},_setPath:function(e,n){e._path.setAttribute("d",n)},_bringToFront:function(e){un(e._path)},_bringToBack:function(e){Dt(e._path)}});ge.vml&&ps.include(ed);function al(e){return ge.svg||ge.vml?new ps(e):null}Xe.include({getRenderer:function(e){var n=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(e){if(e==="overlayPane"||e===void 0)return!1;var n=this._paneRenderers[e];return n===void 0&&(n=this._createRenderer({pane:e}),this._paneRenderers[e]=n),n},_createRenderer:function(e){return this.options.preferCanvas&&sl(e)||al(e)}});var rl=Ei.extend({initialize:function(e,n){Ei.prototype.initialize.call(this,this._boundsToLatLngs(e),n)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=st(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function td(e,n){return new rl(e,n)}ps.create=la,ps.pointsToPath=W,Gt.geometryToLayer=Oi,Gt.coordsToLatLng=ds,Gt.coordsToLatLngs=Ao,Gt.latLngToCoords=y,Gt.latLngsToCoords=f,Gt.getFeature=H,Gt.asFeature=k,Xe.mergeOptions({boxZoom:!0});var ll=fn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Ue(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){mt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){it(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),_n(),wi(),this._startPoint=this._map.mouseEventToContainerPoint(e),Ue(document,{contextmenu:ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=nt("div","leaflet-zoom-box",this._container),We(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var n=new xe(this._point,this._startPoint),o=n.getSize();Lt(this._box,n.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(it(this._box),Ct(this._container,"leaflet-crosshair")),Zn(),cn(),mt(document,{contextmenu:ri,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(h(this._resetState,this),0);var n=new dt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Xe.addInitHook("addHandler","boxZoom",ll),Xe.mergeOptions({doubleClickZoom:!0});var ul=fn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var n=this._map,o=n.getZoom(),a=n.options.zoomDelta,c=e.originalEvent.shiftKey?o-a:o+a;n.options.doubleClickZoom==="center"?n.setZoom(c):n.setZoomAround(e.containerPoint,c)}});Xe.addInitHook("addHandler","doubleClickZoom",ul),Xe.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var cl=fn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new hn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}We(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ct(this._map._container,"leaflet-grab"),Ct(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=st(this._map.options.maxBounds);this._offsetLimit=Ne(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var n=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(n),this._prunePositions(n)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,n){return e-(e-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;e.xn.max.x&&(e.x=this._viscousLimit(e.x,n.max.x)),e.y>n.max.y&&(e.y=this._viscousLimit(e.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,n=Math.round(e/2),o=this._initialWorldOffset,a=this._draggable._newPos.x,c=(a-n+o)%e+n-o,m=(a+n+o)%e-n-o,P=Math.abs(c+o)0?m:-m))-n;this._delta=0,this._startTime=null,P&&(e.options.scrollWheelZoom==="center"?e.setZoom(n+P):e.setZoomAround(this._lastMousePos,n+P))}});Xe.addInitHook("addHandler","scrollWheelZoom",fl);var nd=600;Xe.mergeOptions({tapHold:ge.touchNative&&ge.safari&&ge.mobile,tapTolerance:15});var hl=fn.extend({addHooks:function(){Ue(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){mt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var n=e.touches[0];this._startPos=this._newPos=new ae(n.clientX,n.clientY),this._holdTimeout=setTimeout(h(function(){this._cancel(),this._isTapValid()&&(Ue(document,"touchend",Mt),Ue(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),nd),Ue(document,"touchend touchcancel contextmenu",this._cancel,this),Ue(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){mt(document,"touchend",Mt),mt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),mt(document,"touchend touchcancel contextmenu",this._cancel,this),mt(document,"touchmove",this._onMove,this)},_onMove:function(e){var n=e.touches[0];this._newPos=new ae(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,n){var o=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});o._simulated=!0,n.target.dispatchEvent(o)}});Xe.addInitHook("addHandler","tapHold",hl),Xe.mergeOptions({touchZoom:ge.touch,bounceAtZoomLimits:!0});var pl=fn.extend({addHooks:function(){We(this._map._container,"leaflet-touch-zoom"),Ue(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ct(this._map._container,"leaflet-touch-zoom"),mt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var n=this._map;if(!(!e.touches||e.touches.length!==2||n._animatingZoom||this._zooming)){var o=n.mouseEventToContainerPoint(e.touches[0]),a=n.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(o.add(a)._divideBy(2))),this._startDist=o.distanceTo(a),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),Ue(document,"touchmove",this._onTouchMove,this),Ue(document,"touchend touchcancel",this._onTouchEnd,this),Mt(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var n=this._map,o=n.mouseEventToContainerPoint(e.touches[0]),a=n.mouseEventToContainerPoint(e.touches[1]),c=o.distanceTo(a)/this._startDist;if(this._zoom=n.getScaleZoom(c,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoomn.getMaxZoom()&&c>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var m=o._add(a)._divideBy(2)._subtract(this._centerPoint);if(c===1&&m.x===0&&m.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(m),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),ie(this._animRequest);var P=h(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ze(P,this,!0),Mt(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ie(this._animRequest),mt(document,"touchmove",this._onTouchMove,this),mt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Xe.addInitHook("addHandler","touchZoom",pl),Xe.BoxZoom=ll,Xe.DoubleClickZoom=ul,Xe.Drag=cl,Xe.Keyboard=dl,Xe.ScrollWheelZoom=fl,Xe.TapHold=hl,Xe.TouchZoom=pl,s.Bounds=xe,s.Browser=ge,s.CRS=M,s.Canvas=ol,s.Circle=Po,s.CircleMarker=To,s.Class=oe,s.Control=Ke,s.DivIcon=tl,s.DivOverlay=jn,s.DomEvent=ns,s.DomUtil=nn,s.Draggable=hn,s.Evented=ce,s.FeatureGroup=$n,s.GeoJSON=Gt,s.GridLayer=fs,s.Handler=fn,s.Icon=yn,s.ImageOverlay=sa,s.LatLng=Ve,s.LatLngBounds=dt,s.Layer=Kt,s.LayerGroup=Mi,s.LineUtil=Li,s.Map=Xe,s.Marker=wn,s.Mixin=yo,s.Path=Dn,s.Point=ae,s.PolyUtil=qa,s.Polygon=Ei,s.Polyline=Fn,s.Popup=aa,s.PosAnimation=bo,s.Projection=Xa,s.Rectangle=rl,s.Renderer=ui,s.SVG=ps,s.SVGOverlay=el,s.TileLayer=Mo,s.Tooltip=ra,s.Transformation=kt,s.Util=He,s.VideoOverlay=Qr,s.bind=h,s.bounds=Ne,s.canvas=sl,s.circle=Qa,s.circleMarker=oa,s.control=zt,s.divIcon=Jc,s.extend=u,s.featureGroup=ko,s.geoJSON=Xr,s.geoJson=jc,s.gridLayer=Xc,s.icon=So,s.imageOverlay=Wc,s.latLng=Y,s.latLngBounds=st,s.layerGroup=ia,s.map=is,s.marker=cs,s.point=ee,s.polygon=yt,s.polyline=Co,s.popup=qc,s.rectangle=td,s.setOptions=F,s.stamp=b,s.svg=al,s.svgOverlay=Gc,s.tileLayer=nl,s.tooltip=Yc,s.transformation=x,s.version=l,s.videoOverlay=Kc;var id=window.L;s.noConflict=function(){return window.L=id,this},window.L=s}))})(ws,ws.exports)),ws.exports}var sm=om();const Ii=nm(sm),mu={__name:"DeviceMap",props:{position:{type:Object,default:null},trail:{type:Array,default:()=>[]},aircraft:{type:Array,default:()=>[]}},setup(t){const i=t,s=j(null);let l,u,d,h;const v=new Map;function b(Z,F){const he=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0",pe=F?"#8a94a6":he,q=typeof Z=="number"?Z:0;return Ii.divIcon({className:"plane-marker",iconSize:[22,22],iconAnchor:[11,11],html:``})}function C(Z){const he=[`${Z.callsign||Z.icao24||"aircraft"}`];return Z.country&&he.push(Z.country),typeof Z.altitude=="number"&&he.push(`${Math.round(Z.altitude)} m`),typeof Z.velocity=="number"&&he.push(`${Math.round(Z.velocity*3.6)} km/h`),Z.onGround&&he.push("on ground"),he.join(" · ")}function T(){if(!l)return;h||(h=Ii.layerGroup().addTo(l));const Z=new Set;for(const F of i.aircraft){if(typeof F.lat!="number"||typeof F.lng!="number")continue;Z.add(F.icao24);const he=[F.lat,F.lng];let pe=v.get(F.icao24);pe?(pe.setLatLng(he),pe.setIcon(b(F.heading,F.onGround)),pe.setTooltipContent(C(F))):(pe=Ii.marker(he,{icon:b(F.heading,F.onGround)}).bindTooltip(C(F)),pe.addTo(h),v.set(F.icao24,pe))}for(const[F,he]of v)Z.has(F)||(h.removeLayer(he),v.delete(F))}function A(){if(!l)return;const Z=i.position;if(Z&&(Z.lat||Z.lng)){const F=[Z.lat,Z.lng];u?u.setLatLng(F):(u=Ii.marker(F).addTo(l),l.setView(F,17))}if(d&&d.remove(),i.trail.length){const F=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0";d=Ii.polyline(i.trail,{color:F,weight:3}).addTo(l)}}_i(()=>{l=Ii.map(s.value,{zoomControl:!0}).setView([20,0],2),Ii.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap",maxZoom:19}).addTo(l),setTimeout(()=>l.invalidateSize(),60),A(),T(),(!i.position||!i.position.lat&&!i.position.lng)&&i.aircraft.length&&B()});let R=!1;function B(){if(R||!l||!i.aircraft.length)return;const Z=i.aircraft.filter(F=>typeof F.lat=="number"&&typeof F.lng=="number").map(F=>[F.lat,F.lng]);Z.length&&(l.fitBounds(Ii.latLngBounds(Z).pad(.2)),R=!0)}return Ho(()=>{l&&l.remove(),l=null}),$t(()=>i.position,A,{deep:!0}),$t(()=>i.trail,A,{deep:!0}),$t(()=>i.aircraft,()=>{T(),(!i.position||!i.position.lat&&!i.position.lng)&&B()},{deep:!0}),(Z,F)=>(p(),g("div",{ref_key:"el",ref:s,class:"h-[320px] w-full rounded-lg"},null,512))}},am=["width","height","stroke-width"],rm=["d"],X={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},stroke:{type:[Number,String],default:2}},setup(t){const l=({grid:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",radio:"M4.9 19.1a10 10 0 0 1 0-14.2M7.8 16.2a6 6 0 0 1 0-8.4M16.2 7.8a6 6 0 0 1 0 8.4M19.1 4.9a10 10 0 0 1 0 14.2M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2z",route:"M6 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 13V9a4 4 0 0 1 4-4h4",calendar:"M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",book:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z",fileText:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M16 13H8M16 17H8M10 9H8",settings:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z",search:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.3-4.3",plus:"M12 5v14M5 12h14",battery:"M3 8h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zM22 11v2",signal:"M2 20h.01M7 20v-4M12 20v-8M17 20V8M22 20V4",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2",chevronRight:"M9 6l6 6-6 6",play:"M6 3l14 9-14 9V3z",logout:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9",wind:"M12.8 19.6A2 2 0 1 0 14 16H2M17.5 8a2.5 2.5 0 1 1 2 4H2M9.6 4.6A2 2 0 1 1 11 8H2",drone:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM6 6 4 4M18 6l2-2M6 18l-2 2M18 18l2 2",user:"M20 21a8 8 0 1 0-16 0M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",users:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75",shield:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",sliders:"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6",alertTriangle:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01",download:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3",upload:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",trash:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6",check:"M20 6 9 17l-5-5",mail:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM22 6l-10 7L2 6",lock:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM7 11V7a5 5 0 0 1 10 0v4",monitor:"M3 4h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8 21h8M12 17v4",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM3 12h18M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18z",smartphone:"M7 2h10a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM11 18h2",image:"M4 4h16a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM8.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21",eye:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",type:"M4 7V4h16v3M9 20h6M12 4v16",sun:"M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM12 1v2M12 21v2M4.2 4.2l1.4 1.4M18.4 18.4l1.4 1.4M1 12h2M21 12h2M4.2 19.8l1.4-1.4M18.4 5.6l1.4-1.4",moon:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z",x:"M18 6 6 18M6 6l12 12",server:"M20 4H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM20 13H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2zM6 7.5h.01M6 16.5h.01",cloud:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9z"}[t.name]||"").split(" M").map((u,d)=>d?"M"+u:u);return(u,d)=>(p(),g("svg",{width:t.size,height:t.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":t.stroke,"stroke-linecap":"round","stroke-linejoin":"round",style:{flex:"none"},"aria-hidden":"true"},[(p(!0),g(ue,null,Fe(Oe(l),(h,v)=>(p(),g("path",{key:v,d:h},null,8,rm))),128))],8,am))}},lm=["aria-checked","disabled"],sn={__name:"Toggle",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:i}){const s=i;return(l,u)=>(p(),g("button",{type:"button",role:"switch","aria-checked":t.modelValue,disabled:t.disabled,class:Ee(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-40",t.modelValue?"bg-accent":"bg-surface-2 border border-line-strong"]),onClick:u[0]||(u[0]=d=>s("update:modelValue",!t.modelValue))},[r("span",{class:Ee(["inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition",t.modelValue?"translate-x-6":"translate-x-1"])},null,2)],10,lm))}},um={class:"inline-flex rounded-[10px] border border-line bg-surface-2 p-0.5"},cm=["onClick"],Tn={__name:"Segmented",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:i}){const s=i;return(l,u)=>(p(),g("div",um,[(p(!0),g(ue,null,Fe(t.options,d=>(p(),g("button",{key:d.value,type:"button",class:Ee(["inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[13px] font-semibold transition",t.modelValue===d.value?"bg-surface-1 text-ink shadow-xs":"text-ink-secondary hover:text-ink"]),onClick:h=>s("update:modelValue",d.value)},[d.icon?(p(),at(X,{key:0,name:d.icon,size:15},null,8,["name"])):N("",!0),$(" "+S(d.label),1)],10,cm))),128))]))}},dm={class:"text-sm font-semibold text-ink"},fm={key:0,class:"mt-0.5 text-xs text-ink-muted"},Me={__name:"Row",props:{title:{type:String,default:""},desc:{type:String,default:""},keywords:{type:String,default:""},block:{type:Boolean,default:!1}},setup(t){const i=t,s=Ps("settingsSearch",{value:""}),l=ye(()=>{const u=(s.value||"").trim().toLowerCase();return u?`${i.title} ${i.desc} ${i.keywords}`.toLowerCase().includes(u):!0});return(u,d)=>l.value?(p(),g("div",{key:0,class:Ee(["border-b border-line py-4 last:border-0",t.block?"":"flex items-center justify-between gap-6"])},[r("div",{class:Ee(t.block?"mb-3":"min-w-0")},[r("div",dm,S(t.title),1),t.desc?(p(),g("div",fm,S(t.desc),1)):N("",!0)],2),r("div",{class:Ee(t.block?"":"shrink-0")},[kf(u.$slots,"default")],2)],2)):N("",!0)}},Us=[{code:"AL",name:"Albania",continent:"EU",bbox:"39.6,19.3,42.7,21.1"},{code:"AD",name:"Andorra",continent:"EU",bbox:"42.4,1.4,42.7,1.8"},{code:"AT",name:"Austria",continent:"EU",bbox:"46.4,9.5,49.0,17.2"},{code:"BY",name:"Belarus",continent:"EU",bbox:"51.2,23.2,56.2,32.8"},{code:"BE",name:"Belgium",continent:"EU",bbox:"49.5,2.5,51.5,6.4"},{code:"BA",name:"Bosnia and Herzegovina",continent:"EU",bbox:"42.6,15.7,45.3,19.6"},{code:"BG",name:"Bulgaria",continent:"EU",bbox:"41.2,22.4,44.2,28.6"},{code:"HR",name:"Croatia",continent:"EU",bbox:"42.4,13.5,46.6,19.4"},{code:"CY",name:"Cyprus",continent:"EU",bbox:"34.6,32.3,35.7,34.6"},{code:"CZ",name:"Czechia",continent:"EU",bbox:"48.6,12.1,51.1,18.9"},{code:"DK",name:"Denmark",continent:"EU",bbox:"54.6,8.1,57.8,12.7"},{code:"EE",name:"Estonia",continent:"EU",bbox:"57.5,21.8,59.7,28.2"},{code:"FI",name:"Finland",continent:"EU",bbox:"59.8,20.6,70.1,31.6"},{code:"FR",name:"France",continent:"EU",bbox:"41.3,-5.2,51.1,9.6"},{code:"DE",name:"Germany",continent:"EU",bbox:"47.2,5.8,55.1,15.1"},{code:"GR",name:"Greece",continent:"EU",bbox:"34.8,19.4,41.8,28.3"},{code:"HU",name:"Hungary",continent:"EU",bbox:"45.7,16.1,48.6,22.9"},{code:"IS",name:"Iceland",continent:"EU",bbox:"63.3,-24.6,66.6,-13.5"},{code:"IE",name:"Ireland",continent:"EU",bbox:"51.4,-10.6,55.4,-6.0"},{code:"IT",name:"Italy",continent:"EU",bbox:"36.6,6.6,47.1,18.6"},{code:"XK",name:"Kosovo",continent:"EU",bbox:"41.8,20.0,43.3,21.8"},{code:"LV",name:"Latvia",continent:"EU",bbox:"55.7,20.9,58.1,28.2"},{code:"LI",name:"Liechtenstein",continent:"EU",bbox:"47.0,9.4,47.3,9.6"},{code:"LT",name:"Lithuania",continent:"EU",bbox:"53.9,20.9,56.5,26.9"},{code:"LU",name:"Luxembourg",continent:"EU",bbox:"49.4,5.7,50.2,6.5"},{code:"MT",name:"Malta",continent:"EU",bbox:"35.8,14.1,36.1,14.6"},{code:"MD",name:"Moldova",continent:"EU",bbox:"45.4,26.6,48.5,30.2"},{code:"MC",name:"Monaco",continent:"EU",bbox:"43.72,7.40,43.75,7.44"},{code:"ME",name:"Montenegro",continent:"EU",bbox:"41.8,18.4,43.6,20.4"},{code:"NL",name:"Netherlands",continent:"EU",bbox:"50.7,3.3,53.7,7.2"},{code:"MK",name:"North Macedonia",continent:"EU",bbox:"40.8,20.4,42.4,23.0"},{code:"NO",name:"Norway",continent:"EU",bbox:"57.9,4.6,71.2,31.1"},{code:"PL",name:"Poland",continent:"EU",bbox:"49.0,14.1,54.9,24.2"},{code:"PT",name:"Portugal",continent:"EU",bbox:"36.9,-9.5,42.2,-6.2"},{code:"RO",name:"Romania",continent:"EU",bbox:"43.6,20.2,48.3,29.7"},{code:"SM",name:"San Marino",continent:"EU",bbox:"43.89,12.40,43.99,12.52"},{code:"RS",name:"Serbia",continent:"EU",bbox:"42.2,18.8,46.2,23.0"},{code:"SK",name:"Slovakia",continent:"EU",bbox:"47.7,16.8,49.6,22.6"},{code:"SI",name:"Slovenia",continent:"EU",bbox:"45.4,13.4,46.9,16.6"},{code:"ES",name:"Spain",continent:"EU",bbox:"35.9,-9.4,43.8,3.4"},{code:"SE",name:"Sweden",continent:"EU",bbox:"55.3,11.1,69.1,24.2"},{code:"CH",name:"Switzerland",continent:"EU",bbox:"45.8,5.9,47.8,10.5"},{code:"UA",name:"Ukraine",continent:"EU",bbox:"44.4,22.1,52.4,40.2"},{code:"GB",name:"United Kingdom",continent:"EU",bbox:"49.9,-8.7,60.9,1.8"},{code:"VA",name:"Vatican City",continent:"EU",bbox:"41.900,12.445,41.908,12.458"},{code:"RU",name:"Russia",continent:"EU",bbox:"41.2,19.6,81.9,180"},{code:"TR",name:"Turkey",continent:"EU",bbox:"35.8,25.7,42.3,44.8"},{code:"AF",name:"Afghanistan",continent:"AS",bbox:"29.4,60.5,38.5,74.9"},{code:"AM",name:"Armenia",continent:"AS",bbox:"38.8,43.4,41.3,46.6"},{code:"AZ",name:"Azerbaijan",continent:"AS",bbox:"38.4,44.8,41.9,50.4"},{code:"BH",name:"Bahrain",continent:"AS",bbox:"25.8,50.4,26.3,50.7"},{code:"BD",name:"Bangladesh",continent:"AS",bbox:"20.7,88.0,26.6,92.7"},{code:"BT",name:"Bhutan",continent:"AS",bbox:"26.7,88.7,28.3,92.1"},{code:"BN",name:"Brunei",continent:"AS",bbox:"4.0,114.0,5.1,115.4"},{code:"KH",name:"Cambodia",continent:"AS",bbox:"10.4,102.3,14.7,107.6"},{code:"CN",name:"China",continent:"AS",bbox:"18.2,73.5,53.6,134.8"},{code:"GE",name:"Georgia",continent:"AS",bbox:"41.0,40.0,43.6,46.7"},{code:"IN",name:"India",continent:"AS",bbox:"6.7,68.1,35.5,97.4"},{code:"ID",name:"Indonesia",continent:"AS",bbox:"-11.0,95.0,6.1,141.0"},{code:"IR",name:"Iran",continent:"AS",bbox:"25.0,44.0,39.8,63.3"},{code:"IQ",name:"Iraq",continent:"AS",bbox:"29.1,38.8,37.4,48.6"},{code:"IL",name:"Israel",continent:"AS",bbox:"29.5,34.2,33.3,35.9"},{code:"JP",name:"Japan",continent:"AS",bbox:"24.0,122.9,45.5,145.8"},{code:"JO",name:"Jordan",continent:"AS",bbox:"29.2,34.9,33.4,39.3"},{code:"KZ",name:"Kazakhstan",continent:"AS",bbox:"40.6,46.5,55.4,87.3"},{code:"KW",name:"Kuwait",continent:"AS",bbox:"28.5,46.5,30.1,48.4"},{code:"KG",name:"Kyrgyzstan",continent:"AS",bbox:"39.2,69.3,43.3,80.3"},{code:"LA",name:"Laos",continent:"AS",bbox:"13.9,100.1,22.5,107.7"},{code:"LB",name:"Lebanon",continent:"AS",bbox:"33.0,35.1,34.7,36.6"},{code:"MY",name:"Malaysia",continent:"AS",bbox:"0.9,99.6,7.4,119.3"},{code:"MV",name:"Maldives",continent:"AS",bbox:"-0.7,72.7,7.1,73.7"},{code:"MN",name:"Mongolia",continent:"AS",bbox:"41.6,87.7,52.1,119.9"},{code:"MM",name:"Myanmar",continent:"AS",bbox:"9.8,92.2,28.5,101.2"},{code:"NP",name:"Nepal",continent:"AS",bbox:"26.3,80.1,30.4,88.2"},{code:"KP",name:"North Korea",continent:"AS",bbox:"37.7,124.2,43.0,130.7"},{code:"OM",name:"Oman",continent:"AS",bbox:"16.6,52.0,26.4,59.8"},{code:"PK",name:"Pakistan",continent:"AS",bbox:"23.7,60.9,37.1,77.8"},{code:"PH",name:"Philippines",continent:"AS",bbox:"4.6,116.9,21.1,126.6"},{code:"QA",name:"Qatar",continent:"AS",bbox:"24.5,50.7,26.2,51.6"},{code:"SA",name:"Saudi Arabia",continent:"AS",bbox:"16.4,34.6,32.2,55.7"},{code:"SG",name:"Singapore",continent:"AS",bbox:"1.2,103.6,1.5,104.1"},{code:"KR",name:"South Korea",continent:"AS",bbox:"33.1,125.9,38.6,129.6"},{code:"LK",name:"Sri Lanka",continent:"AS",bbox:"5.9,79.7,9.8,81.9"},{code:"SY",name:"Syria",continent:"AS",bbox:"32.3,35.7,37.3,42.4"},{code:"TW",name:"Taiwan",continent:"AS",bbox:"21.9,120.0,25.3,122.0"},{code:"TJ",name:"Tajikistan",continent:"AS",bbox:"36.7,67.4,41.0,75.2"},{code:"TH",name:"Thailand",continent:"AS",bbox:"5.6,97.3,20.5,105.6"},{code:"TL",name:"Timor-Leste",continent:"AS",bbox:"-9.5,124.0,-8.1,127.3"},{code:"TM",name:"Turkmenistan",continent:"AS",bbox:"35.1,52.4,42.8,66.7"},{code:"AE",name:"United Arab Emirates",continent:"AS",bbox:"22.6,51.5,26.1,56.4"},{code:"UZ",name:"Uzbekistan",continent:"AS",bbox:"37.2,55.9,45.6,73.1"},{code:"VN",name:"Vietnam",continent:"AS",bbox:"8.2,102.1,23.4,109.5"},{code:"YE",name:"Yemen",continent:"AS",bbox:"12.1,42.5,19.0,54.5"},{code:"DZ",name:"Algeria",continent:"AF",bbox:"18.9,-8.7,37.1,12.0"},{code:"AO",name:"Angola",continent:"AF",bbox:"-18.0,11.6,-4.4,24.1"},{code:"BJ",name:"Benin",continent:"AF",bbox:"6.2,0.8,12.4,3.9"},{code:"BW",name:"Botswana",continent:"AF",bbox:"-26.9,20.0,-17.8,29.4"},{code:"BF",name:"Burkina Faso",continent:"AF",bbox:"9.4,-5.5,15.1,2.4"},{code:"BI",name:"Burundi",continent:"AF",bbox:"-4.5,29.0,-2.3,30.8"},{code:"CV",name:"Cabo Verde",continent:"AF",bbox:"14.8,-25.4,17.2,-22.7"},{code:"CM",name:"Cameroon",continent:"AF",bbox:"1.7,8.5,13.1,16.2"},{code:"CF",name:"Central African Republic",continent:"AF",bbox:"2.2,14.4,11.0,27.5"},{code:"TD",name:"Chad",continent:"AF",bbox:"7.4,13.5,23.4,24.0"},{code:"KM",name:"Comoros",continent:"AF",bbox:"-12.4,43.2,-11.4,44.5"},{code:"CG",name:"Congo",continent:"AF",bbox:"-5.0,11.1,3.7,18.6"},{code:"CD",name:"DR Congo",continent:"AF",bbox:"-13.5,12.2,5.4,31.3"},{code:"DJ",name:"Djibouti",continent:"AF",bbox:"10.9,41.7,12.7,43.4"},{code:"EG",name:"Egypt",continent:"AF",bbox:"22.0,25.0,31.7,36.9"},{code:"GQ",name:"Equatorial Guinea",continent:"AF",bbox:"0.9,9.3,3.8,11.4"},{code:"ER",name:"Eritrea",continent:"AF",bbox:"12.4,36.4,18.0,43.1"},{code:"SZ",name:"Eswatini",continent:"AF",bbox:"-27.3,30.8,-25.7,32.1"},{code:"ET",name:"Ethiopia",continent:"AF",bbox:"3.4,33.0,14.9,48.0"},{code:"GA",name:"Gabon",continent:"AF",bbox:"-4.0,8.7,2.3,14.5"},{code:"GM",name:"Gambia",continent:"AF",bbox:"13.1,-16.8,13.8,-13.8"},{code:"GH",name:"Ghana",continent:"AF",bbox:"4.7,-3.3,11.2,1.2"},{code:"GN",name:"Guinea",continent:"AF",bbox:"7.2,-15.1,12.7,-7.6"},{code:"GW",name:"Guinea-Bissau",continent:"AF",bbox:"10.9,-16.7,12.7,-13.6"},{code:"CI",name:"Ivory Coast",continent:"AF",bbox:"4.4,-8.6,10.7,-2.5"},{code:"KE",name:"Kenya",continent:"AF",bbox:"-4.7,33.9,5.5,41.9"},{code:"LS",name:"Lesotho",continent:"AF",bbox:"-30.7,27.0,-28.6,29.5"},{code:"LR",name:"Liberia",continent:"AF",bbox:"4.3,-11.5,8.6,-7.4"},{code:"LY",name:"Libya",continent:"AF",bbox:"19.5,9.3,33.2,25.2"},{code:"MG",name:"Madagascar",continent:"AF",bbox:"-25.6,43.2,-11.9,50.5"},{code:"MW",name:"Malawi",continent:"AF",bbox:"-17.1,32.7,-9.4,35.9"},{code:"ML",name:"Mali",continent:"AF",bbox:"10.1,-12.3,25.0,4.3"},{code:"MR",name:"Mauritania",continent:"AF",bbox:"14.7,-17.1,27.3,-4.8"},{code:"MU",name:"Mauritius",continent:"AF",bbox:"-20.5,57.3,-19.9,57.8"},{code:"MA",name:"Morocco",continent:"AF",bbox:"27.7,-13.2,35.9,-1.0"},{code:"MZ",name:"Mozambique",continent:"AF",bbox:"-26.9,30.2,-10.5,40.8"},{code:"NA",name:"Namibia",continent:"AF",bbox:"-28.9,11.7,-16.9,25.3"},{code:"NE",name:"Niger",continent:"AF",bbox:"11.7,0.2,23.5,16.0"},{code:"NG",name:"Nigeria",continent:"AF",bbox:"4.3,2.7,13.9,14.7"},{code:"RW",name:"Rwanda",continent:"AF",bbox:"-2.8,28.9,-1.1,30.9"},{code:"SN",name:"Senegal",continent:"AF",bbox:"12.3,-17.5,16.7,-11.4"},{code:"SL",name:"Sierra Leone",continent:"AF",bbox:"6.9,-13.3,10.0,-10.3"},{code:"SO",name:"Somalia",continent:"AF",bbox:"-1.7,40.9,12.0,51.4"},{code:"ZA",name:"South Africa",continent:"AF",bbox:"-34.8,16.5,-22.1,32.9"},{code:"SS",name:"South Sudan",continent:"AF",bbox:"3.5,24.1,12.2,35.9"},{code:"SD",name:"Sudan",continent:"AF",bbox:"8.7,21.8,22.2,38.6"},{code:"TZ",name:"Tanzania",continent:"AF",bbox:"-11.7,29.3,-1.0,40.4"},{code:"TG",name:"Togo",continent:"AF",bbox:"6.1,-0.1,11.1,1.8"},{code:"TN",name:"Tunisia",continent:"AF",bbox:"30.2,7.5,37.5,11.6"},{code:"UG",name:"Uganda",continent:"AF",bbox:"-1.5,29.6,4.2,35.0"},{code:"ZM",name:"Zambia",continent:"AF",bbox:"-18.1,21.9,-8.2,33.7"},{code:"ZW",name:"Zimbabwe",continent:"AF",bbox:"-22.4,25.2,-15.6,33.1"},{code:"CA",name:"Canada",continent:"NA",bbox:"41.7,-141.0,83.1,-52.6"},{code:"US",name:"United States",continent:"NA",bbox:"24.4,-125.0,49.4,-66.9"},{code:"MX",name:"Mexico",continent:"NA",bbox:"14.5,-118.4,32.7,-86.7"},{code:"GT",name:"Guatemala",continent:"NA",bbox:"13.7,-92.2,17.8,-88.2"},{code:"BZ",name:"Belize",continent:"NA",bbox:"15.9,-89.2,18.5,-87.8"},{code:"SV",name:"El Salvador",continent:"NA",bbox:"13.1,-90.1,14.4,-87.7"},{code:"HN",name:"Honduras",continent:"NA",bbox:"12.9,-89.4,16.5,-83.1"},{code:"NI",name:"Nicaragua",continent:"NA",bbox:"10.7,-87.7,15.0,-83.1"},{code:"CR",name:"Costa Rica",continent:"NA",bbox:"8.0,-85.9,11.2,-82.5"},{code:"PA",name:"Panama",continent:"NA",bbox:"7.2,-83.1,9.6,-77.2"},{code:"CU",name:"Cuba",continent:"NA",bbox:"19.8,-85.0,23.3,-74.1"},{code:"DO",name:"Dominican Republic",continent:"NA",bbox:"17.5,-72.0,19.9,-68.3"},{code:"HT",name:"Haiti",continent:"NA",bbox:"18.0,-74.5,20.1,-71.6"},{code:"JM",name:"Jamaica",continent:"NA",bbox:"17.7,-78.4,18.5,-76.2"},{code:"BS",name:"Bahamas",continent:"NA",bbox:"20.9,-79.0,27.3,-72.7"},{code:"TT",name:"Trinidad and Tobago",continent:"NA",bbox:"10.0,-61.9,11.4,-60.5"},{code:"AR",name:"Argentina",continent:"SA",bbox:"-55.1,-73.6,-21.8,-53.6"},{code:"BO",name:"Bolivia",continent:"SA",bbox:"-22.9,-69.6,-9.7,-57.5"},{code:"BR",name:"Brazil",continent:"SA",bbox:"-33.8,-74.0,5.3,-34.8"},{code:"CL",name:"Chile",continent:"SA",bbox:"-55.9,-75.6,-17.5,-66.4"},{code:"CO",name:"Colombia",continent:"SA",bbox:"-4.2,-79.0,12.5,-66.9"},{code:"EC",name:"Ecuador",continent:"SA",bbox:"-5.0,-81.1,1.4,-75.2"},{code:"GY",name:"Guyana",continent:"SA",bbox:"1.2,-61.4,8.6,-56.5"},{code:"PY",name:"Paraguay",continent:"SA",bbox:"-27.6,-62.6,-19.3,-54.3"},{code:"PE",name:"Peru",continent:"SA",bbox:"-18.4,-81.3,0.0,-68.7"},{code:"SR",name:"Suriname",continent:"SA",bbox:"1.8,-58.1,6.0,-54.0"},{code:"UY",name:"Uruguay",continent:"SA",bbox:"-35.0,-58.4,-30.1,-53.1"},{code:"VE",name:"Venezuela",continent:"SA",bbox:"0.6,-73.4,12.2,-59.8"},{code:"AU",name:"Australia",continent:"OC",bbox:"-43.6,113.3,-10.7,153.6"},{code:"NZ",name:"New Zealand",continent:"OC",bbox:"-47.3,166.4,-34.4,178.6"},{code:"PG",name:"Papua New Guinea",continent:"OC",bbox:"-11.7,140.8,-1.3,155.9"},{code:"FJ",name:"Fiji",continent:"OC",bbox:"-19.2,177.0,-16.0,180.0"}],hm=new Map(Us.map(t=>[t.code,t]));function pm(t){const i=String(t||"").split(",").map(s=>Number(s.trim()));return i.length!==4||i.some(s=>Number.isNaN(s))?null:i}function mm(t){const i=hm.get(t);return i?i.bbox:""}function pr(t,i){if(typeof t!="number"||typeof i!="number"||Number.isNaN(t)||Number.isNaN(i))return null;let s=null,l=1/0;for(const u of Us){const d=pm(u.bbox);if(!d)continue;const[h,v,b,C]=d;if(tb||iC)continue;const T=Math.abs(b-h)*Math.abs(C-v);Tt.continent==="EU").slice().sort((t,i)=>t.name.localeCompare(i.name)).map(t=>({value:t.bbox,label:t.name}))}function vm(){return Us.slice().sort((t,i)=>t.name.localeCompare(i.name)).map(t=>[t.code,t.name])}const _m=[["EU","European countries"],["AS","Asian countries"],["AF","African countries"],["NA","North American countries"],["SA","South American countries"],["OC","Oceanian countries"]];function bm(){return _m.map(([t,i])=>({label:i,options:Us.filter(s=>s.continent===t).slice().sort((s,l)=>s.name.localeCompare(l.name)).map(s=>({value:s.bbox,label:s.name}))}))}const ym=(t,i)=>{const s=t.__vccOpts||t;for(const[l,u]of i)s[l]=u;return s},xm={class:"mx-auto max-w-[1280px] p-7"},wm={class:"mb-5 flex flex-wrap items-end justify-between gap-4"},km={class:"flex h-10 w-full max-w-[280px] items-center gap-2 rounded border border-line-strong bg-surface-1 px-3"},Sm={class:"grid grid-cols-[210px_1fr] gap-6 max-[760px]:grid-cols-1"},Tm={class:"flex flex-col gap-0.5 max-[760px]:flex-row max-[760px]:overflow-x-auto"},Pm=["onClick"],Cm={class:"whitespace-nowrap"},Lm={class:"min-w-0"},Am={key:0,class:"panel p-10 text-center text-sm text-ink-muted"},Mm={key:0,class:"eyebrow mb-2 mt-5 first:mt-0 flex items-center gap-2"},Em={key:1,class:"panel mb-5 p-5"},Om={class:"flex items-center gap-1"},zm={class:"flex items-center gap-2"},Im={class:"font-mono text-sm text-ink"},$m={class:"inline-flex items-center gap-1 rounded-full bg-amber-soft px-2 py-0.5 text-[11px] font-semibold text-amber-fg"},Nm={key:0,class:"mt-2 text-xs text-ink-muted"},Dm={class:"grid max-w-[420px] gap-2"},Fm={class:"flex items-center gap-3"},Rm={key:2,class:"panel mb-5 p-5"},Bm=["value"],Um=["value"],Vm=["value"],Zm={class:"font-mono text-sm text-ink"},Hm={key:3},jm={key:0,class:"mb-5 flex items-center gap-1 overflow-x-auto border-b border-line"},Wm=["onClick"],Km={key:1,class:"panel mb-5 p-5"},Gm={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},qm={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Ym={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Jm={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Xm={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Qm={key:0},eg={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},tg={class:"font-semibold text-ink-secondary"},ng={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},ig={key:7,class:"my-4 rounded-lg border border-line bg-surface-2 p-4","data-keywords":"credits usage quota remaining daily allowance rate limit"},og={class:"flex items-center justify-between gap-3"},sg={class:"flex items-center gap-2 text-sm font-semibold text-ink"},ag={key:0,class:"text-[11px] text-ink-muted"},rg={class:"mt-2 flex items-baseline gap-1.5"},lg={class:"font-mono text-2xl font-semibold text-ink"},ug={class:"text-sm text-ink-muted"},cg={class:"mt-2 h-2 w-full overflow-hidden rounded-full bg-line"},dg={class:"mt-2 text-xs text-ink-muted"},fg={class:"mt-2 text-sm text-ink"},hg={class:"font-semibold"},pg={class:"mt-1 text-xs text-ink-muted"},mg={key:1,class:"mt-2 text-xs text-ink-muted"},gg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},vg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},_g={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},bg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},yg={key:1,class:"flex flex-col items-end gap-2"},xg={key:0,value:"__auto__"},wg=["label"],kg=["value"],Sg={key:0,class:"w-64 text-right text-[11px] leading-snug text-ink-muted"},Tg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Pg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Cg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Lg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Ag={key:8,class:"border-b border-line py-3 text-xs text-amber-fg"},Mg={class:"mt-4 flex flex-wrap items-center gap-3"},Eg=["disabled"],Og={key:1,class:"flex items-center gap-2",title:"Bounding box used for Test connection — smaller areas cost fewer OpenSky credits"},zg=["label"],Ig=["value"],$g=["disabled"],Ng={key:3,class:"text-xs text-danger-fg"},Dg={class:"panel mb-5 p-5"},Fg={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Rg={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Bg={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Ug={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},Vg={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Zg={key:0},Hg={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},jg={class:"font-semibold text-ink-secondary"},Wg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Kg={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Gg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},qg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Yg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Jg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Xg={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Qg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},ev={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},tv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},nv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},iv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},ov={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},sv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},av={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},rv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},lv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},uv={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},cv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},dv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},fv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},hv={class:"mt-4 flex flex-wrap items-center gap-3"},pv=["disabled"],mv=["disabled"],gv={key:2,class:"text-xs text-danger-fg"},vv={key:3,class:"text-[11px] text-ink-muted"},_v={class:"panel mb-5 p-5"},bv={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},yv={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},xv={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},wv={key:1,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},kv={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Sv={key:0},Tv={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Pv={class:"font-semibold text-ink-secondary"},Cv={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Lv={key:0,class:"inline-flex items-center gap-2 break-all font-mono text-sm text-ink"},Av={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Mv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Ev={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Ov={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},zv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Iv={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},$v={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Nv={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Dv={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},Fv={class:"mt-4 flex flex-wrap items-center gap-3"},Rv=["disabled"],Bv=["disabled"],Uv={key:2,class:"text-xs text-danger-fg"},Vv={key:3,class:"text-[11px] text-ink-muted"},Zv={key:3,class:"panel mb-5 p-5"},Hv={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},jv={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Wv={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Kv={key:1,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Gv={key:2,class:"mb-4 flex flex-col gap-2 border-b border-line pb-4 sm:flex-row sm:items-center sm:justify-between"},qv={key:5,class:"border-b border-line py-3 text-xs text-amber-fg"},Yv={key:0},Jv={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Xv={class:"font-semibold text-ink-secondary"},Qv={key:7,class:"border-b border-line py-3 text-xs text-ink-muted"},e_={class:"flex w-full flex-col gap-2"},t_={class:"break-all font-mono text-sm text-ink"},n_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},i_={key:1,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},o_={key:0,class:"text-xs text-ink-muted"},s_={key:1,class:"border-b border-line py-3 text-xs text-ink-muted"},a_={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},r_={key:0,class:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[10px] font-semibold text-ink-secondary"},l_={class:"mt-4 flex flex-wrap items-center gap-3"},u_=["disabled"],c_=["disabled"],d_={key:2,class:"text-xs text-danger-fg"},f_={key:3,class:"text-[11px] text-ink-muted"},h_={key:4,class:"panel mb-5 p-5"},p_={class:"flex items-center gap-4"},m_=["src"],g_={key:1,class:"grid h-16 w-16 place-items-center rounded-full bg-[var(--navy-800)] text-lg font-bold text-white"},v_={class:"flex gap-2"},__={class:"btn-ghost cursor-pointer"},b_={class:"mt-1 text-right text-[11px] text-ink-muted"},y_={key:5,class:"panel mb-5 p-5"},x_={class:"flex items-center gap-3"},w_={key:0,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},k_={class:"flex flex-wrap items-center gap-4"},S_={class:"min-w-0"},T_={class:"mt-1 select-all font-mono text-sm font-bold text-ink"},P_={class:"mt-3 flex items-center gap-2"},C_={key:0,class:"mt-2 text-xs text-danger-fg"},L_={key:1,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},A_={class:"mt-2 grid grid-cols-2 gap-1 font-mono text-xs text-ink-secondary sm:grid-cols-4"},M_={class:"rounded-lg border border-line bg-surface-2 p-3"},E_={class:"flex items-center gap-3"},O_={class:"grid h-9 w-9 place-items-center rounded-full bg-accent-soft text-accent-soft-fg"},z_={class:"min-w-0 flex-1"},I_={class:"text-sm font-semibold text-ink"},$_={class:"font-mono text-[11px] text-ink-muted"},N_={key:6,class:"mb-5"},D_={key:0,class:"panel mb-5 p-5"},F_={class:"grid max-w-[520px] gap-2"},R_={class:"flex flex-wrap gap-2"},B_=["disabled","title"],U_=["value"],V_=["value"],Z_={class:"flex items-center gap-2 py-1 text-sm text-ink-secondary"},H_={class:"flex items-center gap-3"},j_=["disabled"],W_={key:0,class:"text-xs text-danger-fg"},K_={key:1,class:"text-xs text-ink-muted"},G_={key:1,class:"panel mb-5 p-5"},q_={class:"grid max-w-[520px] gap-2"},Y_={class:"flex flex-wrap gap-2"},J_=["value"],X_=["value"],Q_={key:1,class:"text-xs text-ink-muted"},e1={class:"font-semibold text-ink-secondary"},t1={class:"flex items-center gap-3"},n1=["disabled"],i1={key:0,class:"text-xs text-danger-fg"},o1={class:"panel overflow-hidden p-0"},s1={class:"flex items-center justify-between px-5 py-4"},a1=["disabled"],r1={key:0,class:"px-5 pb-5 text-sm text-danger-fg"},l1={key:1,class:"px-5 pb-8 text-sm text-ink-muted"},u1={key:2,class:"overflow-x-auto"},c1={class:"w-full border-collapse text-sm"},d1={class:"text-left"},f1={class:"px-5 py-3"},h1={class:"text-ink"},p1={key:0,class:"ml-1.5 text-[11px] text-ink-muted"},m1={class:"px-5 py-3"},g1={class:"px-5 py-3"},v1={class:"px-5 py-3"},_1={class:"px-5 py-3 text-right"},b1=["onClick"],y1={key:1,class:"inline-flex items-center gap-1.5"},x1=["onClick"],w1=["onClick"],k1={key:7,class:"mb-5"},S1={key:0,class:"panel mb-5 p-5"},T1={class:"grid max-w-[520px] gap-2"},P1={class:"flex items-center gap-3"},C1={key:0,class:"text-xs text-danger-fg"},L1={key:1,class:"panel mb-5 p-5"},A1={class:"grid max-w-[520px] gap-2"},M1={class:"flex items-center gap-3"},E1=["disabled"],O1={key:0,class:"text-xs text-danger-fg"},z1={class:"panel overflow-hidden p-0"},I1={key:0,class:"px-5 pb-8 text-sm text-ink-muted"},$1={key:1,class:"overflow-x-auto"},N1={class:"w-full border-collapse text-sm"},D1={class:"text-left"},F1={class:"px-5 py-3"},R1={class:"inline-flex items-center gap-2 text-ink"},B1={class:"px-5 py-3 text-ink-secondary"},U1={class:"px-5 py-3 text-right"},V1=["onClick"],Z1={key:1,class:"inline-flex items-center gap-1.5"},H1=["onClick"],j1=["disabled","title","onClick"],W1={key:8,class:"mb-5"},K1={class:"panel mb-5 p-5"},G1={class:"btn-ghost cursor-pointer"},q1={key:0,class:"mt-2 text-xs text-ink-muted"},Y1={class:"rounded-lg border p-5",style:{"border-color":"color-mix(in srgb, var(--danger) 35%, transparent)",background:"var(--danger-soft)"}},J1={class:"flex items-center gap-2 text-danger-fg"},X1={class:"mt-4 rounded-lg border border-line bg-surface-1 p-4"},Q1={class:"mt-3 flex items-start gap-2 text-sm text-ink-secondary"},eb={class:"mt-3"},tb={class:"eyebrow mb-1 block"},nb={class:"text-ink"},ib=["placeholder"],ob={class:"mt-4 flex flex-wrap items-center gap-3"},sb=["disabled"],ab=["disabled"],rb={key:2,class:"text-xs text-ink-muted"},lb={key:0,class:"mt-3 rounded border border-line bg-surface-2 px-3 py-2 text-xs text-ink-secondary"},ub={key:0,class:"fixed bottom-5 right-5 z-20 flex items-center gap-2 rounded-lg border border-line bg-surface-1 px-4 py-2.5 text-sm text-ink shadow-md"},gu="pv.opensky.health",vu="pv.filetransfer.health",_u="pv.webdav.health",bu="pv.localstorage.health",cb={__name:"Settings",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(t,{emit:i}){const s=t,l=i,u=ye(()=>s.role==="superadmin"),d=ye(()=>s.role==="admin"||s.role==="superadmin");function h(y){return y==="superadmin"?"Superadmin":y==="admin"?"Admin":"User"}function v(y){return y==="superadmin"||y==="admin"?"shield":"user"}function b(y){return y==="superadmin"||y==="admin"?C.accent:C.neutral}const C={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},T=ye(()=>{const y=[{id:"account",label:"Account",icon:"user",kw:"name username email password verification login credentials role"},{id:"appearance",label:"Appearance",icon:"sliders",kw:"theme light dark system language region font size accessibility date time format motion"},{id:"integrations",label:"Integrations",icon:"radio",kw:"opensky flights adsb aircraft plugin oauth credentials bounding box plan connection ftp sftp ftps file transfer server host upload download local storage folder drive isolated private read only webdav nextcloud owncloud dav url https"},{id:"profile",label:"Profile",icon:"image",kw:"avatar photo display name bio public"},{id:"security",label:"Privacy & Security",icon:"shield",kw:"two factor authentication 2fa sessions devices logout security privacy"}];return d.value&&y.push({id:"team",label:"User management",icon:"users",kw:"users team members add remove create delete role admin permissions rights organization"}),u.value&&y.push({id:"organizations",label:"Organizations",icon:"grid",kw:"organization org tenant company create rename delete members"}),y.push({id:"advanced",label:"Advanced",icon:"alertTriangle",kw:"export import data delete account danger zone",danger:!0}),y}),A=j("account"),R=j("");Yu("settingsSearch",R);const B=ye(()=>R.value.trim().length>0),Z=ye(()=>R.value.trim().toLowerCase());function F(y){return Z.value?(y.label+" "+y.kw).toLowerCase().includes(Z.value)||pe(y.id):!0}const he={account:["full name","username","email address verification verify","password change current new"],appearance:["theme light dark system","language","region","font size accessibility","reduce motion","date format","time format clock"],integrations:["opensky live flights","enable plugin","oauth client id secret","plan credits","bounding box","test connection","file transfer ftp sftp ftps","server host port username password","private key passphrase","base path directory","local storage folder drive","private isolated folder","read only access mode","webdav nextcloud owncloud dav","server url username password tls","base path directory folder"],profile:["profile photo avatar","display name","bio about","show email public"],security:["two factor authentication","active sessions devices","sign out"],team:["add user create account","members list role admin remove delete","organization org assign"],organizations:["add organization create","rename organization","delete organization members"],advanced:["export data download","import data upload","delete account permanent danger"]};function pe(y){return Z.value?(he[y]||[]).some(f=>f.includes(Z.value)):!0}const q=ye(()=>B.value?T.value.filter(F):T.value.filter(y=>y.id===A.value)),Ce=ye({get:()=>oo.value,set:y=>Aa(y)}),fe=[{value:"light",label:"Light",icon:"sun"},{value:"dark",label:"Dark",icon:"moon"},{value:"system",label:"System",icon:"monitor"}],Be=[{value:"sm",label:"Small"},{value:"md",label:"Default"},{value:"lg",label:"Large"}],$e=[{value:"12",label:"12-hour"},{value:"24",label:"24-hour"}],Ie=[["en","English"],["es","Español"],["de","Deutsch"],["fr","Français"],["pl","Polski"],["ja","日本語"]],Ge=vm(),be=ye(()=>(Ge.find(([y])=>y===_e.region)||[null,_e.region])[1]),we=[["MDY","MM/DD/YYYY"],["DMY","DD/MM/YYYY"],["YMD","YYYY/MM/DD"],["ISO","YYYY-MM-DD"]],ze=j(Date.now());let ie=null;const He=ye(()=>fu(ze.value)),oe=St({loaded:!1,available:!1,orgEnabled:!0,allowAnonymous:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),je=j("user"),le=St({clientId:"",clientSecret:"",plan:"",bbox:""}),ce=j(""),ae=j(!1),tt=j(!1),ee=j(null),xe=j(null),Ne=ye(()=>ee.value&&ee.value.credits||null),dt=ye(()=>{const y=Ne.value;return!y||!y.daily||y.remaining==null?null:Math.max(0,Math.min(100,Math.round(y.remaining/y.daily*100)))}),st=ye(()=>{const y=dt.value;return y==null?"bg-accent":y<=10?"bg-danger":y<=30?"bg-amber":"bg-success"});function Ve(y){return typeof y=="number"?y.toLocaleString():y}function Y(){if(!xe.value)return"";const y=Math.max(0,Math.round((Date.now()-xe.value)/1e3));if(y<60)return"just now";const f=Math.round(y/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function M(){try{ee.value&&localStorage.setItem(gu,JSON.stringify({health:ee.value,ts:xe.value}))}catch{}}function z(){try{const y=localStorage.getItem(gu);if(!y)return;const f=JSON.parse(y);f&&f.health&&(ee.value=f.health,xe.value=f.ts||null)}catch{}}const vt=[{value:"",label:"Not set"},{value:"anonymous",label:"Anonymous"},{value:"standard",label:"Standard"},{value:"contributor",label:"Contributor"}],rt=[{value:"user",label:"My settings",icon:"user"},{value:"org",label:"Organization",icon:"users"}],kt=[{label:"World",options:[{value:"-90,-180,90,180",label:"World"}]},{label:"Continents",options:[{value:"34,-25,72,45",label:"Europe"},{value:"-35,-18,38,52",label:"Africa"},{value:"5,25,82,180",label:"Asia"},{value:"7,-168,72,-52",label:"North America"},{value:"-56,-82,13,-34",label:"South America"},{value:"-48,110,-10,180",label:"Oceania"}]},{label:"European countries",options:gm()},{label:"Other countries",options:[{value:"24,-125,49.5,-66.5",label:"United States"},{value:"41.7,-141,83.1,-52.6",label:"Canada"},{value:"-43.6,113.3,-10.7,153.6",label:"Australia"},{value:"24,122.9,45.5,145.8",label:"Japan"}]}],x=kt.flatMap(y=>y.options);function _(y){const f=String(y||"").split(",").map(k=>k.trim());if(f.length!==4)return"";const H=f.map(Number);return H.some(k=>Number.isNaN(k))?"":H.join(",")}function w(y){const f=_(y),H=f&&x.find(k=>_(k.value)===f);return H?H.label:""}const K=j(!1),W=ye({get(){if(!me.value&&_e.autoBbox)return"__auto__";if(K.value)return"__custom__";const y=_(le.bbox),f=y&&x.find(H=>_(H.value)===y);return f?f.value:"__custom__"},set(y){if(y==="__auto__"){me.value||(_e.autoBbox=!0),K.value=!1;return}if(me.value||(_e.autoBbox=!1),y==="__custom__"){K.value=!0;return}K.value=!1,le.bbox=y}}),V=ye(()=>W.value==="__custom__"),re=ye(()=>W.value==="__auto__"),te=ye(()=>oe.isSuperadmin),Q=ye(()=>oe.isSuperadmin?"user":je.value),G=ye(()=>oe.scopes[Q.value]||{editableLayer:"user",fields:{}}),me=ye(()=>Q.value==="org");function se(y){return G.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function Te(y){return te.value||se(y).locked}function Ae(y){const f=se(y).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function Ze(){le.clientId=se("clientId").own||"",le.clientSecret=se("clientSecret").own||"",le.plan=se("plan").own||"",le.bbox=se("bbox").own||"",K.value=!1}function et(y){oe.available=!!y.available,oe.orgEnabled=y.orgEnabled!==!1,oe.allowAnonymous=!!y.allowAnonymous,oe.enabled=!!y.enabled,oe.canEditOrg=!!y.canEditOrg,oe.isSuperadmin=!!y.isSuperadmin,oe.scopes=y.scopes||{},je.value==="org"&&!oe.canEditOrg&&(je.value="user"),Ze(),oe.loaded=!0}$t(je,()=>{ce.value="",Ze()});async function U(){z();const{ok:y,body:f}=await dp();y&&et(f)}async function O(y){const f=me.value;f?oe.orgEnabled=y:oe.enabled=y;const{ok:H,body:k}=await lu(f?{scope:"org",enabled:y}:{scope:"user",enabled:y});H?(et(k),Ke(f?y?"OpenSky enabled for your organization.":"OpenSky disabled for your organization.":y?"OpenSky enabled.":"OpenSky disabled.")):(f?oe.orgEnabled=!y:oe.enabled=!y,Ke(k.error||"Could not update."))}async function ke(){ce.value="",ae.value=!0;const y={};for(const qe of["clientId","clientSecret","plan","bbox"])Te(qe)||(y[qe]=le[qe]);const f={scope:Q.value,config:y};me.value||(f.enabled=oe.enabled);const{ok:H,body:k}=await lu(f);if(ae.value=!1,!H){ce.value=k.error||"Could not save settings.";return}et(k),Ke(me.value?"Organization OpenSky settings saved.":"OpenSky settings saved.")}const Ye=[{label:"World",options:[{value:"-90,-180,90,180",label:"World"}]},{label:"Continents",options:[{value:"34,-25,72,45",label:"Europe"},{value:"-35,-18,38,52",label:"Africa"},{value:"5,25,82,180",label:"Asia"},{value:"7,-168,72,-52",label:"North America"},{value:"-56,-82,13,-34",label:"South America"},{value:"-48,110,-10,180",label:"Oceania"}]},...bm()],gt=Ye.flatMap(y=>y.options),bt=j(""),en=j(!1),de=ye({get(){if(en.value)return"__custom__";if(!bt.value)return"__default__";const y=_(bt.value),f=y&>.find(H=>_(H.value)===y);return f?f.value:"__custom__"},set(y){if(y==="__default__"){en.value=!1,bt.value="";return}if(y==="__custom__"){en.value=!0;return}en.value=!1,bt.value=y}}),wt=ye(()=>de.value==="__custom__");async function an(){tt.value=!0,ee.value=null;const{ok:y,body:f}=await fp((bt.value||"").trim()||void 0);tt.value=!1,ee.value=y&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},xe.value=Date.now(),M()}function so(y){return y==="ok"?C.success:y==="degraded"?C.warning:C.danger}const lt=St({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),ei=j("user"),ao=["protocol","host","port","username","password","privateKey","keyPassphrase","hostKeyFingerprint","insecureSkipVerify","basePath"],ft=St(Object.fromEntries(ao.map(y=>[y,""]))),Ui=j(""),ro=j(!1),lo=j(!1),Mn=j(null),yi=j(null),Vs=[{value:"sftp",label:"SFTP"},{value:"ftps",label:"FTPS"},{value:"ftp",label:"FTP"}],jo=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Wo=ye(()=>lt.isSuperadmin),Ko=ye(()=>lt.isSuperadmin?"user":ei.value),Va=ye(()=>lt.scopes[Ko.value]||{editableLayer:"user",fields:{}}),gn=ye(()=>Ko.value==="org"),jt=ye(()=>(Wt("protocol")?ge("protocol").effective:ft.protocol)||"sftp");function ge(y){return Va.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function Wt(y){return Wo.value||ge(y).locked}function Pt(y){const f=ge(y).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function Zs(y){return(Vs.find(f=>f.value===y)||{}).label||y||"—"}function Go(){for(const y of ao)ft[y]=ge(y).own||"";ft.protocol||(ft.protocol="sftp"),ft.insecureSkipVerify||(ft.insecureSkipVerify="false")}function Vi(y){lt.available=!!y.available,lt.orgEnabled=y.orgEnabled!==!1,lt.enabled=!!y.enabled,lt.canEditOrg=!!y.canEditOrg,lt.isSuperadmin=!!y.isSuperadmin,lt.scopes=y.scopes||{},ei.value==="org"&&!lt.canEditOrg&&(ei.value="user"),Go(),lt.loaded=!0}$t(ei,()=>{Ui.value="",Go()});function Hs(){if(!yi.value)return"";const y=Math.max(0,Math.round((Date.now()-yi.value)/1e3));if(y<60)return"just now";const f=Math.round(y/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function xi(){try{Mn.value&&localStorage.setItem(vu,JSON.stringify({health:Mn.value,ts:yi.value}))}catch{}}function js(){try{const y=localStorage.getItem(vu);if(!y)return;const f=JSON.parse(y);f&&f.health&&(Mn.value=f.health,yi.value=f.ts||null)}catch{}}async function Za(){js();const{ok:y,body:f}=await pp();y&&Vi(f)}async function Ws(y){const f=gn.value;f?lt.orgEnabled=y:lt.enabled=y;const{ok:H,body:k}=await uu(f?{scope:"org",enabled:y}:{scope:"user",enabled:y});H?(Vi(k),Ke(f?y?"File transfer enabled for your organization.":"File transfer disabled for your organization.":y?"File transfer enabled.":"File transfer disabled.")):(f?lt.orgEnabled=!y:lt.enabled=!y,Ke(k.error||"Could not update."))}async function Ha(){Ui.value="",ro.value=!0;const y={};for(const qe of ao)Wt(qe)||(y[qe]=ft[qe]);const f={scope:Ko.value,config:y};gn.value||(f.enabled=lt.enabled);const{ok:H,body:k}=await uu(f);if(ro.value=!1,!H){Ui.value=k.error||"Could not save settings.";return}Vi(k),Ke(gn.value?"Organization file-transfer settings saved.":"File-transfer settings saved.")}async function ja(){lo.value=!0,Mn.value=null;const{ok:y,body:f}=await mp();lo.value=!1,Mn.value=y&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},yi.value=Date.now(),xi()}function Ks(y){return y==="ok"?C.success:y==="degraded"?C.warning:C.danger}const ut=St({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),En=j("user"),qo=["baseURL","username","password","insecureSkipVerify","basePath"],Bt=St(Object.fromEntries(qo.map(y=>[y,""]))),Zi=j(""),uo=j(!1),co=j(!1),rn=j(null),vn=j(null),Gs=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],fo=ye(()=>ut.isSuperadmin),ti=ye(()=>ut.isSuperadmin?"user":En.value),nt=ye(()=>ut.scopes[ti.value]||{editableLayer:"user",fields:{}}),it=ye(()=>ti.value==="org");function ln(y){return nt.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function un(y){return fo.value||ln(y).locked}function Dt(y){const f=ln(y).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function ho(){for(const y of qo)Bt[y]=ln(y).own||"";Bt.insecureSkipVerify||(Bt.insecureSkipVerify="false")}function We(y){ut.available=!!y.available,ut.orgEnabled=y.orgEnabled!==!1,ut.enabled=!!y.enabled,ut.canEditOrg=!!y.canEditOrg,ut.isSuperadmin=!!y.isSuperadmin,ut.scopes=y.scopes||{},En.value==="org"&&!ut.canEditOrg&&(En.value="user"),ho(),ut.loaded=!0}$t(En,()=>{Zi.value="",ho()});function Ct(){if(!vn.value)return"";const y=Math.max(0,Math.round((Date.now()-vn.value)/1e3));if(y<60)return"just now";const f=Math.round(y/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function Yo(){try{rn.value&&localStorage.setItem(_u,JSON.stringify({health:rn.value,ts:vn.value}))}catch{}}function po(){try{const y=localStorage.getItem(_u);if(!y)return;const f=JSON.parse(y);f&&f.health&&(rn.value=f.health,vn.value=f.ts||null)}catch{}}async function tn(){po();const{ok:y,body:f}=await _p();y&&We(f)}async function qs(y){const f=it.value;f?ut.orgEnabled=y:ut.enabled=y;const{ok:H,body:k}=await cu(f?{scope:"org",enabled:y}:{scope:"user",enabled:y});H?(We(k),Ke(f?y?"WebDAV enabled for your organization.":"WebDAV disabled for your organization.":y?"WebDAV enabled.":"WebDAV disabled.")):(f?ut.orgEnabled=!y:ut.enabled=!y,Ke(k.error||"Could not update."))}async function mo(){Zi.value="",uo.value=!0;const y={};for(const qe of qo)un(qe)||(y[qe]=Bt[qe]);const f={scope:ti.value,config:y};it.value||(f.enabled=ut.enabled);const{ok:H,body:k}=await cu(f);if(uo.value=!1,!H){Zi.value=k.error||"Could not save settings.";return}We(k),Ke(it.value?"Organization WebDAV settings saved.":"WebDAV settings saved.")}async function ni(){co.value=!0,rn.value=null;const{ok:y,body:f}=await bp();co.value=!1,rn.value=y&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."},vn.value=Date.now(),Yo()}function Lt(y){return y==="ok"?C.success:y==="degraded"?C.warning:C.danger}const Pe=St({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,isOrgUser:!1,mounts:[],privateFolder:!1,privateEnabled:!1,allowPrivate:!0,rootConfigured:!1,scopes:{}}),_n=j("user"),Zn=j(""),ii=j(""),Hn=j(!1),wi=j(!1),cn=j(null),On=j(null),oi=j({}),go=[{value:"",label:"Inherit"},{value:"false",label:"Read-write"},{value:"true",label:"Read-only"}],ki=ye(()=>Pe.isSuperadmin),vo=ye(()=>Pe.isSuperadmin?"user":_n.value),Jo=ye(()=>Pe.scopes[vo.value]||{editableLayer:"user",fields:{}}),nn=ye(()=>vo.value==="org");function Ue(y){return Jo.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function dn(y){return ki.value||Ue(y).locked}function mt(y){const f=Ue(y).source;return f==="global"?"Set by administrator":f==="org"?"Set by your organization":""}function Ys(y){return(go.find(f=>f.value===y)||{}).label||"Inherit"}function _o(){Zn.value=Ue("readOnly").own||""}function si(y){Pe.available=!!y.available,Pe.orgEnabled=y.orgEnabled!==!1,Pe.enabled=!!y.enabled,Pe.canEditOrg=!!y.canEditOrg,Pe.isSuperadmin=!!y.isSuperadmin,Pe.isOrgUser=!!y.isOrgUser,Pe.mounts=Array.isArray(y.mounts)?y.mounts:[],Pe.privateFolder=!!y.privateFolder,Pe.privateEnabled=!!y.privateEnabled,Pe.allowPrivate=y.allowPrivate!==!1,Pe.rootConfigured=!!y.rootConfigured,Pe.scopes=y.scopes||{},_n.value==="org"&&!Pe.canEditOrg&&(_n.value="user"),_o(),Pe.loaded=!0}$t(_n,()=>{ii.value="",_o()});function Xo(){if(!On.value)return"";const y=Math.max(0,Math.round((Date.now()-On.value)/1e3));if(y<60)return"just now";const f=Math.round(y/60);if(f<60)return`${f} min ago`;const H=Math.round(f/60);return H<24?`${H} h ago`:`${Math.round(H/24)} d ago`}function ai(){try{cn.value&&localStorage.setItem(bu,JSON.stringify({health:cn.value,ts:On.value}))}catch{}}function Qo(){try{const y=localStorage.getItem(bu);if(!y)return;const f=JSON.parse(y);f&&f.health&&(cn.value=f.health,On.value=f.ts||null)}catch{}}async function Hi(){Qo();const{ok:y,body:f}=await gp();y&&si(f)}async function Mt(y){const f=nn.value;f?Pe.orgEnabled=y:Pe.enabled=y;const{ok:H,body:k}=await ma(f?{scope:"org",enabled:y}:{scope:"user",enabled:y});H?(si(k),Ke(f?y?"Local storage enabled for your organization.":"Local storage disabled for your organization.":y?"Local storage enabled.":"Local storage disabled.")):(f?Pe.orgEnabled=!y:Pe.enabled=!y,Ke(k.error||"Could not update."))}async function ri(y){Pe.privateFolder=y;const{ok:f,body:H}=await ma({scope:"user",privateFolder:y});f?(si(H),Ke(y?"Private folder enabled.":"Private folder disabled.")):(Pe.privateFolder=!y,Ke(H.error||"Could not update."))}async function Js(y){Pe.allowPrivate=y;const{ok:f,body:H}=await ma({scope:"org",allowPrivate:y});f?(si(H),Ke(y?"Members may now create private folders.":"Private folders disabled for your organization.")):(Pe.allowPrivate=!y,Ke(H.error||"Could not update."))}async function Xs(){ii.value="",Hn.value=!0;const y={};dn("readOnly")||(y.readOnly=Zn.value);const f={scope:vo.value,config:y};nn.value||(f.enabled=Pe.enabled);const{ok:H,body:k}=await ma(f);if(Hn.value=!1,!H){ii.value=k.error||"Could not save settings.";return}si(k),Ke(nn.value?"Organization local-storage settings saved.":"Local-storage settings saved.")}async function Wa(){wi.value=!0,cn.value=null,oi.value={};const{ok:y,body:f}=await vp();wi.value=!1,cn.value=y&&f.health?f.health:{status:"down",detail:f.error||"Probe failed."};const H={};if(Array.isArray(f.mounts))for(const k of f.mounts)H[k.id]={status:k.status,detail:k.detail};oi.value=H,On.value=Date.now(),ai()}function es(y){return y==="ok"?C.success:y==="degraded"?C.warning:C.danger}const ts=[{id:"apis-external",label:"APIs — External",icon:"globe"},{id:"drives-external",label:"Drives — External",icon:"server"},{id:"drives-local",label:"Drives — Local",icon:"monitor"}],ns=j("apis-external");function bo(y){return B.value||ns.value===y}const Xe=j("");let is=null;function Ke(y){Xe.value=y,clearTimeout(is),is=setTimeout(()=>Xe.value="",2200)}const zt=St({current:"",next:"",confirm:""}),li=j(""),Qs=j(!1);function os(){if(Qs.value=!1,!zt.current)return li.value="Enter your current password.";if(zt.next.length<8)return li.value="New password must be at least 8 characters.";if(zt.next!==zt.confirm)return li.value="New passwords do not match.";li.value="Validated. Connecting to the account service is pending — no password endpoint yet.",zt.current=zt.next=zt.confirm=""}const ss=j("");function ea(){ss.value="Verification link would be sent once the account service is wired up."}function Ka(y){const f=y.target.files&&y.target.files[0];if(!f)return;if(f.size>1.5*1024*1024){Ke("Image too large (max ~1.5 MB).");return}const H=new FileReader;H.onload=()=>{_e.avatar=String(H.result),Ke("Photo updated.")},H.readAsDataURL(f)}function Ga(){_e.avatar="",Ke("Photo removed.")}const as=ye(()=>{var H,k,qe;const f=(_e.displayName||_e.name||s.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((H=f[0])==null?void 0:H[0])||"P")+(((k=f[1])==null?void 0:k[0])||((qe=f[0])==null?void 0:qe[1])||"V")).toUpperCase()}),ji=j(!1),fn=j(""),yo=j(""),Si=j(""),hn=j([]);function xo(y){const f="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let H="";for(let k=0;kxo(4).toLowerCase()+"-"+xo(4).toLowerCase()),Si.value=""}function qa(){_e.twoFactor=!1,hn.value=[],ji.value=!1}const pn=navigator.userAgent;function na(){return/Edg\//.test(pn)?"Edge":/OPR\//.test(pn)?"Opera":/Chrome\//.test(pn)?"Chrome":/Firefox\//.test(pn)?"Firefox":/Safari\//.test(pn)?"Safari":"Browser"}function Ya(){return/Windows/.test(pn)?"Windows":/Mac OS X/.test(pn)?"macOS":/Android/.test(pn)?"Android":/iPhone|iPad/.test(pn)?"iOS":/Linux/.test(pn)?"Linux":"Unknown OS"}const Ja=Date.now(),Ti=j([]),Wi=j(!1),Ki=j(""),Et=St({email:"",password:"",role:"user",organization:""}),zn=j(""),bn=j(!1),Gi=j(""),Pi=ye(()=>{const y=[{value:"user",label:"User"},{value:"admin",label:"Admin"}];return u.value&&y.push({value:"superadmin",label:"Superadmin"}),y}),Ft=j([]);async function Ci(){if(!d.value)return;const y=await sp();y.ok&&(Ft.value=y.organizations.slice().sort((f,H)=>f.name.localeCompare(H.name)))}const ls=ye(()=>{const y=Ft.value.map(f=>({value:f.id,label:f.name}));return u.value&&y.unshift({value:"",label:"No organization"}),y});async function Li(){if(!d.value)return;Wi.value=!0,Ki.value="";const y=await tp();if(Wi.value=!1,!y.ok){Ki.value=y.status===403?"Manager role required.":"Could not load users.";return}Ti.value=y.users.slice().sort((f,H)=>f.email.localeCompare(H.email))}function Ai(y){try{const f=y.data||{},H=Object.keys(f)[0];return H&&f[H]&&f[H].message||y.message||y.error||"Invalid input."}catch{return y.error||"Could not create user."}}async function us(){zn.value="";const y=Et.email.trim().toLowerCase();if(!y.includes("@"))return zn.value="Enter a valid email.";if(Et.password.length<8)return zn.value="Password must be at least 8 characters.";bn.value=!0;const f=u.value?Et.organization:s.organization,{ok:H,body:k}=await np(y,Et.password,Et.role,f);if(bn.value=!1,!H)return zn.value=Ai(k);Et.email="",Et.password="",Et.role="user",Et.organization="",Ke("User created."),Li()}async function Xa(y){const{ok:f,body:H}=await op(y.id);if(Gi.value="",!f)return Ke(H.error||"Could not remove user.");Ke("User removed."),Li()}const ot=St({id:"",email:"",role:"user",verified:!1,password:"",organization:""}),In=j(""),wo=j(!1),Kt=ye(()=>!!ot.id&&ot.email===s.email);function Mi(y){Gi.value="",ot.id=y.id,ot.email=y.email,ot.role=y.role||"user",ot.verified=!!y.verified,ot.password="",ot.organization=y.organization||"",In.value=""}function ia(){ot.id="",In.value=""}async function $n(){In.value="";const y=ot.email.trim().toLowerCase();if(!y.includes("@"))return In.value="Enter a valid email.";if(ot.password&&ot.password.length<8)return In.value="New password must be at least 8 characters (or leave blank).";const f={email:y,role:ot.role,verified:ot.verified};u.value&&(f.organization=ot.organization),ot.password&&(f.password=ot.password),wo.value=!0;const{ok:H,body:k}=await ip(ot.id,f);if(wo.value=!1,!H)return In.value=Ai(k);Ke("User updated."),ia(),Li()}const ko=St({name:""}),yn=j(""),So=j(!1),Nn=j(""),xn=St({id:"",name:""}),wn=j(""),cs=ye(()=>{const y={};for(const f of Ti.value)f.organization&&(y[f.organization]=(y[f.organization]||0)+1);return y});async function Dn(){yn.value="";const y=ko.name.trim();if(!y)return yn.value="Enter an organization name.";So.value=!0;const{ok:f,body:H}=await ap(y);if(So.value=!1,!f)return yn.value=Ai(H);ko.name="",Ke("Organization created."),Ci()}function To(y){Nn.value="",xn.id=y.id,xn.name=y.name,wn.value=""}function oa(){xn.id="",wn.value=""}async function Po(){wn.value="";const y=xn.name.trim();if(!y)return wn.value="Enter an organization name.";const{ok:f,body:H}=await rp(xn.id,y);if(!f)return wn.value=Ai(H);Ke("Organization renamed."),oa(),Ci(),Li()}async function Qa(y){const{ok:f,body:H}=await lp(y.id);if(Nn.value="",!f)return Ke(H.error||"Could not delete organization.");Ke("Organization deleted."),Ci()}function Fn(){const y={_app:"PilotVault",_kind:"settings-export",exportedAt:new Date().toISOString(),email:s.email,prefs:{..._e},themeMode:oo.value},f=new Blob([JSON.stringify(y,null,2)],{type:"application/json"}),H=URL.createObjectURL(f),k=document.createElement("a");k.href=H,k.download=`pilotvault-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(k),k.click(),k.remove(),URL.revokeObjectURL(H),Ke("Settings exported.")}const Co=j("");function Ei(y){const f=y.target.files&&y.target.files[0];if(!f)return;const H=new FileReader;H.onload=()=>{try{const k=JSON.parse(String(H.result)),qe=k.prefs||k;if(!Vc(qe))throw new Error("bad shape");k.themeMode&&Aa(k.themeMode),Gr(_e.fontSize),qr(_e.reduceMotion),Co.value="Settings imported and applied."}catch{Co.value="That file is not a valid PilotVault settings export."}},H.readAsText(f),y.target.value=""}const yt=St({understand:!1,typed:"",cooldown:0,armed:!1,msg:""});let Gt=null;const Oi=ye(()=>s.email||"DELETE MY ACCOUNT"),Lo=ye(()=>yt.understand&&yt.typed===Oi.value);function ds(){Lo.value&&(yt.armed=!0,yt.cooldown=5,clearInterval(Gt),Gt=setInterval(()=>{yt.cooldown--,yt.cooldown<=0&&clearInterval(Gt)},1e3))}$t(Lo,y=>{!y&&yt.armed&&(yt.armed=!1,yt.cooldown=0,clearInterval(Gt))});function Ao(){if(!(!yt.armed||yt.cooldown>0)){try{localStorage.removeItem("pv_prefs")}catch{}yt.msg="Account deletion requires the account service. Local data was cleared and you were signed out.",setTimeout(()=>l("logout"),900)}}return _i(()=>{ie=setInterval(()=>ze.value=Date.now(),1e3),Ci(),Li(),U(),Za(),tn(),Hi()}),Ho(()=>{clearInterval(ie),clearInterval(Gt),clearTimeout(is)}),(y,f)=>(p(),g("div",xm,[r("div",wm,[f[65]||(f[65]=r("div",null,[r("div",{class:"eyebrow"},"Preferences"),r("h2",{class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},"Settings")],-1)),r("div",km,[E(X,{name:"search",size:16,class:"text-ink-muted"}),ne(r("input",{"onUpdate:modelValue":f[0]||(f[0]=H=>R.value=H),placeholder:"Search settings…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Se,R.value]]),R.value?(p(),g("button",{key:0,class:"text-ink-muted hover:text-ink","aria-label":"Clear search",onClick:f[1]||(f[1]=H=>R.value="")},[E(X,{name:"x",size:15})])):N("",!0)])]),r("div",Sm,[ne(r("nav",Tm,[(p(!0),g(ue,null,Fe(T.value,H=>(p(),g("button",{key:H.id,class:Ee(["flex items-center gap-2.5 rounded px-3 py-2.5 text-left text-sm transition",[A.value===H.id?H.danger?"bg-danger-soft font-semibold text-danger-fg":"bg-accent-soft font-semibold text-accent-soft-fg":H.danger?"font-medium text-danger-fg hover:bg-danger-soft":"font-medium text-ink-secondary hover:bg-surface-2"]]),onClick:k=>A.value=H.id},[E(X,{name:H.icon,size:17},null,8,["name"]),r("span",Cm,S(H.label),1)],10,Pm))),128))],512),[[xh,!B.value]]),r("div",Lm,[B.value&&!q.value.length?(p(),g("div",Am," No settings match “"+S(R.value)+"”. ",1)):N("",!0),(p(!0),g(ue,null,Fe(q.value,H=>(p(),g(ue,{key:H.id},[B.value?(p(),g("div",Mm,[E(X,{name:H.icon,size:14},null,8,["name"]),$(" "+S(H.label),1)])):N("",!0),H.id==="account"?(p(),g("div",Em,[E(Me,{title:"Full name",desc:"Shown to your team on flights and audit logs.",keywords:"full name account"},{default:Le(()=>[ne(r("input",{"onUpdate:modelValue":f[2]||(f[2]=k=>Oe(_e).name=k),class:"field w-56",placeholder:"Jane Operator",onBlur:f[3]||(f[3]=k=>Ke("Saved."))},null,544),[[Se,Oe(_e).name]])]),_:1}),E(Me,{title:"Username",desc:"Your unique handle within PilotVault.",keywords:"username handle"},{default:Le(()=>[r("div",Om,[f[66]||(f[66]=r("span",{class:"text-sm text-ink-muted"},"@",-1)),ne(r("input",{"onUpdate:modelValue":f[4]||(f[4]=k=>Oe(_e).username=k),class:"field w-48",placeholder:"jane",onBlur:f[5]||(f[5]=k=>Ke("Saved."))},null,544),[[Se,Oe(_e).username]])])]),_:1}),E(Me,{title:"Email address",desc:"Used for sign-in and notifications.",keywords:"email verification verify"},{default:Le(()=>[r("div",zm,[r("span",Im,S(t.email||"—"),1),r("span",$m,[E(X,{name:"mail",size:12}),f[67]||(f[67]=$(" Unverified ",-1))])])]),_:1}),E(Me,{title:"Role",desc:"Your access level in PilotVault.",keywords:"role admin user superadmin access rights permissions"},{default:Le(()=>[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",b(t.role)])},[E(X,{name:v(t.role),size:12},null,8,["name"]),$(S(h(t.role)),1)],2)]),_:1}),E(Me,{title:"Organization",desc:"The organization your account belongs to.",keywords:"organization org tenant company"},{default:Le(()=>[r("span",{class:Ee(["text-sm",t.organizationName?"text-ink":"text-ink-muted"])},S(t.organizationName||(u.value?"All organizations":"None")),3)]),_:1}),E(Me,{block:"",title:"Verify email",desc:"Confirm ownership to enable password resets and alerts.",keywords:"verify email resend"},{default:Le(()=>[r("button",{class:"btn-ghost",onClick:ea},"Send verification link"),ss.value?(p(),g("p",Nm,S(ss.value),1)):N("",!0)]),_:1}),E(Me,{block:"",title:"Change password",desc:"Use at least 8 characters.",keywords:"password change current new"},{default:Le(()=>[r("div",Dm,[ne(r("input",{"onUpdate:modelValue":f[6]||(f[6]=k=>zt.current=k),type:"password",class:"field",placeholder:"Current password"},null,512),[[Se,zt.current]]),ne(r("input",{"onUpdate:modelValue":f[7]||(f[7]=k=>zt.next=k),type:"password",class:"field",placeholder:"New password"},null,512),[[Se,zt.next]]),ne(r("input",{"onUpdate:modelValue":f[8]||(f[8]=k=>zt.confirm=k),type:"password",class:"field",placeholder:"Confirm new password"},null,512),[[Se,zt.confirm]]),r("div",Fm,[r("button",{class:"btn-accent",onClick:os},"Update password"),li.value?(p(),g("span",{key:0,class:Ee(["text-xs",Qs.value?"text-success-fg":"text-ink-muted"])},S(li.value),3)):N("",!0)])])]),_:1})])):H.id==="appearance"?(p(),g("div",Rm,[E(Me,{title:"Theme",desc:"Light, dark, or follow your system.",keywords:"theme light dark system appearance"},{default:Le(()=>[E(Tn,{modelValue:Ce.value,"onUpdate:modelValue":f[9]||(f[9]=k=>Ce.value=k),options:fe},null,8,["modelValue"])]),_:1}),E(Me,{title:"Font size",desc:"Scales the entire interface for readability.",keywords:"font size accessibility text"},{default:Le(()=>[E(Tn,{modelValue:Oe(_e).fontSize,"onUpdate:modelValue":f[10]||(f[10]=k=>Oe(_e).fontSize=k),options:Be},null,8,["modelValue"])]),_:1}),E(Me,{title:"Reduce motion",desc:"Minimise animations and transitions.",keywords:"reduce motion accessibility animation"},{default:Le(()=>[E(sn,{modelValue:Oe(_e).reduceMotion,"onUpdate:modelValue":f[11]||(f[11]=k=>Oe(_e).reduceMotion=k)},null,8,["modelValue"])]),_:1}),E(Me,{title:"Language",desc:"Interface language.",keywords:"language locale"},{default:Le(()=>[ne(r("select",{"onUpdate:modelValue":f[12]||(f[12]=k=>Oe(_e).language=k),class:"field w-48"},[(p(),g(ue,null,Fe(Ie,([k,qe])=>r("option",{key:k,value:k},S(qe),9,Bm)),64))],512),[[At,Oe(_e).language]])]),_:1}),E(Me,{title:"Region",desc:"Affects number, unit and date defaults.",keywords:"region country locale"},{default:Le(()=>[ne(r("select",{"onUpdate:modelValue":f[13]||(f[13]=k=>Oe(_e).region=k),class:"field w-48"},[(p(!0),g(ue,null,Fe(Oe(Ge),([k,qe])=>(p(),g("option",{key:k,value:k},S(qe),9,Um))),128))],512),[[At,Oe(_e).region]])]),_:1}),E(Me,{title:"Date format",desc:"How calendar dates are displayed.",keywords:"date format"},{default:Le(()=>[ne(r("select",{"onUpdate:modelValue":f[14]||(f[14]=k=>Oe(_e).dateFormat=k),class:"field w-48"},[(p(),g(ue,null,Fe(we,([k,qe])=>r("option",{key:k,value:k},S(qe),9,Vm)),64))],512),[[At,Oe(_e).dateFormat]])]),_:1}),E(Me,{title:"Time format",desc:"12- or 24-hour clock.",keywords:"time format clock 12 24 hour"},{default:Le(()=>[E(Tn,{modelValue:Oe(_e).timeFormat,"onUpdate:modelValue":f[15]||(f[15]=k=>Oe(_e).timeFormat=k),options:$e},null,8,["modelValue"])]),_:1}),E(Me,{title:"Preview",desc:"How timestamps appear across the app.",keywords:"preview date time"},{default:Le(()=>[r("span",Zm,S(He.value),1)]),_:1}),f[68]||(f[68]=r("p",{class:"mt-3 text-xs text-ink-muted"}," Language & region are stored now; full localisation ships with the account service. ",-1))])):H.id==="integrations"?(p(),g("div",Hm,[B.value?N("",!0):(p(),g("div",jm,[(p(),g(ue,null,Fe(ts,k=>r("button",{key:k.id,type:"button",class:Ee(["-mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",ns.value===k.id?"border-accent text-ink":"border-transparent text-ink-secondary hover:text-ink"]),onClick:qe=>ns.value=k.id},[E(X,{name:k.icon,size:16},null,8,["name"]),$(S(k.label),1)],10,Wm)),64))])),bo("apis-external")?(p(),g("div",Km,[r("div",Gm,[r("div",qm,[E(X,{name:"radio",size:20})]),f[69]||(f[69]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"OpenSky Network"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Live ADS-B aircraft data. Configure your own OAuth2 credentials, plan and default bounding box. ")],-1))]),oe.loaded&&!oe.available?(p(),g("div",Ym,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[70]||(f[70]=$(" OpenSky is currently disabled by your administrator. Contact them to enable it. ",-1))])):N("",!0),oe.canEditOrg?(p(),g("div",Jm,[f[71]||(f[71]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:je.value,"onUpdate:modelValue":f[16]||(f[16]=k=>je.value=k),options:rt},null,8,["modelValue"])])):N("",!0),me.value?(p(),at(Me,{key:2,title:"Enable OpenSky (organization-wide)",desc:"Turn OpenSky on or off for everyone in your organization.",keywords:"enable disable plugin opensky organization"},{default:Le(()=>[E(sn,{"model-value":oe.orgEnabled,disabled:!oe.available,"onUpdate:modelValue":O},null,8,["model-value","disabled"])]),_:1})):(p(),at(Me,{key:3,title:"Enable OpenSky",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin opensky"},{default:Le(()=>[E(sn,{"model-value":oe.enabled,disabled:!oe.available||!oe.orgEnabled,"onUpdate:modelValue":O},null,8,["model-value","disabled"])]),_:1})),!me.value&&oe.available&&!oe.orgEnabled?(p(),g("div",Xm,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[73]||(f[73]=$("OpenSky is turned off for your organization",-1)),oe.canEditOrg?(p(),g("span",Qm,[...f[72]||(f[72]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[74]||(f[74]=$(". ",-1))])):N("",!0),me.value?(p(),g("div",eg,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[75]||(f[75]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",tg,S(t.organizationName||"your organization"),1),f[76]||(f[76]=$(". Leave a field blank to let each user choose their own; a value set here overrides the user's. ",-1))])):te.value?(p(),g("div",ng," As a superadmin you manage the global OpenSky configuration in the API Server panel. The effective configuration is shown below. ")):N("",!0),oe.available&&!me.value?(p(),g("div",ig,[r("div",og,[r("div",sg,[E(X,{name:"signal",size:15}),f[77]||(f[77]=$("Credit usage ",-1))]),xe.value?(p(),g("span",ag,"Checked "+S(Y()),1)):N("",!0)]),Ne.value?(p(),g(ue,{key:0},[Ne.value.remaining!=null?(p(),g(ue,{key:0},[r("div",rg,[r("span",lg,S(Ve(Ne.value.remaining)),1),r("span",ug,"/ "+S(Ve(Ne.value.daily))+" credits left today",1)]),r("div",cg,[r("div",{class:Ee(["h-full rounded-full transition-all",st.value]),style:Bo({width:dt.value+"%"})},null,6)]),r("div",dg," Used "+S(Ve(Ne.value.daily-Ne.value.remaining))+" today · "+S(Ne.value.probeCost)+" credit"+S(Ne.value.probeCost===1?"":"s")+" per query · "+S(Ne.value.mode),1)],64)):(p(),g(ue,{key:1},[r("div",fg,[f[78]||(f[78]=$("Daily allowance: ",-1)),r("span",hg,S(Ve(Ne.value.daily)),1),f[79]||(f[79]=$(" credits",-1))]),r("div",pg,S(Ne.value.probeCost)+" credit"+S(Ne.value.probeCost===1?"":"s")+" per query · "+S(Ne.value.mode)+". OpenSky only reports live remaining credits for authenticated requests — add OAuth2 credentials below to track usage. ",1)],64))],64)):(p(),g("div",mg,[...f[80]||(f[80]=[$(" Run ",-1),r("span",{class:"font-semibold text-ink-secondary"},"Test connection",-1),$(" below to fetch your live OpenSky credit balance. ",-1)])]))])):N("",!0),E(Me,{title:"OpenSky plan",desc:"Your account tier — sets the daily credit allowance.",keywords:"plan tier credits"},{default:Le(()=>[Te("plan")?(p(),g("span",gg,[$(S((vt.find(k=>k.value===se("plan").effective)||{}).label||se("plan").effective||"—")+" ",1),Ae("plan")?(p(),g("span",vg,[E(X,{name:"lock",size:10}),$(S(Ae("plan")),1)])):N("",!0)])):(p(),at(Tn,{key:1,modelValue:le.plan,"onUpdate:modelValue":f[17]||(f[17]=k=>le.plan=k),options:vt},null,8,["modelValue"]))]),_:1}),E(Me,{title:"Default bounding box",desc:"Automatic follows your location; or pick a region, or enter lamin,lomin,lamax,lomax by hand.",keywords:"bounding box bbox area region country continent world europe custom coordinates automatic location drone"},{default:Le(()=>[Te("bbox")?(p(),g("span",_g,[$(S(w(se("bbox").effective)||se("bbox").effective||"—")+" ",1),Ae("bbox")?(p(),g("span",bg,[E(X,{name:"lock",size:10}),$(S(Ae("bbox")),1)])):N("",!0)])):(p(),g("div",yg,[ne(r("select",{"onUpdate:modelValue":f[18]||(f[18]=k=>W.value=k),class:"field w-64"},[me.value?N("",!0):(p(),g("option",xg,"Automatic (by location)")),(p(),g(ue,null,Fe(kt,k=>r("optgroup",{key:k.label,label:k.label},[(p(!0),g(ue,null,Fe(k.options,qe=>(p(),g("option",{key:qe.value,value:qe.value},S(qe.label),9,kg))),128))],8,wg)),64)),f[81]||(f[81]=r("option",{value:"__custom__"},"Custom…",-1))],512),[[At,W.value]]),re.value?(p(),g("p",Sg," Live map follows drone location → your device location → your Region ("+S(be.value)+"). ",1)):N("",!0),V.value?ne((p(),g("input",{key:1,"onUpdate:modelValue":f[19]||(f[19]=k=>le.bbox=k),class:"field w-64 font-mono",placeholder:"50.5,3.2,53.7,7.3"},null,512)),[[Se,le.bbox]]):N("",!0)]))]),_:1}),E(Me,{title:"OAuth2 client ID",desc:"Optional — leave blank for anonymous access (lower limits).",keywords:"oauth client id credentials"},{default:Le(()=>[Te("clientId")?(p(),g("span",Tg,[$(S(se("clientId").effective||"—")+" ",1),Ae("clientId")?(p(),g("span",Pg,[E(X,{name:"lock",size:10}),$(S(Ae("clientId")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[20]||(f[20]=k=>le.clientId=k),class:"field w-64",placeholder:"your-api-client"},null,512)),[[Se,le.clientId]])]),_:1}),E(Me,{title:"OAuth2 client secret",desc:"Paired with the client ID for authenticated access.",keywords:"oauth client secret credentials password"},{default:Le(()=>[Te("clientSecret")?(p(),g("span",Cg,[$(S(se("clientSecret").effective||"—")+" ",1),Ae("clientSecret")?(p(),g("span",Lg,[E(X,{name:"lock",size:10}),$(S(Ae("clientSecret")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[21]||(f[21]=k=>le.clientSecret=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,le.clientSecret]])]),_:1}),oe.available&&!oe.allowAnonymous?(p(),g("div",Ag," Anonymous access is disabled by the administrator — OpenSky needs OAuth2 credentials from some layer to work. ")):N("",!0),r("div",Mg,[te.value?N("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:ae.value||!oe.available,onClick:ke},S(ae.value?"Saving…":me.value?"Save organization settings":"Save settings"),9,Eg)),me.value?N("",!0):(p(),g("div",Og,[f[84]||(f[84]=r("label",{class:"text-xs text-ink-muted"},"Test area",-1)),ne(r("select",{"onUpdate:modelValue":f[22]||(f[22]=k=>de.value=k),class:"field w-44"},[f[82]||(f[82]=r("option",{value:"__default__"},"Default bounding box",-1)),(p(),g(ue,null,Fe(Ye,k=>r("optgroup",{key:k.label,label:k.label},[(p(!0),g(ue,null,Fe(k.options,qe=>(p(),g("option",{key:qe.value,value:qe.value},S(qe.label),9,Ig))),128))],8,zg)),64)),f[83]||(f[83]=r("option",{value:"__custom__"},"Custom…",-1))],512),[[At,de.value]]),wt.value?ne((p(),g("input",{key:0,"onUpdate:modelValue":f[23]||(f[23]=k=>bt.value=k),class:"field w-44 font-mono",placeholder:"lamin,lomin,lamax,lomax"},null,512)),[[Se,bt.value]]):N("",!0)])),me.value?N("",!0):(p(),g("button",{key:2,class:"btn-ghost",disabled:tt.value||!oe.available,onClick:an},S(tt.value?"Testing…":"Test connection"),9,$g)),ce.value?(p(),g("span",Ng,S(ce.value),1)):N("",!0),ee.value&&!me.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",so(ee.value.status)])},[f[85]||(f[85]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(ee.value.detail||ee.value.status),1)],2)):N("",!0)])])):N("",!0),bo("drives-external")?(p(),g(ue,{key:2},[r("div",Dg,[r("div",Fg,[r("div",Rg,[E(X,{name:"server",size:20})]),f[86]||(f[86]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"File Transfer (FTP / SFTP)"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to an FTP, FTPS or SFTP server. Configure the connection your account uses for file transfers. ")],-1))]),lt.loaded&&!lt.available?(p(),g("div",Bg,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[87]||(f[87]=$(" File transfer is currently disabled by your administrator. Contact them to enable it. ",-1))])):N("",!0),lt.canEditOrg?(p(),g("div",Ug,[f[88]||(f[88]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:ei.value,"onUpdate:modelValue":f[24]||(f[24]=k=>ei.value=k),options:rt},null,8,["modelValue"])])):N("",!0),gn.value?(p(),at(Me,{key:2,title:"Enable file transfer (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin ftp sftp organization"},{default:Le(()=>[E(sn,{"model-value":lt.orgEnabled,disabled:!lt.available,"onUpdate:modelValue":Ws},null,8,["model-value","disabled"])]),_:1})):(p(),at(Me,{key:3,title:"Enable file transfer",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin ftp sftp"},{default:Le(()=>[E(sn,{"model-value":lt.enabled,disabled:!lt.available||!lt.orgEnabled,"onUpdate:modelValue":Ws},null,8,["model-value","disabled"])]),_:1})),!gn.value&<.available&&!lt.orgEnabled?(p(),g("div",Vg,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[90]||(f[90]=$("File transfer is turned off for your organization",-1)),lt.canEditOrg?(p(),g("span",Zg,[...f[89]||(f[89]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[91]||(f[91]=$(". ",-1))])):N("",!0),gn.value?(p(),g("div",Hg,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[92]||(f[92]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",jg,S(t.organizationName||"your organization"),1),f[93]||(f[93]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Wo.value?(p(),g("div",Wg," As a superadmin you manage the global file-transfer configuration in the API Server panel. The effective configuration is shown below. ")):N("",!0),E(Me,{title:"Protocol",desc:"SFTP (over SSH), FTPS (FTP over TLS), or plain FTP.",keywords:"protocol sftp ftps ftp"},{default:Le(()=>[Wt("protocol")?(p(),g("span",Kg,[$(S(Zs(ge("protocol").effective))+" ",1),Pt("protocol")?(p(),g("span",Gg,[E(X,{name:"lock",size:10}),$(S(Pt("protocol")),1)])):N("",!0)])):(p(),at(Tn,{key:1,modelValue:ft.protocol,"onUpdate:modelValue":f[25]||(f[25]=k=>ft.protocol=k),options:Vs},null,8,["modelValue"]))]),_:1}),E(Me,{title:"Host",desc:"Server hostname or IP address.",keywords:"host server address"},{default:Le(()=>[Wt("host")?(p(),g("span",qg,[$(S(ge("host").effective||"—")+" ",1),Pt("host")?(p(),g("span",Yg,[E(X,{name:"lock",size:10}),$(S(Pt("host")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[26]||(f[26]=k=>ft.host=k),class:"field w-64",placeholder:"files.example.com"},null,512)),[[Se,ft.host]])]),_:1}),E(Me,{title:"Port",desc:"Leave blank for the protocol default (22 for SFTP, 21 for FTP/FTPS).",keywords:"port"},{default:Le(()=>[Wt("port")?(p(),g("span",Jg,[$(S(ge("port").effective||"default")+" ",1),Pt("port")?(p(),g("span",Xg,[E(X,{name:"lock",size:10}),$(S(Pt("port")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[27]||(f[27]=k=>ft.port=k),inputmode:"numeric",class:"field w-24 font-mono",placeholder:"22"},null,512)),[[Se,ft.port]])]),_:1}),E(Me,{title:"Username",desc:"Account used to authenticate.",keywords:"username login account"},{default:Le(()=>[Wt("username")?(p(),g("span",Qg,[$(S(ge("username").effective||"—")+" ",1),Pt("username")?(p(),g("span",ev,[E(X,{name:"lock",size:10}),$(S(Pt("username")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[28]||(f[28]=k=>ft.username=k),class:"field w-64",placeholder:"user"},null,512)),[[Se,ft.username]])]),_:1}),E(Me,{title:"Password",desc:"Password auth for FTP/FTPS, or SFTP password login. Leave blank to use a key.",keywords:"password secret credentials"},{default:Le(()=>[Wt("password")?(p(),g("span",tv,[$(S(ge("password").effective||"—")+" ",1),Pt("password")?(p(),g("span",nv,[E(X,{name:"lock",size:10}),$(S(Pt("password")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[29]||(f[29]=k=>ft.password=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,ft.password]])]),_:1}),jt.value==="sftp"?(p(),at(Me,{key:7,block:"",title:"SSH private key",desc:"PEM key for SFTP key auth — used instead of, or alongside, a password.",keywords:"private key ssh pem identity"},{default:Le(()=>[Wt("privateKey")?(p(),g("span",iv,[$(S(ge("privateKey").effective||"—")+" ",1),Pt("privateKey")?(p(),g("span",ov,[E(X,{name:"lock",size:10}),$(S(Pt("privateKey")),1)])):N("",!0)])):ne((p(),g("textarea",{key:1,"onUpdate:modelValue":f[30]||(f[30]=k=>ft.privateKey=k),rows:"3",class:"field w-full font-mono text-xs",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----"},null,512)),[[Se,ft.privateKey]])]),_:1})):N("",!0),jt.value==="sftp"?(p(),at(Me,{key:8,title:"Private key passphrase",desc:"Passphrase protecting the SSH private key, if any.",keywords:"passphrase key secret"},{default:Le(()=>[Wt("keyPassphrase")?(p(),g("span",sv,[$(S(ge("keyPassphrase").effective||"—")+" ",1),Pt("keyPassphrase")?(p(),g("span",av,[E(X,{name:"lock",size:10}),$(S(Pt("keyPassphrase")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[31]||(f[31]=k=>ft.keyPassphrase=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,ft.keyPassphrase]])]),_:1})):N("",!0),jt.value==="sftp"?(p(),at(Me,{key:9,title:"Host key fingerprint",desc:"Optional SHA256:… fingerprint to pin the server's host key. Blank accepts any key.",keywords:"host key fingerprint verify trust"},{default:Le(()=>[Wt("hostKeyFingerprint")?(p(),g("span",rv,[$(S(ge("hostKeyFingerprint").effective||"—")+" ",1),Pt("hostKeyFingerprint")?(p(),g("span",lv,[E(X,{name:"lock",size:10}),$(S(Pt("hostKeyFingerprint")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[32]||(f[32]=k=>ft.hostKeyFingerprint=k),class:"field w-full font-mono text-xs",placeholder:"SHA256:…"},null,512)),[[Se,ft.hostKeyFingerprint]])]),_:1})):N("",!0),jt.value==="ftps"?(p(),at(Me,{key:10,title:"TLS verification",desc:"Skip only for self-signed test servers.",keywords:"tls certificate verify insecure ftps"},{default:Le(()=>[Wt("insecureSkipVerify")?(p(),g("span",uv,[$(S(ge("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),Pt("insecureSkipVerify")?(p(),g("span",cv,[E(X,{name:"lock",size:10}),$(S(Pt("insecureSkipVerify")),1)])):N("",!0)])):(p(),at(Tn,{key:1,modelValue:ft.insecureSkipVerify,"onUpdate:modelValue":f[33]||(f[33]=k=>ft.insecureSkipVerify=k),options:jo},null,8,["modelValue"]))]),_:1})):N("",!0),E(Me,{title:"Base path",desc:"Working directory and health-check target, e.g. /uploads.",keywords:"base path directory folder root"},{default:Le(()=>[Wt("basePath")?(p(),g("span",dv,[$(S(ge("basePath").effective||"—")+" ",1),Pt("basePath")?(p(),g("span",fv,[E(X,{name:"lock",size:10}),$(S(Pt("basePath")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[34]||(f[34]=k=>ft.basePath=k),class:"field w-64 font-mono",placeholder:"/uploads"},null,512)),[[Se,ft.basePath]])]),_:1}),r("div",hv,[Wo.value?N("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:ro.value||!lt.available,onClick:Ha},S(ro.value?"Saving…":gn.value?"Save organization settings":"Save settings"),9,pv)),gn.value?N("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:lo.value||!lt.available,onClick:ja},S(lo.value?"Testing…":"Test connection"),9,mv)),Ui.value?(p(),g("span",gv,S(Ui.value),1)):N("",!0),yi.value&&!gn.value?(p(),g("span",vv,"Checked "+S(Hs()),1)):N("",!0),Mn.value&&!gn.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Ks(Mn.value.status)])},[f[94]||(f[94]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(Mn.value.detail||Mn.value.status),1)],2)):N("",!0)])]),r("div",_v,[r("div",bv,[r("div",yv,[E(X,{name:"cloud",size:20})]),f[95]||(f[95]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"WebDAV"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," Connect to a WebDAV server (Nextcloud, ownCloud, IIS, …). Configure the connection your account uses. ")],-1))]),ut.loaded&&!ut.available?(p(),g("div",xv,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[96]||(f[96]=$(" WebDAV is currently disabled by your administrator. Contact them to enable it. ",-1))])):N("",!0),ut.canEditOrg?(p(),g("div",wv,[f[97]||(f[97]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:En.value,"onUpdate:modelValue":f[35]||(f[35]=k=>En.value=k),options:rt},null,8,["modelValue"])])):N("",!0),it.value?(p(),at(Me,{key:2,title:"Enable WebDAV (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin webdav organization"},{default:Le(()=>[E(sn,{"model-value":ut.orgEnabled,disabled:!ut.available,"onUpdate:modelValue":qs},null,8,["model-value","disabled"])]),_:1})):(p(),at(Me,{key:3,title:"Enable WebDAV",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin webdav"},{default:Le(()=>[E(sn,{"model-value":ut.enabled,disabled:!ut.available||!ut.orgEnabled,"onUpdate:modelValue":qs},null,8,["model-value","disabled"])]),_:1})),!it.value&&ut.available&&!ut.orgEnabled?(p(),g("div",kv,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[99]||(f[99]=$("WebDAV is turned off for your organization",-1)),ut.canEditOrg?(p(),g("span",Sv,[...f[98]||(f[98]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[100]||(f[100]=$(". ",-1))])):N("",!0),it.value?(p(),g("div",Tv,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[101]||(f[101]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Pv,S(t.organizationName||"your organization"),1),f[102]||(f[102]=$(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):fo.value?(p(),g("div",Cv," As a superadmin you manage the global WebDAV configuration in the API Server panel. The effective configuration is shown below. ")):N("",!0),E(Me,{block:"",title:"Server URL",desc:"WebDAV endpoint including scheme, e.g. https://cloud.example.com/remote.php/dav/files/alice/.",keywords:"url server address endpoint webdav host"},{default:Le(()=>[un("baseURL")?(p(),g("span",Lv,[$(S(ln("baseURL").effective||"—")+" ",1),Dt("baseURL")?(p(),g("span",Av,[E(X,{name:"lock",size:10}),$(S(Dt("baseURL")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[36]||(f[36]=k=>Bt.baseURL=k),class:"field w-full font-mono text-xs",placeholder:"https://cloud.example.com/remote.php/dav/files/alice/"},null,512)),[[Se,Bt.baseURL]])]),_:1}),E(Me,{title:"Username",desc:"Account used to authenticate (leave blank for a public share).",keywords:"username login account"},{default:Le(()=>[un("username")?(p(),g("span",Mv,[$(S(ln("username").effective||"—")+" ",1),Dt("username")?(p(),g("span",Ev,[E(X,{name:"lock",size:10}),$(S(Dt("username")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[37]||(f[37]=k=>Bt.username=k),class:"field w-64",placeholder:"user"},null,512)),[[Se,Bt.username]])]),_:1}),E(Me,{title:"Password",desc:"Password or app-specific token for HTTP Basic auth.",keywords:"password secret credentials token"},{default:Le(()=>[un("password")?(p(),g("span",Ov,[$(S(ln("password").effective||"—")+" ",1),Dt("password")?(p(),g("span",zv,[E(X,{name:"lock",size:10}),$(S(Dt("password")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[38]||(f[38]=k=>Bt.password=k),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Se,Bt.password]])]),_:1}),E(Me,{title:"TLS verification",desc:"Only affects HTTPS. Skip only for self-signed test servers.",keywords:"tls certificate verify insecure https"},{default:Le(()=>[un("insecureSkipVerify")?(p(),g("span",Iv,[$(S(ln("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),Dt("insecureSkipVerify")?(p(),g("span",$v,[E(X,{name:"lock",size:10}),$(S(Dt("insecureSkipVerify")),1)])):N("",!0)])):(p(),at(Tn,{key:1,modelValue:Bt.insecureSkipVerify,"onUpdate:modelValue":f[39]||(f[39]=k=>Bt.insecureSkipVerify=k),options:Gs},null,8,["modelValue"]))]),_:1}),E(Me,{title:"Base path",desc:"Working directory under the server URL and health-check target, e.g. /Documents.",keywords:"base path directory folder root"},{default:Le(()=>[un("basePath")?(p(),g("span",Nv,[$(S(ln("basePath").effective||"—")+" ",1),Dt("basePath")?(p(),g("span",Dv,[E(X,{name:"lock",size:10}),$(S(Dt("basePath")),1)])):N("",!0)])):ne((p(),g("input",{key:1,"onUpdate:modelValue":f[40]||(f[40]=k=>Bt.basePath=k),class:"field w-64 font-mono",placeholder:"/Documents"},null,512)),[[Se,Bt.basePath]])]),_:1}),r("div",Fv,[fo.value?N("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:uo.value||!ut.available,onClick:mo},S(uo.value?"Saving…":it.value?"Save organization settings":"Save settings"),9,Rv)),it.value?N("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:co.value||!ut.available,onClick:ni},S(co.value?"Testing…":"Test connection"),9,Bv)),Zi.value?(p(),g("span",Uv,S(Zi.value),1)):N("",!0),vn.value&&!it.value?(p(),g("span",Vv,"Checked "+S(Ct()),1)):N("",!0),rn.value&&!it.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Lt(rn.value.status)])},[f[103]||(f[103]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(rn.value.detail||rn.value.status),1)],2)):N("",!0)])])],64)):N("",!0),bo("drives-local")?(p(),g("div",Zv,[r("div",Hv,[r("div",jv,[E(X,{name:"monitor",size:20})]),f[104]||(f[104]=r("div",{class:"min-w-0"},[r("div",{class:"text-sm font-semibold text-ink"},"Local Storage"),r("div",{class:"mt-0.5 text-xs text-ink-muted"}," A private folder on the server for your files. Each user has their own; members of an organization share one. ")],-1))]),Pe.loaded&&!Pe.available?(p(),g("div",Wv,[E(X,{name:"lock",size:14,class:"mr-1 inline"}),f[105]||(f[105]=$(" Local storage is currently disabled by your administrator. Contact them to enable it. ",-1))])):Pe.loaded&&!Pe.rootConfigured?(p(),g("div",Kv,[E(X,{name:"alertTriangle",size:14,class:"mr-1 inline"}),f[106]||(f[106]=$(" No storage root has been configured by your administrator yet. ",-1))])):N("",!0),Pe.canEditOrg?(p(),g("div",Gv,[f[107]||(f[107]=r("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(Tn,{modelValue:_n.value,"onUpdate:modelValue":f[41]||(f[41]=k=>_n.value=k),options:rt},null,8,["modelValue"])])):N("",!0),nn.value?(p(),at(Me,{key:3,title:"Enable local storage (organization-wide)",desc:"Turn it on or off for everyone in your organization.",keywords:"enable disable plugin local storage folder organization"},{default:Le(()=>[E(sn,{"model-value":Pe.orgEnabled,disabled:!Pe.available,"onUpdate:modelValue":Mt},null,8,["model-value","disabled"])]),_:1})):(p(),at(Me,{key:4,title:"Enable local storage",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin local storage folder"},{default:Le(()=>[E(sn,{"model-value":Pe.enabled,disabled:!Pe.available||!Pe.orgEnabled,"onUpdate:modelValue":Mt},null,8,["model-value","disabled"])]),_:1})),!nn.value&&Pe.available&&!Pe.orgEnabled?(p(),g("div",qv,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[109]||(f[109]=$("Local storage is turned off for your organization",-1)),Pe.canEditOrg?(p(),g("span",Yv,[...f[108]||(f[108]=[$(" — switch to ",-1),r("span",{class:"font-semibold"},"Organization",-1),$(" to turn it back on",-1)])])):N("",!0),f[110]||(f[110]=$(". ",-1))])):N("",!0),nn.value?(p(),g("div",Jv,[E(X,{name:"users",size:13,class:"mr-1 inline"}),f[111]||(f[111]=$("These are organization-wide settings — they apply to everyone in ",-1)),r("span",Xv,S(t.organizationName||"your organization"),1),f[112]||(f[112]=$(", who all share the organization folder. Members can additionally enable a private folder inside it. ",-1))])):ki.value?(p(),g("div",Qv," As a superadmin you manage the global storage root in the API Server panel. The effective configuration is shown below. ")):N("",!0),nn.value?(p(),at(Me,{key:8,title:"Private folders",desc:"Let members create a private folder inside the organization folder, reachable only by them.",keywords:"private folder members allow policy organization"},{default:Le(()=>[E(sn,{"model-value":Pe.allowPrivate,disabled:!Pe.available,"onUpdate:modelValue":Js},null,8,["model-value","disabled"])]),_:1})):N("",!0),nn.value?N("",!0):(p(),g(ue,{key:9},[E(Me,{block:"",title:"Your folders",desc:"Assigned automatically and isolated — no one else can reach your private folder.",keywords:"folder directory path storage location isolated private shared"},{default:Le(()=>[r("div",e_,[(p(!0),g(ue,null,Fe(Pe.mounts,k=>(p(),g("div",{key:k.id,class:"flex flex-wrap items-center gap-2"},[r("span",t_,S(k.path),1),k.kind==="shared"?(p(),g("span",n_,[E(X,{name:"users",size:10}),f[113]||(f[113]=$("Shared with your organization",-1))])):(p(),g("span",i_,[E(X,{name:"lock",size:10}),f[114]||(f[114]=$("Private to you",-1))])),oi.value[k.id]?(p(),g("span",{key:2,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-semibold",es(oi.value[k.id].status)])},[f[115]||(f[115]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(oi.value[k.id].status),1)],2)):N("",!0)]))),128)),Pe.mounts.length?N("",!0):(p(),g("div",o_,S(Pe.rootConfigured?"No folder assigned yet.":"Waiting for the administrator to configure a storage root."),1))])]),_:1}),Pe.isOrgUser&&Pe.allowPrivate?(p(),at(Me,{key:0,title:"My private folder",desc:"Add a private folder inside the organization folder, reachable only by you — you keep the shared folder too.",keywords:"private folder personal isolated organization inside"},{default:Le(()=>[E(sn,{"model-value":Pe.privateFolder,disabled:!Pe.available||!Pe.orgEnabled,"onUpdate:modelValue":ri},null,8,["model-value","disabled"])]),_:1})):Pe.isOrgUser&&!Pe.allowPrivate?(p(),g("div",s_,[E(X,{name:"lock",size:13,class:"mr-1 inline"}),f[116]||(f[116]=$("Private folders are turned off by your organization. ",-1))])):N("",!0)],64)),E(Me,{title:"Access mode",desc:"Read-only prevents uploads, deletes and folder creation.",keywords:"read only write access mode permission"},{default:Le(()=>[dn("readOnly")?(p(),g("span",a_,[$(S(Ys(Ue("readOnly").effective))+" ",1),mt("readOnly")?(p(),g("span",r_,[E(X,{name:"lock",size:10}),$(S(mt("readOnly")),1)])):N("",!0)])):(p(),at(Tn,{key:1,modelValue:Zn.value,"onUpdate:modelValue":f[42]||(f[42]=k=>Zn.value=k),options:go},null,8,["modelValue"]))]),_:1}),r("div",l_,[ki.value?N("",!0):(p(),g("button",{key:0,class:"btn-accent",disabled:Hn.value||!Pe.available,onClick:Xs},S(Hn.value?"Saving…":nn.value?"Save organization settings":"Save settings"),9,u_)),nn.value?N("",!0):(p(),g("button",{key:1,class:"btn-ghost",disabled:wi.value||!Pe.available,onClick:Wa},S(wi.value?"Testing…":"Test folder"),9,c_)),ii.value?(p(),g("span",d_,S(ii.value),1)):N("",!0),On.value&&!nn.value?(p(),g("span",f_,"Checked "+S(Xo()),1)):N("",!0),cn.value&&!nn.value?(p(),g("span",{key:4,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",es(cn.value.status)])},[f[117]||(f[117]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(cn.value.detail||cn.value.status),1)],2)):N("",!0)])])):N("",!0)])):H.id==="profile"?(p(),g("div",h_,[E(Me,{block:"",title:"Profile photo",desc:"PNG or JPG, up to ~1.5 MB. Stored on this device.",keywords:"avatar photo picture"},{default:Le(()=>[r("div",p_,[Oe(_e).avatar?(p(),g("img",{key:0,src:Oe(_e).avatar,alt:"Avatar",class:"h-16 w-16 rounded-full object-cover"},null,8,m_)):(p(),g("div",g_,S(as.value),1)),r("div",v_,[r("label",__,[E(X,{name:"upload",size:15,class:"mr-1.5 inline"}),f[118]||(f[118]=$("Upload ",-1)),r("input",{type:"file",accept:"image/*",class:"hidden",onChange:Ka},null,32)]),Oe(_e).avatar?(p(),g("button",{key:0,class:"btn-ghost",onClick:Ga},"Remove")):N("",!0)])])]),_:1}),E(Me,{title:"Display name",desc:"The name shown on your public profile.",keywords:"display name profile"},{default:Le(()=>[ne(r("input",{"onUpdate:modelValue":f[43]||(f[43]=k=>Oe(_e).displayName=k),class:"field w-56",placeholder:"Jane O.",onBlur:f[44]||(f[44]=k=>Ke("Saved."))},null,544),[[Se,Oe(_e).displayName]])]),_:1}),E(Me,{block:"",title:"Bio",desc:"A short description others can see.",keywords:"bio about description"},{default:Le(()=>[ne(r("textarea",{"onUpdate:modelValue":f[45]||(f[45]=k=>Oe(_e).bio=k),rows:"3",maxlength:"240",class:"field w-full resize-none",placeholder:"Flight director, North yard operations…",onBlur:f[46]||(f[46]=k=>Ke("Saved."))},null,544),[[Se,Oe(_e).bio]]),r("div",b_,S((Oe(_e).bio||"").length)+"/240",1)]),_:1}),E(Me,{title:"Show email on profile",desc:"Let teammates see your email address.",keywords:"show email public visibility"},{default:Le(()=>[E(sn,{modelValue:Oe(_e).showEmail,"onUpdate:modelValue":f[47]||(f[47]=k=>Oe(_e).showEmail=k)},null,8,["modelValue"])]),_:1})])):H.id==="security"?(p(),g("div",y_,[E(Me,{block:"",title:"Two-factor authentication",desc:"Require a one-time code at sign-in.",keywords:"two factor 2fa authentication security"},{default:Le(()=>[r("div",x_,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Oe(_e).twoFactor?"bg-success-soft text-success-fg":"bg-surface-2 text-ink-secondary"])},[f[119]||(f[119]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(Oe(_e).twoFactor?"Enabled":"Disabled"),1)],2),!Oe(_e).twoFactor&&!ji.value?(p(),g("button",{key:0,class:"btn-accent",onClick:ta},"Enable 2FA")):Oe(_e).twoFactor?(p(),g("button",{key:1,class:"btn-ghost",onClick:qa},"Disable")):N("",!0)]),ji.value?(p(),g("div",w_,[r("div",k_,[f[121]||(f[121]=r("div",{class:"grid h-28 w-28 place-items-center rounded bg-white p-2"},[r("svg",{viewBox:"0 0 100 100",class:"h-full w-full"},[r("rect",{width:"100",height:"100",fill:"#fff"}),r("g",{fill:"#0F1E3D"},[r("rect",{x:"6",y:"6",width:"24",height:"24"}),r("rect",{x:"70",y:"6",width:"24",height:"24"}),r("rect",{x:"6",y:"70",width:"24",height:"24"}),r("rect",{x:"12",y:"12",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"76",y:"12",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"12",y:"76",width:"12",height:"12",fill:"#fff"}),r("rect",{x:"40",y:"10",width:"8",height:"8"}),r("rect",{x:"52",y:"20",width:"8",height:"8"}),r("rect",{x:"40",y:"40",width:"8",height:"8"}),r("rect",{x:"60",y:"44",width:"8",height:"8"}),r("rect",{x:"44",y:"60",width:"8",height:"8"}),r("rect",{x:"70",y:"60",width:"8",height:"8"}),r("rect",{x:"80",y:"72",width:"8",height:"8"}),r("rect",{x:"60",y:"80",width:"8",height:"8"})])])],-1)),r("div",S_,[f[120]||(f[120]=r("div",{class:"text-xs text-ink-secondary"},"Scan with an authenticator app, or enter this secret:",-1)),r("div",T_,S(fn.value),1),r("div",P_,[ne(r("input",{"onUpdate:modelValue":f[48]||(f[48]=k=>yo.value=k),inputmode:"numeric",maxlength:"6",class:"field w-28 font-mono tracking-[0.3em]",placeholder:"000000"},null,512),[[Se,yo.value]]),r("button",{class:"btn-accent",onClick:rs},"Verify & enable")]),Si.value?(p(),g("p",C_,S(Si.value),1)):N("",!0)])])])):N("",!0),Oe(_e).twoFactor&&hn.value.length?(p(),g("div",L_,[f[122]||(f[122]=r("div",{class:"text-xs font-semibold text-ink"},"Recovery codes",-1)),f[123]||(f[123]=r("div",{class:"mt-0.5 text-xs text-ink-muted"},"Store these somewhere safe — each works once.",-1)),r("div",A_,[(p(!0),g(ue,null,Fe(hn.value,k=>(p(),g("span",{key:k,class:"select-all"},S(k),1))),128))])])):N("",!0),f[124]||(f[124]=r("p",{class:"mt-2 text-xs text-ink-muted"},"Prototype — codes are generated locally until the account service verifies them.",-1))]),_:1}),E(Me,{block:"",title:"Active sessions",desc:"Devices currently signed in to your account.",keywords:"sessions devices logout sign out remote"},{default:Le(()=>[r("div",M_,[r("div",E_,[r("div",O_,[E(X,{name:"monitor",size:18})]),r("div",z_,[r("div",I_,[$(S(na())+" on "+S(Ya())+" ",1),f[125]||(f[125]=r("span",{class:"ml-1 rounded-full bg-success-soft px-2 py-0.5 text-[10px] font-semibold text-success-fg"},"This device",-1))]),r("div",$_,"Signed in "+S(Oe(fu)(Oe(Ja))),1)]),r("button",{class:"btn-ghost",onClick:f[49]||(f[49]=k=>l("logout"))},"Log out")])]),f[126]||(f[126]=r("button",{class:"btn-ghost mt-2 opacity-60",disabled:"",title:"Requires the account service"}," Log out all other devices ",-1)),f[127]||(f[127]=r("p",{class:"mt-2 text-xs text-ink-muted"}," Only this session is visible from the browser; enumerating and revoking remote sessions needs the account service. ",-1))]),_:1})])):H.id==="team"?(p(),g("div",N_,[ot.id?(p(),g("div",D_,[E(Me,{block:"",title:`Edit user — ${ot.email}`,desc:"Update details, change role, reset password, or set verified.",keywords:"edit user update role password verified organization"},{default:Le(()=>[r("div",F_,[r("div",R_,[ne(r("input",{"onUpdate:modelValue":f[50]||(f[50]=k=>ot.email=k),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Se,ot.email]]),ne(r("select",{"onUpdate:modelValue":f[51]||(f[51]=k=>ot.role=k),class:"field w-32",disabled:Kt.value,title:Kt.value?"You cannot change your own role":""},[(p(!0),g(ue,null,Fe(Pi.value,k=>(p(),g("option",{key:k.value,value:k.value},S(k.label),9,U_))),128))],8,B_),[[At,ot.role]])]),u.value?ne((p(),g("select",{key:0,"onUpdate:modelValue":f[52]||(f[52]=k=>ot.organization=k),class:"field",title:"Organization"},[(p(!0),g(ue,null,Fe(ls.value,k=>(p(),g("option",{key:k.value,value:k.value},S(k.label),9,V_))),128))],512)),[[At,ot.organization]]):N("",!0),ne(r("input",{"onUpdate:modelValue":f[53]||(f[53]=k=>ot.password=k),type:"password",class:"field",placeholder:"New password (leave blank to keep current)"},null,512),[[Se,ot.password]]),r("label",Z_,[E(sn,{modelValue:ot.verified,"onUpdate:modelValue":f[54]||(f[54]=k=>ot.verified=k)},null,8,["modelValue"]),f[128]||(f[128]=$(" Email verified ",-1))]),r("div",H_,[r("button",{class:"btn-accent",disabled:wo.value,onClick:$n},S(wo.value?"Saving…":"Save changes"),9,j_),r("button",{class:"btn-ghost",onClick:ia},"Cancel"),In.value?(p(),g("span",W_,S(In.value),1)):N("",!0),Kt.value?(p(),g("span",K_,"Editing your own account — role locked.")):N("",!0)])])]),_:1},8,["title"])])):(p(),g("div",G_,[E(Me,{block:"",title:"Add user",desc:"Create a new account. Admins add users within their organization; superadmins can target any.",keywords:"add user create account role admin organization"},{default:Le(()=>[r("div",q_,[r("div",Y_,[ne(r("input",{"onUpdate:modelValue":f[55]||(f[55]=k=>Et.email=k),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Se,Et.email]]),ne(r("select",{"onUpdate:modelValue":f[56]||(f[56]=k=>Et.role=k),class:"field w-32"},[(p(!0),g(ue,null,Fe(Pi.value,k=>(p(),g("option",{key:k.value,value:k.value},S(k.label),9,J_))),128))],512),[[At,Et.role]])]),u.value?ne((p(),g("select",{key:0,"onUpdate:modelValue":f[57]||(f[57]=k=>Et.organization=k),class:"field",title:"Organization"},[(p(!0),g(ue,null,Fe(ls.value,k=>(p(),g("option",{key:k.value,value:k.value},S(k.label),9,X_))),128))],512)),[[At,Et.organization]]):(p(),g("div",Q_,[f[129]||(f[129]=$(" New users join your organization: ",-1)),r("span",e1,S(t.organizationName||"—"),1)])),ne(r("input",{"onUpdate:modelValue":f[58]||(f[58]=k=>Et.password=k),type:"password",class:"field",placeholder:"Temporary password (min 8 chars)"},null,512),[[Se,Et.password]]),r("div",t1,[r("button",{class:"btn-accent",disabled:bn.value,onClick:us},S(bn.value?"Creating…":"Create user"),9,n1),zn.value?(p(),g("span",i1,S(zn.value),1)):N("",!0)])])]),_:1})])),r("div",o1,[r("div",s1,[f[130]||(f[130]=r("div",null,[r("div",{class:"eyebrow"},"Team"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All users")],-1)),r("button",{class:"btn-ghost",disabled:Wi.value,onClick:Li},S(Wi.value?"Loading…":"Refresh"),9,a1)]),Ki.value?(p(),g("div",r1,S(Ki.value),1)):!Ti.value.length&&!Wi.value?(p(),g("div",l1,"No users yet.")):(p(),g("div",u1,[r("table",c1,[r("thead",null,[r("tr",d1,[(p(),g(ue,null,Fe(["User","Role","Organization","Status",""],k=>r("th",{key:k,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},S(k),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Fe(Ti.value,k=>(p(),g("tr",{key:k.id,class:Ee(["border-b border-line last:border-0",ot.id===k.id?"bg-accent-soft":""])},[r("td",f1,[r("span",h1,S(k.email),1),k.email===t.email?(p(),g("span",p1,"(you)")):N("",!0)]),r("td",m1,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",b(k.role||"user")])},[E(X,{name:v(k.role||"user"),size:12},null,8,["name"]),$(S(h(k.role||"user")),1)],2)]),r("td",g1,[r("span",{class:Ee(["text-sm",k.organizationName?"text-ink-secondary":"text-ink-muted"])},S(k.organizationName||"—"),3)]),r("td",v1,[r("span",{class:Ee(["text-xs",k.verified?"text-success-fg":"text-ink-muted"])},S(k.verified?"Verified":"Unverified"),3)]),r("td",_1,[Gi.value===k.id?(p(),g(ue,{key:0},[f[131]||(f[131]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Remove?",-1)),r("button",{class:"btn-ghost mr-1",onClick:f[59]||(f[59]=qe=>Gi.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:qe=>Xa(k)}," Remove ",8,b1)],64)):(p(),g("div",y1,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:qe=>Mi(k)},[E(X,{name:"settings",size:14}),f[132]||(f[132]=$(" Edit ",-1))],8,x1),k.email!==t.email?(p(),g("button",{key:0,class:"btn-ghost inline-flex items-center gap-1.5",onClick:qe=>Gi.value=k.id},[E(X,{name:"trash",size:14}),f[133]||(f[133]=$(" Remove ",-1))],8,w1)):N("",!0)]))])],2))),128))])])]))])])):H.id==="organizations"?(p(),g("div",k1,[xn.id?(p(),g("div",S1,[E(Me,{block:"",title:"Rename organization",desc:"Update the organization's display name.",keywords:"rename organization edit"},{default:Le(()=>[r("div",T1,[ne(r("input",{"onUpdate:modelValue":f[60]||(f[60]=k=>xn.name=k),class:"field",placeholder:"Organization name",onKeyup:iu(Po,["enter"])},null,544),[[Se,xn.name]]),r("div",P1,[r("button",{class:"btn-accent",onClick:Po},"Save changes"),r("button",{class:"btn-ghost",onClick:oa},"Cancel"),wn.value?(p(),g("span",C1,S(wn.value),1)):N("",!0)])])]),_:1})])):(p(),g("div",L1,[E(Me,{block:"",title:"Add organization",desc:"Create a new organization. Assign admins and users to it from User management.",keywords:"add organization create tenant company"},{default:Le(()=>[r("div",A1,[ne(r("input",{"onUpdate:modelValue":f[61]||(f[61]=k=>ko.name=k),class:"field",placeholder:"e.g. Northwind Aerial",onKeyup:iu(Dn,["enter"])},null,544),[[Se,ko.name]]),r("div",M1,[r("button",{class:"btn-accent",disabled:So.value,onClick:Dn},S(So.value?"Creating…":"Create organization"),9,E1),yn.value?(p(),g("span",O1,S(yn.value),1)):N("",!0)])])]),_:1})])),r("div",z1,[r("div",{class:"flex items-center justify-between px-5 py-4"},[f[134]||(f[134]=r("div",null,[r("div",{class:"eyebrow"},"Tenancy"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All organizations")],-1)),r("button",{class:"btn-ghost",onClick:Ci},"Refresh")]),Ft.value.length?(p(),g("div",$1,[r("table",N1,[r("thead",null,[r("tr",D1,[(p(),g(ue,null,Fe(["Organization","Members",""],k=>r("th",{key:k,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},S(k),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Fe(Ft.value,k=>(p(),g("tr",{key:k.id,class:Ee(["border-b border-line last:border-0",xn.id===k.id?"bg-accent-soft":""])},[r("td",F1,[r("span",R1,[E(X,{name:"grid",size:14,class:"text-ink-muted"}),$(S(k.name),1)])]),r("td",B1,S(cs.value[k.id]||0),1),r("td",U1,[Nn.value===k.id?(p(),g(ue,{key:0},[f[135]||(f[135]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:f[62]||(f[62]=qe=>Nn.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:qe=>Qa(k)}," Delete ",8,V1)],64)):(p(),g("div",Z1,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:qe=>To(k)},[E(X,{name:"settings",size:14}),f[136]||(f[136]=$(" Rename ",-1))],8,H1),r("button",{class:"btn-ghost inline-flex items-center gap-1.5",disabled:(cs.value[k.id]||0)>0,title:(cs.value[k.id]||0)>0?"Reassign or remove members first":"",onClick:qe=>Nn.value=k.id},[E(X,{name:"trash",size:14}),f[137]||(f[137]=$(" Delete ",-1))],8,j1)]))])],2))),128))])])])):(p(),g("div",I1,"No organizations yet."))])])):H.id==="advanced"?(p(),g("div",W1,[r("div",K1,[E(Me,{title:"Export data",desc:"Download your settings and profile as JSON.",keywords:"export data download backup"},{default:Le(()=>[r("button",{class:"btn-ghost",onClick:Fn},[E(X,{name:"download",size:15,class:"mr-1.5 inline"}),f[138]||(f[138]=$("Export",-1))])]),_:1}),E(Me,{block:"",title:"Import data",desc:"Restore settings from a previous export.",keywords:"import data upload restore"},{default:Le(()=>[r("label",G1,[E(X,{name:"upload",size:15,class:"mr-1.5 inline"}),f[139]||(f[139]=$("Choose file… ",-1)),r("input",{type:"file",accept:"application/json,.json",class:"hidden",onChange:Ei},null,32)]),Co.value?(p(),g("p",q1,S(Co.value),1)):N("",!0)]),_:1})]),r("div",Y1,[r("div",J1,[E(X,{name:"alertTriangle",size:18}),f[140]||(f[140]=r("h3",{class:"text-sm font-bold uppercase tracking-caps"},"Danger zone",-1))]),f[145]||(f[145]=r("p",{class:"mt-1 text-xs text-ink-secondary"},"Deleting your account is permanent and cannot be undone.",-1)),r("div",X1,[f[144]||(f[144]=r("div",{class:"text-sm font-semibold text-ink"},"Delete account",-1)),r("label",Q1,[ne(r("input",{"onUpdate:modelValue":f[63]||(f[63]=k=>yt.understand=k),type:"checkbox",class:"mt-0.5 h-4 w-4 accent-[var(--danger)]"},null,512),[[Ca,yt.understand]]),f[141]||(f[141]=$(" I understand this permanently deletes my account and all associated data. ",-1))]),r("div",eb,[r("label",tb,[f[142]||(f[142]=$("Type ",-1)),r("span",nb,S(Oi.value),1),f[143]||(f[143]=$(" to confirm",-1))]),ne(r("input",{"onUpdate:modelValue":f[64]||(f[64]=k=>yt.typed=k),class:"field w-full max-w-[360px] font-mono",placeholder:Oi.value},null,8,ib),[[Se,yt.typed]])]),r("div",ob,[yt.armed?(p(),g("button",{key:1,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",disabled:yt.cooldown>0,onClick:Ao},S(yt.cooldown>0?`Confirm in ${yt.cooldown}s…`:"Permanently delete account"),9,ab)):(p(),g("button",{key:0,class:"rounded bg-danger px-4 py-2.5 text-sm font-semibold text-white transition enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-40",disabled:!Lo.value,onClick:ds}," Delete account… ",8,sb)),yt.armed&&yt.cooldown>0?(p(),g("span",rb,"Cooling-off period — read once more.")):N("",!0)]),yt.msg?(p(),g("p",lb,S(yt.msg),1)):N("",!0)])])])):N("",!0)],64))),128))])]),E(mh,{name:"fade"},{default:Le(()=>[Xe.value?(p(),g("div",ub,[E(X,{name:"check",size:16,class:"text-success-fg"}),$(S(Xe.value),1)])):N("",!0)]),_:1})]))}},db=ym(cb,[["__scopeId","data-v-f495a614"]]),fb={class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},hb={class:"flex flex-wrap items-center gap-3"},pb={class:"inline-flex rounded-lg border border-line bg-surface-1 p-0.5"},mb=["onClick"],gb={class:"ml-auto flex items-center gap-2"},vb=["href"],_b={class:"grid grid-cols-4 gap-4 max-[900px]:grid-cols-2"},bb={class:"eyebrow"},yb={key:0,class:"panel border-danger/40 p-4 text-sm text-danger-fg"},xb={key:0,class:"panel p-5"},wb={class:"mb-4 flex items-center justify-between"},kb={class:"eyebrow"},Sb={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},Tb={class:"block"},Pb={class:"block"},Cb={class:"block"},Lb={class:"block"},Ab={key:0,value:""},Mb=["value"],Eb={class:"block"},Ob={class:"block"},zb={class:"block"},Ib={class:"block"},$b={class:"block"},Nb=["value"],Db={class:"block"},Fb=["value"],Rb={class:"block"},Bb=["value"],Ub={class:"block"},Vb={class:"mt-3 block"},Zb={key:0,class:"mt-3 grid grid-cols-2 gap-3 max-[760px]:grid-cols-1"},Hb={class:"block"},jb={class:"block"},Wb={class:"block"},Kb={class:"block"},Gb={class:"col-span-2 block max-[760px]:col-span-1"},qb={class:"mt-4 flex items-center gap-3"},Yb=["disabled"],Jb={key:0,class:"text-sm text-danger-fg"},Xb={class:"panel overflow-hidden p-0"},Qb={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},ey={key:1,class:"grid place-items-center px-5 py-16 text-center"},ty={key:2,class:"overflow-x-auto"},ny={class:"w-full border-collapse text-sm"},iy={class:"text-left"},oy={class:"whitespace-nowrap px-5 py-3 font-mono text-ink"},sy={key:0,class:"text-ink-muted"},ay={class:"px-5 py-3 text-ink-secondary"},ry=["title"],ly={class:"px-5 py-3 font-mono text-ink-secondary"},uy={class:"px-5 py-3 text-ink-secondary"},cy={class:"px-5 py-3"},dy=["onClick"],fy={class:"whitespace-nowrap px-5 py-3 text-right"},hy=["onClick"],py=["onClick"],my=["onClick"],gy={key:0,class:"border-b border-line bg-surface-2"},vy={colspan:"7",class:"px-5 py-3"},_y={class:"flex flex-wrap gap-x-8 gap-y-1.5 text-xs"},by={class:"text-ink-secondary"},yy={class:"text-ink"},xy={class:"text-ink-secondary"},wy={class:"text-ink"},ky={class:"text-ink-secondary"},Sy={class:"font-mono text-ink"},Ty={key:0,class:"text-ink-secondary"},Py={class:"text-ink"},Cy={key:0,class:"mt-2 space-y-1"},Ly={key:1,class:"mt-2 text-xs text-success-fg"},Ay={key:0,class:"panel p-5"},My={class:"mb-4 flex items-center justify-between"},Ey={class:"eyebrow"},Oy={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},zy={class:"block"},Iy={class:"block"},$y={class:"block"},Ny={class:"block"},Dy={class:"block"},Fy={class:"block"},Ry=["value"],By={class:"mt-3 flex flex-wrap gap-6"},Uy={class:"flex items-center gap-2 text-sm text-ink-secondary"},Vy={class:"flex items-center gap-2 text-sm text-ink-secondary"},Zy={class:"mt-4 flex items-center gap-3"},Hy=["disabled"],jy={key:0,class:"text-sm text-danger-fg"},Wy={class:"panel overflow-hidden p-0"},Ky={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Gy={key:1,class:"grid place-items-center px-5 py-16 text-center"},qy={key:2,class:"overflow-x-auto"},Yy={class:"w-full border-collapse text-sm"},Jy={class:"text-left"},Xy={class:"px-5 py-3 font-semibold text-ink"},Qy={class:"px-5 py-3 text-ink-secondary"},ex={class:"px-5 py-3 font-mono text-ink-secondary"},tx={class:"px-5 py-3"},nx={key:1,class:"text-ink-muted"},ix={class:"px-5 py-3"},ox={class:"whitespace-nowrap px-5 py-3 text-right"},sx=["onClick"],ax=["onClick"],rx=["onClick"],lx={__name:"Logbook",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},setup(t){const i=t,s={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},l=j("flights"),u=j([]),d=j([]),h=j(!1),v=j("");async function b(){h.value=!0,v.value="";const[Y,M]=await Promise.all([Rc(),kp()]);(!Y.ok||!M.ok)&&(v.value=Y.status===503||M.status===503?"Logbook storage is not configured on the API Server (service account missing).":"Could not load the logbook."),u.value=Y.drones,d.value=M.flights,h.value=!1}_i(b);function C(Y){const M=Y.compliance||{};return M.exempt?{tone:"neutral",label:"Exempt"}:(M.redFlags||[]).length?{tone:"danger",label:`${M.redFlags.length} issue${M.redFlags.length>1?"s":""}`}:{tone:"success",label:"Compliant"}}const T=j("");function A(Y){T.value=T.value===Y?"":Y}const R=[{value:"open",label:"Open"},{value:"specific",label:"Specific"},{value:"certified",label:"Certified"}],B=[{value:"commercial",label:"Commercial"},{value:"research",label:"Research"},{value:"public",label:"Public-benefit"},{value:"hobby",label:"Private hobby"},{value:"club_area",label:"Model-club area"}],Z=[{value:"",label:"Auto (from drone)"},{value:"manual",label:"Manual"},{value:"automatic",label:"Automatic (FDR)"}];function F(){var Y;return{operationDate:new Date().toISOString().slice(0,10),startTime:"",endTime:"",drone:((Y=u.value[0])==null?void 0:Y.id)||"",areaRoute:"",maxAltitudeAgl:"",pilotName:i.email,certificateRef:"",category:"open",purpose:"commercial",loggingPath:"",rawFdrLogUrl:"",authorisationRef:"",weather:"",airspaceRef:"",observer:"",incidents:"",notes:""}}const he=j(!1),pe=j(""),q=St(F()),Ce=j(""),fe=j(!1),Be=j(!1);function $e(){Object.assign(q,F()),pe.value="",Ce.value="",Be.value=!1,he.value=!0}function Ie(Y){Object.assign(q,{operationDate:(Y.operationDate||"").slice(0,10),startTime:Y.startTime||"",endTime:Y.endTime||"",drone:Y.drone||"",areaRoute:Y.areaRoute||"",maxAltitudeAgl:Y.maxAltitudeAgl||"",pilotName:Y.pilotName||"",certificateRef:Y.certificateRef||"",category:Y.category||"open",purpose:Y.purpose||"commercial",loggingPath:Y.loggingPath||"",rawFdrLogUrl:Y.rawFdrLogUrl||"",authorisationRef:Y.authorisationRef||"",weather:Y.weather||"",airspaceRef:Y.airspaceRef||"",observer:Y.observer||"",incidents:Y.incidents||"",notes:Y.notes||""}),pe.value=Y.id,Ce.value="",Be.value=!!(Y.weather||Y.airspaceRef||Y.observer||Y.incidents||Y.notes),he.value=!0}function Ge(){he.value=!1,pe.value=""}async function be(){var z;if(Ce.value="",!q.drone){Ce.value="Select a drone first (add one on the Drones tab).";return}fe.value=!0;const Y={...q,maxAltitudeAgl:Number(q.maxAltitudeAgl)||0},M=pe.value?await Tp(pe.value,Y):await Sp(Y);if(fe.value=!1,!M.ok){Ce.value=((z=M.body)==null?void 0:z.error)||"Could not save the flight.";return}he.value=!1,await b()}const we=j("");async function ze(Y){const M=await Pp(Y.id);we.value="",M.ok&&await b()}const ie=["","C0","C1","C2","C3","C4","C5","C6"];function He(){return{name:"",model:"",serial:"",operatorNumber:"",mtomGrams:"",isToy:!1,autologsFlights:!1,cClass:""}}const oe=j(!1),je=j(""),le=St(He()),ce=j(""),ae=j(!1);function tt(){Object.assign(le,He()),je.value="",ce.value="",oe.value=!0}function ee(Y){Object.assign(le,{name:Y.name||"",model:Y.model||"",serial:Y.serial||"",operatorNumber:Y.operatorNumber||"",mtomGrams:Y.mtomGrams||"",isToy:!!Y.isToy,autologsFlights:!!Y.autologsFlights,cClass:Y.cClass||""}),je.value=Y.id,ce.value="",oe.value=!0}function xe(){oe.value=!1,je.value=""}async function Ne(){var z;if(ce.value="",!le.name.trim()){ce.value="Give the drone a name.";return}ae.value=!0;const Y={...le,mtomGrams:Number(le.mtomGrams)||0},M=je.value?await xp(je.value,Y):await yp(Y);if(ae.value=!1,!M.ok){ce.value=((z=M.body)==null?void 0:z.error)||"Could not save the drone.";return}oe.value=!1,await b()}const dt=j("");async function st(Y){var z;const M=await wp(Y.id);dt.value="",M.ok?await b():ce.value=((z=M.body)==null?void 0:z.error)||"Could not delete the drone."}const Ve=ye(()=>{const Y=d.value.length,M=d.value.filter(vt=>{var rt;return(((rt=vt.compliance)==null?void 0:rt.redFlags)||[]).length}).length,z=d.value.filter(vt=>{var rt;return(rt=vt.compliance)==null?void 0:rt.required}).length;return{total:Y,flagged:M,required:z,fleet:u.value.length}});return(Y,M)=>(p(),g("div",fb,[r("div",hb,[r("div",pb,[(p(),g(ue,null,Fe([["flights","Flights"],["drones","Drones"]],z=>r("button",{key:z[0],class:Ee(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",l.value===z[0]?"bg-accent-soft text-accent-soft-fg":"text-ink-secondary hover:text-ink"]),onClick:vt=>l.value=z[0]},S(z[1]),11,mb)),64))]),r("div",gb,[r("a",{href:Oe(Cp)(),class:"btn-ghost inline-flex items-center gap-2",title:"Download a compliance CSV (Trafikstyrelsen / police disclosure)"},[E(X,{name:"download",size:15}),M[29]||(M[29]=$(" Export CSV ",-1))],8,vb),l.value==="flights"?(p(),g("button",{key:0,class:"btn-accent inline-flex items-center gap-2",onClick:$e},[E(X,{name:"plus",size:15}),M[30]||(M[30]=$(" Log flight ",-1))])):(p(),g("button",{key:1,class:"btn-accent inline-flex items-center gap-2",onClick:tt},[E(X,{name:"plus",size:15}),M[31]||(M[31]=$(" Add drone ",-1))]))])]),r("div",_b,[(p(!0),g(ue,null,Fe([{label:"Flights logged",value:Ve.value.total,tone:"neutral"},{label:"Require logbook",value:Ve.value.required,tone:"neutral"},{label:"Compliance flags",value:Ve.value.flagged,tone:Ve.value.flagged?"danger":"success"},{label:"Registered drones",value:Ve.value.fleet,tone:"neutral"}],z=>(p(),g("div",{key:z.label,class:"panel p-5"},[r("div",bb,S(z.label),1),r("div",{class:Ee(["mt-2 text-[30px] font-bold leading-none tracking-tightest",z.tone==="danger"?"text-danger-fg":z.tone==="success"?"text-success-fg":"text-ink"])},S(z.value),3)]))),128))]),v.value?(p(),g("div",yb,S(v.value),1)):N("",!0),l.value==="flights"?(p(),g(ue,{key:1},[he.value?(p(),g("div",xb,[r("div",wb,[r("div",null,[r("div",kb,S(pe.value?"Edit entry":"New entry"),1),M[32]||(M[32]=r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Logbook flight (BEK 1649 §5)",-1))]),r("button",{class:"btn-icon",onClick:Ge},[E(X,{name:"x",size:16})])]),r("div",Sb,[r("label",Tb,[M[33]||(M[33]=r("span",{class:"eyebrow mb-1 block"},"Date",-1)),ne(r("input",{"onUpdate:modelValue":M[0]||(M[0]=z=>q.operationDate=z),type:"date",class:"field"},null,512),[[Se,q.operationDate]])]),r("label",Pb,[M[34]||(M[34]=r("span",{class:"eyebrow mb-1 block"},"Start",-1)),ne(r("input",{"onUpdate:modelValue":M[1]||(M[1]=z=>q.startTime=z),type:"time",class:"field"},null,512),[[Se,q.startTime]])]),r("label",Cb,[M[35]||(M[35]=r("span",{class:"eyebrow mb-1 block"},"End",-1)),ne(r("input",{"onUpdate:modelValue":M[2]||(M[2]=z=>q.endTime=z),type:"time",class:"field"},null,512),[[Se,q.endTime]])]),r("label",Lb,[M[36]||(M[36]=r("span",{class:"eyebrow mb-1 block"},"Drone",-1)),ne(r("select",{"onUpdate:modelValue":M[3]||(M[3]=z=>q.drone=z),class:"field"},[u.value.length?N("",!0):(p(),g("option",Ab,"— add a drone first —")),(p(!0),g(ue,null,Fe(u.value,z=>(p(),g("option",{key:z.id,value:z.id},S(z.name)+S(z.model?` · ${z.model}`:""),9,Mb))),128))],512),[[At,q.drone]])]),r("label",Eb,[M[37]||(M[37]=r("span",{class:"eyebrow mb-1 block"},"Max altitude (m AGL)",-1)),ne(r("input",{"onUpdate:modelValue":M[4]||(M[4]=z=>q.maxAltitudeAgl=z),type:"number",min:"0",class:"field",placeholder:"120"},null,512),[[Se,q.maxAltitudeAgl]])]),r("label",Ob,[M[38]||(M[38]=r("span",{class:"eyebrow mb-1 block"},"Area / route",-1)),ne(r("input",{"onUpdate:modelValue":M[5]||(M[5]=z=>q.areaRoute=z),class:"field",placeholder:"Field N of Roskilde, grid survey"},null,512),[[Se,q.areaRoute]])]),r("label",zb,[M[39]||(M[39]=r("span",{class:"eyebrow mb-1 block"},"Remote pilot name",-1)),ne(r("input",{"onUpdate:modelValue":M[6]||(M[6]=z=>q.pilotName=z),class:"field",placeholder:"Full name"},null,512),[[Se,q.pilotName]])]),r("label",Ib,[M[40]||(M[40]=r("span",{class:"eyebrow mb-1 block"},"Certificate ref",-1)),ne(r("input",{"onUpdate:modelValue":M[7]||(M[7]=z=>q.certificateRef=z),class:"field",placeholder:"A2 / STS cert no."},null,512),[[Se,q.certificateRef]])]),r("label",$b,[M[41]||(M[41]=r("span",{class:"eyebrow mb-1 block"},"Logging path",-1)),ne(r("select",{"onUpdate:modelValue":M[8]||(M[8]=z=>q.loggingPath=z),class:"field"},[(p(),g(ue,null,Fe(Z,z=>r("option",{key:z.value,value:z.value},S(z.label),9,Nb)),64))],512),[[At,q.loggingPath]])]),r("label",Db,[M[42]||(M[42]=r("span",{class:"eyebrow mb-1 block"},"Category",-1)),ne(r("select",{"onUpdate:modelValue":M[9]||(M[9]=z=>q.category=z),class:"field"},[(p(),g(ue,null,Fe(R,z=>r("option",{key:z.value,value:z.value},S(z.label),9,Fb)),64))],512),[[At,q.category]])]),r("label",Rb,[M[43]||(M[43]=r("span",{class:"eyebrow mb-1 block"},"Purpose",-1)),ne(r("select",{"onUpdate:modelValue":M[10]||(M[10]=z=>q.purpose=z),class:"field"},[(p(),g(ue,null,Fe(B,z=>r("option",{key:z.value,value:z.value},S(z.label),9,Bb)),64))],512),[[At,q.purpose]])]),r("label",Ub,[M[44]||(M[44]=r("span",{class:"eyebrow mb-1 block"},"Authorisation ref",-1)),ne(r("input",{"onUpdate:modelValue":M[11]||(M[11]=z=>q.authorisationRef=z),class:"field",placeholder:"Specific-category ref"},null,512),[[Se,q.authorisationRef]])])]),r("label",Vb,[M[45]||(M[45]=r("span",{class:"eyebrow mb-1 block"},"FDR log URL (automatic path)",-1)),ne(r("input",{"onUpdate:modelValue":M[12]||(M[12]=z=>q.rawFdrLogUrl=z),class:"field",placeholder:"Link to the stored flight-data-recorder export"},null,512),[[Se,q.rawFdrLogUrl]])]),r("button",{class:"mt-4 flex items-center gap-1.5 text-sm font-semibold text-accent",onClick:M[13]||(M[13]=z=>Be.value=!Be.value)},[E(X,{name:Be.value?"x":"plus",size:14},null,8,["name"]),M[46]||(M[46]=$(" Operational details (weather, airspace, incidents) ",-1))]),Be.value?(p(),g("div",Zb,[r("label",Hb,[M[47]||(M[47]=r("span",{class:"eyebrow mb-1 block"},"Weather / wind",-1)),ne(r("input",{"onUpdate:modelValue":M[14]||(M[14]=z=>q.weather=z),class:"field",placeholder:"6 m/s NW, CAVOK"},null,512),[[Se,q.weather]])]),r("label",jb,[M[48]||(M[48]=r("span",{class:"eyebrow mb-1 block"},"Airspace / NOTAM ref",-1)),ne(r("input",{"onUpdate:modelValue":M[15]||(M[15]=z=>q.airspaceRef=z),class:"field"},null,512),[[Se,q.airspaceRef]])]),r("label",Wb,[M[49]||(M[49]=r("span",{class:"eyebrow mb-1 block"},"Observer",-1)),ne(r("input",{"onUpdate:modelValue":M[16]||(M[16]=z=>q.observer=z),class:"field"},null,512),[[Se,q.observer]])]),r("label",Kb,[M[50]||(M[50]=r("span",{class:"eyebrow mb-1 block"},"Incidents / anomalies",-1)),ne(r("input",{"onUpdate:modelValue":M[17]||(M[17]=z=>q.incidents=z),class:"field",placeholder:"RTH trigger, GPS dropout…"},null,512),[[Se,q.incidents]])]),r("label",Gb,[M[51]||(M[51]=r("span",{class:"eyebrow mb-1 block"},"Notes",-1)),ne(r("textarea",{"onUpdate:modelValue":M[18]||(M[18]=z=>q.notes=z),rows:"2",class:"field"},null,512),[[Se,q.notes]])])])):N("",!0),r("div",qb,[r("button",{class:"btn-accent",disabled:fe.value,onClick:be},S(fe.value?"Saving…":pe.value?"Save changes":"Log flight"),9,Yb),r("button",{class:"btn-ghost",onClick:Ge},"Cancel"),Ce.value?(p(),g("span",Jb,S(Ce.value),1)):N("",!0)])])):N("",!0),r("div",Xb,[h.value?(p(),g("div",Qb,"Loading…")):d.value.length?(p(),g("div",ty,[r("table",ny,[r("thead",null,[r("tr",iy,[(p(),g(ue,null,Fe(["Date","Drone","Area / route","Alt","Pilot","Compliance",""],z=>r("th",{key:z,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},S(z),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Fe(d.value,z=>{var vt,rt,kt,x;return p(),g(ue,{key:z.id},[r("tr",{class:Ee(["border-b border-line last:border-0",pe.value===z.id?"bg-accent-soft":""])},[r("td",oy,[$(S((z.operationDate||"").slice(0,10))+" ",1),z.startTime?(p(),g("span",sy,S(z.startTime),1)):N("",!0)]),r("td",ay,S(z.droneName||"—"),1),r("td",{class:"max-w-[220px] truncate px-5 py-3 text-ink-secondary",title:z.areaRoute},S(z.areaRoute||"—"),9,ry),r("td",ly,S(z.maxAltitudeAgl?z.maxAltitudeAgl+" m":"—"),1),r("td",uy,S(z.pilotName||"—"),1),r("td",cy,[r("button",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",s[C(z).tone]]),onClick:_=>A(z.id)},[C(z).tone==="danger"?(p(),at(X,{key:0,name:"alertTriangle",size:12})):C(z).tone==="success"?(p(),at(X,{key:1,name:"check",size:12})):N("",!0),$(" "+S(C(z).label),1)],10,dy)]),r("td",fy,[we.value===z.id?(p(),g(ue,{key:0},[M[54]||(M[54]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:M[19]||(M[19]=_=>we.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:_=>ze(z)},"Delete",8,hy)],64)):(p(),g(ue,{key:1},[r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:_=>Ie(z)},[E(X,{name:"sliders",size:13}),M[55]||(M[55]=$(" Edit",-1))],8,py),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:_=>we.value=z.id},[E(X,{name:"trash",size:13})],8,my)],64))])],2),T.value===z.id?(p(),g("tr",gy,[r("td",vy,[r("div",_y,[r("span",by,[M[56]||(M[56]=$("Logging path: ",-1)),r("b",yy,S(((vt=z.compliance)==null?void 0:vt.loggingPath)||"—"),1)]),r("span",xy,[M[57]||(M[57]=$("Category: ",-1)),r("b",wy,S(z.category||"—"),1)]),r("span",ky,[M[58]||(M[58]=$("Retain until: ",-1)),r("b",Sy,S((z.retentionUntil||"").slice(0,10)||"—"),1)]),(rt=z.compliance)!=null&&rt.exempt?(p(),g("span",Ty,[M[59]||(M[59]=$("Exempt: ",-1)),r("b",Py,S(z.compliance.exemptReason),1)])):N("",!0)]),(((kt=z.compliance)==null?void 0:kt.redFlags)||[]).length?(p(),g("ul",Cy,[(p(!0),g(ue,null,Fe(z.compliance.redFlags,(_,w)=>(p(),g("li",{key:w,class:"flex items-start gap-2 text-xs text-danger-fg"},[E(X,{name:"alertTriangle",size:13,class:"mt-px shrink-0"}),$(" "+S(_),1)]))),128))])):(x=z.compliance)!=null&&x.exempt?N("",!0):(p(),g("div",Ly,"No compliance gaps detected."))])])):N("",!0)],64)}),128))])])])):(p(),g("div",ey,[E(X,{name:"book",size:26,class:"text-ink-muted"}),M[52]||(M[52]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No flights logged yet",-1)),M[53]||(M[53]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Log your first operation to start the 5-year retention record.",-1))]))])],64)):(p(),g(ue,{key:2},[oe.value?(p(),g("div",Ay,[r("div",My,[r("div",null,[r("div",Ey,S(je.value?"Edit drone":"New drone"),1),M[60]||(M[60]=r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft registry",-1))]),r("button",{class:"btn-icon",onClick:xe},[E(X,{name:"x",size:16})])]),r("div",Oy,[r("label",zy,[M[61]||(M[61]=r("span",{class:"eyebrow mb-1 block"},"Name",-1)),ne(r("input",{"onUpdate:modelValue":M[20]||(M[20]=z=>le.name=z),class:"field",placeholder:"Mavic-01"},null,512),[[Se,le.name]])]),r("label",Iy,[M[62]||(M[62]=r("span",{class:"eyebrow mb-1 block"},"Model",-1)),ne(r("input",{"onUpdate:modelValue":M[21]||(M[21]=z=>le.model=z),class:"field",placeholder:"DJI Mavic 3 Enterprise"},null,512),[[Se,le.model]])]),r("label",$y,[M[63]||(M[63]=r("span",{class:"eyebrow mb-1 block"},"Serial",-1)),ne(r("input",{"onUpdate:modelValue":M[22]||(M[22]=z=>le.serial=z),class:"field"},null,512),[[Se,le.serial]])]),r("label",Ny,[M[64]||(M[64]=r("span",{class:"eyebrow mb-1 block"},"Operator no.",-1)),ne(r("input",{"onUpdate:modelValue":M[23]||(M[23]=z=>le.operatorNumber=z),class:"field",placeholder:"DNK…"},null,512),[[Se,le.operatorNumber]])]),r("label",Dy,[M[65]||(M[65]=r("span",{class:"eyebrow mb-1 block"},"MTOM (grams)",-1)),ne(r("input",{"onUpdate:modelValue":M[24]||(M[24]=z=>le.mtomGrams=z),type:"number",min:"0",class:"field",placeholder:"920"},null,512),[[Se,le.mtomGrams]])]),r("label",Fy,[M[66]||(M[66]=r("span",{class:"eyebrow mb-1 block"},"C-class",-1)),ne(r("select",{"onUpdate:modelValue":M[25]||(M[25]=z=>le.cClass=z),class:"field"},[(p(),g(ue,null,Fe(ie,z=>r("option",{key:z,value:z},S(z||"— none —"),9,Ry)),64))],512),[[At,le.cClass]])])]),r("div",By,[r("label",Uy,[ne(r("input",{"onUpdate:modelValue":M[26]||(M[26]=z=>le.autologsFlights=z),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[Ca,le.autologsFlights]]),M[67]||(M[67]=$(" Auto-logs flights (onboard FDR) ",-1))]),r("label",Vy,[ne(r("input",{"onUpdate:modelValue":M[27]||(M[27]=z=>le.isToy=z),type:"checkbox",class:"h-4 w-4 accent-[var(--accent)]"},null,512),[[Ca,le.isToy]]),M[68]||(M[68]=$(" Toy drone (logbook-exempt) ",-1))])]),r("div",Zy,[r("button",{class:"btn-accent",disabled:ae.value,onClick:Ne},S(ae.value?"Saving…":je.value?"Save changes":"Add drone"),9,Hy),r("button",{class:"btn-ghost",onClick:xe},"Cancel"),ce.value?(p(),g("span",jy,S(ce.value),1)):N("",!0)])])):N("",!0),r("div",Wy,[h.value?(p(),g("div",Ky,"Loading…")):u.value.length?(p(),g("div",qy,[r("table",Yy,[r("thead",null,[r("tr",Jy,[(p(),g(ue,null,Fe(["Name","Model","MTOM","Class","FDR",""],z=>r("th",{key:z,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},S(z),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Fe(u.value,z=>(p(),g("tr",{key:z.id,class:Ee(["border-b border-line last:border-0",je.value===z.id?"bg-accent-soft":""])},[r("td",Xy,S(z.name),1),r("td",Qy,S(z.model||"—"),1),r("td",ex,S(z.mtomGrams?z.mtomGrams+" g":"—"),1),r("td",tx,[z.cClass?(p(),g("span",{key:0,class:Ee(["inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",s.accent])},S(z.cClass),3)):(p(),g("span",nx,"—")),z.isToy?(p(),g("span",{key:2,class:Ee(["ml-1 inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold",s.neutral])},"toy",2)):N("",!0)]),r("td",ix,[r("span",{class:Ee(["text-xs",z.autologsFlights?"text-success-fg":"text-ink-muted"])},S(z.autologsFlights?"yes":"no"),3)]),r("td",ox,[dt.value===z.id?(p(),g(ue,{key:0},[M[71]||(M[71]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:M[28]||(M[28]=vt=>dt.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:vt=>st(z)},"Delete",8,sx)],64)):(p(),g(ue,{key:1},[r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:vt=>ee(z)},[E(X,{name:"sliders",size:13}),M[72]||(M[72]=$(" Edit",-1))],8,ax),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:vt=>dt.value=z.id},[E(X,{name:"trash",size:13})],8,rx)],64))])],2))),128))])])])):(p(),g("div",Gy,[E(X,{name:"drone",size:26,class:"text-ink-muted"}),M[69]||(M[69]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No drones registered",-1)),M[70]||(M[70]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Register the airframes you fly to log flights against them.",-1))]))])],64))]))}},ux={class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},cx={class:"flex flex-wrap items-center gap-3"},dx={class:"inline-flex flex-wrap rounded-lg border border-line bg-surface-1 p-0.5"},fx=["onClick"],hx={class:"ml-auto"},px={class:"grid grid-cols-4 gap-4 max-[900px]:grid-cols-2"},mx={class:"eyebrow"},gx={key:0,class:"panel border-danger/40 p-4 text-sm text-danger-fg"},vx={key:1,class:"panel p-5"},_x={class:"mb-4 flex items-center justify-between"},bx={class:"eyebrow"},yx={class:"mt-0.5 text-base font-semibold text-ink"},xx={class:"grid grid-cols-3 gap-3 max-[760px]:grid-cols-1"},wx={class:"col-span-2 block max-[760px]:col-span-1"},kx={class:"block"},Sx=["value"],Tx={class:"block"},Px=["value"],Cx={class:"block"},Lx=["value"],Ax={class:"block"},Mx={class:"block"},Ex={class:"block"},Ox={class:"block"},zx=["value"],Ix={class:"block"},$x={class:"block"},Nx={class:"block"},Dx=["value"],Fx={class:"mt-3 block"},Rx={key:0,class:"mt-3"},Bx={class:"eyebrow mb-1 block"},Ux={key:1,class:"mt-3 text-xs text-ink-muted"},Vx={class:"mt-4 flex items-center gap-3"},Zx=["disabled"],Hx={key:0,class:"text-sm text-danger-fg"},jx={class:"panel overflow-hidden p-0"},Wx={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Kx={key:1,class:"grid place-items-center px-5 py-16 text-center"},Gx={class:"mt-3 text-sm font-medium text-ink-secondary"},qx={class:"mt-1 text-xs text-ink-muted"},Yx={key:2,class:"overflow-x-auto"},Jx={class:"w-full border-collapse text-sm"},Xx={class:"text-left"},Qx={class:"px-5 py-3"},e0={class:"font-semibold text-ink"},t0={key:0,class:"font-mono text-[11px] text-ink-muted"},n0={class:"px-5 py-3 text-ink-secondary"},i0={class:"px-5 py-3 text-ink-secondary"},o0={class:"px-5 py-3"},s0=["onClick"],a0={key:0,class:"mt-0.5 font-mono text-[10.5px] text-ink-muted"},r0={class:"px-5 py-3 font-mono text-ink-secondary"},l0={class:"whitespace-nowrap px-5 py-3 text-right"},u0=["onClick"],c0=["onClick"],d0=["href"],f0=["onClick"],h0=["onClick"],p0=["onClick"],m0={key:0,class:"border-b border-line bg-surface-2"},g0={colspan:"6",class:"px-5 py-3"},v0={class:"flex flex-wrap gap-x-8 gap-y-1.5 text-xs"},_0={class:"text-ink-secondary"},b0={class:"text-ink"},y0={class:"text-ink-secondary"},x0={class:"text-ink"},w0={key:0,class:"text-ink-secondary"},k0={class:"text-ink"},S0={key:1,class:"text-ink-secondary"},T0={class:"font-mono text-ink"},P0={key:2,class:"text-ink-secondary"},C0={class:"font-mono text-ink"},L0={class:"text-ink-secondary"},A0={class:"text-ink"},M0={key:0,class:"mt-2 space-y-1"},E0={key:1,class:"mt-2 text-xs text-success-fg"},O0={key:2,class:"mt-2 text-xs text-ink-secondary"},z0={class:"flex max-h-[90vh] w-full max-w-[920px] flex-col overflow-hidden rounded-lg border border-line bg-surface-1 shadow-2xl"},I0={class:"flex items-center gap-3 border-b border-line px-5 py-3"},$0={class:"min-w-0"},N0={class:"truncate text-sm font-semibold text-ink"},D0={class:"truncate font-mono text-[11px] text-ink-muted"},F0={class:"ml-auto flex items-center gap-2"},R0=["href"],B0=["href"],U0={class:"flex-1 overflow-auto bg-surface-2"},V0=["src","alt"],Z0=["src","title"],H0={key:2,class:"grid place-items-center px-6 py-16 text-center"},j0={class:"mt-1 text-xs text-ink-muted"},W0=["href"],K0={__name:"Documents",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},setup(t){const i={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},s=[{value:"certificate",label:"Pilot certificate"},{value:"medical",label:"Medical / training"},{value:"insurance",label:"Insurance / liability"},{value:"background_check",label:"Background check / waiver"},{value:"registration",label:"Aircraft registration"},{value:"maintenance",label:"Maintenance log"},{value:"conformity",label:"Conformity / compliance"},{value:"firmware",label:"Firmware / software"},{value:"incident",label:"Incident / repair report"},{value:"flight_log",label:"Flight log"},{value:"checklist",label:"Pre-flight checklist"},{value:"airspace_auth",label:"Airspace authorisation"},{value:"mission_plan",label:"Mission plan / flight path"},{value:"risk_assessment",label:"Risk assessment / survey"},{value:"contract",label:"Contract / SOW"},{value:"client_insurance",label:"Client insurance cert"},{value:"delivery_report",label:"Delivery / media handoff"},{value:"other",label:"Other"}],l=Object.fromEntries(s.map(x=>[x.value,x.label])),u=[{value:"pilot",label:"Pilot"},{value:"aircraft",label:"Aircraft"},{value:"organization",label:"Organization"},{value:"client",label:"Client"},{value:"other",label:"Other"}],d=[{value:"active",label:"Active"},{value:"pending_review",label:"Pending review"},{value:"archived",label:"Archived"}],h=[{value:"pilot",label:"Pilot"},{value:"ops",label:"Ops manager"},{value:"admin",label:"Admin"},{value:"client",label:"Client-facing"}],v=j([]),b=j([]),C=j(!1),T=j("");async function A(){C.value=!0,T.value="";const[x,_]=await Promise.all([Lp(),Rc()]);x.ok||(T.value=x.status===503?"Document storage is not configured on the API Server (service account missing).":"Could not load documents."),v.value=x.documents,b.value=_.drones||[],C.value=!1}_i(A);const R=j("all"),B=[["all","All"],["expiring","Expiring soon"],["expired","Expired"],["pending","Pending review"],["archived","Archived"]],Z=ye(()=>{const x=v.value;switch(R.value){case"expiring":return x.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expiring_soon"&&_.status!=="archived"});case"expired":return x.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expired"&&_.status!=="archived"});case"pending":return x.filter(_=>_.status==="pending_review");case"archived":return x.filter(_=>_.status==="archived");default:return x.filter(_=>_.status!=="archived")}});function F(x){if(x.status==="archived")return{tone:"neutral",label:"Superseded",icon:""};const _=x.expiry||{};return _.state==="expired"?{tone:"danger",label:"Expired",icon:"alertTriangle"}:_.state==="expiring_soon"?{tone:"warning",label:`Expires in ${_.daysUntilExpiry}d`,icon:"clock"}:_.state==="valid"?{tone:"success",label:"Valid",icon:"check"}:{tone:"neutral",label:"No expiry",icon:""}}const he=j("");function pe(x){he.value=he.value===x?"":x}function q(x){return x.ownerDrone?x.ownerDroneName||"Aircraft":x.ownerRef?x.ownerRef:x.ownerType==="pilot"?"Pilot":x.ownerType?x.ownerType.charAt(0).toUpperCase()+x.ownerType.slice(1):"—"}const Ce=["png","jpg","jpeg","gif","webp","svg","bmp","avif"],fe=["pdf","txt","csv","log","json","md","html","htm","xml"];function Be(x){const _=(x||"").split(".").pop().toLowerCase();return Ce.includes(_)?"image":fe.includes(_)?"frame":"none"}const $e=j(null),Ie=ye(()=>$e.value?Be($e.value.fileName):"none"),Ge=ye(()=>$e.value?Op($e.value.id):"");function be(x){$e.value=x}function we(){$e.value=null}function ze(x){x.key==="Escape"&&$e.value&&we()}_i(()=>window.addEventListener("keydown",ze)),Ho(()=>window.removeEventListener("keydown",ze));function ie(){return{title:"",docType:"certificate",ownerType:"pilot",ownerDrone:"",ownerRef:"",reference:"",jurisdiction:"",issueDate:"",expiryDate:"",status:"active",accessTier:"ops",notes:""}}const He=j(!1),oe=j(""),je=j(""),le=j(""),ce=St(ie()),ae=j(null),tt=j(null),ee=j(""),xe=j(!1);function Ne(){ae.value=null,tt.value&&(tt.value.value="")}function dt(){Object.assign(ce,ie()),oe.value="",je.value="",le.value="",Ne(),ee.value="",He.value=!0}function st(x){Object.assign(ce,{title:x.title||"",docType:x.docType||"certificate",ownerType:x.ownerType||"pilot",ownerDrone:x.ownerDrone||"",ownerRef:x.ownerRef||"",reference:x.reference||"",jurisdiction:x.jurisdiction||"",issueDate:x.issueDate||"",expiryDate:x.expiryDate||"",status:x.status||"active",accessTier:x.accessTier||"ops",notes:x.notes||""}),oe.value=x.id,je.value="",le.value="",Ne(),ee.value="",He.value=!0}function Ve(x){st(x),oe.value="",je.value=x.id,le.value=x.title,ce.status="active"}function Y(){He.value=!1,oe.value="",je.value=""}function M(x){var _;ae.value=((_=x.target.files)==null?void 0:_[0])||null}async function z(){var _;if(ee.value="",!ce.title.trim()){ee.value="Give the document a title.";return}xe.value=!0;let x;if(oe.value)x=await Mp(oe.value,{...ce});else{const w={...ce};je.value&&(w.replaces=je.value),x=await Ap(w,ae.value)}if(xe.value=!1,!x.ok){ee.value=((_=x.body)==null?void 0:_.error)||"Could not save the document.";return}He.value=!1,oe.value="",je.value="",await A()}const vt=j("");async function rt(x){var w;const _=await Ep(x.id);vt.value="",_.ok?await A():ee.value=((w=_.body)==null?void 0:w.error)||"Could not delete the document."}const kt=ye(()=>{const x=v.value.filter(_=>_.status!=="archived");return{total:x.length,expiring:x.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expiring_soon"}).length,expired:x.filter(_=>{var w;return((w=_.expiry)==null?void 0:w.state)==="expired"}).length,pending:v.value.filter(_=>_.status==="pending_review").length}});return(x,_)=>(p(),g("div",ux,[r("div",cx,[r("div",dx,[(p(),g(ue,null,Fe(B,w=>r("button",{key:w[0],class:Ee(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",R.value===w[0]?"bg-accent-soft text-accent-soft-fg":"text-ink-secondary hover:text-ink"]),onClick:K=>R.value=w[0]},S(w[1]),11,fx)),64))]),r("div",hx,[r("button",{class:"btn-accent inline-flex items-center gap-2",onClick:dt},[E(X,{name:"upload",size:15}),_[13]||(_[13]=$(" Add document ",-1))])])]),r("div",px,[(p(!0),g(ue,null,Fe([{label:"Documents on file",value:kt.value.total,tone:"neutral"},{label:"Expiring soon",value:kt.value.expiring,tone:kt.value.expiring?"warning":"neutral"},{label:"Expired",value:kt.value.expired,tone:kt.value.expired?"danger":"success"},{label:"Pending review",value:kt.value.pending,tone:kt.value.pending?"accent":"neutral"}],w=>(p(),g("div",{key:w.label,class:"panel p-5"},[r("div",mx,S(w.label),1),r("div",{class:Ee(["mt-2 text-[30px] font-bold leading-none tracking-tightest",w.tone==="danger"?"text-danger-fg":w.tone==="warning"?"text-amber-fg":w.tone==="success"?"text-success-fg":w.tone==="accent"?"text-accent-soft-fg":"text-ink"])},S(w.value),3)]))),128))]),T.value?(p(),g("div",gx,S(T.value),1)):N("",!0),He.value?(p(),g("div",vx,[r("div",_x,[r("div",null,[r("div",bx,S(oe.value?"Edit document":je.value?"New version":"New document"),1),r("div",yx,S(je.value?`Supersedes “${le.value}”`:"Compliance & operational document"),1)]),r("button",{class:"btn-icon",onClick:Y},[E(X,{name:"x",size:16})])]),r("div",xx,[r("label",wx,[_[14]||(_[14]=r("span",{class:"eyebrow mb-1 block"},"Title",-1)),ne(r("input",{"onUpdate:modelValue":_[0]||(_[0]=w=>ce.title=w),class:"field",placeholder:"A2 Remote Pilot Certificate — J. Dariusz"},null,512),[[Se,ce.title]])]),r("label",kx,[_[15]||(_[15]=r("span",{class:"eyebrow mb-1 block"},"Type",-1)),ne(r("select",{"onUpdate:modelValue":_[1]||(_[1]=w=>ce.docType=w),class:"field"},[(p(),g(ue,null,Fe(s,w=>r("option",{key:w.value,value:w.value},S(w.label),9,Sx)),64))],512),[[At,ce.docType]])]),r("label",Tx,[_[16]||(_[16]=r("span",{class:"eyebrow mb-1 block"},"Owner type",-1)),ne(r("select",{"onUpdate:modelValue":_[2]||(_[2]=w=>ce.ownerType=w),class:"field"},[(p(),g(ue,null,Fe(u,w=>r("option",{key:w.value,value:w.value},S(w.label),9,Px)),64))],512),[[At,ce.ownerType]])]),r("label",Cx,[_[18]||(_[18]=r("span",{class:"eyebrow mb-1 block"},"Aircraft (if any)",-1)),ne(r("select",{"onUpdate:modelValue":_[3]||(_[3]=w=>ce.ownerDrone=w),class:"field"},[_[17]||(_[17]=r("option",{value:""},"— none —",-1)),(p(!0),g(ue,null,Fe(b.value,w=>(p(),g("option",{key:w.id,value:w.id},S(w.name)+S(w.model?` · ${w.model}`:""),9,Lx))),128))],512),[[At,ce.ownerDrone]])]),r("label",Ax,[_[19]||(_[19]=r("span",{class:"eyebrow mb-1 block"},"Owner reference",-1)),ne(r("input",{"onUpdate:modelValue":_[4]||(_[4]=w=>ce.ownerRef=w),class:"field",placeholder:"Client name / serial / site"},null,512),[[Se,ce.ownerRef]])]),r("label",Mx,[_[20]||(_[20]=r("span",{class:"eyebrow mb-1 block"},"Reference / number",-1)),ne(r("input",{"onUpdate:modelValue":_[5]||(_[5]=w=>ce.reference=w),class:"field",placeholder:"Cert / registration / policy no."},null,512),[[Se,ce.reference]])]),r("label",Ex,[_[21]||(_[21]=r("span",{class:"eyebrow mb-1 block"},"Jurisdiction",-1)),ne(r("input",{"onUpdate:modelValue":_[6]||(_[6]=w=>ce.jurisdiction=w),class:"field",placeholder:"DK / EASA / FAA"},null,512),[[Se,ce.jurisdiction]])]),r("label",Ox,[_[22]||(_[22]=r("span",{class:"eyebrow mb-1 block"},"Access tier",-1)),ne(r("select",{"onUpdate:modelValue":_[7]||(_[7]=w=>ce.accessTier=w),class:"field"},[(p(),g(ue,null,Fe(h,w=>r("option",{key:w.value,value:w.value},S(w.label),9,zx)),64))],512),[[At,ce.accessTier]])]),r("label",Ix,[_[23]||(_[23]=r("span",{class:"eyebrow mb-1 block"},"Issue date",-1)),ne(r("input",{"onUpdate:modelValue":_[8]||(_[8]=w=>ce.issueDate=w),type:"date",class:"field"},null,512),[[Se,ce.issueDate]])]),r("label",$x,[_[24]||(_[24]=r("span",{class:"eyebrow mb-1 block"},"Expiry date",-1)),ne(r("input",{"onUpdate:modelValue":_[9]||(_[9]=w=>ce.expiryDate=w),type:"date",class:"field"},null,512),[[Se,ce.expiryDate]])]),r("label",Nx,[_[25]||(_[25]=r("span",{class:"eyebrow mb-1 block"},"Status",-1)),ne(r("select",{"onUpdate:modelValue":_[10]||(_[10]=w=>ce.status=w),class:"field"},[(p(),g(ue,null,Fe(d,w=>r("option",{key:w.value,value:w.value},S(w.label),9,Dx)),64))],512),[[At,ce.status]])])]),r("label",Fx,[_[26]||(_[26]=r("span",{class:"eyebrow mb-1 block"},"Notes",-1)),ne(r("textarea",{"onUpdate:modelValue":_[11]||(_[11]=w=>ce.notes=w),rows:"2",class:"field",placeholder:"Conditions, renewal contacts, anything worth recording"},null,512),[[Se,ce.notes]])]),oe.value?(p(),g("div",Ux,[..._[28]||(_[28]=[$(" Editing updates metadata only. To replace the file, close this and use ",-1),r("b",{class:"text-ink-secondary"},"New version",-1),$(" on the document — the old version is kept for audit. ",-1)])])):(p(),g("div",Rx,[r("span",Bx,"File "+S(je.value?"(new version)":"(optional)"),1),r("input",{ref_key:"fileInput",ref:tt,type:"file",class:"field",onChange:M},null,544),_[27]||(_[27]=r("p",{class:"mt-1 text-xs text-ink-muted"}," Stored in PocketBase for now (object storage later). Max 50 MB. ",-1))])),r("div",Vx,[r("button",{class:"btn-accent",disabled:xe.value,onClick:z},S(xe.value?"Saving…":oe.value?"Save changes":je.value?"Upload new version":"Add document"),9,Zx),r("button",{class:"btn-ghost",onClick:Y},"Cancel"),ee.value?(p(),g("span",Hx,S(ee.value),1)):N("",!0)])])):N("",!0),r("div",jx,[C.value?(p(),g("div",Wx,"Loading…")):Z.value.length?(p(),g("div",Yx,[r("table",Jx,[r("thead",null,[r("tr",Xx,[(p(),g(ue,null,Fe(["Title","Type","Owner","Expiry","Ver",""],w=>r("th",{key:w,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},S(w),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Fe(Z.value,w=>{var K,W;return p(),g(ue,{key:w.id},[r("tr",{class:Ee(["border-b border-line last:border-0",oe.value===w.id?"bg-accent-soft":""])},[r("td",Qx,[r("div",e0,S(w.title),1),w.reference?(p(),g("div",t0,S(w.reference),1)):N("",!0)]),r("td",n0,S(Oe(l)[w.docType]||w.docType||"—"),1),r("td",i0,S(q(w)),1),r("td",o0,[r("button",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",i[F(w).tone]]),onClick:V=>pe(w.id)},[F(w).icon?(p(),at(X,{key:0,name:F(w).icon,size:12},null,8,["name"])):N("",!0),$(" "+S(F(w).label),1)],10,s0),w.expiryDate?(p(),g("div",a0,S(w.expiryDate),1)):N("",!0)]),r("td",r0,"v"+S(w.version||1),1),r("td",l0,[vt.value===w.id?(p(),g(ue,{key:0},[_[29]||(_[29]=r("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),r("button",{class:"btn-ghost mr-1",onClick:_[12]||(_[12]=V=>vt.value="")},"Cancel"),r("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:V=>rt(w)},"Delete",8,u0)],64)):(p(),g(ue,{key:1},[w.hasFile?(p(),g("button",{key:0,class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Preview",onClick:V=>be(w)},[E(X,{name:"eye",size:13})],8,c0)):N("",!0),w.hasFile?(p(),g("a",{key:1,href:Oe(hr)(w.id),class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Download file"},[E(X,{name:"download",size:13})],8,d0)):N("",!0),r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",title:"Upload new version",onClick:V=>Ve(w)},[E(X,{name:"upload",size:13})],8,f0),r("button",{class:"btn-ghost mr-1 inline-flex items-center gap-1",onClick:V=>st(w)},[E(X,{name:"sliders",size:13}),_[30]||(_[30]=$(" Edit",-1))],8,h0),r("button",{class:"btn-ghost inline-flex items-center gap-1",onClick:V=>vt.value=w.id},[E(X,{name:"trash",size:13})],8,p0)],64))])],2),he.value===w.id?(p(),g("tr",m0,[r("td",g0,[r("div",v0,[r("span",_0,[_[31]||(_[31]=$("Status: ",-1)),r("b",b0,S(w.status||"—"),1)]),r("span",y0,[_[32]||(_[32]=$("Access: ",-1)),r("b",x0,S(w.accessTier||"—"),1)]),w.jurisdiction?(p(),g("span",w0,[_[33]||(_[33]=$("Jurisdiction: ",-1)),r("b",k0,S(w.jurisdiction),1)])):N("",!0),w.issueDate?(p(),g("span",S0,[_[34]||(_[34]=$("Issued: ",-1)),r("b",T0,S(w.issueDate),1)])):N("",!0),w.expiryDate?(p(),g("span",P0,[_[35]||(_[35]=$("Expires: ",-1)),r("b",C0,S(w.expiryDate),1)])):N("",!0),r("span",L0,[_[36]||(_[36]=$("File: ",-1)),r("b",A0,S(w.hasFile?w.fileName:"none"),1)])]),(((K=w.expiry)==null?void 0:K.flags)||[]).length?(p(),g("ul",M0,[(p(!0),g(ue,null,Fe(w.expiry.flags,(V,re)=>(p(),g("li",{key:re,class:Ee(["flex items-start gap-2 text-xs",w.expiry.state==="expired"?"text-danger-fg":w.expiry.state==="expiring_soon"?"text-amber-fg":"text-ink-secondary"])},[E(X,{name:"alertTriangle",size:13,class:"mt-px shrink-0"}),$(" "+S(V),1)],2))),128))])):((W=w.expiry)==null?void 0:W.state)==="valid"?(p(),g("div",E0,"In force — no action needed.")):N("",!0),w.notes?(p(),g("div",O0,[_[37]||(_[37]=r("span",{class:"text-ink-muted"},"Notes:",-1)),$(" "+S(w.notes),1)])):N("",!0)])])):N("",!0)],64)}),128))])])])):(p(),g("div",Kx,[E(X,{name:"fileText",size:26,class:"text-ink-muted"}),r("div",Gx,S(R.value==="all"?"No documents on file yet":"Nothing in this view"),1),r("div",qx,S(R.value==="all"?"Add certificates, registrations, insurance and authorisations to track their expiry.":"Try a different filter."),1)]))]),(p(),at(lf,{to:"body"},[$e.value?(p(),g("div",{key:0,class:"fixed inset-0 z-50 grid place-items-center p-4",style:{background:"color-mix(in srgb, black 60%, transparent)"},onClick:Kr(we,["self"])},[r("div",z0,[r("div",I0,[r("div",$0,[r("div",N0,S($e.value.title),1),r("div",D0,S($e.value.fileName),1)]),r("div",F0,[r("a",{href:Ge.value,target:"_blank",rel:"noopener",class:"btn-ghost inline-flex items-center gap-1.5",title:"Open in new tab"},[E(X,{name:"globe",size:14}),_[38]||(_[38]=$(" New tab ",-1))],8,R0),r("a",{href:Oe(hr)($e.value.id),class:"btn-ghost inline-flex items-center gap-1.5",title:"Download"},[E(X,{name:"download",size:14}),_[39]||(_[39]=$(" Download ",-1))],8,B0),r("button",{class:"btn-icon",title:"Close",onClick:we},[E(X,{name:"x",size:16})])])]),r("div",U0,[Ie.value==="image"?(p(),g("img",{key:0,src:Ge.value,alt:$e.value.title,class:"mx-auto block max-w-full"},null,8,V0)):Ie.value==="frame"?(p(),g("iframe",{key:1,src:Ge.value,class:"h-[74vh] w-full border-0 bg-white",title:$e.value.title},null,8,Z0)):(p(),g("div",H0,[E(X,{name:"fileText",size:28,class:"text-ink-muted"}),_[41]||(_[41]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"Preview isn't available for this file type",-1)),r("div",j0,S($e.value.fileName),1),r("a",{href:Oe(hr)($e.value.id),class:"btn-accent mt-4 inline-flex items-center gap-2"},[E(X,{name:"download",size:15}),_[40]||(_[40]=$(" Download instead ",-1))],8,W0)]))])])])):N("",!0)]))]))}},G0={class:"grid h-full grid-cols-[248px_1fr] max-[900px]:grid-cols-1"},q0={class:"flex flex-col border-r border-line bg-surface-1 px-4 py-5 max-[900px]:hidden"},Y0={class:"flex items-center gap-2.5 px-2 pb-5"},J0={class:"flex flex-col gap-0.5"},X0=["onClick"],Q0={class:"mt-auto flex flex-col gap-2.5"},ew={class:"rounded-lg bg-surface-2 p-3"},tw={class:"flex items-center gap-2"},nw={class:"text-xs font-semibold text-ink"},iw={class:"mt-1.5 block font-mono text-[10.5px] text-ink-muted"},ow={class:"flex items-center gap-2.5 px-2 py-1"},sw={class:"grid h-8 w-8 place-items-center rounded-full bg-[var(--navy-800)] text-xs font-bold text-white"},aw={class:"min-w-0 flex-1"},rw={class:"truncate text-[13px] font-semibold text-ink"},lw={class:"flex items-center gap-1.5 text-[11px] text-ink-muted"},uw=["title"],cw={class:"overflow-y-auto"},dw={class:"sticky top-0 z-10 flex items-center gap-4 border-b border-line px-7 py-3.5",style:{background:"color-mix(in srgb, var(--bg-app) 82%, transparent)","backdrop-filter":"blur(10px)"}},fw={class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},hw={class:"ml-auto flex items-center gap-3"},pw={class:"flex h-10 w-60 items-center gap-2 rounded border border-line-strong bg-surface-1 px-3 max-[1100px]:hidden"},mw={key:0,class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},gw={class:"grid grid-cols-4 gap-4 max-[1100px]:grid-cols-2 max-[560px]:grid-cols-1"},vw={class:"flex items-center justify-between"},_w={class:"eyebrow"},bw={class:"mt-2.5 text-[34px] font-bold leading-none tracking-tightest text-ink"},yw={class:"grid grid-cols-[1.6fr_1fr] gap-5 max-[1100px]:grid-cols-1"},xw={class:"panel p-5"},ww={class:"mb-3.5 flex items-center justify-between"},kw={class:"flex items-center gap-2"},Sw={class:"relative z-[1200]"},Tw={class:"panel absolute right-0 z-[1200] mt-1.5 w-72 p-3.5 shadow-lg"},Pw={class:"flex items-center justify-between gap-3"},Cw={class:"mb-1.5 flex items-center justify-between"},Lw={class:"font-mono text-[11px] text-ink-muted"},Aw=["value"],Mw={key:0,class:"mt-1.5 text-[11px] text-ink-muted"},Ew={key:0,class:"mt-2.5 text-xs text-ink-muted"},Ow={key:1,class:"mt-2.5 text-xs text-ink-muted"},zw={key:2,class:"mt-2.5 text-xs text-ink-muted"},Iw={class:"panel p-5"},$w={class:"mb-3.5 flex items-center justify-between"},Nw={class:"grid place-items-center py-10 text-center"},Dw={class:"panel overflow-hidden p-0"},Fw={class:"flex items-center justify-between px-5 py-4"},Rw={class:"flex gap-2"},Bw={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},Uw={key:1,class:"overflow-x-auto"},Vw={class:"w-full border-collapse text-sm"},Zw={class:"text-left"},Hw=["onClick"],jw={class:"px-5 py-3 font-mono font-bold text-ink"},Ww={class:"px-5 py-3 text-ink-secondary"},Kw={class:"px-5 py-3"},Gw={class:"px-5 py-3 font-mono text-ink-secondary"},qw={class:"px-5 py-3"},Yw={key:0,class:"flex items-center gap-2"},Jw={class:"h-1.5 w-12 overflow-hidden rounded bg-surface-2"},Xw={class:"font-mono text-xs text-ink-secondary"},Qw={key:1,class:"font-mono text-xs text-ink-muted"},e2={class:"px-5 py-3 font-mono text-ink-secondary"},t2={class:"px-5 py-3 text-right"},n2=["onClick"],i2={key:1,class:"p-7"},o2={class:"mb-4 flex flex-wrap items-center gap-3"},s2={class:"font-mono text-mode font-bold text-ink"},a2={key:0,class:"rounded-full bg-danger-soft px-2.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-caps text-danger-fg"},r2={key:1,class:"ml-auto flex flex-wrap gap-1.5"},l2=["onClick"],u2={key:0,class:"panel grid place-items-center p-16 text-center"},c2={class:"pill"},d2={class:"pill"},f2={class:"pill"},h2={class:"mt-1 text-sm font-semibold text-ink"},p2={class:"pill"},m2={class:"mt-1 font-mono text-sm font-bold tabular text-ink"},g2={class:"grid grid-cols-2 gap-4 max-[820px]:grid-cols-1"},v2={class:"panel p-4"},_2={class:"flex items-center gap-4"},b2={class:"h-9 flex-1 overflow-hidden rounded border border-line bg-surface-2"},y2={class:"readout"},x2={class:"panel p-4"},w2={class:"readout"},k2={class:"panel p-4"},S2={class:"space-y-1.5 text-sm"},T2={class:"flex justify-between"},P2={class:"text-ink"},C2={class:"flex justify-between"},L2={class:"text-ink"},A2={class:"flex justify-between"},M2={class:"font-mono tabular text-ink"},E2={class:"flex justify-between"},O2={class:"font-mono tabular text-ink"},z2={class:"panel p-4"},I2={class:"space-y-1.5 text-sm"},$2={class:"flex justify-between"},N2={class:"font-mono tabular text-ink"},D2={class:"flex justify-between"},F2={class:"font-mono tabular text-ink"},R2={class:"flex justify-between"},B2={class:"font-mono tabular text-ink"},U2={class:"panel col-span-2 p-4 max-[820px]:col-span-1"},V2={class:"panel p-4"},Z2={class:"flex flex-wrap gap-2"},H2={class:"mt-2 min-h-[16px] text-xs text-ink-muted"},j2={class:"panel p-4"},W2={class:"h-[180px] overflow-y-auto font-mono text-xs"},K2={class:"text-ink-muted"},G2={class:"font-semibold text-accent"},q2={class:"break-all text-ink"},Y2={key:5,class:"p-7"},J2={class:"panel grid place-items-center p-16 text-center"},X2={class:"mt-3 text-sm font-medium text-ink-secondary"},Q2={key:0,class:"mt-1 text-xs text-ink-muted"},ek={key:1,class:"mt-1 text-xs text-ink-muted"},tk="34,-25,72,45",nk={__name:"Dashboard",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(t,{emit:i}){const s=t,l=i,u=St({}),d=St({}),h=j(null),v=j(!1),b=St([]),C=j(""),T=j([]),A=St({unavailable:!1,detail:"",loaded:!1,plan:"",recommendedInterval:30}),R=ye(()=>T.value.filter(U=>!U.onGround).length),B=j(!1);let Z=null;const F=[{value:"auto",label:"Auto"},{value:15,label:"15s"},{value:30,label:"30s"},{value:60,label:"60s"},{value:120,label:"120s"}],he=ye(()=>{if(_e.airTrafficInterval==="auto")return A.recommendedInterval||30;const U=Number(_e.airTrafficInterval);return Number.isFinite(U)&&U>0?U:30}),pe=j(null);let q=!1;function Ce(){if(!(q||pe.value!==null)){if(typeof navigator>"u"||!navigator.geolocation){pe.value=!1;return}q=!0,navigator.geolocation.getCurrentPosition(U=>{pe.value={lat:U.coords.latitude,lng:U.coords.longitude},q=!1},()=>{pe.value=!1,q=!1},{timeout:8e3,maximumAge:6e5})}}function fe(U,O,ke){const Ye=U&&U.telemetry||{},gt=Ye[O],bt=Ye[ke];return typeof gt=="number"&&typeof bt=="number"&&(gt||bt)?{lat:gt,lng:bt}:null}function Be(){const U=fe(ee.value,"latitude","longitude")||tt.value.map(Ye=>fe(u[Ye],"latitude","longitude")).find(Boolean);if(U){const Ye=pr(U.lat,U.lng);if(Ye)return Ye.bbox}const O=fe(ee.value,"phoneLatitude","phoneLongitude")||tt.value.map(Ye=>fe(u[Ye],"phoneLatitude","phoneLongitude")).find(Boolean);if(O){const Ye=pr(O.lat,O.lng);if(Ye)return Ye.bbox}if(Ce(),pe.value){const Ye=pr(pe.value.lat,pe.value.lng);if(Ye)return Ye.bbox}const ke=mm(_e.region);return ke||tk}async function $e(){if(!_e.showAirTraffic)return;const U=_e.autoBbox?Be():void 0,{states:O,unavailable:ke,detail:Ye,plan:gt,recommendedInterval:bt}=await hp(U);T.value=O,A.unavailable=ke,A.detail=Ye,A.plan=gt||"",bt&&(A.recommendedInterval=bt),A.loaded=!0}function Ie(){Z&&clearInterval(Z),Z=setInterval(()=>{we.value==="Overview"&&_e.showAirTraffic&&$e()},he.value*1e3)}function Ge(){$e(),Ie()}function be(){Z&&clearInterval(Z),Z=null}const we=j("Overview"),ze=[["grid","Overview"],["radio","Live flights"],["route","Routes"],["calendar","Schedule"],["book","Logbook"],["fileText","Documents"],["server","Drives"],["settings","Settings"]],ie=ye(()=>(ze.find(([,U])=>U===we.value)||["grid"])[0]),He=j(""),oe=j(""),je=j("");let le=null,ce=null,ae=!1;const tt=ye(()=>Object.keys(u).sort((U,O)=>(u[O].online?1:0)-(u[U].online?1:0)||U.localeCompare(O))),ee=ye(()=>h.value?u[h.value]:null),xe=ye(()=>ee.value&&ee.value.telemetry||{}),Ne=ye(()=>!!(ee.value&&ee.value.online)),dt=ye(()=>{const U=xe.value;return typeof U.latitude=="number"&&typeof U.longitude=="number"&&(U.latitude||U.longitude)?{lat:U.latitude,lng:U.longitude}:null}),st=ye(()=>h.value&&d[h.value]||[]),Ve=ye(()=>{const U=xe.value;return typeof U.velocityX=="number"&&typeof U.velocityY=="number"?Math.hypot(U.velocityX,U.velocityY):null});function Y(U){return U.online?U.connected?["In flight","success"]:["Standby","accent"]:["Offline","neutral"]}function M(U){const O=U&&U.telemetry||{};return typeof O.velocityX=="number"&&typeof O.velocityY=="number"?Math.hypot(O.velocityX,O.velocityY):null}const z=ye(()=>tt.value.map(U=>{const O=u[U],ke=O.telemetry||{},[Ye,gt]=Y(O);return{id:U,mission:O.model||(O.connected?"Drone linked":O.online?"App online":"No signal"),status:Ye,tone:gt,alt:typeof ke.altitude=="number"?ke.altitude.toFixed(0)+" m":"—",battery:typeof ke.batteryPercent=="number"?ke.batteryPercent:null,speed:M(O)}})),vt=ye(()=>tt.value.filter(U=>u[U].online).length),rt=ye(()=>tt.value.filter(U=>u[U].online&&u[U].connected).length),kt=ye(()=>tt.value.filter(U=>!u[U].online).length),x=ye(()=>{const U=tt.value.map(O=>{var ke;return(ke=u[O].telemetry)==null?void 0:ke.batteryPercent}).filter(O=>typeof O=="number");return U.length?Math.round(U.reduce((O,ke)=>O+ke,0)/U.length):null}),_=ye(()=>[{label:"Active flights",value:String(rt.value),delta:`${vt.value} online`,tone:"success",icon:"radio"},{label:"Avg battery",value:x.value==null?"—":x.value+"%",delta:x.value==null?"no telemetry":x.value<40?"low — watch":"nominal",tone:x.value!=null&&x.value<40?"danger":"neutral",icon:"battery"},{label:"Fleet size",value:String(tt.value.length),delta:`${rt.value} in flight`,tone:"neutral",icon:"grid"},{label:"Offline",value:String(kt.value),delta:kt.value?"needs attention":"all reachable",tone:kt.value?"warning":"success",icon:"signal"}]),w={success:"bg-success-soft text-success-fg",warning:"bg-amber-soft text-amber-fg",danger:"bg-danger-soft text-danger-fg",accent:"bg-accent-soft text-accent-soft-fg",neutral:"bg-surface-2 text-ink-secondary"},K={success:"text-success-fg",danger:"text-danger-fg",warning:"text-amber-fg",neutral:"text-ink-muted",accent:"text-accent-soft-fg"},W=ye(()=>{var ke,Ye,gt;const O=(s.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((ke=O[0])==null?void 0:ke[0])||"P")+(((Ye=O[1])==null?void 0:Ye[0])||((gt=O[0])==null?void 0:gt[1])||"V")).toUpperCase()}),V={superadmin:"Superadmin",admin:"Admin",user:"Operator"},re=ye(()=>V[s.role]||"Operator"),te=ye(()=>s.organizationName||(s.role==="superadmin"?"All organizations":"No organization"));function Q(U){var ke;u[U.deviceId]=U;const O=U.telemetry||{};typeof O.latitude=="number"&&typeof O.longitude=="number"&&(O.latitude||O.longitude)&&(d[U.deviceId]||(d[U.deviceId]=[]),d[U.deviceId].push([O.latitude,O.longitude]),d[U.deviceId].length>1e3&&d[U.deviceId].shift()),(!h.value||U.online&&!((ke=u[h.value])!=null&&ke.online))&&(h.value=U.deviceId)}function G(U){delete u[U],delete d[U],h.value===U&&(h.value=tt.value[0]||null)}function me(U){b.unshift({t:du(Date.now()),tag:U.type||"?",text:JSON.stringify(se(U))}),b.length>200&&b.pop()}function se(U){const O={...U};return delete O.type,O}function Te(){const U=location.protocol==="https:"?"wss":"ws";le=new WebSocket(`${U}://${location.host}/bff/ws`),le.onopen=()=>v.value=!0,le.onclose=()=>{v.value=!1,ae||(ce=setTimeout(Te,1500))},le.onerror=()=>le&&le.close(),le.onmessage=O=>{let ke;try{ke=JSON.parse(O.data)}catch{return}ke.type==="snapshot"?(ke.devices||[]).forEach(Q):ke.type==="update"&&ke.device?(Q(ke.device),ke.event&&ke.device.deviceId===h.value&&me(ke.event)):ke.type==="removed"&&ke.deviceId&&G(ke.deviceId)}}async function Ae(){if(!h.value)return je.value="No device selected.";if(!He.value.trim())return je.value="Enter a command name.";let U;if(oe.value.trim())try{U=JSON.parse(oe.value)}catch{return je.value="Payload is not valid JSON."}const{ok:O,body:ke}=await zp(h.value,He.value.trim(),U);je.value=O?`Sent "${He.value.trim()}".`:`Error: ${ke.error||"failed"}`}function Ze(U,O,ke=""){return typeof U=="number"?U.toFixed(O)+ke:"—"}function et(U){h.value=U,we.value="Live flights"}return $t(we,U=>{U==="Overview"&&$e()}),$t(()=>_e.showAirTraffic,U=>{U?$e():T.value=[]}),$t(he,Ie),_i(async()=>{(await ep()).forEach(Q),Te(),Ge()}),Ho(()=>{ae=!0,ce&&clearTimeout(ce),le&&le.close(),be()}),(U,O)=>{var ke,Ye,gt,bt,en;return p(),g("div",G0,[r("aside",q0,[r("div",Y0,[E(Hc,{size:26}),O[11]||(O[11]=r("span",{class:"text-[19px] tracking-tightest"},[r("span",{class:"font-medium text-ink-secondary"},"Pilot"),r("span",{class:"font-bold text-ink"},"Vault")],-1))]),r("nav",J0,[(p(),g(ue,null,Fe(ze,([de,wt])=>r("button",{key:wt,class:Ee(["flex items-center gap-3 rounded px-3 py-2.5 text-left text-sm transition",we.value===wt?"bg-accent-soft font-semibold text-accent-soft-fg":"font-medium text-ink-secondary hover:bg-surface-2"]),onClick:an=>we.value=wt},[E(X,{name:de,size:18,stroke:we.value===wt?2.2:1.8},null,8,["name","stroke"]),$(" "+S(wt),1)],10,X0)),64))]),r("div",Q0,[r("div",ew,[r("div",tw,[r("span",{class:Ee(["h-2 w-2 rounded-full",v.value?"bg-ready":"bg-caution"])},null,2),r("span",nw,S(v.value?"Link healthy":"Reconnecting…"),1)]),r("span",iw,"API gateway · "+S(v.value?"streaming":"retrying"),1)]),r("div",ow,[r("div",sw,S(W.value),1),r("div",aw,[r("div",rw,S(t.email||"Operator"),1),r("div",lw,[E(X,{name:"grid",size:11,class:"shrink-0"}),r("span",{class:"truncate",title:`${re.value} · ${te.value}`},S(re.value)+" · "+S(te.value),9,uw)])]),r("button",{class:"text-ink-muted transition hover:text-ink",title:"Log out","aria-label":"Log out",onClick:O[0]||(O[0]=de=>l("logout"))},[E(X,{name:"logout",size:16})])])])]),r("main",cw,[r("header",dw,[r("div",null,[O[12]||(O[12]=r("div",{class:"eyebrow"},"Live operations",-1)),r("h1",fw,S(we.value),1)]),r("div",hw,[r("div",pw,[E(X,{name:"search",size:16,class:"text-ink-muted"}),ne(r("input",{"onUpdate:modelValue":O[1]||(O[1]=de=>C.value=de),placeholder:"Search drones, routes…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Se,C.value]])]),r("button",{class:"btn-accent flex items-center gap-2",onClick:O[2]||(O[2]=de=>we.value="Live flights")},[E(X,{name:"radio",size:16}),O[13]||(O[13]=$(" Live flights ",-1))])])]),we.value==="Overview"?(p(),g("div",mw,[r("div",gw,[(p(!0),g(ue,null,Fe(_.value,de=>(p(),g("div",{key:de.label,class:"panel p-5"},[r("div",vw,[r("span",_w,S(de.label),1),E(X,{name:de.icon,size:16,class:"text-ink-muted"},null,8,["name"])]),r("div",bw,S(de.value),1),r("span",{class:Ee(["mt-2 block font-mono text-[11px]",K[de.tone]])},S(de.delta),3)]))),128))]),r("div",yw,[r("div",xw,[r("div",ww,[O[18]||(O[18]=r("div",null,[r("div",{class:"eyebrow"},"Airspace"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Live map")],-1)),r("div",kw,[Oe(_e).showAirTraffic&&R.value?(p(),g("span",{key:0,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.accent]),title:"Live aircraft from OpenSky Network"},[E(X,{name:"radio",size:12}),$(S(R.value)+" aircraft ",1)],2)):N("",!0),rt.value?(p(),g("span",{key:1,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.success])},[O[14]||(O[14]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(rt.value)+" drones ",1)],2)):N("",!0),r("div",Sw,[r("button",{type:"button",class:Ee(["grid h-7 w-7 place-items-center rounded-md text-ink-muted transition hover:bg-surface-2 hover:text-ink",B.value?"bg-surface-2 text-ink":""]),title:"Map settings","aria-label":"Map settings",onClick:O[3]||(O[3]=de=>B.value=!B.value)},[E(X,{name:"settings",size:16})],2),B.value?(p(),g(ue,{key:0},[r("div",{class:"fixed inset-0 z-[1190]",onClick:O[4]||(O[4]=de=>B.value=!1)}),r("div",Tw,[O[17]||(O[17]=r("div",{class:"eyebrow mb-2.5"},"Map settings",-1)),r("label",Pw,[O[15]||(O[15]=r("span",{class:"text-sm text-ink-secondary"},"Show live air traffic",-1)),E(sn,{modelValue:Oe(_e).showAirTraffic,"onUpdate:modelValue":O[5]||(O[5]=de=>Oe(_e).showAirTraffic=de)},null,8,["modelValue"])]),r("div",{class:Ee(["mt-3.5",Oe(_e).showAirTraffic?"":"pointer-events-none opacity-40"])},[r("div",Cw,[O[16]||(O[16]=r("span",{class:"text-sm text-ink-secondary"},"Refresh interval",-1)),r("span",Lw,"every "+S(he.value)+"s",1)]),ne(r("select",{"onUpdate:modelValue":O[6]||(O[6]=de=>Oe(_e).airTrafficInterval=de),class:"field"},[(p(),g(ue,null,Fe(F,de=>r("option",{key:de.value,value:de.value},S(de.label)+S(de.value==="auto"?` (plan: ${A.recommendedInterval}s)`:""),9,Aw)),64))],512),[[At,Oe(_e).airTrafficInterval]]),A.plan?(p(),g("p",Mw," OpenSky plan: "+S(A.plan),1)):N("",!0)],2)])],64)):N("",!0)])])]),E(mu,{position:dt.value,trail:st.value,aircraft:Oe(_e).showAirTraffic?T.value:[]},null,8,["position","trail","aircraft"]),Oe(_e).showAirTraffic?A.loaded&&A.unavailable?(p(),g("p",Ow,S(A.detail||"Live air traffic is unavailable."),1)):(p(),g("p",zw," Live air traffic from OpenSky Network · updates every "+S(he.value)+"s ",1)):(p(),g("p",Ew," Live air traffic hidden · enable it in Map settings "))]),r("div",Iw,[r("div",$w,[O[19]||(O[19]=r("div",null,[r("div",{class:"eyebrow"},"Today"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Schedule")],-1)),E(X,{name:"clock",size:16,class:"text-ink-muted"})]),r("div",Nw,[E(X,{name:"calendar",size:24,class:"text-ink-muted"}),O[20]||(O[20]=r("div",{class:"mt-2 text-sm font-medium text-ink-secondary"},"No missions scheduled",-1)),O[21]||(O[21]=r("div",{class:"mt-0.5 text-xs text-ink-muted"},"Scheduling is not wired to a backend yet.",-1))])])]),r("div",Dw,[r("div",Fw,[O[24]||(O[24]=r("div",null,[r("div",{class:"eyebrow"},"Fleet"),r("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft status")],-1)),r("div",Rw,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.success])},[O[22]||(O[22]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(rt.value)+" in flight ",1)],2),kt.value?(p(),g("span",{key:0,class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w.warning])},[O[23]||(O[23]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(kt.value)+" offline ",1)],2)):N("",!0)])]),z.value.length?(p(),g("div",Uw,[r("table",Vw,[r("thead",null,[r("tr",Zw,[(p(),g(ue,null,Fe(["Aircraft","Mission","Status","Alt","Battery","Speed",""],de=>r("th",{key:de,class:"border-y border-line bg-surface-2 px-5 py-2.5 font-mono text-[10.5px] font-normal uppercase tracking-caps text-ink-muted"},S(de),1)),64))])]),r("tbody",null,[(p(!0),g(ue,null,Fe(z.value,(de,wt)=>(p(),g("tr",{key:de.id,class:Ee(["cursor-pointer transition hover:bg-surface-2",wtet(de.id)},[r("td",jw,S(de.id),1),r("td",Ww,S(de.mission),1),r("td",Kw,[r("span",{class:Ee(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",w[de.tone]])},[O[25]||(O[25]=r("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$(S(de.status),1)],2)]),r("td",Gw,S(de.alt),1),r("td",qw,[de.battery!=null?(p(),g("div",Yw,[r("div",Jw,[r("div",{class:Ee(["h-full",de.battery<40?"bg-caution":"bg-ready"]),style:Bo({width:de.battery+"%"})},null,6)]),r("span",Xw,S(de.battery)+"%",1)])):(p(),g("span",Qw,"—"))]),r("td",e2,[$(S(de.speed==null?"—":de.speed.toFixed(1))+" ",1),O[26]||(O[26]=r("span",{class:"text-ink-muted"},"m/s",-1))]),r("td",t2,[r("button",{class:"btn-ghost inline-flex items-center gap-1.5 whitespace-nowrap",onClick:Kr(an=>et(de.id),["stop"])},[E(X,{name:"play",size:14}),O[27]||(O[27]=$(" Track ",-1))],8,n2)])],10,Hw))),128))])])])):(p(),g("div",Bw," No aircraft connected yet. Devices appear here as they come online. "))])])):we.value==="Live flights"?(p(),g("div",i2,[r("div",o2,[r("span",s2,S(h.value||"No device selected"),1),ee.value&&!Ne.value?(p(),g("span",a2,"Offline")):N("",!0),tt.value.length?(p(),g("div",r2,[(p(!0),g(ue,null,Fe(tt.value,de=>(p(),g("button",{key:de,class:Ee(["flex items-center gap-2 rounded border px-3 py-1.5 font-mono text-xs font-bold transition",de===h.value?"border-accent bg-accent-soft text-accent-soft-fg":"border-line bg-surface-1 text-ink-secondary hover:border-line-strong"]),onClick:wt=>h.value=de},[r("span",{class:Ee(["h-2 w-2 rounded-full",u[de].online?"bg-ready":"bg-ink-muted"])},null,2),$(" "+S(de),1)],10,l2))),128))])):N("",!0)]),tt.value.length?(p(),g(ue,{key:1},[r("div",{class:Ee(["mb-4 grid gap-3",!Ne.value&&ee.value?"opacity-60":""]),style:{"grid-template-columns":"repeat(auto-fit, minmax(150px, 1fr))"}},[r("div",c2,[O[30]||(O[30]=r("div",{class:"eyebrow"},"Registration",-1)),r("div",{class:Ee(["mt-1 text-sm font-semibold",Ne.value?((ke=ee.value)==null?void 0:ke.registration)==="success"?"text-success-fg":"text-danger-fg":"text-ink"])},S(Ne.value&&((Ye=ee.value)!=null&&Ye.registration)?ee.value.registration:"—"),3)]),r("div",d2,[O[31]||(O[31]=r("div",{class:"eyebrow"},"Drone link",-1)),r("div",{class:Ee(["mt-1 text-sm font-semibold",Ne.value?(gt=ee.value)!=null&>.connected?"text-success-fg":"text-danger-fg":"text-ink"])},S(ee.value?Ne.value?ee.value.connected?"connected":"no drone":"app offline":"—"),3)]),r("div",f2,[O[32]||(O[32]=r("div",{class:"eyebrow"},"Model",-1)),r("div",h2,S(((bt=ee.value)==null?void 0:bt.model)||"—"),1)]),r("div",p2,[O[33]||(O[33]=r("div",{class:"eyebrow"},"Last update",-1)),r("div",m2,S((en=ee.value)!=null&&en.lastSeenMs?Oe(du)(ee.value.lastSeenMs):"—"),1)])],2),r("div",g2,[r("div",v2,[O[35]||(O[35]=r("div",{class:"mb-3 eyebrow"},"Battery",-1)),r("div",_2,[r("div",b2,[r("div",{class:Ee(["h-full transition-all",typeof xe.value.batteryPercent=="number"?xe.value.batteryPercent<20?"bg-warning":xe.value.batteryPercent<40?"bg-caution":"bg-ready":""]),style:Bo({width:(typeof xe.value.batteryPercent=="number"?xe.value.batteryPercent:0)+"%"})},null,6)]),r("div",y2,[$(S(typeof xe.value.batteryPercent=="number"?xe.value.batteryPercent:"—"),1),O[34]||(O[34]=r("span",{class:"text-sm text-ink-secondary"},"%",-1))])])]),r("div",x2,[O[37]||(O[37]=r("div",{class:"mb-3 eyebrow"},"Altitude",-1)),r("div",w2,[$(S(Ze(xe.value.altitude,1)),1),O[36]||(O[36]=r("span",{class:"text-sm text-ink-secondary"}," m",-1))])]),r("div",k2,[O[42]||(O[42]=r("div",{class:"mb-3 eyebrow"},"Flight",-1)),r("div",S2,[r("div",T2,[O[38]||(O[38]=r("span",{class:"text-ink-secondary"},"Mode",-1)),r("b",P2,S(xe.value.flightMode||"—"),1)]),r("div",C2,[O[39]||(O[39]=r("span",{class:"text-ink-secondary"},"Flying",-1)),r("b",L2,S(xe.value.isFlying==null?"—":xe.value.isFlying?"yes":"no"),1)]),r("div",A2,[O[40]||(O[40]=r("span",{class:"text-ink-secondary"},"GPS sats",-1)),r("b",M2,S(xe.value.satelliteCount==null?"—":xe.value.satelliteCount),1)]),r("div",E2,[O[41]||(O[41]=r("span",{class:"text-ink-secondary"},"Speed (H)",-1)),r("b",O2,S(Ve.value==null?"—":Ze(Ve.value,2," m/s")),1)])])]),r("div",z2,[O[46]||(O[46]=r("div",{class:"mb-3 eyebrow"},"Position",-1)),r("div",I2,[r("div",$2,[O[43]||(O[43]=r("span",{class:"text-ink-secondary"},"Latitude",-1)),r("b",N2,S(Ze(xe.value.latitude,6)),1)]),r("div",D2,[O[44]||(O[44]=r("span",{class:"text-ink-secondary"},"Longitude",-1)),r("b",F2,S(Ze(xe.value.longitude,6)),1)]),r("div",R2,[O[45]||(O[45]=r("span",{class:"text-ink-secondary"},"Vert. speed",-1)),r("b",B2,S(Ze(typeof xe.value.velocityZ=="number"?-xe.value.velocityZ:void 0,2," m/s")),1)])])]),r("div",U2,[O[47]||(O[47]=r("div",{class:"mb-3 eyebrow"},"Track",-1)),E(mu,{position:dt.value,trail:st.value},null,8,["position","trail"])]),r("div",V2,[O[48]||(O[48]=r("div",{class:"mb-3 eyebrow"},"Send command",-1)),r("div",Z2,[ne(r("input",{"onUpdate:modelValue":O[7]||(O[7]=de=>He.value=de),class:"field flex-1",placeholder:"command (e.g. startConnection)"},null,512),[[Se,He.value]]),ne(r("input",{"onUpdate:modelValue":O[8]||(O[8]=de=>oe.value=de),class:"field flex-1",placeholder:"payload JSON (optional)"},null,512),[[Se,oe.value]]),r("button",{class:"btn-accent",onClick:Ae},"Send")]),r("div",H2,S(je.value),1)]),r("div",j2,[O[49]||(O[49]=r("div",{class:"mb-3 eyebrow"},"Event log",-1)),r("div",W2,[(p(!0),g(ue,null,Fe(b,(de,wt)=>(p(),g("div",{key:wt,class:"border-b border-line py-1"},[r("span",K2,S(de.t),1),r("span",G2,S(de.tag),1),r("span",q2,S(de.text),1)]))),128))])])])],64)):(p(),g("div",u2,[E(X,{name:"radio",size:28,class:"text-ink-muted"}),O[28]||(O[28]=r("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No aircraft online",-1)),O[29]||(O[29]=r("div",{class:"mt-1 text-xs text-ink-muted"},"Live telemetry appears here once a drone connects.",-1))]))])):we.value==="Logbook"?(p(),at(lx,{key:2,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName},null,8,["email","role","organization","organization-name"])):we.value==="Documents"?(p(),at(K0,{key:3,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName},null,8,["email","role","organization","organization-name"])):we.value==="Settings"?(p(),at(db,{key:4,email:t.email,role:t.role,organization:t.organization,"organization-name":t.organizationName,onLogout:O[9]||(O[9]=de=>l("logout"))},null,8,["email","role","organization","organization-name"])):(p(),g("div",Y2,[r("div",J2,[E(X,{name:ie.value,size:28,class:"text-ink-muted"},null,8,["name"]),r("div",X2,S(we.value),1),we.value==="Drives"?(p(),g("div",Q2,[O[50]||(O[50]=$(" Browse and transfer files here once a drive is connected. Configure drives in ",-1)),r("button",{class:"font-semibold text-accent hover:underline",onClick:O[10]||(O[10]=de=>we.value="Settings")},"Settings → Integrations"),O[51]||(O[51]=$(". ",-1))])):(p(),g("div",ek,"This section is part of the console shell and has no backend yet."))])]))])])}}},ik={key:0,class:"h-full"},ok={key:1,class:"grid h-full place-items-center text-ink-muted text-sm"},sk={__name:"App",setup(t){const i=j(!1),s=j(null),l=j("user"),u=j(""),d=j(""),h=j("");function v(T){l.value=T&&T.role||"user",u.value=T&&T.organization||"",d.value=T&&T.organizationName||""}_i(async()=>{h.value=(await Jh()).apiBase||"";const T=await ru();T&&(s.value=T.email,v(T),await hu()),i.value=!0});async function b(T){s.value=T,v(await ru()),await hu()}async function C(){Fp(),await Qh(),s.value=null,l.value="user",u.value="",d.value=""}return(T,A)=>i.value?(p(),g("div",ik,[s.value?(p(),at(nk,{key:0,email:s.value,role:l.value,organization:u.value,"organization-name":d.value,onLogout:C},null,8,["email","role","organization","organization-name"])):(p(),at(tm,{key:1,"default-api-base":h.value,onSignedIn:b},null,8,["default-api-base"]))])):(p(),g("div",ok,"Loading…"))}};Kh(sk).mount("#app"); diff --git a/Web App/server/dist/assets/index-FLz21UuE.css b/Web App/server/dist/assets/index-CcgvhCJr.css similarity index 51% rename from Web App/server/dist/assets/index-FLz21UuE.css rename to Web App/server/dist/assets/index-CcgvhCJr.css index 1bdede4..d3746df 100644 --- a/Web App/server/dist/assets/index-FLz21UuE.css +++ b/Web App/server/dist/assets/index-CcgvhCJr.css @@ -1 +1 @@ -:root,[data-theme=light]{--navy-950: #0B1730;--navy-900: #0F1E3D;--navy-800: #1B2E52;--navy-700: #26406E;--blue-50: #EAF1FE;--blue-100: #D6E3FD;--blue-200: #B4CDFA;--blue-300: #8FB4F6;--blue-400: #5B93F5;--blue-500: #3D7BF0;--blue-600: #2B62CC;--blue-700: #1F4CA0;--slate-0: #FFFFFF;--slate-50: #F6F7F9;--slate-100: #EEF0F3;--slate-150: #E6E9EE;--slate-200: #DCE0E7;--slate-300: #C5CCD7;--slate-400: #97A1B0;--slate-500: #6B7688;--slate-600: #4C5566;--slate-700: #333B4A;--slate-800: #1E2635;--slate-900: #131A28;--slate-950: #0B111C;--steel: #5A6B85;--green-500: #1F8A5B;--green-100: #DCF1E7;--green-600:#177049;--amber-500: #D9852B;--amber-100: #FBEBD5;--amber-600:#B86C1B;--red-500: #D64545;--red-100: #FBE0E0;--red-600: #B83232;--bg-app: var(--slate-100);--bg-subtle: var(--slate-50);--surface: var(--slate-0);--surface-2: var(--slate-50);--surface-inset: var(--slate-100);--border: var(--slate-200);--border-strong: var(--slate-300);--border-subtle: var(--slate-150);--text-primary: var(--navy-900);--text-secondary:var(--steel);--text-tertiary: var(--slate-400);--text-inverse: var(--slate-0);--text-on-accent:#FFFFFF;--accent: var(--blue-500);--accent-hover: var(--blue-600);--accent-active: var(--blue-700);--accent-soft: var(--blue-50);--accent-soft-fg:var(--blue-700);--focus-ring: color-mix(in srgb, var(--blue-500) 45%, transparent);--success: var(--green-500);--success-soft: var(--green-100);--success-fg: var(--green-600);--warning: var(--amber-500);--warning-soft: var(--amber-100);--warning-fg: var(--amber-600);--danger: var(--red-500);--danger-soft: var(--red-100);--danger-fg: var(--red-600);--overlay: color-mix(in srgb, var(--navy-950) 55%, transparent);--font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono: "Space Mono", ui-monospace, "SF Mono", "JetBrains Mono", monospace;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--radius-xl: 20px;--radius-pill: 999px;--shadow-xs: 0 1px 2px rgba(15,30,61,.06);--shadow-sm: 0 1px 2px rgba(15,30,61,.06), 0 1px 3px rgba(15,30,61,.04);--shadow-md: 0 2px 4px rgba(15,30,61,.06), 0 6px 16px rgba(15,30,61,.08);--shadow-lg: 0 8px 24px rgba(15,30,61,.1), 0 2px 6px rgba(15,30,61,.06);--ease-standard: cubic-bezier(.4, 0, .2, 1);--ease-out: cubic-bezier(.16, 1, .3, 1);--dur-fast: .12s;--dur-base: .2s;color-scheme:light}[data-theme=dark]{--bg-app: var(--navy-950);--bg-subtle: var(--slate-950);--surface: #10203F;--surface-2: #142748;--surface-inset: var(--navy-950);--border: color-mix(in srgb, #FFFFFF 10%, transparent);--border-strong: color-mix(in srgb, #FFFFFF 18%, transparent);--border-subtle: color-mix(in srgb, #FFFFFF 6%, transparent);--text-primary: #F4F7FC;--text-secondary:#8FA0BE;--text-tertiary: #5E6E8C;--text-inverse: var(--navy-900);--text-on-accent:#FFFFFF;--accent: var(--blue-400);--accent-hover: var(--blue-300);--accent-active: var(--blue-200);--accent-soft: color-mix(in srgb, var(--blue-500) 18%, transparent);--accent-soft-fg:var(--blue-300);--focus-ring: color-mix(in srgb, var(--blue-400) 55%, transparent);--success:var(--green-500);--success-soft: color-mix(in srgb, var(--green-500) 22%, transparent);--success-fg:#5FD3A0;--warning:var(--amber-500);--warning-soft: color-mix(in srgb, var(--amber-500) 22%, transparent);--warning-fg:#F0B26A;--danger: var(--red-500);--danger-soft: color-mix(in srgb, var(--red-500) 22%, transparent);--danger-fg: #F08A8A;--overlay: color-mix(in srgb, #000000 62%, transparent);--shadow-xs: 0 1px 2px rgba(0,0,0,.35);--shadow-sm: 0 1px 3px rgba(0,0,0,.4);--shadow-md: 0 4px 12px rgba(0,0,0,.45);--shadow-lg: 0 12px 32px rgba(0,0,0,.5);color-scheme:dark}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tabular{font-variant-numeric:tabular-nums}.eyebrow{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:11px;text-transform:uppercase;letter-spacing:.14em;color:var(--text-tertiary)}.readout{font-variant-numeric:tabular-nums;font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:30px;line-height:1;font-weight:500;color:var(--text-primary)}.panel{border-radius:14px;border-width:1px;border-color:var(--border);background-color:var(--surface);--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.pill{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.5rem .75rem}.field{width:100%;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.625rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-primary);outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.field::-moz-placeholder{color:var(--text-tertiary)}.field::placeholder{color:var(--text-tertiary)}.field{transition-duration:var(--dur-fast)}.field:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.btn-accent{border-radius:10px;background-color:var(--accent);padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-accent:hover{background-color:var(--accent-hover)}.btn-accent:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-accent:disabled{opacity:.5}.btn-accent{transition-duration:var(--dur-fast)}.btn-ghost{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-ghost:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-ghost:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-ghost{transition-duration:var(--dur-fast)}.btn-icon{display:grid;height:2.25rem;width:2.25rem;place-items:center;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-icon:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-icon{transition-duration:var(--dur-fast)}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-5{bottom:1.25rem}.right-0{right:0}.right-5{right:1.25rem}.top-0{top:0}.top-5{top:1.25rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1190\]{z-index:1190}.z-\[1200\]{z-index:1200}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-3\.5{margin-top:.875rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-28{height:7rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[320px\]{height:320px}.h-\[74vh\]{height:74vh}.h-full{height:100%}.max-h-\[90vh\]{max-height:90vh}.min-h-\[16px\]{min-height:16px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-56{width:14rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[18px\]{width:18px}.w-\[380px\]{width:380px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\[1240px\]{max-width:1240px}.max-w-\[1280px\]{max-width:1280px}.max-w-\[220px\]{max-width:220px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-\[420px\]{max-width:420px}.max-w-\[520px\]{max-width:520px}.max-w-\[920px\]{max-width:920px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[1\.6fr_1fr\]{grid-template-columns:1.6fr 1fr}.grid-cols-\[210px_1fr\]{grid-template-columns:210px 1fr}.grid-cols-\[248px_1fr\]{grid-template-columns:248px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1\.5{row-gap:.375rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded,.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--accent)}.border-line{border-color:var(--border)}.border-line-strong{border-color:var(--border-strong)}.border-transparent{border-color:transparent}.bg-\[var\(--navy-800\)\]{background-color:var(--navy-800)}.bg-accent{background-color:var(--accent)}.bg-accent-soft{background-color:var(--accent-soft)}.bg-amber{background-color:var(--warning)}.bg-amber-soft{background-color:var(--warning-soft)}.bg-caution{background-color:var(--warning)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--danger)}.bg-danger-soft{background-color:var(--danger-soft)}.bg-ink-muted{background-color:var(--text-tertiary)}.bg-line{background-color:var(--border)}.bg-ready,.bg-success{background-color:var(--success)}.bg-success-soft{background-color:var(--success-soft)}.bg-surface-1{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:transparent}.bg-warning{background-color:var(--danger)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-10{padding:2.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-8{padding-bottom:2rem}.pr-10{padding-right:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[19px\]{font-size:19px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[34px\]{font-size:34px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-mode{font-size:18px;line-height:1.2;letter-spacing:-.02em;font-weight:600}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-caps{letter-spacing:.14em}.tracking-tightest{letter-spacing:-.02em}.text-accent{color:var(--accent)}.text-accent-soft-fg{color:var(--accent-soft-fg)}.text-amber-fg{color:var(--warning-fg)}.text-danger-fg{color:var(--danger-fg)}.text-ink{color:var(--text-primary)}.text-ink-muted{color:var(--text-tertiary)}.text-ink-secondary{color:var(--text-secondary)}.text-success-fg{color:var(--success-fg)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.accent-\[var\(--danger\)\]{accent-color:var(--danger)}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: var(--shadow-sm);--tw-shadow-colored: var(--shadow-sm);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xs{--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}html,body,#app{height:100%}html{background-color:var(--bg-app);transition:background-color var(--dur-base) var(--ease-standard)}body{font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#app{background-color:var(--bg-app);min-height:100vh;transition:background-color var(--dur-base) var(--ease-standard)}html.reduce-motion *,html.reduce-motion *:before,html.reduce-motion *:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}.leaflet-container{background:var(--surface-inset);font-family:var(--font-sans)}.leaflet-control-attribution{background:color-mix(in srgb,var(--surface) 82%,transparent)!important;color:var(--text-tertiary)!important}.leaflet-control-attribution a{color:var(--text-secondary)!important}.placeholder\:text-ink-muted::-moz-placeholder{color:var(--text-tertiary)}.placeholder\:text-ink-muted::placeholder{color:var(--text-tertiary)}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-line-strong:hover{border-color:var(--border-strong)}.hover\:bg-danger-soft:hover{background-color:var(--danger-soft)}.hover\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\:text-ink:hover{color:var(--text-primary)}.hover\:text-ink-secondary:hover{color:var(--text-secondary)}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:hover\:brightness-110:hover:enabled{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(max-width:1100px){.max-\[1100px\]\:hidden{display:none}.max-\[1100px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[1100px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.max-\[900px\]\:hidden{display:none}.max-\[900px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[900px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:820px){.max-\[820px\]\:col-span-1{grid-column:span 1 / span 1}.max-\[820px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:760px){.max-\[760px\]\:col-span-1{grid-column:span 1 / span 1}.max-\[760px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[760px\]\:flex-row{flex-direction:row}.max-\[760px\]\:overflow-x-auto{overflow-x:auto}}@media(max-width:560px){.max-\[560px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(min-width:640px){.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}.fade-enter-active[data-v-977256e5],.fade-leave-active[data-v-977256e5]{transition:opacity .2s}.fade-enter-from[data-v-977256e5],.fade-leave-to[data-v-977256e5]{opacity:0} +:root,[data-theme=light]{--navy-950: #0B1730;--navy-900: #0F1E3D;--navy-800: #1B2E52;--navy-700: #26406E;--blue-50: #EAF1FE;--blue-100: #D6E3FD;--blue-200: #B4CDFA;--blue-300: #8FB4F6;--blue-400: #5B93F5;--blue-500: #3D7BF0;--blue-600: #2B62CC;--blue-700: #1F4CA0;--slate-0: #FFFFFF;--slate-50: #F6F7F9;--slate-100: #EEF0F3;--slate-150: #E6E9EE;--slate-200: #DCE0E7;--slate-300: #C5CCD7;--slate-400: #97A1B0;--slate-500: #6B7688;--slate-600: #4C5566;--slate-700: #333B4A;--slate-800: #1E2635;--slate-900: #131A28;--slate-950: #0B111C;--steel: #5A6B85;--green-500: #1F8A5B;--green-100: #DCF1E7;--green-600:#177049;--amber-500: #D9852B;--amber-100: #FBEBD5;--amber-600:#B86C1B;--red-500: #D64545;--red-100: #FBE0E0;--red-600: #B83232;--bg-app: var(--slate-100);--bg-subtle: var(--slate-50);--surface: var(--slate-0);--surface-2: var(--slate-50);--surface-inset: var(--slate-100);--border: var(--slate-200);--border-strong: var(--slate-300);--border-subtle: var(--slate-150);--text-primary: var(--navy-900);--text-secondary:var(--steel);--text-tertiary: var(--slate-400);--text-inverse: var(--slate-0);--text-on-accent:#FFFFFF;--accent: var(--blue-500);--accent-hover: var(--blue-600);--accent-active: var(--blue-700);--accent-soft: var(--blue-50);--accent-soft-fg:var(--blue-700);--focus-ring: color-mix(in srgb, var(--blue-500) 45%, transparent);--success: var(--green-500);--success-soft: var(--green-100);--success-fg: var(--green-600);--warning: var(--amber-500);--warning-soft: var(--amber-100);--warning-fg: var(--amber-600);--danger: var(--red-500);--danger-soft: var(--red-100);--danger-fg: var(--red-600);--overlay: color-mix(in srgb, var(--navy-950) 55%, transparent);--font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono: "Space Mono", ui-monospace, "SF Mono", "JetBrains Mono", monospace;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--radius-xl: 20px;--radius-pill: 999px;--shadow-xs: 0 1px 2px rgba(15,30,61,.06);--shadow-sm: 0 1px 2px rgba(15,30,61,.06), 0 1px 3px rgba(15,30,61,.04);--shadow-md: 0 2px 4px rgba(15,30,61,.06), 0 6px 16px rgba(15,30,61,.08);--shadow-lg: 0 8px 24px rgba(15,30,61,.1), 0 2px 6px rgba(15,30,61,.06);--ease-standard: cubic-bezier(.4, 0, .2, 1);--ease-out: cubic-bezier(.16, 1, .3, 1);--dur-fast: .12s;--dur-base: .2s;color-scheme:light}[data-theme=dark]{--bg-app: var(--navy-950);--bg-subtle: var(--slate-950);--surface: #10203F;--surface-2: #142748;--surface-inset: var(--navy-950);--border: color-mix(in srgb, #FFFFFF 10%, transparent);--border-strong: color-mix(in srgb, #FFFFFF 18%, transparent);--border-subtle: color-mix(in srgb, #FFFFFF 6%, transparent);--text-primary: #F4F7FC;--text-secondary:#8FA0BE;--text-tertiary: #5E6E8C;--text-inverse: var(--navy-900);--text-on-accent:#FFFFFF;--accent: var(--blue-400);--accent-hover: var(--blue-300);--accent-active: var(--blue-200);--accent-soft: color-mix(in srgb, var(--blue-500) 18%, transparent);--accent-soft-fg:var(--blue-300);--focus-ring: color-mix(in srgb, var(--blue-400) 55%, transparent);--success:var(--green-500);--success-soft: color-mix(in srgb, var(--green-500) 22%, transparent);--success-fg:#5FD3A0;--warning:var(--amber-500);--warning-soft: color-mix(in srgb, var(--amber-500) 22%, transparent);--warning-fg:#F0B26A;--danger: var(--red-500);--danger-soft: color-mix(in srgb, var(--red-500) 22%, transparent);--danger-fg: #F08A8A;--overlay: color-mix(in srgb, #000000 62%, transparent);--shadow-xs: 0 1px 2px rgba(0,0,0,.35);--shadow-sm: 0 1px 3px rgba(0,0,0,.4);--shadow-md: 0 4px 12px rgba(0,0,0,.45);--shadow-lg: 0 12px 32px rgba(0,0,0,.5);color-scheme:dark}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tabular{font-variant-numeric:tabular-nums}.eyebrow{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:11px;text-transform:uppercase;letter-spacing:.14em;color:var(--text-tertiary)}.readout{font-variant-numeric:tabular-nums;font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace;font-size:30px;line-height:1;font-weight:500;color:var(--text-primary)}.panel{border-radius:14px;border-width:1px;border-color:var(--border);background-color:var(--surface);--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.pill{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.5rem .75rem}.field{width:100%;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface-2);padding:.625rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-primary);outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.field::-moz-placeholder{color:var(--text-tertiary)}.field::placeholder{color:var(--text-tertiary)}.field{transition-duration:var(--dur-fast)}.field:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.btn-accent{border-radius:10px;background-color:var(--accent);padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-accent:hover{background-color:var(--accent-hover)}.btn-accent:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-accent:disabled{opacity:.5}.btn-accent{transition-duration:var(--dur-fast)}.btn-ghost{border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem;color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-ghost:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-ghost:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-ghost{transition-duration:var(--dur-fast)}.btn-icon{display:grid;height:2.25rem;width:2.25rem;place-items:center;border-radius:10px;border-width:1px;border-color:var(--border);background-color:var(--surface);color:var(--text-secondary);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-icon:hover{border-color:var(--border-strong);color:var(--text-primary)}.btn-icon{transition-duration:var(--dur-fast)}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-5{bottom:1.25rem}.right-0{right:0}.right-5{right:1.25rem}.top-0{top:0}.top-5{top:1.25rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1190\]{z-index:1190}.z-\[1200\]{z-index:1200}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-3\.5{margin-top:.875rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-28{height:7rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[320px\]{height:320px}.h-\[74vh\]{height:74vh}.h-full{height:100%}.max-h-\[90vh\]{max-height:90vh}.min-h-\[16px\]{min-height:16px}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-4{width:1rem}.w-44{width:11rem}.w-48{width:12rem}.w-56{width:14rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[18px\]{width:18px}.w-\[380px\]{width:380px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\[1240px\]{max-width:1240px}.max-w-\[1280px\]{max-width:1280px}.max-w-\[220px\]{max-width:220px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-\[420px\]{max-width:420px}.max-w-\[520px\]{max-width:520px}.max-w-\[920px\]{max-width:920px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[1\.6fr_1fr\]{grid-template-columns:1.6fr 1fr}.grid-cols-\[210px_1fr\]{grid-template-columns:210px 1fr}.grid-cols-\[248px_1fr\]{grid-template-columns:248px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1\.5{row-gap:.375rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded,.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--accent)}.border-line{border-color:var(--border)}.border-line-strong{border-color:var(--border-strong)}.border-transparent{border-color:transparent}.bg-\[var\(--navy-800\)\]{background-color:var(--navy-800)}.bg-accent{background-color:var(--accent)}.bg-accent-soft{background-color:var(--accent-soft)}.bg-amber{background-color:var(--warning)}.bg-amber-soft{background-color:var(--warning-soft)}.bg-caution{background-color:var(--warning)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--danger)}.bg-danger-soft{background-color:var(--danger-soft)}.bg-ink-muted{background-color:var(--text-tertiary)}.bg-line{background-color:var(--border)}.bg-ready,.bg-success{background-color:var(--success)}.bg-success-soft{background-color:var(--success-soft)}.bg-surface-1{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:transparent}.bg-warning{background-color:var(--danger)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-10{padding:2.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-8{padding-bottom:2rem}.pr-10{padding-right:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:Space Mono,ui-monospace,SF Mono,JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[19px\]{font-size:19px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[34px\]{font-size:34px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-mode{font-size:18px;line-height:1.2;letter-spacing:-.02em;font-weight:600}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.3em\]{letter-spacing:.3em}.tracking-caps{letter-spacing:.14em}.tracking-tightest{letter-spacing:-.02em}.text-accent{color:var(--accent)}.text-accent-soft-fg{color:var(--accent-soft-fg)}.text-amber-fg{color:var(--warning-fg)}.text-danger-fg{color:var(--danger-fg)}.text-ink{color:var(--text-primary)}.text-ink-muted{color:var(--text-tertiary)}.text-ink-secondary{color:var(--text-secondary)}.text-success-fg{color:var(--success-fg)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.accent-\[var\(--danger\)\]{accent-color:var(--danger)}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: var(--shadow-sm);--tw-shadow-colored: var(--shadow-sm);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xs{--tw-shadow: var(--shadow-xs);--tw-shadow-colored: var(--shadow-xs);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}html,body,#app{height:100%}html{background-color:var(--bg-app);transition:background-color var(--dur-base) var(--ease-standard)}body{font-family:Space Grotesk,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#app{background-color:var(--bg-app);min-height:100vh;transition:background-color var(--dur-base) var(--ease-standard)}html.reduce-motion *,html.reduce-motion *:before,html.reduce-motion *:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}.leaflet-container{background:var(--surface-inset);font-family:var(--font-sans)}.leaflet-control-attribution{background:color-mix(in srgb,var(--surface) 82%,transparent)!important;color:var(--text-tertiary)!important}.leaflet-control-attribution a{color:var(--text-secondary)!important}.placeholder\:text-ink-muted::-moz-placeholder{color:var(--text-tertiary)}.placeholder\:text-ink-muted::placeholder{color:var(--text-tertiary)}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-line-strong:hover{border-color:var(--border-strong)}.hover\:bg-danger-soft:hover{background-color:var(--danger-soft)}.hover\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\:text-ink:hover{color:var(--text-primary)}.hover\:text-ink-secondary:hover{color:var(--text-secondary)}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.enabled\:hover\:brightness-110:hover:enabled{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(max-width:1100px){.max-\[1100px\]\:hidden{display:none}.max-\[1100px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[1100px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.max-\[900px\]\:hidden{display:none}.max-\[900px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[900px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:820px){.max-\[820px\]\:col-span-1{grid-column:span 1 / span 1}.max-\[820px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:760px){.max-\[760px\]\:col-span-1{grid-column:span 1 / span 1}.max-\[760px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[760px\]\:flex-row{flex-direction:row}.max-\[760px\]\:overflow-x-auto{overflow-x:auto}}@media(max-width:560px){.max-\[560px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(min-width:640px){.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}.fade-enter-active[data-v-f495a614],.fade-leave-active[data-v-f495a614]{transition:opacity .2s}.fade-enter-from[data-v-f495a614],.fade-leave-to[data-v-f495a614]{opacity:0} diff --git a/Web App/server/dist/index.html b/Web App/server/dist/index.html index 18351bd..cba5d44 100644 --- a/Web App/server/dist/index.html +++ b/Web App/server/dist/index.html @@ -35,8 +35,8 @@ })() PilotVault — Control Panel - - + +
diff --git a/Web App/web/src/api.js b/Web App/web/src/api.js index 5c6eb6a..4e4f132 100644 --- a/Web App/web/src/api.js +++ b/Web App/web/src/api.js @@ -160,9 +160,12 @@ export async function saveOpenSky(payload) { return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } } -// Run a live health probe against the caller's resolved config. -export async function testOpenSky() { - const r = await fetch('/bff/integrations/opensky/health', { method: 'POST' }) +// Run a live health probe against the caller's resolved config. An optional +// `bbox` ("lamin,lomin,lamax,lomax") overrides the probe area for this test only +// (to check an area's credit cost without changing the saved default). +export async function testOpenSky(bbox) { + const qs = bbox ? `?bbox=${encodeURIComponent(bbox)}` : '' + const r = await fetch(`/bff/integrations/opensky/health${qs}`, { method: 'POST' }) return { ok: r.ok, status: r.status, body: await r.json().catch(() => ({})) } } diff --git a/Web App/web/src/components/Settings.vue b/Web App/web/src/components/Settings.vue index 1215862..e816e68 100644 --- a/Web App/web/src/components/Settings.vue +++ b/Web App/web/src/components/Settings.vue @@ -6,7 +6,7 @@ import Segmented from './settings/Segmented.vue' import Row from './settings/Row.vue' import { themeMode, setThemeMode } from '../theme.js' import { prefs, formatDateTime, importPrefs, applyFontSize, applyReduceMotion } from '../prefs.js' -import { europeanCountries, regionOptions } from '../countries.js' +import { europeanCountries, regionOptions, countryGroups } from '../countries.js' import { getUsers, createUser, updateUser, deleteUser, getOrgs, createOrg, updateOrg, deleteOrg, @@ -371,10 +371,45 @@ async function saveOpenSkySettings() { flash(osEditingOrg.value ? 'Organization OpenSky settings saved.' : 'OpenSky settings saved.') } +// Test-connection "probe area": an optional bounding box used only for the +// Test connection probe (to check an area's credit cost) without touching the +// saved default. Full country list (World / Continents / all countries) + Custom. +const OS_PROBE_GROUPS = [ + { label: 'World', options: [{ value: '-90,-180,90,180', label: 'World' }] }, + { label: 'Continents', options: [ + { value: '34,-25,72,45', label: 'Europe' }, + { value: '-35,-18,38,52', label: 'Africa' }, + { value: '5,25,82,180', label: 'Asia' }, + { value: '7,-168,72,-52', label: 'North America' }, + { value: '-56,-82,13,-34', label: 'South America' }, + { value: '-48,110,-10,180', label: 'Oceania' }, + ] }, + ...countryGroups(), +] +const OS_PROBE_FLAT = OS_PROBE_GROUPS.flatMap((g) => g.options) +const osProbeBbox = ref('') // '' = use the saved default bounding box +const osProbeCustom = ref(false) +const osProbeSelect = computed({ + get() { + if (osProbeCustom.value) return '__custom__' + if (!osProbeBbox.value) return '__default__' + const norm = osNormBbox(osProbeBbox.value) + const m = norm && OS_PROBE_FLAT.find((o) => osNormBbox(o.value) === norm) + return m ? m.value : '__custom__' + }, + set(v) { + if (v === '__default__') { osProbeCustom.value = false; osProbeBbox.value = ''; return } + if (v === '__custom__') { osProbeCustom.value = true; return } + osProbeCustom.value = false + osProbeBbox.value = v + }, +}) +const osProbeManual = computed(() => osProbeSelect.value === '__custom__') + async function testOpenSkyConnection() { osTesting.value = true osHealth.value = null - const { ok, body } = await testOpenSky() + const { ok, body } = await testOpenSky((osProbeBbox.value || '').trim() || undefined) osTesting.value = false osHealth.value = ok && body.health ? body.health : { status: 'down', detail: body.error || 'Probe failed.' } osHealthTs.value = Date.now() @@ -1562,6 +1597,17 @@ onBeforeUnmount(() => { +
+ + + +
diff --git a/Web App/web/src/countries.js b/Web App/web/src/countries.js index 73b0214..37e592f 100644 --- a/Web App/web/src/countries.js +++ b/Web App/web/src/countries.js @@ -255,3 +255,23 @@ export function regionOptions() { .sort((a, b) => a.name.localeCompare(b.name)) .map((c) => [c.code, c.name]) } + +// Per-continent picker groups ({ label, options:[{value:bbox, label:name}] }), +// countries A→Z within each. Used by the "Test area" probe picker. +const CONTINENT_LABELS = [ + ['EU', 'European countries'], + ['AS', 'Asian countries'], + ['AF', 'African countries'], + ['NA', 'North American countries'], + ['SA', 'South American countries'], + ['OC', 'Oceanian countries'], +] +export function countryGroups() { + return CONTINENT_LABELS.map(([code, label]) => ({ + label, + options: COUNTRIES.filter((c) => c.continent === code) + .slice() + .sort((a, b) => a.name.localeCompare(b.name)) + .map((c) => ({ value: c.bbox, label: c.name })), + })) +}