Add API Server (Go/PocketBase), Web App (Go BFF + Vue), Fly App (Flutter/DJI MSDK), Adobe Plugin, and Docker/Docker AIO deployment configs. Design assets and build artifacts are gitignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
347 KiB
JavaScript
21 lines
347 KiB
JavaScript
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function o(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(l){if(l.ep)return;l.ep=!0;const c=o(l);fetch(l.href,c)}})();/**
|
|
* @vue/shared v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function va(e){const i=Object.create(null);for(const o of e.split(","))i[o]=1;return o=>o in i}const ie={},_s=[],Zn=()=>{},iu=()=>!1,lr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ur=e=>e.startsWith("onUpdate:"),Ce=Object.assign,ya=(e,i)=>{const o=e.indexOf(i);o>-1&&e.splice(o,1)},Qc=Object.prototype.hasOwnProperty,Xt=(e,i)=>Qc.call(e,i),pt=Array.isArray,vs=e=>po(e)==="[object Map]",Ts=e=>po(e)==="[object Set]",il=e=>po(e)==="[object Date]",Lt=e=>typeof e=="function",pe=e=>typeof e=="string",Ln=e=>typeof e=="symbol",Qt=e=>e!==null&&typeof e=="object",su=e=>(Qt(e)||Lt(e))&&Lt(e.then)&&Lt(e.catch),ou=Object.prototype.toString,po=e=>ou.call(e),td=e=>po(e).slice(8,-1),ru=e=>po(e)==="[object Object]",ba=e=>pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xs=va(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cr=e=>{const i=Object.create(null);return(o=>i[o]||(i[o]=e(o)))},ed=/-\w/g,Pn=cr(e=>e.replace(ed,i=>i.slice(1).toUpperCase())),nd=/\B([A-Z])/g,Li=cr(e=>e.replace(nd,"-$1").toLowerCase()),au=cr(e=>e.charAt(0).toUpperCase()+e.slice(1)),jr=cr(e=>e?`on${au(e)}`:""),Vn=(e,i)=>!Object.is(e,i),Go=(e,...i)=>{for(let o=0;o<e.length;o++)e[o](...i)},lu=(e,i,o,a=!1)=>{Object.defineProperty(e,i,{configurable:!0,enumerable:!1,writable:a,value:o})},dr=e=>{const i=parseFloat(e);return isNaN(i)?e:i},id=e=>{const i=pe(e)?Number(e):NaN;return isNaN(i)?e:i};let sl;const fr=()=>sl||(sl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ks(e){if(pt(e)){const i={};for(let o=0;o<e.length;o++){const a=e[o],l=pe(a)?ad(a):ks(a);if(l)for(const c in l)i[c]=l[c]}return i}else if(pe(e)||Qt(e))return e}const sd=/;(?![^(]*\))/g,od=/:([^]+)/,rd=/\/\*[^]*?\*\//g;function ad(e){const i={};return e.replace(rd,"").split(sd).forEach(o=>{if(o){const a=o.split(od);a.length>1&&(i[a[0].trim()]=a[1].trim())}}),i}function Ot(e){let i="";if(pe(e))i=e;else if(pt(e))for(let o=0;o<e.length;o++){const a=Ot(e[o]);a&&(i+=a+" ")}else if(Qt(e))for(const o in e)e[o]&&(i+=o+" ");return i.trim()}const ld="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ud=va(ld);function uu(e){return!!e||e===""}function cd(e,i){if(e.length!==i.length)return!1;let o=!0;for(let a=0;o&&a<e.length;a++)o=Si(e[a],i[a]);return o}function Si(e,i){if(e===i)return!0;let o=il(e),a=il(i);if(o||a)return o&&a?e.getTime()===i.getTime():!1;if(o=Ln(e),a=Ln(i),o||a)return e===i;if(o=pt(e),a=pt(i),o||a)return o&&a?cd(e,i):!1;if(o=Qt(e),a=Qt(i),o||a){if(!o||!a)return!1;const l=Object.keys(e).length,c=Object.keys(i).length;if(l!==c)return!1;for(const h in e){const g=e.hasOwnProperty(h),v=i.hasOwnProperty(h);if(g&&!v||!g&&v||!Si(e[h],i[h]))return!1}}return String(e)===String(i)}function xa(e,i){return e.findIndex(o=>Si(o,i))}const cu=e=>!!(e&&e.__v_isRef===!0),M=e=>pe(e)?e:e==null?"":pt(e)||Qt(e)&&(e.toString===ou||!Lt(e.toString))?cu(e)?M(e.value):JSON.stringify(e,du,2):String(e),du=(e,i)=>cu(i)?du(e,i.value):vs(i)?{[`Map(${i.size})`]:[...i.entries()].reduce((o,[a,l],c)=>(o[Wr(a,c)+" =>"]=l,o),{})}:Ts(i)?{[`Set(${i.size})`]:[...i.values()].map(o=>Wr(o))}:Ln(i)?Wr(i):Qt(i)&&!pt(i)&&!ru(i)?String(i):i,Wr=(e,i="")=>{var o;return Ln(e)?`Symbol(${(o=e.description)!=null?o:i})`:e};/**
|
|
* @vue/reactivity v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let ze;class dd{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&&ze&&(ze.active?(this.parent=ze,this.index=(ze.scopes||(ze.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let i,o;if(this.scopes)for(i=0,o=this.scopes.length;i<o;i++)this.scopes[i].pause();for(i=0,o=this.effects.length;i<o;i++)this.effects[i].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let i,o;if(this.scopes)for(i=0,o=this.scopes.length;i<o;i++)this.scopes[i].resume();for(i=0,o=this.effects.length;i<o;i++)this.effects[i].resume()}}run(i){if(this._active){const o=ze;try{return ze=this,i()}finally{ze=o}}}on(){++this._on===1&&(this.prevScope=ze,ze=this)}off(){if(this._on>0&&--this._on===0){if(ze===this)ze=this.prevScope;else{let i=ze;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 o,a;for(o=0,a=this.effects.length;o<a;o++)this.effects[o].stop();for(this.effects.length=0,o=0,a=this.cleanups.length;o<a;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,a=this.scopes.length;o<a;o++)this.scopes[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!i){const l=this.parent.scopes.pop();l&&l!==this&&(this.parent.scopes[this.index]=l,l.index=this.index)}this.parent=void 0}}}function fd(){return ze}let re;const Kr=new WeakSet;class fu{constructor(i){this.fn=i,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ze&&(ze.active?ze.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Kr.has(this)&&(Kr.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||pu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ol(this),mu(this);const i=re,o=Tn;re=this,Tn=!0;try{return this.fn()}finally{gu(this),re=i,Tn=o,this.flags&=-3}}stop(){if(this.flags&1){for(let i=this.deps;i;i=i.nextDep)Sa(i);this.deps=this.depsTail=void 0,ol(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Kr.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ia(this)&&this.run()}get dirty(){return ia(this)}}let hu=0,Qs,to;function pu(e,i=!1){if(e.flags|=8,i){e.next=to,to=e;return}e.next=Qs,Qs=e}function wa(){hu++}function ka(){if(--hu>0)return;if(to){let i=to;for(to=void 0;i;){const o=i.next;i.next=void 0,i.flags&=-9,i=o}}let e;for(;Qs;){let i=Qs;for(Qs=void 0;i;){const o=i.next;if(i.next=void 0,i.flags&=-9,i.flags&1)try{i.trigger()}catch(a){e||(e=a)}i=o}}if(e)throw e}function mu(e){for(let i=e.deps;i;i=i.nextDep)i.version=-1,i.prevActiveLink=i.dep.activeLink,i.dep.activeLink=i}function gu(e){let i,o=e.depsTail,a=o;for(;a;){const l=a.prevDep;a.version===-1?(a===o&&(o=l),Sa(a),hd(a)):i=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=l}e.deps=i,e.depsTail=o}function ia(e){for(let i=e.deps;i;i=i.nextDep)if(i.dep.version!==i.version||i.dep.computed&&(_u(i.dep.computed)||i.dep.version!==i.version))return!0;return!!e._dirty}function _u(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===oo)||(e.globalVersion=oo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ia(e))))return;e.flags|=2;const i=e.dep,o=re,a=Tn;re=e,Tn=!0;try{mu(e);const l=e.fn(e._value);(i.version===0||Vn(l,e._value))&&(e.flags|=128,e._value=l,i.version++)}catch(l){throw i.version++,l}finally{re=o,Tn=a,gu(e),e.flags&=-3}}function Sa(e,i=!1){const{dep:o,prevSub:a,nextSub:l}=e;if(a&&(a.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=a,e.nextSub=void 0),o.subs===e&&(o.subs=a,!a&&o.computed)){o.computed.flags&=-5;for(let c=o.computed.deps;c;c=c.nextDep)Sa(c,!0)}!i&&!--o.sc&&o.map&&o.map.delete(o.key)}function hd(e){const{prevDep:i,nextDep:o}=e;i&&(i.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=i,e.nextDep=void 0)}let Tn=!0;const vu=[];function $n(){vu.push(Tn),Tn=!1}function Hn(){const e=vu.pop();Tn=e===void 0?!0:e}function ol(e){const{cleanup:i}=e;if(e.cleanup=void 0,i){const o=re;re=void 0;try{i()}finally{re=o}}}let oo=0;class pd{constructor(i,o){this.sub=i,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Pa{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(!re||!Tn||re===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==re)o=this.activeLink=new pd(re,this),re.deps?(o.prevDep=re.depsTail,re.depsTail.nextDep=o,re.depsTail=o):re.deps=re.depsTail=o,yu(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){const a=o.nextDep;a.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=a),o.prevDep=re.depsTail,o.nextDep=void 0,re.depsTail.nextDep=o,re.depsTail=o,re.deps===o&&(re.deps=a)}return o}trigger(i){this.version++,oo++,this.notify(i)}notify(i){wa();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{ka()}}}function yu(e){if(e.dep.sc++,e.sub.flags&4){const i=e.dep.computed;if(i&&!e.dep.subs){i.flags|=20;for(let a=i.deps;a;a=a.nextDep)yu(a)}const o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}const sa=new WeakMap,Ki=Symbol(""),oa=Symbol(""),ro=Symbol("");function Ne(e,i,o){if(Tn&&re){let a=sa.get(e);a||sa.set(e,a=new Map);let l=a.get(o);l||(a.set(o,l=new Pa),l.map=a,l.key=o),l.track()}}function si(e,i,o,a,l,c){const h=sa.get(e);if(!h){oo++;return}const g=v=>{v&&v.trigger()};if(wa(),i==="clear")h.forEach(g);else{const v=pt(e),P=v&&ba(o);if(v&&o==="length"){const k=Number(a);h.forEach((O,$)=>{($==="length"||$===ro||!Ln($)&&$>=k)&&g(O)})}else switch((o!==void 0||h.has(void 0))&&g(h.get(o)),P&&g(h.get(ro)),i){case"add":v?P&&g(h.get("length")):(g(h.get(Ki)),vs(e)&&g(h.get(oa)));break;case"delete":v||(g(h.get(Ki)),vs(e)&&g(h.get(oa)));break;case"set":vs(e)&&g(h.get(Ki));break}}ka()}function ms(e){const i=Gt(e);return i===e?i:(Ne(i,"iterate",ro),hn(e)?i:i.map(Mn))}function hr(e){return Ne(e=Gt(e),"iterate",ro),e}function Rn(e,i){return ai(e)?Ss(qi(e)?Mn(i):i):Mn(i)}const md={__proto__:null,[Symbol.iterator](){return qr(this,Symbol.iterator,e=>Rn(this,e))},concat(...e){return ms(this).concat(...e.map(i=>pt(i)?ms(i):i))},entries(){return qr(this,"entries",e=>(e[1]=Rn(this,e[1]),e))},every(e,i){return ti(this,"every",e,i,void 0,arguments)},filter(e,i){return ti(this,"filter",e,i,o=>o.map(a=>Rn(this,a)),arguments)},find(e,i){return ti(this,"find",e,i,o=>Rn(this,o),arguments)},findIndex(e,i){return ti(this,"findIndex",e,i,void 0,arguments)},findLast(e,i){return ti(this,"findLast",e,i,o=>Rn(this,o),arguments)},findLastIndex(e,i){return ti(this,"findLastIndex",e,i,void 0,arguments)},forEach(e,i){return ti(this,"forEach",e,i,void 0,arguments)},includes(...e){return Gr(this,"includes",e)},indexOf(...e){return Gr(this,"indexOf",e)},join(e){return ms(this).join(e)},lastIndexOf(...e){return Gr(this,"lastIndexOf",e)},map(e,i){return ti(this,"map",e,i,void 0,arguments)},pop(){return js(this,"pop")},push(...e){return js(this,"push",e)},reduce(e,...i){return rl(this,"reduce",e,i)},reduceRight(e,...i){return rl(this,"reduceRight",e,i)},shift(){return js(this,"shift")},some(e,i){return ti(this,"some",e,i,void 0,arguments)},splice(...e){return js(this,"splice",e)},toReversed(){return ms(this).toReversed()},toSorted(e){return ms(this).toSorted(e)},toSpliced(...e){return ms(this).toSpliced(...e)},unshift(...e){return js(this,"unshift",e)},values(){return qr(this,"values",e=>Rn(this,e))}};function qr(e,i,o){const a=hr(e),l=a[i]();return a!==e&&!hn(e)&&(l._next=l.next,l.next=()=>{const c=l._next();return c.done||(c.value=o(c.value)),c}),l}const gd=Array.prototype;function ti(e,i,o,a,l,c){const h=hr(e),g=h!==e&&!hn(e),v=h[i];if(v!==gd[i]){const O=v.apply(e,c);return g?Mn(O):O}let P=o;h!==e&&(g?P=function(O,$){return o.call(this,Rn(e,O),$,e)}:o.length>2&&(P=function(O,$){return o.call(this,O,$,e)}));const k=v.call(h,P,a);return g&&l?l(k):k}function rl(e,i,o,a){const l=hr(e),c=l!==e&&!hn(e);let h=o,g=!1;l!==e&&(c?(g=a.length===0,h=function(P,k,O){return g&&(g=!1,P=Rn(e,P)),o.call(this,P,Rn(e,k),O,e)}):o.length>3&&(h=function(P,k,O){return o.call(this,P,k,O,e)}));const v=l[i](h,...a);return g?Rn(e,v):v}function Gr(e,i,o){const a=Gt(e);Ne(a,"iterate",ro);const l=a[i](...o);return(l===-1||l===!1)&&Ma(o[0])?(o[0]=Gt(o[0]),a[i](...o)):l}function js(e,i,o=[]){$n(),wa();const a=Gt(e)[i].apply(e,o);return ka(),Hn(),a}const _d=va("__proto__,__v_isRef,__isVue"),bu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ln));function vd(e){Ln(e)||(e=String(e));const i=Gt(this);return Ne(i,"has",e),i.hasOwnProperty(e)}class xu{constructor(i=!1,o=!1){this._isReadonly=i,this._isShallow=o}get(i,o,a){if(o==="__v_skip")return i.__v_skip;const l=this._isReadonly,c=this._isShallow;if(o==="__v_isReactive")return!l;if(o==="__v_isReadonly")return l;if(o==="__v_isShallow")return c;if(o==="__v_raw")return a===(l?c?Md:Pu:c?Su:ku).get(i)||Object.getPrototypeOf(i)===Object.getPrototypeOf(a)?i:void 0;const h=pt(i);if(!l){let v;if(h&&(v=md[o]))return v;if(o==="hasOwnProperty")return vd}const g=Reflect.get(i,o,Re(i)?i:a);if((Ln(o)?bu.has(o):_d(o))||(l||Ne(i,"get",o),c))return g;if(Re(g)){const v=h&&ba(o)?g:g.value;return l&&Qt(v)?aa(v):v}return Qt(g)?l?aa(g):xe(g):g}}class wu extends xu{constructor(i=!1){super(!1,i)}set(i,o,a,l){let c=i[o];const h=pt(i)&&ba(o);if(!this._isShallow){const P=ai(c);if(!hn(a)&&!ai(a)&&(c=Gt(c),a=Gt(a)),!h&&Re(c)&&!Re(a))return P||(c.value=a),!0}const g=h?Number(o)<i.length:Xt(i,o),v=Reflect.set(i,o,a,Re(i)?i:l);return i===Gt(l)&&v&&(g?Vn(a,c)&&si(i,"set",o,a):si(i,"add",o,a)),v}deleteProperty(i,o){const a=Xt(i,o);i[o];const l=Reflect.deleteProperty(i,o);return l&&a&&si(i,"delete",o,void 0),l}has(i,o){const a=Reflect.has(i,o);return(!Ln(o)||!bu.has(o))&&Ne(i,"has",o),a}ownKeys(i){return Ne(i,"iterate",pt(i)?"length":Ki),Reflect.ownKeys(i)}}class yd extends xu{constructor(i=!1){super(!0,i)}set(i,o){return!0}deleteProperty(i,o){return!0}}const bd=new wu,xd=new yd,wd=new wu(!0);const ra=e=>e,Ho=e=>Reflect.getPrototypeOf(e);function kd(e,i,o){return function(...a){const l=this.__v_raw,c=Gt(l),h=vs(c),g=e==="entries"||e===Symbol.iterator&&h,v=e==="keys"&&h,P=l[e](...a),k=o?ra:i?Ss:Mn;return!i&&Ne(c,"iterate",v?oa:Ki),Ce(Object.create(P),{next(){const{value:O,done:$}=P.next();return $?{value:O,done:$}:{value:g?[k(O[0]),k(O[1])]:k(O),done:$}}})}}function Uo(e){return function(...i){return e==="delete"?!1:e==="clear"?void 0:this}}function Sd(e,i){const o={get(l){const c=this.__v_raw,h=Gt(c),g=Gt(l);e||(Vn(l,g)&&Ne(h,"get",l),Ne(h,"get",g));const{has:v}=Ho(h),P=i?ra:e?Ss:Mn;if(v.call(h,l))return P(c.get(l));if(v.call(h,g))return P(c.get(g));c!==h&&c.get(l)},get size(){const l=this.__v_raw;return!e&&Ne(Gt(l),"iterate",Ki),l.size},has(l){const c=this.__v_raw,h=Gt(c),g=Gt(l);return e||(Vn(l,g)&&Ne(h,"has",l),Ne(h,"has",g)),l===g?c.has(l):c.has(l)||c.has(g)},forEach(l,c){const h=this,g=h.__v_raw,v=Gt(g),P=i?ra:e?Ss:Mn;return!e&&Ne(v,"iterate",Ki),g.forEach((k,O)=>l.call(c,P(k),P(O),h))}};return Ce(o,e?{add:Uo("add"),set:Uo("set"),delete:Uo("delete"),clear:Uo("clear")}:{add(l){const c=Gt(this),h=Ho(c),g=Gt(l),v=!i&&!hn(l)&&!ai(l)?g:l;return h.has.call(c,v)||Vn(l,v)&&h.has.call(c,l)||Vn(g,v)&&h.has.call(c,g)||(c.add(v),si(c,"add",v,v)),this},set(l,c){!i&&!hn(c)&&!ai(c)&&(c=Gt(c));const h=Gt(this),{has:g,get:v}=Ho(h);let P=g.call(h,l);P||(l=Gt(l),P=g.call(h,l));const k=v.call(h,l);return h.set(l,c),P?Vn(c,k)&&si(h,"set",l,c):si(h,"add",l,c),this},delete(l){const c=Gt(this),{has:h,get:g}=Ho(c);let v=h.call(c,l);v||(l=Gt(l),v=h.call(c,l)),g&&g.call(c,l);const P=c.delete(l);return v&&si(c,"delete",l,void 0),P},clear(){const l=Gt(this),c=l.size!==0,h=l.clear();return c&&si(l,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(l=>{o[l]=kd(l,e,i)}),o}function Ta(e,i){const o=Sd(e,i);return(a,l,c)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?a:Reflect.get(Xt(o,l)&&l in a?o:a,l,c)}const Pd={get:Ta(!1,!1)},Td={get:Ta(!1,!0)},Ld={get:Ta(!0,!1)};const ku=new WeakMap,Su=new WeakMap,Pu=new WeakMap,Md=new WeakMap;function Cd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xe(e){return ai(e)?e:La(e,!1,bd,Pd,ku)}function Od(e){return La(e,!1,wd,Td,Su)}function aa(e){return La(e,!0,xd,Ld,Pu)}function La(e,i,o,a,l){if(!Qt(e)||e.__v_raw&&!(i&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const c=l.get(e);if(c)return c;const h=Cd(td(e));if(h===0)return e;const g=new Proxy(e,h===2?a:o);return l.set(e,g),g}function qi(e){return ai(e)?qi(e.__v_raw):!!(e&&e.__v_isReactive)}function ai(e){return!!(e&&e.__v_isReadonly)}function hn(e){return!!(e&&e.__v_isShallow)}function Ma(e){return e?!!e.__v_raw:!1}function Gt(e){const i=e&&e.__v_raw;return i?Gt(i):e}function Ed(e){return!Xt(e,"__v_skip")&&Object.isExtensible(e)&&lu(e,"__v_skip",!0),e}const Mn=e=>Qt(e)?xe(e):e,Ss=e=>Qt(e)?aa(e):e;function Re(e){return e?e.__v_isRef===!0:!1}function J(e){return zd(e,!1)}function zd(e,i){return Re(e)?e:new Ad(e,i)}class Ad{constructor(i,o){this.dep=new Pa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?i:Gt(i),this._value=o?i:Mn(i),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(i){const o=this._rawValue,a=this.__v_isShallow||hn(i)||ai(i);i=a?i:Gt(i),Vn(i,o)&&(this._rawValue=i,this._value=a?i:Mn(i),this.dep.trigger())}}function Ct(e){return Re(e)?e.value:e}const Id={get:(e,i,o)=>i==="__v_raw"?e:Ct(Reflect.get(e,i,o)),set:(e,i,o,a)=>{const l=e[i];return Re(l)&&!Re(o)?(l.value=o,!0):Reflect.set(e,i,o,a)}};function Tu(e){return qi(e)?e:new Proxy(e,Id)}class Nd{constructor(i,o,a){this.fn=i,this.setter=o,this._value=void 0,this.dep=new Pa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=oo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=a}notify(){if(this.flags|=16,!(this.flags&8)&&re!==this)return pu(this,!0),!0}get value(){const i=this.dep.track();return _u(this),i&&(i.version=this.dep.version),this._value}set value(i){this.setter&&this.setter(i)}}function Bd(e,i,o=!1){let a,l;return Lt(e)?a=e:(a=e.get,l=e.set),new Nd(a,l,o)}const jo={},Jo=new WeakMap;let ji;function Dd(e,i=!1,o=ji){if(o){let a=Jo.get(o);a||Jo.set(o,a=[]),a.push(e)}}function Rd(e,i,o=ie){const{immediate:a,deep:l,once:c,scheduler:h,augmentJob:g,call:v}=o,P=X=>l?X:hn(X)||l===!1||l===0?oi(X,1):oi(X);let k,O,$,F,nt=!1,q=!1;if(Re(e)?(O=()=>e.value,nt=hn(e)):qi(e)?(O=()=>P(e),nt=!0):pt(e)?(q=!0,nt=e.some(X=>qi(X)||hn(X)),O=()=>e.map(X=>{if(Re(X))return X.value;if(qi(X))return P(X);if(Lt(X))return v?v(X,2):X()})):Lt(e)?i?O=v?()=>v(e,2):e:O=()=>{if($){$n();try{$()}finally{Hn()}}const X=ji;ji=k;try{return v?v(e,3,[F]):e(F)}finally{ji=X}}:O=Zn,i&&l){const X=O,ft=l===!0?1/0:l;O=()=>oi(X(),ft)}const At=fd(),Dt=()=>{k.stop(),At&&At.active&&ya(At.effects,k)};if(c&&i){const X=i;i=(...ft)=>{const jt=X(...ft);return Dt(),jt}}let bt=q?new Array(e.length).fill(jo):jo;const ut=X=>{if(!(!(k.flags&1)||!k.dirty&&!X))if(i){const ft=k.run();if(X||l||nt||(q?ft.some((jt,de)=>Vn(jt,bt[de])):Vn(ft,bt))){$&&$();const jt=ji;ji=k;try{const de=[ft,bt===jo?void 0:q&&bt[0]===jo?[]:bt,F];bt=ft,v?v(i,3,de):i(...de)}finally{ji=jt}}}else k.run()};return g&&g(ut),k=new fu(O),k.scheduler=h?()=>h(ut,!1):ut,F=X=>Dd(X,!1,k),$=k.onStop=()=>{const X=Jo.get(k);if(X){if(v)v(X,4);else for(const ft of X)ft();Jo.delete(k)}},i?a?ut(!0):bt=k.run():h?h(ut.bind(null,!0),!0):k.run(),Dt.pause=k.pause.bind(k),Dt.resume=k.resume.bind(k),Dt.stop=Dt,Dt}function oi(e,i=1/0,o){if(i<=0||!Qt(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=i))return e;if(o.set(e,i),i--,Re(e))oi(e.value,i,o);else if(pt(e))for(let a=0;a<e.length;a++)oi(e[a],i,o);else if(Ts(e)||vs(e))e.forEach(a=>{oi(a,i,o)});else if(ru(e)){for(const a in e)oi(e[a],i,o);for(const a of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,a)&&oi(e[a],i,o)}return e}/**
|
|
* @vue/runtime-core v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function mo(e,i,o,a){try{return a?e(...a):e()}catch(l){pr(l,i,o)}}function mn(e,i,o,a){if(Lt(e)){const l=mo(e,i,o,a);return l&&su(l)&&l.catch(c=>{pr(c,i,o)}),l}if(pt(e)){const l=[];for(let c=0;c<e.length;c++)l.push(mn(e[c],i,o,a));return l}}function pr(e,i,o,a=!0){const l=i?i.vnode:null,{errorHandler:c,throwUnhandledErrorInProduction:h}=i&&i.appContext.config||ie;if(i){let g=i.parent;const v=i.proxy,P=`https://vuejs.org/error-reference/#runtime-${o}`;for(;g;){const k=g.ec;if(k){for(let O=0;O<k.length;O++)if(k[O](e,v,P)===!1)return}g=g.parent}if(c){$n(),mo(c,null,10,[e,v,P]),Hn();return}}Fd(e,o,l,a,h)}function Fd(e,i,o,a=!0,l=!1){if(l)throw e;console.error(e)}const je=[];let Dn=-1;const ys=[];let ki=null,gs=0;const Lu=Promise.resolve();let Xo=null;function Mu(e){const i=Xo||Lu;return e?i.then(this?e.bind(this):e):i}function Vd(e){let i=Dn+1,o=je.length;for(;i<o;){const a=i+o>>>1,l=je[a],c=ao(l);c<e||c===e&&l.flags&2?i=a+1:o=a}return i}function Ca(e){if(!(e.flags&1)){const i=ao(e),o=je[je.length-1];!o||!(e.flags&2)&&i>=ao(o)?je.push(e):je.splice(Vd(i),0,e),e.flags|=1,Cu()}}function Cu(){Xo||(Xo=Lu.then(Eu))}function Zd(e){pt(e)?ys.push(...e):ki&&e.id===-1?ki.splice(gs+1,0,e):e.flags&1||(ys.push(e),e.flags|=1),Cu()}function al(e,i,o=Dn+1){for(;o<je.length;o++){const a=je[o];if(a&&a.flags&2){if(e&&a.id!==e.uid)continue;je.splice(o,1),o--,a.flags&4&&(a.flags&=-2),a(),a.flags&4||(a.flags&=-2)}}}function Ou(e){if(ys.length){const i=[...new Set(ys)].sort((o,a)=>ao(o)-ao(a));if(ys.length=0,ki){ki.push(...i);return}for(ki=i,gs=0;gs<ki.length;gs++){const o=ki[gs];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}ki=null,gs=0}}const ao=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Eu(e){try{for(Dn=0;Dn<je.length;Dn++){const i=je[Dn];i&&!(i.flags&8)&&(i.flags&4&&(i.flags&=-2),mo(i,i.i,i.i?15:14),i.flags&4||(i.flags&=-2))}}finally{for(;Dn<je.length;Dn++){const i=je[Dn];i&&(i.flags&=-2)}Dn=-1,je.length=0,Ou(),Xo=null,(je.length||ys.length)&&Eu()}}let De=null,zu=null;function Qo(e){const i=De;return De=e,zu=e&&e.type.__scopeId||null,i}function ot(e,i=De,o){if(!i||e._n)return e;const a=(...l)=>{a._d&&nr(-1);const c=Qo(i);let h;try{h=e(...l)}finally{Qo(c),a._d&&nr(1)}return h};return a._n=!0,a._c=!0,a._d=!0,a}function xt(e,i){if(De===null)return e;const o=br(De),a=e.dirs||(e.dirs=[]);for(let l=0;l<i.length;l++){let[c,h,g,v=ie]=i[l];c&&(Lt(c)&&(c={mounted:c,updated:c}),c.deep&&oi(h),a.push({dir:c,instance:o,value:h,oldValue:void 0,arg:g,modifiers:v}))}return e}function Zi(e,i,o,a){const l=e.dirs,c=i&&i.dirs;for(let h=0;h<l.length;h++){const g=l[h];c&&(g.oldValue=c[h].value);let v=g.dir[a];v&&($n(),mn(v,o,8,[e.el,g,e,i]),Hn())}}function Au(e,i){if(We){let o=We.provides;const a=We.parent&&We.parent.provides;a===o&&(o=We.provides=Object.create(a)),o[e]=i}}function eo(e,i,o=!1){const a=dc();if(a||xs){let l=xs?xs._context.provides:a?a.parent==null||a.ce?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides:void 0;if(l&&e in l)return l[e];if(arguments.length>1)return o&&Lt(i)?i.call(a&&a.proxy):i}}const $d=Symbol.for("v-scx"),Hd=()=>eo($d);function Je(e,i,o){return Iu(e,i,o)}function Iu(e,i,o=ie){const{immediate:a,deep:l,flush:c,once:h}=o,g=Ce({},o),v=i&&a||!i&&c!=="post";let P;if(fo){if(c==="sync"){const F=Hd();P=F.__watcherHandles||(F.__watcherHandles=[])}else if(!v){const F=()=>{};return F.stop=Zn,F.resume=Zn,F.pause=Zn,F}}const k=We;g.call=(F,nt,q)=>mn(F,k,nt,q);let O=!1;c==="post"?g.scheduler=F=>{Ye(F,k&&k.suspense)}:c!=="sync"&&(O=!0,g.scheduler=(F,nt)=>{nt?F():Ca(F)}),g.augmentJob=F=>{i&&(F.flags|=4),O&&(F.flags|=2,k&&(F.id=k.uid,F.i=k))};const $=Rd(e,i,g);return fo&&(P?P.push($):v&&$()),$}function Ud(e,i,o){const a=this.proxy,l=pe(e)?e.includes(".")?Nu(a,e):()=>a[e]:e.bind(a,a);let c;Lt(i)?c=i:(c=i.handler,o=i);const h=go(this),g=Iu(l,c.bind(a),o);return h(),g}function Nu(e,i){const o=i.split(".");return()=>{let a=e;for(let l=0;l<o.length&&a;l++)a=a[o[l]];return a}}const jd=Symbol("_vte"),Bu=e=>e.__isTeleport,fn=Symbol("_leaveCb"),Ws=Symbol("_enterCb");function Wd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ls(()=>{e.isMounted=!0}),_r(()=>{e.isUnmounting=!0}),e}const cn=[Function,Array],Du={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:cn,onEnter:cn,onAfterEnter:cn,onEnterCancelled:cn,onBeforeLeave:cn,onLeave:cn,onAfterLeave:cn,onLeaveCancelled:cn,onBeforeAppear:cn,onAppear:cn,onAfterAppear:cn,onAppearCancelled:cn},Ru=e=>{const i=e.subTree;return i.component?Ru(i.component):i},Kd={name:"BaseTransition",props:Du,setup(e,{slots:i}){const o=dc(),a=Wd();return()=>{const l=i.default&&Zu(i.default(),!0),c=l&&l.length?Fu(l):o.subTree?V():void 0;if(!c)return;const h=Gt(e),{mode:g}=h;if(a.isLeaving)return Yr(c);const v=ll(c);if(!v)return Yr(c);let P=la(v,h,a,o,O=>P=O);v.type!==Be&&lo(v,P);let k=o.subTree&&ll(o.subTree);if(k&&k.type!==Be&&!Wi(k,v)&&Ru(o).type!==Be){let O=la(k,h,a,o);if(lo(k,O),g==="out-in"&&v.type!==Be)return a.isLeaving=!0,O.afterLeave=()=>{a.isLeaving=!1,o.job.flags&8||o.update(),delete O.afterLeave,k=void 0},Yr(c);g==="in-out"&&v.type!==Be?O.delayLeave=($,F,nt)=>{const q=Vu(a,k);q[String(k.key)]=k,$[fn]=()=>{F(),$[fn]=void 0,delete P.delayedLeave,k=void 0},P.delayedLeave=()=>{nt(),delete P.delayedLeave,k=void 0}}:k=void 0}else k&&(k=void 0);return c}}};function Fu(e){let i=e[0];if(e.length>1){for(const o of e)if(o.type!==Be){i=o;break}}return i}const qd=Kd;function Vu(e,i){const{leavingVNodes:o}=e;let a=o.get(i.type);return a||(a=Object.create(null),o.set(i.type,a)),a}function la(e,i,o,a,l){const{appear:c,mode:h,persisted:g=!1,onBeforeEnter:v,onEnter:P,onAfterEnter:k,onEnterCancelled:O,onBeforeLeave:$,onLeave:F,onAfterLeave:nt,onLeaveCancelled:q,onBeforeAppear:At,onAppear:Dt,onAfterAppear:bt,onAppearCancelled:ut}=i,X=String(e.key),ft=Vu(o,e),jt=(vt,Ft)=>{vt&&mn(vt,a,9,Ft)},de=(vt,Ft)=>{const Tt=Ft[1];jt(vt,Ft),pt(vt)?vt.every(G=>G.length<=1)&&Tt():vt.length<=1&&Tt()},me={mode:h,persisted:g,beforeEnter(vt){let Ft=v;if(!o.isMounted)if(c)Ft=At||v;else return;vt[fn]&&vt[fn](!0);const Tt=ft[X];Tt&&Wi(e,Tt)&&Tt.el[fn]&&Tt.el[fn](),jt(Ft,[vt])},enter(vt){if(ft[X]===e)return;let Ft=P,Tt=k,G=O;if(!o.isMounted)if(c)Ft=Dt||P,Tt=bt||k,G=ut||O;else return;let st=!1;vt[Ws]=Wt=>{st||(st=!0,Wt?jt(G,[vt]):jt(Tt,[vt]),me.delayedLeave&&me.delayedLeave(),vt[Ws]=void 0)};const It=vt[Ws].bind(null,!1);Ft?de(Ft,[vt,It]):It()},leave(vt,Ft){const Tt=String(e.key);if(vt[Ws]&&vt[Ws](!0),o.isUnmounting)return Ft();jt($,[vt]);let G=!1;vt[fn]=It=>{G||(G=!0,Ft(),It?jt(q,[vt]):jt(nt,[vt]),vt[fn]=void 0,ft[Tt]===e&&delete ft[Tt])};const st=vt[fn].bind(null,!1);ft[Tt]=e,F?de(F,[vt,st]):st()},clone(vt){const Ft=la(vt,i,o,a,l);return l&&l(Ft),Ft}};return me}function Yr(e){if(mr(e))return e=Pi(e),e.children=null,e}function ll(e){if(!mr(e))return Bu(e.type)&&e.children?Fu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:i,children:o}=e;if(o){if(i&16)return o[0];if(i&32&&Lt(o.default))return o.default()}}function lo(e,i){e.shapeFlag&6&&e.component?(e.transition=i,lo(e.component.subTree,i)):e.shapeFlag&128?(e.ssContent.transition=i.clone(e.ssContent),e.ssFallback.transition=i.clone(e.ssFallback)):e.transition=i}function Zu(e,i=!1,o){let a=[],l=0;for(let c=0;c<e.length;c++){let h=e[c];const g=o==null?h.key:String(o)+String(h.key!=null?h.key:c);h.type===wt?(h.patchFlag&128&&l++,a=a.concat(Zu(h.children,i,g))):(i||h.type!==Be)&&a.push(g!=null?Pi(h,{key:g}):h)}if(l>1)for(let c=0;c<a.length;c++)a[c].patchFlag=-2;return a}function $u(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ul(e,i){let o;return!!((o=Object.getOwnPropertyDescriptor(e,i))&&!o.configurable)}const tr=new WeakMap;function no(e,i,o,a,l=!1){if(pt(e)){e.forEach((q,At)=>no(q,i&&(pt(i)?i[At]:i),o,a,l));return}if(bs(a)&&!l){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&no(e,i,o,a.component.subTree);return}const c=a.shapeFlag&4?br(a.component):a.el,h=l?null:c,{i:g,r:v}=e,P=i&&i.r,k=g.refs===ie?g.refs={}:g.refs,O=g.setupState,$=Gt(O),F=O===ie?iu:q=>ul(k,q)?!1:Xt($,q),nt=(q,At)=>!(At&&ul(k,At));if(P!=null&&P!==v){if(cl(i),pe(P))k[P]=null,F(P)&&(O[P]=null);else if(Re(P)){const q=i;nt(P,q.k)&&(P.value=null),q.k&&(k[q.k]=null)}}if(Lt(v)){$n();try{mo(v,g,12,[h,k])}finally{Hn()}}else{const q=pe(v),At=Re(v);if(q||At){const Dt=()=>{if(e.f){const bt=q?F(v)?O[v]:k[v]:nt()||!e.k?v.value:k[e.k];if(l)pt(bt)&&ya(bt,c);else if(pt(bt))bt.includes(c)||bt.push(c);else if(q)k[v]=[c],F(v)&&(O[v]=k[v]);else{const ut=[c];nt(v,e.k)&&(v.value=ut),e.k&&(k[e.k]=ut)}}else q?(k[v]=h,F(v)&&(O[v]=h)):At&&(nt(v,e.k)&&(v.value=h),e.k&&(k[e.k]=h))};if(h){const bt=()=>{Dt(),tr.delete(e)};bt.id=-1,tr.set(e,bt),Ye(bt,o)}else cl(e),Dt()}}}function cl(e){const i=tr.get(e);i&&(i.flags|=8,tr.delete(e))}fr().requestIdleCallback;fr().cancelIdleCallback;const bs=e=>!!e.type.__asyncLoader,mr=e=>e.type.__isKeepAlive;function Gd(e,i){Hu(e,"a",i)}function Yd(e,i){Hu(e,"da",i)}function Hu(e,i,o=We){const a=e.__wdc||(e.__wdc=()=>{let l=o;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(gr(i,a,o),o){let l=o.parent;for(;l&&l.parent;)mr(l.parent.vnode)&&Jd(a,i,o,l),l=l.parent}}function Jd(e,i,o,a){const l=gr(i,e,a,!0);Uu(()=>{ya(a[i],l)},o)}function gr(e,i,o=We,a=!1){if(o){const l=o[e]||(o[e]=[]),c=i.__weh||(i.__weh=(...h)=>{$n();const g=go(o),v=mn(i,o,e,h);return g(),Hn(),v});return a?l.unshift(c):l.push(c),c}}const li=e=>(i,o=We)=>{(!fo||e==="sp")&&gr(e,(...a)=>i(...a),o)},Xd=li("bm"),Ls=li("m"),Qd=li("bu"),tf=li("u"),_r=li("bum"),Uu=li("um"),ef=li("sp"),nf=li("rtg"),sf=li("rtc");function of(e,i=We){gr("ec",e,i)}const rf=Symbol.for("v-ndc");function ce(e,i,o,a){let l;const c=o,h=pt(e);if(h||pe(e)){const g=h&&qi(e);let v=!1,P=!1;g&&(v=!hn(e),P=ai(e),e=hr(e)),l=new Array(e.length);for(let k=0,O=e.length;k<O;k++)l[k]=i(v?P?Ss(Mn(e[k])):Mn(e[k]):e[k],k,void 0,c)}else if(typeof e=="number"){l=new Array(e);for(let g=0;g<e;g++)l[g]=i(g+1,g,void 0,c)}else if(Qt(e))if(e[Symbol.iterator])l=Array.from(e,(g,v)=>i(g,v,void 0,c));else{const g=Object.keys(e);l=new Array(g.length);for(let v=0,P=g.length;v<P;v++){const k=g[v];l[v]=i(e[k],k,v,c)}}else l=[];return l}function af(e,i,o={},a,l){if(De.ce||De.parent&&bs(De.parent)&&De.parent.ce){const P=Object.keys(o).length>0;return b(),oe(wt,null,[E("slot",o,a)],P?-2:64)}let c=e[i];c&&c._c&&(c._d=!1),b();const h=c&&ju(c(o)),g=o.key||h&&h.key,v=oe(wt,{key:(g&&!Ln(g)?g:`_${i}`)+(!h&&a?"_fb":"")},h||[],h&&e._===1?64:-2);return v.scopeId&&(v.slotScopeIds=[v.scopeId+"-s"]),c&&c._c&&(c._d=!0),v}function ju(e){return e.some(i=>co(i)?!(i.type===Be||i.type===wt&&!ju(i.children)):!0)?e:null}const ua=e=>e?fc(e)?br(e):ua(e.parent):null,io=Ce(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=>ua(e.parent),$root:e=>ua(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ku(e),$forceUpdate:e=>e.f||(e.f=()=>{Ca(e.update)}),$nextTick:e=>e.n||(e.n=Mu.bind(e.proxy)),$watch:e=>Ud.bind(e)}),Jr=(e,i)=>e!==ie&&!e.__isScriptSetup&&Xt(e,i),lf={get({_:e},i){if(i==="__v_skip")return!0;const{ctx:o,setupState:a,data:l,props:c,accessCache:h,type:g,appContext:v}=e;if(i[0]!=="$"){const $=h[i];if($!==void 0)switch($){case 1:return a[i];case 2:return l[i];case 4:return o[i];case 3:return c[i]}else{if(Jr(a,i))return h[i]=1,a[i];if(l!==ie&&Xt(l,i))return h[i]=2,l[i];if(Xt(c,i))return h[i]=3,c[i];if(o!==ie&&Xt(o,i))return h[i]=4,o[i];ca&&(h[i]=0)}}const P=io[i];let k,O;if(P)return i==="$attrs"&&Ne(e.attrs,"get",""),P(e);if((k=g.__cssModules)&&(k=k[i]))return k;if(o!==ie&&Xt(o,i))return h[i]=4,o[i];if(O=v.config.globalProperties,Xt(O,i))return O[i]},set({_:e},i,o){const{data:a,setupState:l,ctx:c}=e;return Jr(l,i)?(l[i]=o,!0):a!==ie&&Xt(a,i)?(a[i]=o,!0):Xt(e.props,i)||i[0]==="$"&&i.slice(1)in e?!1:(c[i]=o,!0)},has({_:{data:e,setupState:i,accessCache:o,ctx:a,appContext:l,props:c,type:h}},g){let v;return!!(o[g]||e!==ie&&g[0]!=="$"&&Xt(e,g)||Jr(i,g)||Xt(c,g)||Xt(a,g)||Xt(io,g)||Xt(l.config.globalProperties,g)||(v=h.__cssModules)&&v[g])},defineProperty(e,i,o){return o.get!=null?e._.accessCache[i]=0:Xt(o,"value")&&this.set(e,i,o.value,null),Reflect.defineProperty(e,i,o)}};function dl(e){return pt(e)?e.reduce((i,o)=>(i[o]=null,i),{}):e}let ca=!0;function uf(e){const i=Ku(e),o=e.proxy,a=e.ctx;ca=!1,i.beforeCreate&&fl(i.beforeCreate,e,"bc");const{data:l,computed:c,methods:h,watch:g,provide:v,inject:P,created:k,beforeMount:O,mounted:$,beforeUpdate:F,updated:nt,activated:q,deactivated:At,beforeDestroy:Dt,beforeUnmount:bt,destroyed:ut,unmounted:X,render:ft,renderTracked:jt,renderTriggered:de,errorCaptured:me,serverPrefetch:vt,expose:Ft,inheritAttrs:Tt,components:G,directives:st,filters:It}=i;if(P&&cf(P,a,null),h)for(const Vt in h){const Y=h[Vt];Lt(Y)&&(a[Vt]=Y.bind(o))}if(l){const Vt=l.call(o,o);Qt(Vt)&&(e.data=xe(Vt))}if(ca=!0,c)for(const Vt in c){const Y=c[Vt],ue=Lt(Y)?Y.bind(o,o):Lt(Y.get)?Y.get.bind(o,o):Zn,rt=!Lt(Y)&&Lt(Y.set)?Y.set.bind(o):Zn,yt=ht({get:ue,set:rt});Object.defineProperty(a,Vt,{enumerable:!0,configurable:!0,get:()=>yt.value,set:Kt=>yt.value=Kt})}if(g)for(const Vt in g)Wu(g[Vt],a,o,Vt);if(v){const Vt=Lt(v)?v.call(o):v;Reflect.ownKeys(Vt).forEach(Y=>{Au(Y,Vt[Y])})}k&&fl(k,e,"c");function kt(Vt,Y){pt(Y)?Y.forEach(ue=>Vt(ue.bind(o))):Y&&Vt(Y.bind(o))}if(kt(Xd,O),kt(Ls,$),kt(Qd,F),kt(tf,nt),kt(Gd,q),kt(Yd,At),kt(of,me),kt(sf,jt),kt(nf,de),kt(_r,bt),kt(Uu,X),kt(ef,vt),pt(Ft))if(Ft.length){const Vt=e.exposed||(e.exposed={});Ft.forEach(Y=>{Object.defineProperty(Vt,Y,{get:()=>o[Y],set:ue=>o[Y]=ue,enumerable:!0})})}else e.exposed||(e.exposed={});ft&&e.render===Zn&&(e.render=ft),Tt!=null&&(e.inheritAttrs=Tt),G&&(e.components=G),st&&(e.directives=st),vt&&$u(e)}function cf(e,i,o=Zn){pt(e)&&(e=da(e));for(const a in e){const l=e[a];let c;Qt(l)?"default"in l?c=eo(l.from||a,l.default,!0):c=eo(l.from||a):c=eo(l),Re(c)?Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>c.value,set:h=>c.value=h}):i[a]=c}}function fl(e,i,o){mn(pt(e)?e.map(a=>a.bind(i.proxy)):e.bind(i.proxy),i,o)}function Wu(e,i,o,a){let l=a.includes(".")?Nu(o,a):()=>o[a];if(pe(e)){const c=i[e];Lt(c)&&Je(l,c)}else if(Lt(e))Je(l,e.bind(o));else if(Qt(e))if(pt(e))e.forEach(c=>Wu(c,i,o,a));else{const c=Lt(e.handler)?e.handler.bind(o):i[e.handler];Lt(c)&&Je(l,c,e)}}function Ku(e){const i=e.type,{mixins:o,extends:a}=i,{mixins:l,optionsCache:c,config:{optionMergeStrategies:h}}=e.appContext,g=c.get(i);let v;return g?v=g:!l.length&&!o&&!a?v=i:(v={},l.length&&l.forEach(P=>er(v,P,h,!0)),er(v,i,h)),Qt(i)&&c.set(i,v),v}function er(e,i,o,a=!1){const{mixins:l,extends:c}=i;c&&er(e,c,o,!0),l&&l.forEach(h=>er(e,h,o,!0));for(const h in i)if(!(a&&h==="expose")){const g=df[h]||o&&o[h];e[h]=g?g(e[h],i[h]):i[h]}return e}const df={data:hl,props:pl,emits:pl,methods:Gs,computed:Gs,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:Gs,directives:Gs,watch:hf,provide:hl,inject:ff};function hl(e,i){return i?e?function(){return Ce(Lt(e)?e.call(this,this):e,Lt(i)?i.call(this,this):i)}:i:e}function ff(e,i){return Gs(da(e),da(i))}function da(e){if(pt(e)){const i={};for(let o=0;o<e.length;o++)i[e[o]]=e[o];return i}return e}function Ue(e,i){return e?[...new Set([].concat(e,i))]:i}function Gs(e,i){return e?Ce(Object.create(null),e,i):i}function pl(e,i){return e?pt(e)&&pt(i)?[...new Set([...e,...i])]:Ce(Object.create(null),dl(e),dl(i??{})):i}function hf(e,i){if(!e)return i;if(!i)return e;const o=Ce(Object.create(null),e);for(const a in i)o[a]=Ue(e[a],i[a]);return o}function qu(){return{app:null,config:{isNativeTag:iu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let pf=0;function mf(e,i){return function(a,l=null){Lt(a)||(a=Ce({},a)),l!=null&&!Qt(l)&&(l=null);const c=qu(),h=new WeakSet,g=[];let v=!1;const P=c.app={_uid:pf++,_component:a,_props:l,_container:null,_context:c,_instance:null,version:Kf,get config(){return c.config},set config(k){},use(k,...O){return h.has(k)||(k&&Lt(k.install)?(h.add(k),k.install(P,...O)):Lt(k)&&(h.add(k),k(P,...O))),P},mixin(k){return c.mixins.includes(k)||c.mixins.push(k),P},component(k,O){return O?(c.components[k]=O,P):c.components[k]},directive(k,O){return O?(c.directives[k]=O,P):c.directives[k]},mount(k,O,$){if(!v){const F=P._ceVNode||E(a,l);return F.appContext=c,$===!0?$="svg":$===!1&&($=void 0),e(F,k,$),v=!0,P._container=k,k.__vue_app__=P,br(F.component)}},onUnmount(k){g.push(k)},unmount(){v&&(mn(g,P._instance,16),e(null,P._container),delete P._container.__vue_app__)},provide(k,O){return c.provides[k]=O,P},runWithContext(k){const O=xs;xs=P;try{return k()}finally{xs=O}}};return P}}let xs=null;const gf=(e,i)=>i==="modelValue"||i==="model-value"?e.modelModifiers:e[`${i}Modifiers`]||e[`${Pn(i)}Modifiers`]||e[`${Li(i)}Modifiers`];function _f(e,i,...o){if(e.isUnmounted)return;const a=e.vnode.props||ie;let l=o;const c=i.startsWith("update:"),h=c&&gf(a,i.slice(7));h&&(h.trim&&(l=o.map(k=>pe(k)?k.trim():k)),h.number&&(l=o.map(dr)));let g,v=a[g=jr(i)]||a[g=jr(Pn(i))];!v&&c&&(v=a[g=jr(Li(i))]),v&&mn(v,e,6,l);const P=a[g+"Once"];if(P){if(!e.emitted)e.emitted={};else if(e.emitted[g])return;e.emitted[g]=!0,mn(P,e,6,l)}}const vf=new WeakMap;function Gu(e,i,o=!1){const a=o?vf:i.emitsCache,l=a.get(e);if(l!==void 0)return l;const c=e.emits;let h={},g=!1;if(!Lt(e)){const v=P=>{const k=Gu(P,i,!0);k&&(g=!0,Ce(h,k))};!o&&i.mixins.length&&i.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!c&&!g?(Qt(e)&&a.set(e,null),null):(pt(c)?c.forEach(v=>h[v]=null):Ce(h,c),Qt(e)&&a.set(e,h),h)}function vr(e,i){return!e||!lr(i)?!1:(i=i.slice(2),i=i==="Once"?i:i.replace(/Once$/,""),Xt(e,i[0].toLowerCase()+i.slice(1))||Xt(e,Li(i))||Xt(e,i))}function ml(e){const{type:i,vnode:o,proxy:a,withProxy:l,propsOptions:[c],slots:h,attrs:g,emit:v,render:P,renderCache:k,props:O,data:$,setupState:F,ctx:nt,inheritAttrs:q}=e,At=Qo(e);let Dt,bt;try{if(o.shapeFlag&4){const X=l||a,ft=X;Dt=Fn(P.call(ft,X,k,O,F,$,nt)),bt=g}else{const X=i;Dt=Fn(X.length>1?X(O,{attrs:g,slots:h,emit:v}):X(O,null)),bt=i.props?g:yf(g)}}catch(X){so.length=0,pr(X,e,1),Dt=E(Be)}let ut=Dt;if(bt&&q!==!1){const X=Object.keys(bt),{shapeFlag:ft}=ut;X.length&&ft&7&&(c&&X.some(ur)&&(bt=bf(bt,c)),ut=Pi(ut,bt,!1,!0))}return o.dirs&&(ut=Pi(ut,null,!1,!0),ut.dirs=ut.dirs?ut.dirs.concat(o.dirs):o.dirs),o.transition&&lo(ut,o.transition),Dt=ut,Qo(At),Dt}const yf=e=>{let i;for(const o in e)(o==="class"||o==="style"||lr(o))&&((i||(i={}))[o]=e[o]);return i},bf=(e,i)=>{const o={};for(const a in e)(!ur(a)||!(a.slice(9)in i))&&(o[a]=e[a]);return o};function xf(e,i,o){const{props:a,children:l,component:c}=e,{props:h,children:g,patchFlag:v}=i,P=c.emitsOptions;if(i.dirs||i.transition)return!0;if(o&&v>=0){if(v&1024)return!0;if(v&16)return a?gl(a,h,P):!!h;if(v&8){const k=i.dynamicProps;for(let O=0;O<k.length;O++){const $=k[O];if(Yu(h,a,$)&&!vr(P,$))return!0}}}else return(l||g)&&(!g||!g.$stable)?!0:a===h?!1:a?h?gl(a,h,P):!0:!!h;return!1}function gl(e,i,o){const a=Object.keys(i);if(a.length!==Object.keys(e).length)return!0;for(let l=0;l<a.length;l++){const c=a[l];if(Yu(i,e,c)&&!vr(o,c))return!0}return!1}function Yu(e,i,o){const a=e[o],l=i[o];return o==="style"&&Qt(a)&&Qt(l)?!Si(a,l):a!==l}function wf({vnode:e,parent:i,suspense:o},a){for(;i;){const l=i.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.suspense.vnode.el=l.el=a,e=l),l===e)(e=i.vnode).el=a,i=i.parent;else break}o&&o.activeBranch===e&&(o.vnode.el=a)}const Ju={},Xu=()=>Object.create(Ju),Qu=e=>Object.getPrototypeOf(e)===Ju;function kf(e,i,o,a=!1){const l={},c=Xu();e.propsDefaults=Object.create(null),tc(e,i,l,c);for(const h in e.propsOptions[0])h in l||(l[h]=void 0);o?e.props=a?l:Od(l):e.type.props?e.props=l:e.props=c,e.attrs=c}function Sf(e,i,o,a){const{props:l,attrs:c,vnode:{patchFlag:h}}=e,g=Gt(l),[v]=e.propsOptions;let P=!1;if((a||h>0)&&!(h&16)){if(h&8){const k=e.vnode.dynamicProps;for(let O=0;O<k.length;O++){let $=k[O];if(vr(e.emitsOptions,$))continue;const F=i[$];if(v)if(Xt(c,$))F!==c[$]&&(c[$]=F,P=!0);else{const nt=Pn($);l[nt]=fa(v,g,nt,F,e,!1)}else F!==c[$]&&(c[$]=F,P=!0)}}}else{tc(e,i,l,c)&&(P=!0);let k;for(const O in g)(!i||!Xt(i,O)&&((k=Li(O))===O||!Xt(i,k)))&&(v?o&&(o[O]!==void 0||o[k]!==void 0)&&(l[O]=fa(v,g,O,void 0,e,!0)):delete l[O]);if(c!==g)for(const O in c)(!i||!Xt(i,O))&&(delete c[O],P=!0)}P&&si(e.attrs,"set","")}function tc(e,i,o,a){const[l,c]=e.propsOptions;let h=!1,g;if(i)for(let v in i){if(Xs(v))continue;const P=i[v];let k;l&&Xt(l,k=Pn(v))?!c||!c.includes(k)?o[k]=P:(g||(g={}))[k]=P:vr(e.emitsOptions,v)||(!(v in a)||P!==a[v])&&(a[v]=P,h=!0)}if(c){const v=Gt(o),P=g||ie;for(let k=0;k<c.length;k++){const O=c[k];o[O]=fa(l,v,O,P[O],e,!Xt(P,O))}}return h}function fa(e,i,o,a,l,c){const h=e[o];if(h!=null){const g=Xt(h,"default");if(g&&a===void 0){const v=h.default;if(h.type!==Function&&!h.skipFactory&&Lt(v)){const{propsDefaults:P}=l;if(o in P)a=P[o];else{const k=go(l);a=P[o]=v.call(null,i),k()}}else a=v;l.ce&&l.ce._setProp(o,a)}h[0]&&(c&&!g?a=!1:h[1]&&(a===""||a===Li(o))&&(a=!0))}return a}const Pf=new WeakMap;function ec(e,i,o=!1){const a=o?Pf:i.propsCache,l=a.get(e);if(l)return l;const c=e.props,h={},g=[];let v=!1;if(!Lt(e)){const k=O=>{v=!0;const[$,F]=ec(O,i,!0);Ce(h,$),F&&g.push(...F)};!o&&i.mixins.length&&i.mixins.forEach(k),e.extends&&k(e.extends),e.mixins&&e.mixins.forEach(k)}if(!c&&!v)return Qt(e)&&a.set(e,_s),_s;if(pt(c))for(let k=0;k<c.length;k++){const O=Pn(c[k]);_l(O)&&(h[O]=ie)}else if(c)for(const k in c){const O=Pn(k);if(_l(O)){const $=c[k],F=h[O]=pt($)||Lt($)?{type:$}:Ce({},$),nt=F.type;let q=!1,At=!0;if(pt(nt))for(let Dt=0;Dt<nt.length;++Dt){const bt=nt[Dt],ut=Lt(bt)&&bt.name;if(ut==="Boolean"){q=!0;break}else ut==="String"&&(At=!1)}else q=Lt(nt)&&nt.name==="Boolean";F[0]=q,F[1]=At,(q||Xt(F,"default"))&&g.push(O)}}const P=[h,g];return Qt(e)&&a.set(e,P),P}function _l(e){return e[0]!=="$"&&!Xs(e)}const Oa=e=>e==="_"||e==="_ctx"||e==="$stable",Ea=e=>pt(e)?e.map(Fn):[Fn(e)],Tf=(e,i,o)=>{if(i._n)return i;const a=ot((...l)=>Ea(i(...l)),o);return a._c=!1,a},nc=(e,i,o)=>{const a=e._ctx;for(const l in e){if(Oa(l))continue;const c=e[l];if(Lt(c))i[l]=Tf(l,c,a);else if(c!=null){const h=Ea(c);i[l]=()=>h}}},ic=(e,i)=>{const o=Ea(i);e.slots.default=()=>o},sc=(e,i,o)=>{for(const a in i)(o||!Oa(a))&&(e[a]=i[a])},Lf=(e,i,o)=>{const a=e.slots=Xu();if(e.vnode.shapeFlag&32){const l=i._;l?(sc(a,i,o),o&&lu(a,"_",l,!0)):nc(i,a)}else i&&ic(e,i)},Mf=(e,i,o)=>{const{vnode:a,slots:l}=e;let c=!0,h=ie;if(a.shapeFlag&32){const g=i._;g?o&&g===1?c=!1:sc(l,i,o):(c=!i.$stable,nc(i,l)),h=i}else i&&(ic(e,i),h={default:1});if(c)for(const g in l)!Oa(g)&&h[g]==null&&delete l[g]},Ye=Af;function Cf(e){return Of(e)}function Of(e,i){const o=fr();o.__VUE__=!0;const{insert:a,remove:l,patchProp:c,createElement:h,createText:g,createComment:v,setText:P,setElementText:k,parentNode:O,nextSibling:$,setScopeId:F=Zn,insertStaticContent:nt}=e,q=(_,m,T,B=null,I=null,D=null,j=void 0,A=null,U=!!m.dynamicChildren)=>{if(_===m)return;_&&!Wi(_,m)&&(B=Pe(_),Kt(_,I,D,!0),_=null),m.patchFlag===-2&&(U=!1,m.dynamicChildren=null);const{type:R,ref:ct,shapeFlag:Q}=m;switch(R){case yr:At(_,m,T,B);break;case Be:Dt(_,m,T,B);break;case Qr:_==null&&bt(m,T,B,j);break;case wt:G(_,m,T,B,I,D,j,A,U);break;default:Q&1?ft(_,m,T,B,I,D,j,A,U):Q&6?st(_,m,T,B,I,D,j,A,U):(Q&64||Q&128)&&R.process(_,m,T,B,I,D,j,A,U,we)}ct!=null&&I?no(ct,_&&_.ref,D,m||_,!m):ct==null&&_&&_.ref!=null&&no(_.ref,null,D,_,!0)},At=(_,m,T,B)=>{if(_==null)a(m.el=g(m.children),T,B);else{const I=m.el=_.el;m.children!==_.children&&P(I,m.children)}},Dt=(_,m,T,B)=>{_==null?a(m.el=v(m.children||""),T,B):m.el=_.el},bt=(_,m,T,B)=>{[_.el,_.anchor]=nt(_.children,m,T,B,_.el,_.anchor)},ut=({el:_,anchor:m},T,B)=>{let I;for(;_&&_!==m;)I=$(_),a(_,T,B),_=I;a(m,T,B)},X=({el:_,anchor:m})=>{let T;for(;_&&_!==m;)T=$(_),l(_),_=T;l(m)},ft=(_,m,T,B,I,D,j,A,U)=>{if(m.type==="svg"?j="svg":m.type==="math"&&(j="mathml"),_==null)jt(m,T,B,I,D,j,A,U);else{const R=_.el&&_.el._isVueCE?_.el:null;try{R&&R._beginPatch(),vt(_,m,I,D,j,A,U)}finally{R&&R._endPatch()}}},jt=(_,m,T,B,I,D,j,A)=>{let U,R;const{props:ct,shapeFlag:Q,transition:K,dirs:dt}=_;if(U=_.el=h(_.type,D,ct&&ct.is,ct),Q&8?k(U,_.children):Q&16&&me(_.children,U,null,B,I,Xr(_,D),j,A),dt&&Zi(_,null,B,"created"),de(U,_,_.scopeId,j,B),ct){for(const at in ct)at!=="value"&&!Xs(at)&&c(U,at,null,ct[at],D,B);"value"in ct&&c(U,"value",null,ct.value,D),(R=ct.onVnodeBeforeMount)&&Bn(R,B,_)}dt&&Zi(_,null,B,"beforeMount");const Mt=Ef(I,K);Mt&&K.beforeEnter(U),a(U,m,T),((R=ct&&ct.onVnodeMounted)||Mt||dt)&&Ye(()=>{try{R&&Bn(R,B,_),Mt&&K.enter(U),dt&&Zi(_,null,B,"mounted")}finally{}},I)},de=(_,m,T,B,I)=>{if(T&&F(_,T),B)for(let D=0;D<B.length;D++)F(_,B[D]);if(I){let D=I.subTree;if(m===D||lc(D.type)&&(D.ssContent===m||D.ssFallback===m)){const j=I.vnode;de(_,j,j.scopeId,j.slotScopeIds,I.parent)}}},me=(_,m,T,B,I,D,j,A,U=0)=>{for(let R=U;R<_.length;R++){const ct=_[R]=A?ii(_[R]):Fn(_[R]);q(null,ct,m,T,B,I,D,j,A)}},vt=(_,m,T,B,I,D,j)=>{const A=m.el=_.el;let{patchFlag:U,dynamicChildren:R,dirs:ct}=m;U|=_.patchFlag&16;const Q=_.props||ie,K=m.props||ie;let dt;if(T&&$i(T,!1),(dt=K.onVnodeBeforeUpdate)&&Bn(dt,T,m,_),ct&&Zi(m,_,T,"beforeUpdate"),T&&$i(T,!0),R&&(!_.dynamicChildren||_.dynamicChildren.length!==R.length)&&(U=0,j=!1,R=null),(Q.innerHTML&&K.innerHTML==null||Q.textContent&&K.textContent==null)&&k(A,""),R?Ft(_.dynamicChildren,R,A,T,B,Xr(m,I),D):j||Y(_,m,A,null,T,B,Xr(m,I),D,!1),U>0){if(U&16)Tt(A,Q,K,T,I);else if(U&2&&Q.class!==K.class&&c(A,"class",null,K.class,I),U&4&&c(A,"style",Q.style,K.style,I),U&8){const Mt=m.dynamicProps;for(let at=0;at<Mt.length;at++){const Rt=Mt[at],ne=Q[Rt],ae=K[Rt];(ae!==ne||Rt==="value")&&c(A,Rt,ne,ae,I,T)}}U&1&&_.children!==m.children&&k(A,m.children)}else!j&&R==null&&Tt(A,Q,K,T,I);((dt=K.onVnodeUpdated)||ct)&&Ye(()=>{dt&&Bn(dt,T,m,_),ct&&Zi(m,_,T,"updated")},B)},Ft=(_,m,T,B,I,D,j)=>{for(let A=0;A<m.length;A++){const U=_[A],R=m[A],ct=U.el&&(U.type===wt||!Wi(U,R)||U.shapeFlag&198)?O(U.el):T;q(U,R,ct,null,B,I,D,j,!0)}},Tt=(_,m,T,B,I)=>{if(m!==T){if(m!==ie)for(const D in m)!Xs(D)&&!(D in T)&&c(_,D,m[D],null,I,B);for(const D in T){if(Xs(D))continue;const j=T[D],A=m[D];j!==A&&D!=="value"&&c(_,D,A,j,I,B)}"value"in T&&c(_,"value",m.value,T.value,I)}},G=(_,m,T,B,I,D,j,A,U)=>{const R=m.el=_?_.el:g(""),ct=m.anchor=_?_.anchor:g("");let{patchFlag:Q,dynamicChildren:K,slotScopeIds:dt}=m;dt&&(A=A?A.concat(dt):dt),_==null?(a(R,T,B),a(ct,T,B),me(m.children||[],T,ct,I,D,j,A,U)):Q>0&&Q&64&&K&&_.dynamicChildren&&_.dynamicChildren.length===K.length?(Ft(_.dynamicChildren,K,T,I,D,j,A),(m.key!=null||I&&m===I.subTree)&&oc(_,m,!0)):Y(_,m,T,ct,I,D,j,A,U)},st=(_,m,T,B,I,D,j,A,U)=>{m.slotScopeIds=A,_==null?m.shapeFlag&512?I.ctx.activate(m,T,B,j,U):It(m,T,B,I,D,j,U):Wt(_,m,U)},It=(_,m,T,B,I,D,j)=>{const A=_.component=Vf(_,B,I);if(mr(_)&&(A.ctx.renderer=we),Zf(A,!1,j),A.asyncDep){if(I&&I.registerDep(A,kt,j),!_.el){const U=A.subTree=E(Be);Dt(null,U,m,T),_.placeholder=U.el}}else kt(A,_,m,T,I,D,j)},Wt=(_,m,T)=>{const B=m.component=_.component;if(xf(_,m,T))if(B.asyncDep&&!B.asyncResolved){Vt(B,m,T);return}else B.next=m,B.update();else m.el=_.el,B.vnode=m},kt=(_,m,T,B,I,D,j)=>{const A=()=>{if(_.isMounted){let{next:Q,bu:K,u:dt,parent:Mt,vnode:at}=_;{const ke=rc(_);if(ke){Q&&(Q.el=at.el,Vt(_,Q,j)),ke.asyncDep.then(()=>{Ye(()=>{_.isUnmounted||R()},I)});return}}let Rt=Q,ne;$i(_,!1),Q?(Q.el=at.el,Vt(_,Q,j)):Q=at,K&&Go(K),(ne=Q.props&&Q.props.onVnodeBeforeUpdate)&&Bn(ne,Mt,Q,at),$i(_,!0);const ae=ml(_),fe=_.subTree;_.subTree=ae,q(fe,ae,O(fe.el),Pe(fe),_,I,D),Q.el=ae.el,Rt===null&&wf(_,ae.el),dt&&Ye(dt,I),(ne=Q.props&&Q.props.onVnodeUpdated)&&Ye(()=>Bn(ne,Mt,Q,at),I)}else{let Q;const{el:K,props:dt}=m,{bm:Mt,m:at,parent:Rt,root:ne,type:ae}=_,fe=bs(m);$i(_,!1),Mt&&Go(Mt),!fe&&(Q=dt&&dt.onVnodeBeforeMount)&&Bn(Q,Rt,m),$i(_,!0);{ne.ce&&ne.ce._hasShadowRoot()&&ne.ce._injectChildStyle(ae,_.parent?_.parent.type:void 0);const ke=_.subTree=ml(_);q(null,ke,T,B,_,I,D),m.el=ke.el}if(at&&Ye(at,I),!fe&&(Q=dt&&dt.onVnodeMounted)){const ke=m;Ye(()=>Bn(Q,Rt,ke),I)}(m.shapeFlag&256||Rt&&bs(Rt.vnode)&&Rt.vnode.shapeFlag&256)&&_.a&&Ye(_.a,I),_.isMounted=!0,m=T=B=null}};_.scope.on();const U=_.effect=new fu(A);_.scope.off();const R=_.update=U.run.bind(U),ct=_.job=U.runIfDirty.bind(U);ct.i=_,ct.id=_.uid,U.scheduler=()=>Ca(ct),$i(_,!0),R()},Vt=(_,m,T)=>{m.component=_;const B=_.vnode.props;_.vnode=m,_.next=null,Sf(_,m.props,B,T),Mf(_,m.children,T),$n(),al(_),Hn()},Y=(_,m,T,B,I,D,j,A,U=!1)=>{const R=_&&_.children,ct=_?_.shapeFlag:0,Q=m.children,{patchFlag:K,shapeFlag:dt}=m;if(K>0){if(K&128){rt(R,Q,T,B,I,D,j,A,U);return}else if(K&256){ue(R,Q,T,B,I,D,j,A,U);return}}dt&8?(ct&16&&Pt(R,I,D),Q!==R&&k(T,Q)):ct&16?dt&16?rt(R,Q,T,B,I,D,j,A,U):Pt(R,I,D,!0):(ct&8&&k(T,""),dt&16&&me(Q,T,B,I,D,j,A,U))},ue=(_,m,T,B,I,D,j,A,U)=>{_=_||_s,m=m||_s;const R=_.length,ct=m.length,Q=Math.min(R,ct);let K;for(K=0;K<Q;K++){const dt=m[K]=U?ii(m[K]):Fn(m[K]);q(_[K],dt,T,null,I,D,j,A,U)}R>ct?Pt(_,I,D,!0,!1,Q):me(m,T,B,I,D,j,A,U,Q)},rt=(_,m,T,B,I,D,j,A,U)=>{let R=0;const ct=m.length;let Q=_.length-1,K=ct-1;for(;R<=Q&&R<=K;){const dt=_[R],Mt=m[R]=U?ii(m[R]):Fn(m[R]);if(Wi(dt,Mt))q(dt,Mt,T,null,I,D,j,A,U);else break;R++}for(;R<=Q&&R<=K;){const dt=_[Q],Mt=m[K]=U?ii(m[K]):Fn(m[K]);if(Wi(dt,Mt))q(dt,Mt,T,null,I,D,j,A,U);else break;Q--,K--}if(R>Q){if(R<=K){const dt=K+1,Mt=dt<ct?m[dt].el:B;for(;R<=K;)q(null,m[R]=U?ii(m[R]):Fn(m[R]),T,Mt,I,D,j,A,U),R++}}else if(R>K)for(;R<=Q;)Kt(_[R],I,D,!0),R++;else{const dt=R,Mt=R,at=new Map;for(R=Mt;R<=K;R++){const ve=m[R]=U?ii(m[R]):Fn(m[R]);ve.key!=null&&at.set(ve.key,R)}let Rt,ne=0;const ae=K-Mt+1;let fe=!1,ke=0;const _n=new Array(ae);for(R=0;R<ae;R++)_n[R]=0;for(R=dt;R<=Q;R++){const ve=_[R];if(ne>=ae){Kt(ve,I,D,!0);continue}let Ae;if(ve.key!=null)Ae=at.get(ve.key);else for(Rt=Mt;Rt<=K;Rt++)if(_n[Rt-Mt]===0&&Wi(ve,m[Rt])){Ae=Rt;break}Ae===void 0?Kt(ve,I,D,!0):(_n[Ae-Mt]=R+1,Ae>=ke?ke=Ae:fe=!0,q(ve,m[Ae],T,null,I,D,j,A,U),ne++)}const ui=fe?zf(_n):_s;for(Rt=ui.length-1,R=ae-1;R>=0;R--){const ve=Mt+R,Ae=m[ve],Cn=m[ve+1],Fe=ve+1<ct?Cn.el||ac(Cn):B;_n[R]===0?q(null,Ae,T,Fe,I,D,j,A,U):fe&&(Rt<0||R!==ui[Rt]?yt(Ae,T,Fe,2):Rt--)}}},yt=(_,m,T,B,I=null)=>{const{el:D,type:j,transition:A,children:U,shapeFlag:R}=_;if(R&6){yt(_.component.subTree,m,T,B);return}if(R&128){_.suspense.move(m,T,B);return}if(R&64){j.move(_,m,T,we);return}if(j===wt){a(D,m,T);for(let Q=0;Q<U.length;Q++)yt(U[Q],m,T,B);a(_.anchor,m,T);return}if(j===Qr){ut(_,m,T);return}if(B!==2&&R&1&&A)if(B===0)A.persisted&&!D[fn]?a(D,m,T):(A.beforeEnter(D),a(D,m,T),Ye(()=>A.enter(D),I));else{const{leave:Q,delayLeave:K,afterLeave:dt}=A,Mt=()=>{_.ctx.isUnmounted?l(D):a(D,m,T)},at=()=>{const Rt=D._isLeaving||!!D[fn];D._isLeaving&&D[fn](!0),A.persisted&&!Rt?Mt():Q(D,()=>{Mt(),dt&&dt()})};K?K(D,Mt,at):at()}else a(D,m,T)},Kt=(_,m,T,B=!1,I=!1)=>{const{type:D,props:j,ref:A,children:U,dynamicChildren:R,shapeFlag:ct,patchFlag:Q,dirs:K,cacheIndex:dt,memo:Mt}=_;if(Q===-2&&(I=!1),A!=null&&($n(),no(A,null,T,_,!0),Hn()),dt!=null&&(m.renderCache[dt]=void 0),ct&256){m.ctx.deactivate(_);return}const at=ct&1&&K,Rt=!bs(_);let ne;if(Rt&&(ne=j&&j.onVnodeBeforeUnmount)&&Bn(ne,m,_),ct&6)Ut(_.component,T,B);else{if(ct&128){_.suspense.unmount(T,B);return}at&&Zi(_,null,m,"beforeUnmount"),ct&64?_.type.remove(_,m,T,we,B):R&&!R.hasOnce&&(D!==wt||Q>0&&Q&64)?Pt(R,m,T,!1,!0):(D===wt&&Q&384||!I&&ct&16)&&Pt(U,m,T),B&&ge(_)}const ae=Mt!=null&&dt==null;(Rt&&(ne=j&&j.onVnodeUnmounted)||at||ae)&&Ye(()=>{ne&&Bn(ne,m,_),at&&Zi(_,null,m,"unmounted"),ae&&(_.el=null)},T)},ge=_=>{const{type:m,el:T,anchor:B,transition:I}=_;if(m===wt){qt(T,B);return}if(m===Qr){X(_);return}const D=()=>{l(T),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(_.shapeFlag&1&&I&&!I.persisted){const{leave:j,delayLeave:A}=I,U=()=>j(T,D);A?A(_.el,D,U):U()}else D()},qt=(_,m)=>{let T;for(;_!==m;)T=$(_),l(_),_=T;l(m)},Ut=(_,m,T)=>{const{bum:B,scope:I,job:D,subTree:j,um:A,m:U,a:R}=_;vl(U),vl(R),B&&Go(B),I.stop(),D&&(D.flags|=8,Kt(j,_,m,T)),A&&Ye(A,m),Ye(()=>{_.isUnmounted=!0},m)},Pt=(_,m,T,B=!1,I=!1,D=0)=>{for(let j=D;j<_.length;j++)Kt(_[j],m,T,B,I)},Pe=_=>{if(_.shapeFlag&6)return Pe(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const m=$(_.anchor||_.el),T=m&&m[jd];return T?$(T):m};let Te=!1;const nn=(_,m,T)=>{let B;_==null?m._vnode&&(Kt(m._vnode,null,null,!0),B=m._vnode.component):q(m._vnode||null,_,m,null,null,null,T),m._vnode=_,Te||(Te=!0,al(B),Ou(),Te=!1)},we={p:q,um:Kt,m:yt,r:ge,mt:It,mc:me,pc:Y,pbc:Ft,n:Pe,o:e};return{render:nn,hydrate:void 0,createApp:mf(nn)}}function Xr({type:e,props:i},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&i&&i.encoding&&i.encoding.includes("html")?void 0:o}function $i({effect:e,job:i},o){o?(e.flags|=32,i.flags|=4):(e.flags&=-33,i.flags&=-5)}function Ef(e,i){return(!e||e&&!e.pendingBranch)&&i&&!i.persisted}function oc(e,i,o=!1){const a=e.children,l=i.children;if(pt(a)&&pt(l))for(let c=0;c<a.length;c++){const h=a[c];let g=l[c];g.shapeFlag&1&&!g.dynamicChildren&&((g.patchFlag<=0||g.patchFlag===32)&&(g=l[c]=ii(l[c]),g.el=h.el),!o&&g.patchFlag!==-2&&oc(h,g)),g.type===yr&&(g.patchFlag===-1&&(g=l[c]=ii(g)),g.el=h.el),g.type===Be&&!g.el&&(g.el=h.el)}}function zf(e){const i=e.slice(),o=[0];let a,l,c,h,g;const v=e.length;for(a=0;a<v;a++){const P=e[a];if(P!==0){if(l=o[o.length-1],e[l]<P){i[a]=l,o.push(a);continue}for(c=0,h=o.length-1;c<h;)g=c+h>>1,e[o[g]]<P?c=g+1:h=g;P<e[o[c]]&&(c>0&&(i[a]=o[c-1]),o[c]=a)}}for(c=o.length,h=o[c-1];c-- >0;)o[c]=h,h=i[h];return o}function rc(e){const i=e.subTree.component;if(i)return i.asyncDep&&!i.asyncResolved?i:rc(i)}function vl(e){if(e)for(let i=0;i<e.length;i++)e[i].flags|=8}function ac(e){if(e.placeholder)return e.placeholder;const i=e.component;return i?ac(i.subTree):null}const lc=e=>e.__isSuspense;function Af(e,i){i&&i.pendingBranch?pt(e)?i.effects.push(...e):i.effects.push(e):Zd(e)}const wt=Symbol.for("v-fgt"),yr=Symbol.for("v-txt"),Be=Symbol.for("v-cmt"),Qr=Symbol.for("v-stc"),so=[];let en=null;function b(e=!1){so.push(en=e?null:[])}function If(){so.pop(),en=so[so.length-1]||null}let uo=1;function nr(e,i=!1){uo+=e,e<0&&en&&i&&(en.hasOnce=!0)}function uc(e){return e.dynamicChildren=uo>0?en||_s:null,If(),uo>0&&en&&en.push(e),e}function x(e,i,o,a,l,c){return uc(f(e,i,o,a,l,c,!0))}function oe(e,i,o,a,l){return uc(E(e,i,o,a,l,!0))}function co(e){return e?e.__v_isVNode===!0:!1}function Wi(e,i){return e.type===i.type&&e.key===i.key}const cc=({key:e})=>e??null,Yo=({ref:e,ref_key:i,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?pe(e)||Re(e)||Lt(e)?{i:De,r:e,k:i,f:!!o}:e:null);function f(e,i=null,o=null,a=0,l=null,c=e===wt?0:1,h=!1,g=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:i,key:i&&cc(i),ref:i&&Yo(i),scopeId:zu,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:c,patchFlag:a,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:De};return g?(ir(v,o),c&128&&e.normalize(v)):o&&(v.shapeFlag|=pe(o)?8:16),uo>0&&!h&&en&&(v.patchFlag>0||c&6)&&v.patchFlag!==32&&en.push(v),v}const E=Nf;function Nf(e,i=null,o=null,a=0,l=null,c=!1){if((!e||e===rf)&&(e=Be),co(e)){const g=Pi(e,i,!0);return o&&ir(g,o),uo>0&&!c&&en&&(g.shapeFlag&6?en[en.indexOf(e)]=g:en.push(g)),g.patchFlag=-2,g}if(jf(e)&&(e=e.__vccOpts),i){i=Bf(i);let{class:g,style:v}=i;g&&!pe(g)&&(i.class=Ot(g)),Qt(v)&&(Ma(v)&&!pt(v)&&(v=Ce({},v)),i.style=ks(v))}const h=pe(e)?1:lc(e)?128:Bu(e)?64:Qt(e)?4:Lt(e)?2:0;return f(e,i,o,a,l,h,c,!0)}function Bf(e){return e?Ma(e)||Qu(e)?Ce({},e):e:null}function Pi(e,i,o=!1,a=!1){const{props:l,ref:c,patchFlag:h,children:g,transition:v}=e,P=i?Df(l||{},i):l,k={__v_isVNode:!0,__v_skip:!0,type:e.type,props:P,key:P&&cc(P),ref:i&&i.ref?o&&c?pt(c)?c.concat(Yo(i)):[c,Yo(i)]:Yo(i):c,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:i&&e.type!==wt?h===-1?16:h|16:h,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pi(e.ssContent),ssFallback:e.ssFallback&&Pi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return v&&a&&lo(k,v.clone(k)),k}function N(e=" ",i=0){return E(yr,null,e,i)}function V(e="",i=!1){return i?(b(),oe(Be,null,e)):E(Be,null,e)}function Fn(e){return e==null||typeof e=="boolean"?E(Be):pt(e)?E(wt,null,e.slice()):co(e)?ii(e):E(yr,null,String(e))}function ii(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Pi(e)}function ir(e,i){let o=0;const{shapeFlag:a}=e;if(i==null)i=null;else if(pt(i))o=16;else if(typeof i=="object")if(a&65){const l=i.default;l&&(l._c&&(l._d=!1),ir(e,l()),l._c&&(l._d=!0));return}else{o=32;const l=i._;!l&&!Qu(i)?i._ctx=De:l===3&&De&&(De.slots._===1?i._=1:(i._=2,e.patchFlag|=1024))}else if(Lt(i)){if(a&65){ir(e,{default:i});return}i={default:i,_ctx:De},o=32}else i=String(i),a&64?(o=16,i=[N(i)]):o=8;e.children=i,e.shapeFlag|=o}function Df(...e){const i={};for(let o=0;o<e.length;o++){const a=e[o];for(const l in a)if(l==="class")i.class!==a.class&&(i.class=Ot([i.class,a.class]));else if(l==="style")i.style=ks([i.style,a.style]);else if(lr(l)){const c=i[l],h=a[l];h&&c!==h&&!(pt(c)&&c.includes(h))?i[l]=c?[].concat(c,h):h:h==null&&c==null&&!ur(l)&&(i[l]=h)}else l!==""&&(i[l]=a[l])}return i}function Bn(e,i,o,a=null){mn(e,i,7,[o,a])}const Rf=qu();let Ff=0;function Vf(e,i,o){const a=e.type,l=(i?i.appContext:e.appContext)||Rf,c={uid:Ff++,vnode:e,type:a,parent:i,appContext:l,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new dd(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:i?i.provides:Object.create(l.provides),ids:i?i.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ec(a,l),emitsOptions:Gu(a,l),emit:null,emitted:null,propsDefaults:ie,inheritAttrs:a.inheritAttrs,ctx:ie,data:ie,props:ie,attrs:ie,slots:ie,refs:ie,setupState:ie,setupContext:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return c.ctx={_:c},c.root=i?i.root:c,c.emit=_f.bind(null,c),e.ce&&e.ce(c),c}let We=null;const dc=()=>We||De;let sr,ha;{const e=fr(),i=(o,a)=>{let l;return(l=e[o])||(l=e[o]=[]),l.push(a),c=>{l.length>1?l.forEach(h=>h(c)):l[0](c)}};sr=i("__VUE_INSTANCE_SETTERS__",o=>We=o),ha=i("__VUE_SSR_SETTERS__",o=>fo=o)}const go=e=>{const i=We;return sr(e),e.scope.on(),()=>{e.scope.off(),sr(i)}},yl=()=>{We&&We.scope.off(),sr(null)};function fc(e){return e.vnode.shapeFlag&4}let fo=!1;function Zf(e,i=!1,o=!1){i&&ha(i);const{props:a,children:l}=e.vnode,c=fc(e);kf(e,a,c,i),Lf(e,l,o||i);const h=c?$f(e,i):void 0;return i&&ha(!1),h}function $f(e,i){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lf);const{setup:a}=o;if(a){$n();const l=e.setupContext=a.length>1?Uf(e):null,c=go(e),h=mo(a,e,0,[e.props,l]),g=su(h);if(Hn(),c(),(g||e.sp)&&!bs(e)&&$u(e),g){if(h.then(yl,yl),i)return h.then(v=>{bl(e,v)}).catch(v=>{pr(v,e,0)});e.asyncDep=h}else bl(e,h)}else hc(e)}function bl(e,i,o){Lt(i)?e.type.__ssrInlineRender?e.ssrRender=i:e.render=i:Qt(i)&&(e.setupState=Tu(i)),hc(e)}function hc(e,i,o){const a=e.type;e.render||(e.render=a.render||Zn);{const l=go(e);$n();try{uf(e)}finally{Hn(),l()}}}const Hf={get(e,i){return Ne(e,"get",""),e[i]}};function Uf(e){const i=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,Hf),slots:e.slots,emit:e.emit,expose:i}}function br(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Tu(Ed(e.exposed)),{get(i,o){if(o in i)return i[o];if(o in io)return io[o](e)},has(i,o){return o in i||o in io}})):e.proxy}function jf(e){return Lt(e)&&"__vccOpts"in e}const ht=(e,i)=>Bd(e,i,fo);function Wf(e,i,o){try{nr(-1);const a=arguments.length;return a===2?Qt(i)&&!pt(i)?co(i)?E(e,null,[i]):E(e,i):E(e,null,i):(a>3?o=Array.prototype.slice.call(arguments,2):a===3&&co(o)&&(o=[o]),E(e,i,o))}finally{nr(1)}}const Kf="3.5.39";/**
|
|
* @vue/runtime-dom v3.5.39
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let pa;const xl=typeof window<"u"&&window.trustedTypes;if(xl)try{pa=xl.createPolicy("vue",{createHTML:e=>e})}catch{}const pc=pa?e=>pa.createHTML(e):e=>e,qf="http://www.w3.org/2000/svg",Gf="http://www.w3.org/1998/Math/MathML",ni=typeof document<"u"?document:null,wl=ni&&ni.createElement("template"),Yf={insert:(e,i,o)=>{i.insertBefore(e,o||null)},remove:e=>{const i=e.parentNode;i&&i.removeChild(e)},createElement:(e,i,o,a)=>{const l=i==="svg"?ni.createElementNS(qf,e):i==="mathml"?ni.createElementNS(Gf,e):o?ni.createElement(e,{is:o}):ni.createElement(e);return e==="select"&&a&&a.multiple!=null&&l.setAttribute("multiple",a.multiple),l},createText:e=>ni.createTextNode(e),createComment:e=>ni.createComment(e),setText:(e,i)=>{e.nodeValue=i},setElementText:(e,i)=>{e.textContent=i},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ni.querySelector(e),setScopeId(e,i){e.setAttribute(i,"")},insertStaticContent(e,i,o,a,l,c){const h=o?o.previousSibling:i.lastChild;if(l&&(l===c||l.nextSibling))for(;i.insertBefore(l.cloneNode(!0),o),!(l===c||!(l=l.nextSibling)););else{wl.innerHTML=pc(a==="svg"?`<svg>${e}</svg>`:a==="mathml"?`<math>${e}</math>`:e);const g=wl.content;if(a==="svg"||a==="mathml"){const v=g.firstChild;for(;v.firstChild;)g.appendChild(v.firstChild);g.removeChild(v)}i.insertBefore(g,o)}return[h?h.nextSibling:i.firstChild,o?o.previousSibling:i.lastChild]}},xi="transition",Ks="animation",ho=Symbol("_vtc"),mc={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},Jf=Ce({},Du,mc),Xf=e=>(e.displayName="Transition",e.props=Jf,e),Qf=Xf((e,{slots:i})=>Wf(qd,th(e),i)),Hi=(e,i=[])=>{pt(e)?e.forEach(o=>o(...i)):e&&e(...i)},kl=e=>e?pt(e)?e.some(i=>i.length>1):e.length>1:!1;function th(e){const i={};for(const G in e)G in mc||(i[G]=e[G]);if(e.css===!1)return i;const{name:o="v",type:a,duration:l,enterFromClass:c=`${o}-enter-from`,enterActiveClass:h=`${o}-enter-active`,enterToClass:g=`${o}-enter-to`,appearFromClass:v=c,appearActiveClass:P=h,appearToClass:k=g,leaveFromClass:O=`${o}-leave-from`,leaveActiveClass:$=`${o}-leave-active`,leaveToClass:F=`${o}-leave-to`}=e,nt=eh(l),q=nt&&nt[0],At=nt&&nt[1],{onBeforeEnter:Dt,onEnter:bt,onEnterCancelled:ut,onLeave:X,onLeaveCancelled:ft,onBeforeAppear:jt=Dt,onAppear:de=bt,onAppearCancelled:me=ut}=i,vt=(G,st,It,Wt)=>{G._enterCancelled=Wt,Ui(G,st?k:g),Ui(G,st?P:h),It&&It()},Ft=(G,st)=>{G._isLeaving=!1,Ui(G,O),Ui(G,F),Ui(G,$),st&&st()},Tt=G=>(st,It)=>{const Wt=G?de:bt,kt=()=>vt(st,G,It);Hi(Wt,[st,kt]),Sl(()=>{Ui(st,G?v:c),ei(st,G?k:g),kl(Wt)||Pl(st,a,q,kt)})};return Ce(i,{onBeforeEnter(G){Hi(Dt,[G]),ei(G,c),ei(G,h)},onBeforeAppear(G){Hi(jt,[G]),ei(G,v),ei(G,P)},onEnter:Tt(!1),onAppear:Tt(!0),onLeave(G,st){G._isLeaving=!0;const It=()=>Ft(G,st);ei(G,O),G._enterCancelled?(ei(G,$),Ml(G)):(Ml(G),ei(G,$)),Sl(()=>{G._isLeaving&&(Ui(G,O),ei(G,F),kl(X)||Pl(G,a,At,It))}),Hi(X,[G,It])},onEnterCancelled(G){vt(G,!1,void 0,!0),Hi(ut,[G])},onAppearCancelled(G){vt(G,!0,void 0,!0),Hi(me,[G])},onLeaveCancelled(G){Ft(G),Hi(ft,[G])}})}function eh(e){if(e==null)return null;if(Qt(e))return[ta(e.enter),ta(e.leave)];{const i=ta(e);return[i,i]}}function ta(e){return id(e)}function ei(e,i){i.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[ho]||(e[ho]=new Set)).add(i)}function Ui(e,i){i.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const o=e[ho];o&&(o.delete(i),o.size||(e[ho]=void 0))}function Sl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let nh=0;function Pl(e,i,o,a){const l=e._endId=++nh,c=()=>{l===e._endId&&a()};if(o!=null)return setTimeout(c,o);const{type:h,timeout:g,propCount:v}=ih(e,i);if(!h)return a();const P=h+"end";let k=0;const O=()=>{e.removeEventListener(P,$),c()},$=F=>{F.target===e&&++k>=v&&O()};setTimeout(()=>{k<v&&O()},g+1),e.addEventListener(P,$)}function ih(e,i){const o=window.getComputedStyle(e),a=nt=>(o[nt]||"").split(", "),l=a(`${xi}Delay`),c=a(`${xi}Duration`),h=Tl(l,c),g=a(`${Ks}Delay`),v=a(`${Ks}Duration`),P=Tl(g,v);let k=null,O=0,$=0;i===xi?h>0&&(k=xi,O=h,$=c.length):i===Ks?P>0&&(k=Ks,O=P,$=v.length):(O=Math.max(h,P),k=O>0?h>P?xi:Ks:null,$=k?k===xi?c.length:v.length:0);const F=k===xi&&/\b(?:transform|all)(?:,|$)/.test(a(`${xi}Property`).toString());return{type:k,timeout:O,propCount:$,hasTransform:F}}function Tl(e,i){for(;e.length<i.length;)e=e.concat(e);return Math.max(...i.map((o,a)=>Ll(o)+Ll(e[a])))}function Ll(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ml(e){return(e?e.ownerDocument:document).body.offsetHeight}function sh(e,i,o){const a=e[ho];a&&(i=(i?[i,...a]:[...a]).join(" ")),i==null?e.removeAttribute("class"):o?e.setAttribute("class",i):e.className=i}const or=Symbol("_vod"),gc=Symbol("_vsh"),oh={name:"show",beforeMount(e,{value:i},{transition:o}){e[or]=e.style.display==="none"?"":e.style.display,o&&i?o.beforeEnter(e):qs(e,i)},mounted(e,{value:i},{transition:o}){o&&i&&o.enter(e)},updated(e,{value:i,oldValue:o},{transition:a}){!i!=!o&&(a?i?(a.beforeEnter(e),qs(e,!0),a.enter(e)):a.leave(e,()=>{qs(e,!1)}):qs(e,i))},beforeUnmount(e,{value:i}){qs(e,i)}};function qs(e,i){e.style.display=i?e[or]:"none",e[gc]=!i}const rh=Symbol(""),ah=/(?:^|;)\s*display\s*:/;function lh(e,i,o){const a=e.style,l=pe(o);let c=!1;if(o&&!l){if(i)if(pe(i))for(const h of i.split(";")){const g=h.slice(0,h.indexOf(":")).trim();o[g]==null&&Ys(a,g,"")}else for(const h in i)o[h]==null&&Ys(a,h,"");for(const h in o){h==="display"&&(c=!0);const g=o[h];g!=null?ch(e,h,!pe(i)&&i?i[h]:void 0,g)||Ys(a,h,g):Ys(a,h,"")}}else if(l){if(i!==o){const h=a[rh];h&&(o+=";"+h),a.cssText=o,c=ah.test(o)}}else i&&e.removeAttribute("style");or in e&&(e[or]=c?a.display:"",e[gc]&&(a.display="none"))}const Cl=/\s*!important$/;function Ys(e,i,o){if(pt(o))o.forEach(a=>Ys(e,i,a));else if(o==null&&(o=""),i.startsWith("--"))e.setProperty(i,o);else{const a=uh(e,i);Cl.test(o)?e.setProperty(Li(a),o.replace(Cl,""),"important"):e[a]=o}}const Ol=["Webkit","Moz","ms"],ea={};function uh(e,i){const o=ea[i];if(o)return o;let a=Pn(i);if(a!=="filter"&&a in e)return ea[i]=a;a=au(a);for(let l=0;l<Ol.length;l++){const c=Ol[l]+a;if(c in e)return ea[i]=c}return i}function ch(e,i,o,a){return e.tagName==="TEXTAREA"&&(i==="width"||i==="height")&&pe(a)&&o===a}const El="http://www.w3.org/1999/xlink";function zl(e,i,o,a,l,c=ud(i)){a&&i.startsWith("xlink:")?o==null?e.removeAttributeNS(El,i.slice(6,i.length)):e.setAttributeNS(El,i,o):o==null||c&&!uu(o)?e.removeAttribute(i):e.setAttribute(i,c?"":Ln(o)?String(o):o)}function Al(e,i,o,a,l){if(i==="innerHTML"||i==="textContent"){o!=null&&(e[i]=i==="innerHTML"?pc(o):o);return}const c=e.tagName;if(i==="value"&&c!=="PROGRESS"&&!c.includes("-")){const g=c==="OPTION"?e.getAttribute("value")||"":e.value,v=o==null?e.type==="checkbox"?"on":"":String(o);(g!==v||!("_value"in e))&&(e.value=v),o==null&&e.removeAttribute(i),e._value=o;return}let h=!1;if(o===""||o==null){const g=typeof e[i];g==="boolean"?o=uu(o):o==null&&g==="string"?(o="",h=!0):g==="number"&&(o=0,h=!0)}try{e[i]=o}catch{}h&&e.removeAttribute(l||i)}function ri(e,i,o,a){e.addEventListener(i,o,a)}function dh(e,i,o,a){e.removeEventListener(i,o,a)}const Il=Symbol("_vei");function fh(e,i,o,a,l=null){const c=e[Il]||(e[Il]={}),h=c[i];if(a&&h)h.value=a;else{const[g,v]=mh(i);if(a){const P=c[i]=vh(a,l);ri(e,g,P,v)}else h&&(dh(e,g,h,v),c[i]=void 0)}}const hh=/(Once|Passive|Capture)$/,ph=/^on:?(?:Once|Passive|Capture)$/;function mh(e){let i,o;for(;(o=e.match(hh))&&!ph.test(e);)i||(i={}),e=e.slice(0,e.length-o[1].length),i[o[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Li(e.slice(2)),i]}let na=0;const gh=Promise.resolve(),_h=()=>na||(gh.then(()=>na=0),na=Date.now());function vh(e,i){const o=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=o.attached)return;const l=o.value;if(pt(l)){const c=a.stopImmediatePropagation;a.stopImmediatePropagation=()=>{c.call(a),a._stopped=!0};const h=l.slice(),g=[a];for(let v=0;v<h.length&&!a._stopped;v++){const P=h[v];P&&mn(P,i,5,g)}}else mn(l,i,5,[a])};return o.value=e,o.attached=_h(),o}const Nl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,yh=(e,i,o,a,l,c)=>{const h=l==="svg";i==="class"?sh(e,a,h):i==="style"?lh(e,o,a):lr(i)?ur(i)||fh(e,i,o,a,c):(i[0]==="."?(i=i.slice(1),!0):i[0]==="^"?(i=i.slice(1),!1):bh(e,i,a,h))?(Al(e,i,a),!e.tagName.includes("-")&&(i==="value"||i==="checked"||i==="selected")&&zl(e,i,a,h,c,i!=="value")):e._isVueCE&&(xh(e,i)||e._def.__asyncLoader&&(/[A-Z]/.test(i)||!pe(a)))?Al(e,Pn(i),a,c,i):(i==="true-value"?e._trueValue=a:i==="false-value"&&(e._falseValue=a),zl(e,i,a,h))};function bh(e,i,o,a){if(a)return!!(i==="innerHTML"||i==="textContent"||i in e&&Nl(i)&&Lt(o));if(i==="spellcheck"||i==="draggable"||i==="translate"||i==="autocorrect"||i==="sandbox"&&e.tagName==="IFRAME"||i==="form"||i==="list"&&e.tagName==="INPUT"||i==="type"&&e.tagName==="TEXTAREA")return!1;if(i==="width"||i==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return Nl(i)&&pe(o)?!1:i in e}function xh(e,i){const o=e._def.props;if(!o)return!1;const a=Pn(i);return Array.isArray(o)?o.some(l=>Pn(l)===a):Object.keys(o).some(l=>Pn(l)===a)}const Ti=e=>{const i=e.props["onUpdate:modelValue"]||!1;return pt(i)?o=>Go(i,o):i};function wh(e){e.target.composing=!0}function Bl(e){const i=e.target;i.composing&&(i.composing=!1,i.dispatchEvent(new Event("input")))}const pn=Symbol("_assign");function Dl(e,i,o){return i&&(e=e.trim()),o&&(e=dr(e)),e}const Bt={created(e,{modifiers:{lazy:i,trim:o,number:a}},l){e[pn]=Ti(l);const c=a||l.props&&l.props.type==="number";ri(e,i?"change":"input",h=>{h.target.composing||e[pn](Dl(e.value,o,c))}),(o||c)&&ri(e,"change",()=>{e.value=Dl(e.value,o,c)}),i||(ri(e,"compositionstart",wh),ri(e,"compositionend",Bl),ri(e,"change",Bl))},mounted(e,{value:i}){e.value=i??""},beforeUpdate(e,{value:i,oldValue:o,modifiers:{lazy:a,trim:l,number:c}},h){if(e[pn]=Ti(h),e.composing)return;const g=(c||e.type==="number")&&!/^0\d/.test(e.value)?dr(e.value):e.value,v=i??"";if(g===v)return;const P=e.getRootNode();(P instanceof Document||P instanceof ShadowRoot)&&P.activeElement===e&&e.type!=="range"&&(a&&i===o||l&&e.value.trim()===v)||(e.value=v)}},_c={deep:!0,created(e,i,o){e[pn]=Ti(o),ri(e,"change",()=>{const a=e._modelValue,l=Ps(e),c=e.checked,h=e[pn];if(pt(a)){const g=xa(a,l),v=g!==-1;if(c&&!v)h(a.concat(l));else if(!c&&v){const P=[...a];P.splice(g,1),h(P)}}else if(Ts(a)){const g=new Set(a);c?g.add(l):g.delete(l),h(g)}else h(vc(e,c))})},mounted:Rl,beforeUpdate(e,i,o){e[pn]=Ti(o),Rl(e,i,o)}};function Rl(e,{value:i,oldValue:o},a){e._modelValue=i;let l;if(pt(i))l=xa(i,a.props.value)>-1;else if(Ts(i))l=i.has(a.props.value);else{if(i===o)return;l=Si(i,vc(e,!0))}e.checked!==l&&(e.checked=l)}const kh={created(e,{value:i},o){e.checked=Si(i,o.props.value),e[pn]=Ti(o),ri(e,"change",()=>{e[pn](Ps(e))})},beforeUpdate(e,{value:i,oldValue:o},a){e[pn]=Ti(a),i!==o&&(e.checked=Si(i,a.props.value))}},wi={deep:!0,created(e,{value:i,modifiers:{number:o}},a){const l=Ts(i);ri(e,"change",()=>{const c=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>o?dr(Ps(h)):Ps(h));e[pn](e.multiple?l?new Set(c):c:c[0]),e._assigning=!0,Mu(()=>{e._assigning=!1})}),e[pn]=Ti(a)},mounted(e,{value:i}){Fl(e,i)},beforeUpdate(e,i,o){e[pn]=Ti(o)},updated(e,{value:i}){e._assigning||Fl(e,i)}};function Fl(e,i){const o=e.multiple,a=pt(i);if(!(o&&!a&&!Ts(i))){for(let l=0,c=e.options.length;l<c;l++){const h=e.options[l],g=Ps(h);if(o)if(a){const v=typeof g;v==="string"||v==="number"?h.selected=i.some(P=>String(P)===String(g)):h.selected=xa(i,g)>-1}else h.selected=i.has(g);else if(Si(Ps(h),i)){e.selectedIndex!==l&&(e.selectedIndex=l);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ps(e){return"_value"in e?e._value:e.value}function vc(e,i){const o=i?"_trueValue":"_falseValue";return o in e?e[o]:i}const Sh={created(e,i,o){Wo(e,i,o,null,"created")},mounted(e,i,o){Wo(e,i,o,null,"mounted")},beforeUpdate(e,i,o,a){Wo(e,i,o,a,"beforeUpdate")},updated(e,i,o,a){Wo(e,i,o,a,"updated")}};function Ph(e,i){switch(e){case"SELECT":return wi;case"TEXTAREA":return Bt;default:switch(i){case"checkbox":return _c;case"radio":return kh;default:return Bt}}}function Wo(e,i,o,a,l){const h=Ph(e.tagName,o.props&&o.props.type)[l];h&&h(e,i,o,a)}const Th=["ctrl","shift","alt","meta"],Lh={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,i)=>Th.some(o=>e[`${o}Key`]&&!i.includes(o))},yc=(e,i)=>{if(!e)return e;const o=e._withMods||(e._withMods={}),a=i.join(".");return o[a]||(o[a]=((l,...c)=>{for(let h=0;h<i.length;h++){const g=Lh[i[h]];if(g&&g(l,i))return}return e(l,...c)}))},Mh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Vl=(e,i)=>{const o=e._withKeys||(e._withKeys={}),a=i.join(".");return o[a]||(o[a]=(l=>{if(!("key"in l))return;const c=Li(l.key);if(i.some(h=>h===c||Mh[h]===c))return e(l)}))},Ch=Ce({patchProp:yh},Yf);let Zl;function Oh(){return Zl||(Zl=Cf(Ch))}const Eh=((...e)=>{const i=Oh().createApp(...e),{mount:o}=i;return i.mount=a=>{const l=Ah(a);if(!l)return;const c=i._component;!Lt(c)&&!c.render&&!c.template&&(c.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const h=o(l,!1,zh(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),h},i});function zh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ah(e){return pe(e)?document.querySelector(e):e}const bc="pv_theme",$l={light:"#EEF0F3",dark:"#0B1730"},rr=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;function xc(){return rr&&rr.matches?"dark":"light"}function Ih(){try{return localStorage.getItem(bc)||"light"}catch{return"light"}}function wc(e){return e==="system"?xc():e}function kc(e){const i=document.documentElement;i.setAttribute("data-theme",e),i.style.backgroundColor=$l[e]||$l.light}const Gi=J(Ih()),ws=J(wc(Gi.value));function ar(e){Gi.value=e;const i=wc(e);ws.value=i,kc(i);try{localStorage.setItem(bc,e)}catch{}}function Hl(){ar(ws.value==="dark"?"light":"dark")}rr&&rr.addEventListener("change",()=>{if(Gi.value==="system"){const e=xc();ws.value=e,kc(e)}});async function Nh(){try{const e=await fetch("/bff/config");return e.ok?await e.json():{apiBase:""}}catch{return{apiBase:""}}}async function Ul(){try{const e=await fetch("/bff/me");return e.ok?await e.json():null}catch{return null}}async function Bh(e,i,o){const a=await fetch("/bff/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:i,apiBase:o})});return{ok:a.ok,status:a.status,body:await a.json().catch(()=>({}))}}async function Dh(){try{await fetch("/bff/logout",{method:"POST"})}catch{}}async function Rh(){try{const e=await fetch("/bff/devices");return e.ok?await e.json():[]}catch{return[]}}async function Fh(){try{const e=await fetch("/bff/users");return e.ok?{ok:!0,status:200,users:(await e.json()).users||[]}:{ok:!1,status:e.status,users:[]}}catch{return{ok:!1,status:0,users:[]}}}async function Vh(e,i,o,a){const l=await fetch("/bff/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:i,role:o,organization:a})});return{ok:l.ok,status:l.status,body:await l.json().catch(()=>({}))}}async function Zh(e,i){const o=await fetch(`/bff/users/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function $h(e){const i=await fetch(`/bff/users/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Hh(){try{const e=await fetch("/bff/orgs");return e.ok?{ok:!0,status:200,organizations:(await e.json()).organizations||[]}:{ok:!1,status:e.status,organizations:[]}}catch{return{ok:!1,status:0,organizations:[]}}}async function Uh(e){const i=await fetch("/bff/orgs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function jh(e,i){const o=await fetch(`/bff/orgs/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i})});return{ok:o.ok,status:o.status,body:await o.json().catch(()=>({}))}}async function Wh(e){const i=await fetch(`/bff/orgs/${encodeURIComponent(e)}`,{method:"DELETE"});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Kh(){try{const e=await fetch("/bff/preferences");if(!e.ok)return null;const i=await e.json();return i&&typeof i.preferences=="object"?i.preferences:null}catch{return null}}async function qh(e){try{return(await fetch("/bff/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:e})})).ok}catch{return!1}}async function Gh(){try{const e=await fetch("/bff/integrations/opensky");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function jl(e){const i=await fetch("/bff/integrations/opensky",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Yh(){const e=await fetch("/bff/integrations/opensky/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function Jh(){try{const e=await fetch("/bff/integrations/filetransfer");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Wl(e){const i=await fetch("/bff/integrations/filetransfer",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function Xh(){const e=await fetch("/bff/integrations/filetransfer/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function Qh(){try{const e=await fetch("/bff/integrations/localstorage");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Ko(e){const i=await fetch("/bff/integrations/localstorage",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function tp(){const e=await fetch("/bff/integrations/localstorage/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function ep(){try{const e=await fetch("/bff/integrations/webdav");return e.ok?{ok:!0,status:200,body:await e.json()}:{ok:!1,status:e.status,body:await e.json().catch(()=>({}))}}catch{return{ok:!1,status:0,body:{}}}}async function Kl(e){const i=await fetch("/bff/integrations/webdav",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{ok:i.ok,status:i.status,body:await i.json().catch(()=>({}))}}async function np(){const e=await fetch("/bff/integrations/webdav/health",{method:"POST"});return{ok:e.ok,status:e.status,body:await e.json().catch(()=>({}))}}async function ip(e,i,o){const a=await fetch(`/bff/devices/${encodeURIComponent(e)}/command`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:i,payload:o})});return{ok:a.ok,body:await a.json().catch(()=>({}))}}const Sc="pv_prefs",ma={name:"",username:"",displayName:"",bio:"",avatar:"",showEmail:!1,fontSize:"md",language:"en",region:"US",dateFormat:"MDY",timeFormat:"24",reduceMotion:!1,twoFactor:!1};function sp(){try{return{...ma,...JSON.parse(localStorage.getItem(Sc)||"{}")||{}}}catch{return{...ma}}}const gt=xe(sp());function Pc(){try{localStorage.setItem(Sc,JSON.stringify(gt))}catch{}}function Tc(e){if(!e||typeof e!="object")return!1;for(const i of Object.keys(ma))i in e&&(gt[i]=e[i]);return!0}const op={sm:15,md:16,lg:18};function za(e){document.documentElement.style.fontSize=(op[e]||16)+"px"}function Aa(e){document.documentElement.classList.toggle("reduce-motion",!!e)}function Lc(e){const i=new Date(e),o=i.getFullYear(),a=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0");let c;switch(gt.dateFormat){case"DMY":c=`${l}/${a}/${o}`;break;case"YMD":c=`${o}/${a}/${l}`;break;case"ISO":c=`${o}-${a}-${l}`;break;default:c=`${a}/${l}/${o}`}let h;return gt.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:c,time:h}}function ql(e){return Lc(e).time}function Gl(e){const i=Lc(e);return`${i.date} ${i.time}`}let Ia=!1,ga=!1,_a=null;function rp(){return{...JSON.parse(JSON.stringify(gt)),themeMode:Gi.value}}function Na(){!Ia||ga||(clearTimeout(_a),_a=setTimeout(()=>{qh(rp())},600))}function ap(e){ga=!0;try{Tc(e),e.themeMode&&ar(e.themeMode),za(gt.fontSize),Aa(gt.reduceMotion),Pc()}finally{ga=!1}}async function Yl(){Ia=!0;const e=await Kh();e&&Object.keys(e).length?ap(e):Na()}function lp(){Ia=!1,clearTimeout(_a)}Je(gt,()=>{Pc(),Na()},{deep:!0});Je(Gi,Na);Je(()=>gt.fontSize,za,{immediate:!0});Je(()=>gt.reduceMotion,Aa,{immediate:!0});const up=["width","height"],Mc={__name:"BrandMark",props:{size:{type:[Number,String],default:28}},setup(e){return(i,o)=>(b(),x("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},[...o[0]||(o[0]=[f("g",{"stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},[f("polyline",{points:"8,30 19,17 30,30",stroke:"var(--accent)"}),f("polyline",{points:"18,33 29,20 40,33",stroke:"currentColor"})],-1)])],8,up))}},cp=["title","aria-label"],dp={key:0,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},fp={key:1,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},hp={__name:"ThemeToggle",setup(e){return(i,o)=>(b(),x("button",{class:"btn-icon",type:"button",title:Ct(ws)==="dark"?"Switch to light":"Switch to dark","aria-label":Ct(ws)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:o[0]||(o[0]=(...a)=>Ct(Hl)&&Ct(Hl)(...a))},[Ct(ws)==="dark"?(b(),x("svg",dp,[...o[1]||(o[1]=[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)])])):(b(),x("svg",fp,[...o[2]||(o[2]=[f("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z"},null,-1)])]))],8,cp))}},pp={class:"relative grid h-full place-items-center p-5"},mp={class:"absolute right-5 top-5"},gp={class:"mb-6 flex items-center gap-3 text-ink"},_p={class:"relative mb-1"},vp=["type"],yp=["aria-label","title"],bp={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]"},xp={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]"},wp={key:0,class:"mt-4"},kp={key:1,class:"mt-4 rounded border border-line bg-danger-soft px-3 py-2 text-sm text-danger-fg"},Sp=["disabled"],Pp={__name:"LoginView",props:{defaultApiBase:{type:String,default:""}},emits:["signed-in"],setup(e,{emit:i}){const o=e,a=i,l=J(""),c=J(""),h=J(localStorage.getItem("api_url")||o.defaultApiBase||"http://localhost:8080"),g=J(!1),v=J(!1),P=J(!1),k=J("");async function O(){P.value=!0,k.value="",localStorage.setItem("api_url",h.value.trim());const{ok:$,status:F,body:nt}=await Bh(l.value.trim(),c.value,h.value.trim());if(P.value=!1,$){a("signed-in",nt.email);return}k.value=F===400?"Invalid email or password.":F===502?"API server can't reach PocketBase.":nt.message||nt.error||"Cannot reach the API server."}return($,F)=>(b(),x("div",pp,[f("div",mp,[E(hp)]),f("form",{class:"panel w-[380px] p-8 shadow-md",onSubmit:yc(O,["prevent"])},[f("div",gp,[E(Mc,{size:34}),F[5]||(F[5]=f("div",{class:"leading-tight"},[f("div",{class:"text-mode"},"PilotVault"),f("div",{class:"eyebrow mt-0.5"},"Control panel")],-1))]),F[9]||(F[9]=f("label",{class:"eyebrow mb-1.5 block"},"Email",-1)),xt(f("input",{"onUpdate:modelValue":F[0]||(F[0]=nt=>l.value=nt),type:"email",autocomplete:"username",required:"",class:"field mb-4",placeholder:"you@example.com"},null,512),[[Bt,l.value]]),F[10]||(F[10]=f("label",{class:"eyebrow mb-1.5 block"},"Password",-1)),f("div",_p,[xt(f("input",{"onUpdate:modelValue":F[1]||(F[1]=nt=>c.value=nt),type:v.value?"text":"password",autocomplete:"current-password",required:"",class:"field w-full pr-10",placeholder:"••••••••"},null,8,vp),[[Sh,c.value]]),f("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":v.value?"Hide password":"Show password",title:v.value?"Hide password":"Show password",onClick:F[2]||(F[2]=nt=>v.value=!v.value)},[v.value?(b(),x("svg",bp,[...F[6]||(F[6]=[f("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),f("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])])):(b(),x("svg",xp,[...F[7]||(F[7]=[f("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},null,-1),f("circle",{cx:"12",cy:"12",r:"3"},null,-1)])]))],8,yp)]),g.value?(b(),x("div",wp,[F[8]||(F[8]=f("label",{class:"eyebrow mb-1.5 block"},"API Server",-1)),xt(f("input",{"onUpdate:modelValue":F[3]||(F[3]=nt=>h.value=nt),type:"text",class:"field font-mono",placeholder:"10.2.1.101:8080"},null,512),[[Bt,h.value]])])):V("",!0),k.value?(b(),x("p",kp,M(k.value),1)):V("",!0),f("button",{type:"submit",class:"btn-accent mt-6 w-full",disabled:P.value},M(P.value?"Signing in…":"Sign in"),9,Sp),f("button",{type:"button",class:"mx-auto mt-3 block text-xs text-ink-muted transition hover:text-ink-secondary",onClick:F[4]||(F[4]=nt=>g.value=!g.value)},M(g.value?"Hide server settings":"Server settings"),1)],32)]))}};function Tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Js={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 Lp=Js.exports,Jl;function Mp(){return Jl||(Jl=1,(function(e,i){(function(o,a){a(i)})(Lp,(function(o){var a="1.9.4";function l(t){var n,s,r,u;for(s=1,r=arguments.length;s<r;s++){u=arguments[s];for(n in u)t[n]=u[n]}return t}var c=Object.create||(function(){function t(){}return function(n){return t.prototype=n,new t}})();function h(t,n){var s=Array.prototype.slice;if(t.bind)return t.bind.apply(t,s.call(arguments,1));var r=s.call(arguments,2);return function(){return t.apply(n,r.length?r.concat(s.call(arguments)):arguments)}}var g=0;function v(t){return"_leaflet_id"in t||(t._leaflet_id=++g),t._leaflet_id}function P(t,n,s){var r,u,p,S;return S=function(){r=!1,u&&(p.apply(s,u),u=!1)},p=function(){r?u=arguments:(t.apply(s,arguments),setTimeout(S,n),r=!0)},p}function k(t,n,s){var r=n[1],u=n[0],p=r-u;return t===r&&s?t:((t-u)%p+p)%p+u}function O(){return!1}function $(t,n){if(n===!1)return t;var s=Math.pow(10,n===void 0?6:n);return Math.round(t*s)/s}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function nt(t){return F(t).split(/\s+/)}function q(t,n){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?c(t.options):{});for(var s in n)t.options[s]=n[s];return t.options}function At(t,n,s){var r=[];for(var u in t)r.push(encodeURIComponent(s?u.toUpperCase():u)+"="+encodeURIComponent(t[u]));return(!n||n.indexOf("?")===-1?"?":"&")+r.join("&")}var Dt=/\{ *([\w_ -]+) *\}/g;function bt(t,n){return t.replace(Dt,function(s,r){var u=n[r];if(u===void 0)throw new Error("No value provided for variable "+s);return typeof u=="function"&&(u=u(n)),u})}var ut=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function X(t,n){for(var s=0;s<t.length;s++)if(t[s]===n)return s;return-1}var ft="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function jt(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var de=0;function me(t){var n=+new Date,s=Math.max(0,16-(n-de));return de=n+s,window.setTimeout(t,s)}var vt=window.requestAnimationFrame||jt("RequestAnimationFrame")||me,Ft=window.cancelAnimationFrame||jt("CancelAnimationFrame")||jt("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function Tt(t,n,s){if(s&&vt===me)t.call(n);else return vt.call(window,h(t,n))}function G(t){t&&Ft.call(window,t)}var st={__proto__:null,extend:l,create:c,bind:h,get lastId(){return g},stamp:v,throttle:P,wrapNum:k,falseFn:O,formatNum:$,trim:F,splitWords:nt,setOptions:q,getParamString:At,template:bt,isArray:ut,indexOf:X,emptyImageUrl:ft,requestFn:vt,cancelFn:Ft,requestAnimFrame:Tt,cancelAnimFrame:G};function It(){}It.extend=function(t){var n=function(){q(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=n.__super__=this.prototype,r=c(s);r.constructor=n,n.prototype=r;for(var u in this)Object.prototype.hasOwnProperty.call(this,u)&&u!=="prototype"&&u!=="__super__"&&(n[u]=this[u]);return t.statics&&l(n,t.statics),t.includes&&(Wt(t.includes),l.apply(null,[r].concat(t.includes))),l(r,t),delete r.statics,delete r.includes,r.options&&(r.options=s.options?c(s.options):{},l(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var p=0,S=r._initHooks.length;p<S;p++)r._initHooks[p].call(this)}},n},It.include=function(t){var n=this.prototype.options;return l(this.prototype,t),t.options&&(this.prototype.options=n,this.mergeOptions(t.options)),this},It.mergeOptions=function(t){return l(this.prototype.options,t),this},It.addInitHook=function(t){var n=Array.prototype.slice.call(arguments,1),s=typeof t=="function"?t:function(){this[t].apply(this,n)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(s),this};function Wt(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=ut(t)?t:[t];for(var n=0;n<t.length;n++)t[n]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var kt={on:function(t,n,s){if(typeof t=="object")for(var r in t)this._on(r,t[r],n);else{t=nt(t);for(var u=0,p=t.length;u<p;u++)this._on(t[u],n,s)}return this},off:function(t,n,s){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var r in t)this._off(r,t[r],n);else{t=nt(t);for(var u=arguments.length===1,p=0,S=t.length;p<S;p++)u?this._off(t[p]):this._off(t[p],n,s)}return this},_on:function(t,n,s,r){if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}if(this._listens(t,n,s)===!1){s===this&&(s=void 0);var u={fn:n,ctx:s};r&&(u.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(u)}},_off:function(t,n,s){var r,u,p;if(this._events&&(r=this._events[t],!!r)){if(arguments.length===1){if(this._firingCount)for(u=0,p=r.length;u<p;u++)r[u].fn=O;delete this._events[t];return}if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}var S=this._listens(t,n,s);if(S!==!1){var C=r[S];this._firingCount&&(C.fn=O,this._events[t]=r=r.slice()),r.splice(S,1)}}},fire:function(t,n,s){if(!this.listens(t,s))return this;var r=l({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var u=this._events[t];if(u){this._firingCount=this._firingCount+1||1;for(var p=0,S=u.length;p<S;p++){var C=u[p],z=C.fn;C.once&&this.off(t,z,C.ctx),z.call(C.ctx||this,r)}this._firingCount--}}return s&&this._propagateEvent(r),this},listens:function(t,n,s,r){typeof t!="string"&&console.warn('"string" type argument expected');var u=n;typeof n!="function"&&(r=!!n,u=void 0,s=void 0);var p=this._events&&this._events[t];if(p&&p.length&&this._listens(t,u,s)!==!1)return!0;if(r){for(var S in this._eventParents)if(this._eventParents[S].listens(t,n,s,r))return!0}return!1},_listens:function(t,n,s){if(!this._events)return!1;var r=this._events[t]||[];if(!n)return!!r.length;s===this&&(s=void 0);for(var u=0,p=r.length;u<p;u++)if(r[u].fn===n&&r[u].ctx===s)return u;return!1},once:function(t,n,s){if(typeof t=="object")for(var r in t)this._on(r,t[r],n,!0);else{t=nt(t);for(var u=0,p=t.length;u<p;u++)this._on(t[u],n,s,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[v(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[v(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,l({layer:t.target,propagatedFrom:t.target},t),!0)}};kt.addEventListener=kt.on,kt.removeEventListener=kt.clearAllEventListeners=kt.off,kt.addOneTimeEventListener=kt.once,kt.fireEvent=kt.fire,kt.hasEventListeners=kt.listens;var Vt=It.extend(kt);function Y(t,n,s){this.x=s?Math.round(t):t,this.y=s?Math.round(n):n}var ue=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};Y.prototype={clone:function(){return new Y(this.x,this.y)},add:function(t){return this.clone()._add(rt(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(rt(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new Y(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new Y(this.x/t.x,this.y/t.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=ue(this.x),this.y=ue(this.y),this},distanceTo:function(t){t=rt(t);var n=t.x-this.x,s=t.y-this.y;return Math.sqrt(n*n+s*s)},equals:function(t){return t=rt(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=rt(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+$(this.x)+", "+$(this.y)+")"}};function rt(t,n,s){return t instanceof Y?t:ut(t)?new Y(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new Y(t.x,t.y):new Y(t,n,s)}function yt(t,n){if(t)for(var s=n?[t,n]:t,r=0,u=s.length;r<u;r++)this.extend(s[r])}yt.prototype={extend:function(t){var n,s;if(!t)return this;if(t instanceof Y||typeof t[0]=="number"||"x"in t)n=s=rt(t);else if(t=Kt(t),n=t.min,s=t.max,!n||!s)return this;return!this.min&&!this.max?(this.min=n.clone(),this.max=s.clone()):(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(s.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(s.y,this.max.y)),this},getCenter:function(t){return rt((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return rt(this.min.x,this.max.y)},getTopRight:function(){return rt(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,s;return typeof t[0]=="number"||t instanceof Y?t=rt(t):t=Kt(t),t instanceof yt?(n=t.min,s=t.max):n=s=t,n.x>=this.min.x&&s.x<=this.max.x&&n.y>=this.min.y&&s.y<=this.max.y},intersects:function(t){t=Kt(t);var n=this.min,s=this.max,r=t.min,u=t.max,p=u.x>=n.x&&r.x<=s.x,S=u.y>=n.y&&r.y<=s.y;return p&&S},overlaps:function(t){t=Kt(t);var n=this.min,s=this.max,r=t.min,u=t.max,p=u.x>n.x&&r.x<s.x,S=u.y>n.y&&r.y<s.y;return p&&S},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var n=this.min,s=this.max,r=Math.abs(n.x-s.x)*t,u=Math.abs(n.y-s.y)*t;return Kt(rt(n.x-r,n.y-u),rt(s.x+r,s.y+u))},equals:function(t){return t?(t=Kt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function Kt(t,n){return!t||t instanceof yt?t:new yt(t,n)}function ge(t,n){if(t)for(var s=n?[t,n]:t,r=0,u=s.length;r<u;r++)this.extend(s[r])}ge.prototype={extend:function(t){var n=this._southWest,s=this._northEast,r,u;if(t instanceof Ut)r=t,u=t;else if(t instanceof ge){if(r=t._southWest,u=t._northEast,!r||!u)return this}else return t?this.extend(Pt(t)||qt(t)):this;return!n&&!s?(this._southWest=new Ut(r.lat,r.lng),this._northEast=new Ut(u.lat,u.lng)):(n.lat=Math.min(r.lat,n.lat),n.lng=Math.min(r.lng,n.lng),s.lat=Math.max(u.lat,s.lat),s.lng=Math.max(u.lng,s.lng)),this},pad:function(t){var n=this._southWest,s=this._northEast,r=Math.abs(n.lat-s.lat)*t,u=Math.abs(n.lng-s.lng)*t;return new ge(new Ut(n.lat-r,n.lng-u),new Ut(s.lat+r,s.lng+u))},getCenter:function(){return new Ut((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Ut(this.getNorth(),this.getWest())},getSouthEast:function(){return new Ut(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof Ut||"lat"in t?t=Pt(t):t=qt(t);var n=this._southWest,s=this._northEast,r,u;return t instanceof ge?(r=t.getSouthWest(),u=t.getNorthEast()):r=u=t,r.lat>=n.lat&&u.lat<=s.lat&&r.lng>=n.lng&&u.lng<=s.lng},intersects:function(t){t=qt(t);var n=this._southWest,s=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),p=u.lat>=n.lat&&r.lat<=s.lat,S=u.lng>=n.lng&&r.lng<=s.lng;return p&&S},overlaps:function(t){t=qt(t);var n=this._southWest,s=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),p=u.lat>n.lat&&r.lat<s.lat,S=u.lng>n.lng&&r.lng<s.lng;return p&&S},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,n){return t?(t=qt(t),this._southWest.equals(t.getSouthWest(),n)&&this._northEast.equals(t.getNorthEast(),n)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function qt(t,n){return t instanceof ge?t:new ge(t,n)}function Ut(t,n,s){if(isNaN(t)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+n+")");this.lat=+t,this.lng=+n,s!==void 0&&(this.alt=+s)}Ut.prototype={equals:function(t,n){if(!t)return!1;t=Pt(t);var s=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return s<=(n===void 0?1e-9:n)},toString:function(t){return"LatLng("+$(this.lat,t)+", "+$(this.lng,t)+")"},distanceTo:function(t){return Te.distance(this,Pt(t))},wrap:function(){return Te.wrapLatLng(this)},toBounds:function(t){var n=180*t/40075017,s=n/Math.cos(Math.PI/180*this.lat);return qt([this.lat-n,this.lng-s],[this.lat+n,this.lng+s])},clone:function(){return new Ut(this.lat,this.lng,this.alt)}};function Pt(t,n,s){return t instanceof Ut?t:ut(t)&&typeof t[0]!="object"?t.length===3?new Ut(t[0],t[1],t[2]):t.length===2?new Ut(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new Ut(t.lat,"lng"in t?t.lng:t.lon,t.alt):n===void 0?null:new Ut(t,n,s)}var Pe={latLngToPoint:function(t,n){var s=this.projection.project(t),r=this.scale(n);return this.transformation._transform(s,r)},pointToLatLng:function(t,n){var s=this.scale(n),r=this.transformation.untransform(t,s);return this.projection.unproject(r)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var n=this.projection.bounds,s=this.scale(t),r=this.transformation.transform(n.min,s),u=this.transformation.transform(n.max,s);return new yt(r,u)},infinite:!1,wrapLatLng:function(t){var n=this.wrapLng?k(t.lng,this.wrapLng,!0):t.lng,s=this.wrapLat?k(t.lat,this.wrapLat,!0):t.lat,r=t.alt;return new Ut(s,n,r)},wrapLatLngBounds:function(t){var n=t.getCenter(),s=this.wrapLatLng(n),r=n.lat-s.lat,u=n.lng-s.lng;if(r===0&&u===0)return t;var p=t.getSouthWest(),S=t.getNorthEast(),C=new Ut(p.lat-r,p.lng-u),z=new Ut(S.lat-r,S.lng-u);return new ge(C,z)}},Te=l({},Pe,{wrapLng:[-180,180],R:6371e3,distance:function(t,n){var s=Math.PI/180,r=t.lat*s,u=n.lat*s,p=Math.sin((n.lat-t.lat)*s/2),S=Math.sin((n.lng-t.lng)*s/2),C=p*p+Math.cos(r)*Math.cos(u)*S*S,z=2*Math.atan2(Math.sqrt(C),Math.sqrt(1-C));return this.R*z}}),nn=6378137,we={R:nn,MAX_LATITUDE:85.0511287798,project:function(t){var n=Math.PI/180,s=this.MAX_LATITUDE,r=Math.max(Math.min(s,t.lat),-s),u=Math.sin(r*n);return new Y(this.R*t.lng*n,this.R*Math.log((1+u)/(1-u))/2)},unproject:function(t){var n=180/Math.PI;return new Ut((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*n,t.x*n/this.R)},bounds:(function(){var t=nn*Math.PI;return new yt([-t,-t],[t,t])})()};function gn(t,n,s,r){if(ut(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=n,this._c=s,this._d=r}gn.prototype={transform:function(t,n){return this._transform(t.clone(),n)},_transform:function(t,n){return n=n||1,t.x=n*(this._a*t.x+this._b),t.y=n*(this._c*t.y+this._d),t},untransform:function(t,n){return n=n||1,new Y((t.x/n-this._b)/this._a,(t.y/n-this._d)/this._c)}};function _(t,n,s,r){return new gn(t,n,s,r)}var m=l({},Te,{code:"EPSG:3857",projection:we,transformation:(function(){var t=.5/(Math.PI*we.R);return _(t,.5,-t,.5)})()}),T=l({},m,{code:"EPSG:900913"});function B(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function I(t,n){var s="",r,u,p,S,C,z;for(r=0,p=t.length;r<p;r++){for(C=t[r],u=0,S=C.length;u<S;u++)z=C[u],s+=(u?"L":"M")+z.x+" "+z.y;s+=n?it.svg?"z":"x":""}return s||"M0 0"}var D=document.documentElement.style,j="ActiveXObject"in window,A=j&&!document.addEventListener,U="msLaunchUri"in navigator&&!("documentMode"in document),R=Et("webkit"),ct=Et("android"),Q=Et("android 2")||Et("android 3"),K=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),dt=ct&&Et("Google")&&K<537&&!("AudioNode"in window),Mt=!!window.opera,at=!U&&Et("chrome"),Rt=Et("gecko")&&!R&&!Mt&&!j,ne=!at&&Et("safari"),ae=Et("phantom"),fe="OTransition"in D,ke=navigator.platform.indexOf("Win")===0,_n=j&&"transition"in D,ui="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Q,ve="MozPerspective"in D,Ae=!window.L_DISABLE_3D&&(_n||ui||ve)&&!fe&&!ae,Cn=typeof orientation<"u"||Et("mobile"),Fe=Cn&&R,Yi=Cn&&ui,Oe=!window.PointerEvent&&window.MSPointerEvent,Ve=!!(window.PointerEvent||Oe),he="ontouchstart"in window||!!window.TouchEvent,xr=!window.L_NO_TOUCH&&(he||Ve),_o=Cn&&Mt,Ms=Cn&&Rt,wr=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,kr=(function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",O,n),window.removeEventListener("testPassiveEventSupport",O,n)}catch{}return t})(),Sr=(function(){return!!document.createElement("canvas").getContext})(),Cs=!!(document.createElementNS&&B("svg").createSVGRect),vo=!!Cs&&(function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Pr=!Cs&&(function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}})(),Tr=navigator.platform.indexOf("Mac")===0,Lr=navigator.platform.indexOf("Linux")===0;function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var it={ie:j,ielt9:A,edge:U,webkit:R,android:ct,android23:Q,androidStock:dt,opera:Mt,chrome:at,gecko:Rt,safari:ne,phantom:ae,opera12:fe,win:ke,ie3d:_n,webkit3d:ui,gecko3d:ve,any3d:Ae,mobile:Cn,mobileWebkit:Fe,mobileWebkit3d:Yi,msPointer:Oe,pointer:Ve,touch:xr,touchNative:he,mobileOpera:_o,mobileGecko:Ms,retina:wr,passiveEvents:kr,canvas:Sr,svg:Cs,vml:Pr,inlineSvg:vo,mac:Tr,linux:Lr},Ji=it.msPointer?"MSPointerDown":"pointerdown",Ee=it.msPointer?"MSPointerMove":"pointermove",ci=it.msPointer?"MSPointerUp":"pointerup",Mi=it.msPointer?"MSPointerCancel":"pointercancel",di={touchstart:Ji,touchmove:Ee,touchend:ci,touchcancel:Mi},sn={touchstart:bo,touchmove:Ze,touchend:Ze,touchcancel:Ze},Xe={},yo=!1;function Os(t,n,s){return n==="touchstart"&&fi(),sn[n]?(s=sn[n].bind(this,s),t.addEventListener(di[n],s,!1),s):(console.warn("wrong event specified:",n),O)}function Es(t,n,s){if(!di[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(di[n],s,!1)}function Mr(t){Xe[t.pointerId]=t}function on(t){Xe[t.pointerId]&&(Xe[t.pointerId]=t)}function vn(t){delete Xe[t.pointerId]}function fi(){yo||(document.addEventListener(Ji,Mr,!0),document.addEventListener(Ee,on,!0),document.addEventListener(ci,vn,!0),document.addEventListener(Mi,vn,!0),yo=!0)}function Ze(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var s in Xe)n.touches.push(Xe[s]);n.changedTouches=[n],t(n)}}function bo(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Se(n),Ze(t,n)}function zs(t){var n={},s,r;for(r in t)s=t[r],n[r]=s&&s.bind?s.bind(t):s;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var Cr=200;function Or(t,n){t.addEventListener("dblclick",n);var s=0,r;function u(p){if(p.detail!==1){r=p.detail;return}if(!(p.pointerType==="mouse"||p.sourceCapabilities&&!p.sourceCapabilities.firesTouchEvents)){var S=So(p);if(!(S.some(function(z){return z instanceof HTMLLabelElement&&z.attributes.for})&&!S.some(function(z){return z instanceof HTMLInputElement||z instanceof HTMLSelectElement}))){var C=Date.now();C-s<=Cr?(r++,r===2&&n(zs(p))):r=1,s=C}}}return t.addEventListener("click",u),{dblclick:n,simDblclick:u}}function Er(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var As=Xi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),hi=Xi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),xo=hi==="webkitTransition"||hi==="OTransition"?hi+"End":"transitionend";function wo(t){return typeof t=="string"?document.getElementById(t):t}function Ci(t,n){var s=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!s||s==="auto")&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);s=r?r[n]:null}return s==="auto"?null:s}function W(t,n,s){var r=document.createElement(t);return r.className=n||"",s&&s.appendChild(r),r}function Yt(t){var n=t.parentNode;n&&n.removeChild(t)}function Un(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function rn(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function yn(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function pi(t,n){if(t.classList!==void 0)return t.classList.contains(n);var s=Oi(t);return s.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(s)}function mt(t,n){if(t.classList!==void 0)for(var s=nt(n),r=0,u=s.length;r<u;r++)t.classList.add(s[r]);else if(!pi(t,n)){var p=Oi(t);jn(t,(p?p+" ":"")+n)}}function te(t,n){t.classList!==void 0?t.classList.remove(n):jn(t,F((" "+Oi(t)+" ").replace(" "+n+" "," ")))}function jn(t,n){t.className.baseVal===void 0?t.className=n:t.className.baseVal=n}function Oi(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function Ie(t,n){"opacity"in t.style?t.style.opacity=n:"filter"in t.style&&Is(t,n)}function Is(t,n){var s=!1,r="DXImageTransform.Microsoft.Alpha";try{s=t.filters.item(r)}catch{if(n===1)return}n=Math.round(n*100),s?(s.Enabled=n!==100,s.Opacity=n):t.style.filter+=" progid:"+r+"(opacity="+n+")"}function Xi(t){for(var n=document.documentElement.style,s=0;s<t.length;s++)if(t[s]in n)return t[s];return!1}function ye(t,n,s){var r=n||new Y(0,0);t.style[As]=(it.ie3d?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(s?" scale("+s+")":"")}function le(t,n){t._leaflet_pos=n,it.any3d?ye(t,n):(t.style.left=n.x+"px",t.style.top=n.y+"px")}function On(t){return t._leaflet_pos||new Y(0,0)}var mi,Ei,Qi;if("onselectstart"in document)mi=function(){St(window,"selectstart",Se)},Ei=function(){Jt(window,"selectstart",Se)};else{var bn=Xi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);mi=function(){if(bn){var t=document.documentElement.style;Qi=t[bn],t[bn]="none"}},Ei=function(){bn&&(document.documentElement.style[bn]=Qi,Qi=void 0)}}function Ns(){St(window,"dragstart",Se)}function Bs(){Jt(window,"dragstart",Se)}var ts,Ds;function es(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(ns(),ts=t,Ds=t.style.outlineStyle,t.style.outlineStyle="none",St(window,"keydown",ns))}function ns(){ts&&(ts.style.outlineStyle=Ds,ts=void 0,Ds=void 0,Jt(window,"keydown",ns))}function ko(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Rs(t){var n=t.getBoundingClientRect();return{x:n.width/t.offsetWidth||1,y:n.height/t.offsetHeight||1,boundingClientRect:n}}var zr={__proto__:null,TRANSFORM:As,TRANSITION:hi,TRANSITION_END:xo,get:wo,getStyle:Ci,create:W,remove:Yt,empty:Un,toFront:rn,toBack:yn,hasClass:pi,addClass:mt,removeClass:te,setClass:jn,getClass:Oi,setOpacity:Ie,testProp:Xi,setTransform:ye,setPosition:le,getPosition:On,get disableTextSelection(){return mi},get enableTextSelection(){return Ei},disableImageDrag:Ns,enableImageDrag:Bs,preventOutline:es,restoreOutline:ns,getSizedParentNode:ko,getScale:Rs};function St(t,n,s,r){if(n&&typeof n=="object")for(var u in n)zi(t,u,n[u],s);else{n=nt(n);for(var p=0,S=n.length;p<S;p++)zi(t,n[p],s,r)}return this}var an="_leaflet_events";function Jt(t,n,s,r){if(arguments.length===1)is(t),delete t[an];else if(n&&typeof n=="object")for(var u in n)Zt(t,u,n[u],s);else if(n=nt(n),arguments.length===2)is(t,function(C){return X(n,C)!==-1});else for(var p=0,S=n.length;p<S;p++)Zt(t,n[p],s,r);return this}function is(t,n){for(var s in t[an]){var r=s.split(/\d/)[0];(!n||n(r))&&Zt(t,r,null,null,s)}}var gi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function zi(t,n,s,r){var u=n+v(s)+(r?"_"+v(r):"");if(t[an]&&t[an][u])return this;var p=function(C){return s.call(r||t,C||window.event)},S=p;!it.touchNative&&it.pointer&&n.indexOf("touch")===0?p=Os(t,n,p):it.touch&&n==="dblclick"?p=Or(t,p):"addEventListener"in t?n==="touchstart"||n==="touchmove"||n==="wheel"||n==="mousewheel"?t.addEventListener(gi[n]||n,p,it.passiveEvents?{passive:!1}:!1):n==="mouseenter"||n==="mouseleave"?(p=function(C){C=C||window.event,Wn(t,C)&&S(C)},t.addEventListener(gi[n],p,!1)):t.addEventListener(n,S,!1):t.attachEvent("on"+n,p),t[an]=t[an]||{},t[an][u]=p}function Zt(t,n,s,r,u){u=u||n+v(s)+(r?"_"+v(r):"");var p=t[an]&&t[an][u];if(!p)return this;!it.touchNative&&it.pointer&&n.indexOf("touch")===0?Es(t,n,p):it.touch&&n==="dblclick"?Er(t,p):"removeEventListener"in t?t.removeEventListener(gi[n]||n,p,!1):t.detachEvent("on"+n,p),t[an][u]=null}function _e(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function En(t){return zi(t,"wheel",_e),this}function _i(t){return St(t,"mousedown touchstart dblclick contextmenu",_e),t._leaflet_disable_click=!0,this}function Se(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function xn(t){return Se(t),_e(t),this}function So(t){if(t.composedPath)return t.composedPath();for(var n=[],s=t.target;s;)n.push(s),s=s.parentNode;return n}function Po(t,n){if(!n)return new Y(t.clientX,t.clientY);var s=Rs(n),r=s.boundingClientRect;return new Y((t.clientX-r.left)/s.x-n.clientLeft,(t.clientY-r.top)/s.y-n.clientTop)}var Ar=it.linux&&it.chrome?window.devicePixelRatio:it.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function To(t){return it.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Ar:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Wn(t,n){var s=n.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch{return!1}return s!==t}var Lo={__proto__:null,on:St,off:Jt,stopPropagation:_e,disableScrollPropagation:En,disableClickPropagation:_i,preventDefault:Se,stop:xn,getPropagationPath:So,getMousePosition:Po,getWheelDelta:To,isExternalTarget:Wn,addListener:St,removeListener:Jt},Ai=Vt.extend({run:function(t,n,s,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=On(t),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=Tt(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,s=this._duration*1e3;n<s?this._runFrame(this._easeOut(n/s),t):(this._runFrame(1),this._complete())},_runFrame:function(t,n){var s=this._startPos.add(this._offset.multiplyBy(t));n&&s._round(),le(this._el,s),this.fire("step")},_complete:function(){G(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),zt=Vt.extend({options:{crs:m,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,n){n=q(this,n),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=h(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),n.zoom!==void 0&&(this._zoom=this._limitZoom(n.zoom)),n.center&&n.zoom!==void 0&&this.setView(Pt(n.center),n.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=hi&&it.any3d&&!it.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),St(this._proxy,xo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,s){if(n=n===void 0?this._zoom:this._limitZoom(n),t=this._limitCenter(Pt(t),n,this.options.maxBounds),s=s||{},this._stop(),this._loaded&&!s.reset&&s!==!0){s.animate!==void 0&&(s.zoom=l({animate:s.animate},s.zoom),s.pan=l({animate:s.animate,duration:s.duration},s.pan));var r=this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,s.zoom):this._tryAnimatedPan(t,s.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,n,s.pan&&s.pan.noMoveStart),this},setZoom:function(t,n){return this._loaded?this.setView(this.getCenter(),t,{zoom:n}):(this._zoom=t,this)},zoomIn:function(t,n){return t=t||(it.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,n)},zoomOut:function(t,n){return t=t||(it.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,n)},setZoomAround:function(t,n,s){var r=this.getZoomScale(n),u=this.getSize().divideBy(2),p=t instanceof Y?t:this.latLngToContainerPoint(t),S=p.subtract(u).multiplyBy(1-1/r),C=this.containerPointToLatLng(u.add(S));return this.setView(C,n,{zoom:s})},_getBoundsCenterZoom:function(t,n){n=n||{},t=t.getBounds?t.getBounds():qt(t);var s=rt(n.paddingTopLeft||n.padding||[0,0]),r=rt(n.paddingBottomRight||n.padding||[0,0]),u=this.getBoundsZoom(t,!1,s.add(r));if(u=typeof n.maxZoom=="number"?Math.min(n.maxZoom,u):u,u===1/0)return{center:t.getCenter(),zoom:u};var p=r.subtract(s).divideBy(2),S=this.project(t.getSouthWest(),u),C=this.project(t.getNorthEast(),u),z=this.unproject(S.add(C).divideBy(2).add(p),u);return{center:z,zoom:u}},fitBounds:function(t,n){if(t=qt(t),!t.isValid())throw new Error("Bounds are not valid.");var s=this._getBoundsCenterZoom(t,n);return this.setView(s.center,s.zoom,n)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,n){return this.setView(t,this._zoom,{pan:n})},panBy:function(t,n){if(t=rt(t).round(),n=n||{},!t.x&&!t.y)return this.fire("moveend");if(n.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ai,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),n.noMoveStart||this.fire("movestart"),n.animate!==!1){mt(this._mapPane,"leaflet-pan-anim");var s=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,s,n.duration||.25,n.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,n,s){if(s=s||{},s.animate===!1||!it.any3d)return this.setView(t,n,s);this._stop();var r=this.project(this.getCenter()),u=this.project(t),p=this.getSize(),S=this._zoom;t=Pt(t),n=n===void 0?S:n;var C=Math.max(p.x,p.y),z=C*this.getZoomScale(S,n),H=u.distanceTo(r)||1,et=1.42,_t=et*et;function Nt(be){var $o=be?-1:1,Gc=be?z:C,Yc=z*z-C*C+$o*_t*_t*H*H,Jc=2*Gc*_t*H,Ur=Yc/Jc,nl=Math.sqrt(Ur*Ur+1)-Ur,Xc=nl<1e-9?-18:Math.log(nl);return Xc}function He(be){return(Math.exp(be)-Math.exp(-be))/2}function Me(be){return(Math.exp(be)+Math.exp(-be))/2}function un(be){return He(be)/Me(be)}var Ge=Nt(0);function ps(be){return C*(Me(Ge)/Me(Ge+et*be))}function jc(be){return C*(Me(Ge)*un(Ge+et*be)-He(Ge))/_t}function Wc(be){return 1-Math.pow(1-be,1.5)}var Kc=Date.now(),tl=(Nt(1)-Ge)/et,qc=s.duration?1e3*s.duration:1e3*tl*.8;function el(){var be=(Date.now()-Kc)/qc,$o=Wc(be)*tl;be<=1?(this._flyToFrame=Tt(el,this),this._move(this.unproject(r.add(u.subtract(r).multiplyBy(jc($o)/H)),S),this.getScaleZoom(C/ps($o),S),{flyTo:!0})):this._move(t,n)._moveEnd(!0)}return this._moveStart(!0,s.noMoveStart),el.call(this),this},flyToBounds:function(t,n){var s=this._getBoundsCenterZoom(t,n);return this.flyTo(s.center,s.zoom,n)},setMaxBounds:function(t){return t=qt(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var n=this.options.minZoom;return this.options.minZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var n=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var s=this.getCenter(),r=this._limitCenter(s,this._zoom,qt(t));return s.equals(r)||this.panTo(r,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var s=rt(n.paddingTopLeft||n.padding||[0,0]),r=rt(n.paddingBottomRight||n.padding||[0,0]),u=this.project(this.getCenter()),p=this.project(t),S=this.getPixelBounds(),C=Kt([S.min.add(s),S.max.subtract(r)]),z=C.getSize();if(!C.contains(p)){this._enforcingBounds=!0;var H=p.subtract(C.getCenter()),et=C.extend(p).getSize().subtract(z);u.x+=H.x<0?-et.x:et.x,u.y+=H.y<0?-et.y:et.y,this.panTo(this.unproject(u),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),r=n.divideBy(2).round(),u=s.divideBy(2).round(),p=r.subtract(u);return!p.x&&!p.y?this:(t.animate&&t.pan?this.panBy(p):(t.pan&&this._rawPanBy(p),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(h(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:s}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=l({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=h(this._handleGeolocationResponse,this),s=h(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,s,t):navigator.geolocation.getCurrentPosition(n,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,s=t.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: "+s+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,s=t.coords.longitude,r=new Ut(n,s),u=r.toBounds(t.coords.accuracy*2),p=this._locateOptions;if(p.setView){var S=this.getBoundsZoom(u);this.setView(r,p.maxZoom?Math.min(S,p.maxZoom):S)}var C={latlng:r,bounds:u,timestamp:t.timestamp};for(var z in t.coords)typeof t.coords[z]=="number"&&(C[z]=t.coords[z]);this.fire("locationfound",C)}},addHandler:function(t,n){if(!n)return this;var s=this[t]=new n(this);return this._handlers.push(s),this.options[t]&&s.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&&(G(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)Yt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var s="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=W("div",s,n||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),s=this.unproject(t.getTopRight());return new ge(n,s)},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(t,n,s){t=qt(t),s=rt(s||[0,0]);var r=this.getZoom()||0,u=this.getMinZoom(),p=this.getMaxZoom(),S=t.getNorthWest(),C=t.getSouthEast(),z=this.getSize().subtract(s),H=Kt(this.project(C,r),this.project(S,r)).getSize(),et=it.any3d?this.options.zoomSnap:1,_t=z.x/H.x,Nt=z.y/H.y,He=n?Math.max(_t,Nt):Math.min(_t,Nt);return r=this.getScaleZoom(He,r),et&&(r=Math.round(r/(et/100))*(et/100),r=n?Math.ceil(r/et)*et:Math.floor(r/et)*et),Math.max(u,Math.min(p,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Y(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var s=this._getTopLeftPoint(t,n);return new yt(s,s.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var s=this.options.crs;return n=n===void 0?this._zoom:n,s.scale(t)/s.scale(n)},getScaleZoom:function(t,n){var s=this.options.crs;n=n===void 0?this._zoom:n;var r=s.zoom(t*s.scale(n));return isNaN(r)?1/0:r},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(Pt(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(rt(t),n)},layerPointToLatLng:function(t){var n=rt(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(Pt(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Pt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(qt(t))},distance:function(t,n){return this.options.crs.distance(Pt(t),Pt(n))},containerPointToLayerPoint:function(t){return rt(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return rt(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(rt(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Pt(t)))},mouseEventToContainerPoint:function(t){return Po(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=wo(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");St(n,"scroll",this._onScroll,this),this._containerId=v(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&it.any3d,mt(t,"leaflet-container"+(it.touch?" leaflet-touch":"")+(it.retina?" leaflet-retina":"")+(it.ielt9?" leaflet-oldie":"")+(it.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Ci(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),le(this._mapPane,new Y(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(mt(t.markerPane,"leaflet-zoom-hide"),mt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,s){le(this._mapPane,new Y(0,0));var r=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var u=this._zoom!==n;this._moveStart(u,s)._move(t,n)._moveEnd(u),this.fire("viewreset"),r&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,s,r){n===void 0&&(n=this._zoom);var u=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),r?s&&s.pinch&&this.fire("zoom",s):((u||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return G(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){le(this._mapPane,this._getMapPanePos().subtract(t))},_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(t){this._targets={},this._targets[v(this._container)]=this;var n=t?Jt:St;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),it.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){G(this._resizeRequest),this._resizeRequest=Tt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var s=[],r,u=n==="mouseout"||n==="mouseover",p=t.target||t.srcElement,S=!1;p;){if(r=this._targets[v(p)],r&&(n==="click"||n==="preclick")&&this._draggableMoved(r)){S=!0;break}if(r&&r.listens(n,!0)&&(u&&!Wn(p,t)||(s.push(r),u))||p===this._container)break;p=p.parentNode}return!s.length&&!S&&!u&&this.listens(n,!0)&&(s=[this]),s},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var s=t.type;s==="mousedown"&&es(n),this._fireDOMEvent(t,s)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,s){if(t.type==="click"){var r=l({},t);r.type="preclick",this._fireDOMEvent(r,r.type,s)}var u=this._findEventTargets(t,n);if(s){for(var p=[],S=0;S<s.length;S++)s[S].listens(n,!0)&&p.push(s[S]);u=p.concat(u)}if(u.length){n==="contextmenu"&&Se(t);var C=u[0],z={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var H=C.getLatLng&&(!C._radius||C._radius<=10);z.containerPoint=H?this.latLngToContainerPoint(C.getLatLng()):this.mouseEventToContainerPoint(t),z.layerPoint=this.containerPointToLayerPoint(z.containerPoint),z.latlng=H?C.getLatLng():this.layerPointToLatLng(z.layerPoint)}for(S=0;S<u.length;S++)if(u[S].fire(n,z,!0),z.originalEvent._stopped||u[S].options.bubblingMouseEvents===!1&&X(this._mouseEvents,n)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,n=this._handlers.length;t<n;t++)this._handlers[t].disable()},whenReady:function(t,n){return this._loaded?t.call(n||this,{target:this}):this.on("load",t,n),this},_getMapPanePos:function(){return On(this._mapPane)||new Y(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,n){var s=t&&n!==void 0?this._getNewPixelOrigin(t,n):this.getPixelOrigin();return s.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,n){var s=this.getSize()._divideBy(2);return this.project(t,n)._subtract(s)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,n,s){var r=this._getNewPixelOrigin(s,n);return this.project(t,n)._subtract(r)},_latLngBoundsToNewLayerBounds:function(t,n,s){var r=this._getNewPixelOrigin(s,n);return Kt([this.project(t.getSouthWest(),n)._subtract(r),this.project(t.getNorthWest(),n)._subtract(r),this.project(t.getSouthEast(),n)._subtract(r),this.project(t.getNorthEast(),n)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,n,s){if(!s)return t;var r=this.project(t,n),u=this.getSize().divideBy(2),p=new yt(r.subtract(u),r.add(u)),S=this._getBoundsOffset(p,s,n);return Math.abs(S.x)<=1&&Math.abs(S.y)<=1?t:this.unproject(r.add(S),n)},_limitOffset:function(t,n){if(!n)return t;var s=this.getPixelBounds(),r=new yt(s.min.add(t),s.max.add(t));return t.add(this._getBoundsOffset(r,n))},_getBoundsOffset:function(t,n,s){var r=Kt(this.project(n.getNorthEast(),s),this.project(n.getSouthWest(),s)),u=r.min.subtract(t.min),p=r.max.subtract(t.max),S=this._rebound(u.x,-p.x),C=this._rebound(u.y,-p.y);return new Y(S,C)},_rebound:function(t,n){return t+n>0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),s=this.getMaxZoom(),r=it.any3d?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(n,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){te(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var s=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(s)?!1:(this.panBy(s,n),!0)},_createAnimProxy:function(){var t=this._proxy=W("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var s=As,r=this._proxy.style[s];ye(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),r===this._proxy.style[s]&&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 t=this.getCenter(),n=this.getZoom();ye(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||s.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(n),u=this._getCenterOffset(t)._divideBy(1-1/r);return s.animate!==!0&&!this.getSize().contains(u)?!1:(Tt(function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,s,r){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,mt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:r}),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&&te(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 ss(t,n){return new zt(t,n)}var $e=It.extend({options:{position:"topright"},initialize:function(t){q(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),s=this.getPosition(),r=t._controlCorners[s];return mt(n,"leaflet-control"),s.indexOf("bottom")!==-1?r.insertBefore(n,r.firstChild):r.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(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ii=function(t){return new $e(t)};zt.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",s=this._controlContainer=W("div",n+"control-container",this._container);function r(u,p){var S=n+u+" "+n+p;t[u+p]=W("div",S,s)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Yt(this._controlCorners[t]);Yt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Mo=$e.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,s,r){return s<r?-1:r<s?1:0}},initialize:function(t,n,s){q(this,s),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var r in t)this._addLayer(t[r],r);for(r in n)this._addLayer(n[r],r,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return $e.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,n){return this._addLayer(t,n),this._map?this._update():this},addOverlay:function(t,n){return this._addLayer(t,n,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var n=this._getLayer(v(t));return n&&this._layers.splice(this._layers.indexOf(n),1),this._map?this._update():this},expand:function(){mt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(mt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):te(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return te(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",n=this._container=W("div",t),s=this.options.collapsed;n.setAttribute("aria-haspopup",!0),_i(n),En(n);var r=this._section=W("section",t+"-list");s&&(this._map.on("click",this.collapse,this),St(n,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var u=this._layersLink=W("a",t+"-toggle",n);u.href="#",u.title="Layers",u.setAttribute("role","button"),St(u,{keydown:function(p){p.keyCode===13&&this._expandSafely()},click:function(p){Se(p),this._expandSafely()}},this),s||this.expand(),this._baseLayersList=W("div",t+"-base",r),this._separator=W("div",t+"-separator",r),this._overlaysList=W("div",t+"-overlays",r),n.appendChild(r)},_getLayer:function(t){for(var n=0;n<this._layers.length;n++)if(this._layers[n]&&v(this._layers[n].layer)===t)return this._layers[n]},_addLayer:function(t,n,s){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:n,overlay:s}),this.options.sortLayers&&this._layers.sort(h(function(r,u){return this.options.sortFunction(r.layer,u.layer,r.name,u.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Un(this._baseLayersList),Un(this._overlaysList),this._layerControlInputs=[];var t,n,s,r,u=0;for(s=0;s<this._layers.length;s++)r=this._layers[s],this._addItem(r),n=n||r.overlay,t=t||!r.overlay,u+=r.overlay?0:1;return this.options.hideSingleBase&&(t=t&&u>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(v(t.target)),s=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;s&&this._map.fire(s,n)},_createRadioElement:function(t,n){var s='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(n?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=s,r.firstChild},_addItem:function(t){var n=document.createElement("label"),s=this._map.hasLayer(t.layer),r;t.overlay?(r=document.createElement("input"),r.type="checkbox",r.className="leaflet-control-layers-selector",r.defaultChecked=s):r=this._createRadioElement("leaflet-base-layers_"+v(this),s),this._layerControlInputs.push(r),r.layerId=v(t.layer),St(r,"click",this._onInputClick,this);var u=document.createElement("span");u.innerHTML=" "+t.name;var p=document.createElement("span");n.appendChild(p),p.appendChild(r),p.appendChild(u);var S=t.overlay?this._overlaysList:this._baseLayersList;return S.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,s,r=[],u=[];this._handlingClick=!0;for(var p=t.length-1;p>=0;p--)n=t[p],s=this._getLayer(n.layerId).layer,n.checked?r.push(s):n.checked||u.push(s);for(p=0;p<u.length;p++)this._map.hasLayer(u[p])&&this._map.removeLayer(u[p]);for(p=0;p<r.length;p++)this._map.hasLayer(r[p])||this._map.addLayer(r[p]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,n,s,r=this._map.getZoom(),u=t.length-1;u>=0;u--)n=t[u],s=this._getLayer(n.layerId).layer,n.disabled=s.options.minZoom!==void 0&&r<s.options.minZoom||s.options.maxZoom!==void 0&&r>s.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,St(t,"click",Se),this.expand();var n=this;setTimeout(function(){Jt(t,"click",Se),n._preventClick=!1})}}),Ir=function(t,n,s){return new Mo(t,n,s)},Ke=$e.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",s=W("div",n+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,n+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,n+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(t){t.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(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,s,r,u){var p=W("a",s,r);return p.innerHTML=t,p.href="#",p.title=n,p.setAttribute("role","button"),p.setAttribute("aria-label",n),_i(p),St(p,"click",xn),St(p,"click",u,this),St(p,"click",this._refocusOnMap,this),p},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";te(this._zoomInButton,n),te(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(mt(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(mt(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});zt.mergeOptions({zoomControl:!0}),zt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ke,this.addControl(this.zoomControl))});var Nr=function(t){return new Ke(t)},Co=$e.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",s=W("div",n),r=this.options;return this._addScales(r,n+"-line",s),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,s){t.metric&&(this._mScale=W("div",n,s)),t.imperial&&(this._iScale=W("div",n,s))},_update:function(){var t=this._map,n=t.getSize().y/2,s=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(s)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),s=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,s,n/t)},_updateImperial:function(t){var n=t*3.2808399,s,r,u;n>5280?(s=n/5280,r=this._getRoundNum(s),this._updateScale(this._iScale,r+" mi",r/s)):(u=this._getRoundNum(n),this._updateScale(this._iScale,u+" ft",u/n))},_updateScale:function(t,n,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),s=t/n;return s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1,n*s}}),Br=function(t){return new Co(t)},os='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Kn=$e.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(it.inlineSvg?os+" ":"")+"Leaflet</a>"},initialize:function(t){q(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=W("div","leaflet-control-attribution"),_i(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", ")),this._container.innerHTML=s.join(' <span aria-hidden="true">|</span> ')}}});zt.mergeOptions({attributionControl:!0}),zt.addInitHook(function(){this.options.attributionControl&&new Kn().addTo(this)});var rs=function(t){return new Kn(t)};$e.Layers=Mo,$e.Zoom=Ke,$e.Scale=Co,$e.Attribution=Kn,Ii.layers=Ir,Ii.zoom=Nr,Ii.scale=Br,Ii.attribution=rs;var ee=It.extend({initialize:function(t){this._map=t},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}});ee.addTo=function(t,n){return t.addHandler(n,this),this};var vi={Events:kt},Ni=it.touch?"touchstart mousedown":"mousedown",qe=Vt.extend({options:{clickTolerance:3},initialize:function(t,n,s,r){q(this,r),this._element=t,this._dragStartTarget=n||t,this._preventOutline=s},enable:function(){this._enabled||(St(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(qe._dragging===this&&this.finishDrag(!0),Jt(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!pi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){qe._dragging===this&&this.finishDrag();return}if(!(qe._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(qe._dragging=this,this._preventOutline&&es(this._element),Ns(),mi(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,s=ko(this._element);this._startPoint=new Y(n.clientX,n.clientY),this._startPos=On(this._element),this._parentScale=Rs(s);var r=t.type==="mousedown";St(document,r?"mousemove":"touchmove",this._onMove,this),St(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,s=new Y(n.clientX,n.clientY)._subtract(this._startPoint);!s.x&&!s.y||Math.abs(s.x)+Math.abs(s.y)<this.options.clickTolerance||(s.x/=this._parentScale.x,s.y/=this._parentScale.y,Se(t),this._moved||(this.fire("dragstart"),this._moved=!0,mt(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),mt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),le(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){te(document.body,"leaflet-dragging"),this._lastTarget&&(te(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Jt(document,"mousemove touchmove",this._onMove,this),Jt(document,"mouseup touchend touchcancel",this._onUp,this),Bs(),Ei();var n=this._moved&&this._moving;this._moving=!1,qe._dragging=!1,n&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Fs(t,n,s){var r,u=[1,4,2,8],p,S,C,z,H,et,_t,Nt;for(p=0,et=t.length;p<et;p++)t[p]._code=An(t[p],n);for(C=0;C<4;C++){for(_t=u[C],r=[],p=0,et=t.length,S=et-1;p<et;S=p++)z=t[p],H=t[S],z._code&_t?H._code&_t||(Nt=ls(H,z,_t,n,s),Nt._code=An(Nt,n),r.push(Nt)):(H._code&_t&&(Nt=ls(H,z,_t,n,s),Nt._code=An(Nt,n),r.push(Nt)),r.push(z));t=r}return t}function Bi(t,n){var s,r,u,p,S,C,z,H,et;if(!t||t.length===0)throw new Error("latlngs not passed");Le(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var _t=Pt([0,0]),Nt=qt(t),He=Nt.getNorthWest().distanceTo(Nt.getSouthWest())*Nt.getNorthEast().distanceTo(Nt.getNorthWest());He<1700&&(_t=qn(t));var Me=t.length,un=[];for(s=0;s<Me;s++){var Ge=Pt(t[s]);un.push(n.project(Pt([Ge.lat-_t.lat,Ge.lng-_t.lng])))}for(C=z=H=0,s=0,r=Me-1;s<Me;r=s++)u=un[s],p=un[r],S=u.y*p.x-p.y*u.x,z+=(u.x+p.x)*S,H+=(u.y+p.y)*S,C+=S*3;C===0?et=un[0]:et=[z/C,H/C];var ps=n.unproject(rt(et));return Pt([ps.lat+_t.lat,ps.lng+_t.lng])}function qn(t){for(var n=0,s=0,r=0,u=0;u<t.length;u++){var p=Pt(t[u]);n+=p.lat,s+=p.lng,r++}return Pt([n/r,s/r])}var Oo={__proto__:null,clipPolygon:Fs,polygonCenter:Bi,centroid:qn};function Gn(t,n){if(!n||!t.length)return t.slice();var s=n*n;return t=zn(t,s),t=Rr(t,s),t}function Di(t,n,s){return Math.sqrt(In(t,n,s,!0))}function Dr(t,n,s){return In(t,n,s)}function Rr(t,n){var s=t.length,r=typeof Uint8Array<"u"?Uint8Array:Array,u=new r(s);u[0]=u[s-1]=1,$t(t,u,n,0,s-1);var p,S=[];for(p=0;p<s;p++)u[p]&&S.push(t[p]);return S}function $t(t,n,s,r,u){var p=0,S,C,z;for(C=r+1;C<=u-1;C++)z=In(t[C],t[r],t[u],!0),z>p&&(S=C,p=z);p>s&&(n[S]=1,$t(t,n,s,r,S),$t(t,n,s,S,u))}function zn(t,n){for(var s=[t[0]],r=1,u=0,p=t.length;r<p;r++)Fr(t[r],t[u])>n&&(s.push(t[r]),u=r);return u<p-1&&s.push(t[p-1]),s}var Ri;function as(t,n,s,r,u){var p=r?Ri:An(t,s),S=An(n,s),C,z,H;for(Ri=S;;){if(!(p|S))return[t,n];if(p&S)return!1;C=p||S,z=ls(t,n,C,s,u),H=An(z,s),C===p?(t=z,p=H):(n=z,S=H)}}function ls(t,n,s,r,u){var p=n.x-t.x,S=n.y-t.y,C=r.min,z=r.max,H,et;return s&8?(H=t.x+p*(z.y-t.y)/S,et=z.y):s&4?(H=t.x+p*(C.y-t.y)/S,et=C.y):s&2?(H=z.x,et=t.y+S*(z.x-t.x)/p):s&1&&(H=C.x,et=t.y+S*(C.x-t.x)/p),new Y(H,et,u)}function An(t,n){var s=0;return t.x<n.min.x?s|=1:t.x>n.max.x&&(s|=2),t.y<n.min.y?s|=4:t.y>n.max.y&&(s|=8),s}function Fr(t,n){var s=n.x-t.x,r=n.y-t.y;return s*s+r*r}function In(t,n,s,r){var u=n.x,p=n.y,S=s.x-u,C=s.y-p,z=S*S+C*C,H;return z>0&&(H=((t.x-u)*S+(t.y-p)*C)/z,H>1?(u=s.x,p=s.y):H>0&&(u+=S*H,p+=C*H)),S=t.x-u,C=t.y-p,r?S*S+C*C:new Y(u,p)}function Le(t){return!ut(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Fi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Le(t)}function yi(t,n){var s,r,u,p,S,C,z,H;if(!t||t.length===0)throw new Error("latlngs not passed");Le(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var et=Pt([0,0]),_t=qt(t),Nt=_t.getNorthWest().distanceTo(_t.getSouthWest())*_t.getNorthEast().distanceTo(_t.getNorthWest());Nt<1700&&(et=qn(t));var He=t.length,Me=[];for(s=0;s<He;s++){var un=Pt(t[s]);Me.push(n.project(Pt([un.lat-et.lat,un.lng-et.lng])))}for(s=0,r=0;s<He-1;s++)r+=Me[s].distanceTo(Me[s+1])/2;if(r===0)H=Me[0];else for(s=0,p=0;s<He-1;s++)if(S=Me[s],C=Me[s+1],u=S.distanceTo(C),p+=u,p>r){z=(p-r)/u,H=[C.x-z*(C.x-S.x),C.y-z*(C.y-S.y)];break}var Ge=n.unproject(rt(H));return Pt([Ge.lat+et.lat,Ge.lng+et.lng])}var wn={__proto__:null,simplify:Gn,pointToSegmentDistance:Di,closestPointOnSegment:Dr,clipSegment:as,_getEdgeIntersection:ls,_getBitCode:An,_sqClosestPointOnSegment:In,isFlat:Le,_flat:Fi,polylineCenter:yi},kn={project:function(t){return new Y(t.lng,t.lat)},unproject:function(t){return new Ut(t.y,t.x)},bounds:new yt([-180,-90],[180,90])},Vi={R:6378137,R_MINOR:6356752314245179e-9,bounds:new yt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,s=this.R,r=t.lat*n,u=this.R_MINOR/s,p=Math.sqrt(1-u*u),S=p*Math.sin(r),C=Math.tan(Math.PI/4-r/2)/Math.pow((1-S)/(1+S),p/2);return r=-s*Math.log(Math.max(C,1e-10)),new Y(t.lng*n*s,r)},unproject:function(t){for(var n=180/Math.PI,s=this.R,r=this.R_MINOR/s,u=Math.sqrt(1-r*r),p=Math.exp(-t.y/s),S=Math.PI/2-2*Math.atan(p),C=0,z=.1,H;C<15&&Math.abs(z)>1e-7;C++)H=u*Math.sin(S),H=Math.pow((1-H)/(1+H),u/2),z=Math.PI/2-2*Math.atan(p*H)-S,S+=z;return new Ut(S*n,t.x*n/s)}},Eo={__proto__:null,LonLat:kn,Mercator:Vi,SphericalMercator:we},Vr=l({},Te,{code:"EPSG:3395",projection:Vi,transformation:(function(){var t=.5/(Math.PI*Vi.R);return _(t,.5,-t,.5)})()}),Vs=l({},Te,{code:"EPSG:4326",projection:kn,transformation:_(1/180,1,-1/180,.5)}),zo=l({},Pe,{projection:kn,transformation:_(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var s=n.lng-t.lng,r=n.lat-t.lat;return Math.sqrt(s*s+r*r)},infinite:!0});Pe.Earth=Te,Pe.EPSG3395=Vr,Pe.EPSG3857=m,Pe.EPSG900913=T,Pe.EPSG4326=Vs,Pe.Simple=zo;var Qe=Vt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[v(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[v(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var s=this.getEvents();n.on(s,this),this.once("remove",function(){n.off(s,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});zt.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=v(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=v(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return v(t)in this._layers},eachLayer:function(t,n){for(var s in this._layers)t.call(n,this._layers[s]);return this},_addLayers:function(t){t=t?ut(t)?t:[t]:[];for(var n=0,s=t.length;n<s;n++)this.addLayer(t[n])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[v(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var n=v(t);this._zoomBoundLayers[n]&&(delete this._zoomBoundLayers[n],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,n=-1/0,s=this._getZoomSpan();for(var r in this._zoomBoundLayers){var u=this._zoomBoundLayers[r].options;t=u.minZoom===void 0?t:Math.min(t,u.minZoom),n=u.maxZoom===void 0?n:Math.max(n,u.maxZoom)}this._layersMaxZoom=n===-1/0?void 0:n,this._layersMinZoom=t===1/0?void 0:t,s!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var bi=Qe.extend({initialize:function(t,n){q(this,n),this._layers={};var s,r;if(t)for(s=0,r=t.length;s<r;s++)this.addLayer(t[s])},addLayer:function(t){var n=this.getLayerId(t);return this._layers[n]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var n=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[n]&&this._map.removeLayer(this._layers[n]),delete this._layers[n],this},hasLayer:function(t){var n=typeof t=="number"?t:this.getLayerId(t);return n in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var n=Array.prototype.slice.call(arguments,1),s,r;for(s in this._layers)r=this._layers[s],r[t]&&r[t].apply(r,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,n){for(var s in this._layers)t.call(n,this._layers[s]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return v(t)}}),us=function(t,n){return new bi(t,n)},Sn=bi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),bi.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),bi.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new ge;for(var n in this._layers){var s=this._layers[n];t.extend(s.getBounds?s.getBounds():s.getLatLng())}return t}}),se=function(t,n){return new Sn(t,n)},ln=It.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){q(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,n){var s=this._getIconUrl(t);if(!s){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(s,n&&n.tagName==="IMG"?n:null);return this._setIconStyles(r,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(r.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),r},_setIconStyles:function(t,n){var s=this.options,r=s[n+"Size"];typeof r=="number"&&(r=[r,r]);var u=rt(r),p=rt(n==="shadow"&&s.shadowAnchor||s.iconAnchor||u&&u.divideBy(2,!0));t.className="leaflet-marker-"+n+" "+(s.className||""),p&&(t.style.marginLeft=-p.x+"px",t.style.marginTop=-p.y+"px"),u&&(t.style.width=u.x+"px",t.style.height=u.y+"px")},_createImg:function(t,n){return n=n||document.createElement("img"),n.src=t,n},_getIconUrl:function(t){return it.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Zs(t){return new ln(t)}var Yn=ln.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof Yn.imagePath!="string"&&(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+ln.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var n=function(s,r,u){var p=r.exec(s);return p&&p[u]};return t=n(t,/^url\((['"])?(.+)\1\)$/,2),t&&n(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=W("div","leaflet-default-icon-path",document.body),n=Ci(t,"background-image")||Ci(t,"backgroundImage");if(document.body.removeChild(t),n=this._stripUrl(n),n)return n;var s=document.querySelector('link[href$="leaflet.css"]');return s?s.href.substring(0,s.href.length-11-1):""}}),Ao=ee.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new qe(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),mt(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&te(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var n=this._marker,s=n._map,r=this._marker.options.autoPanSpeed,u=this._marker.options.autoPanPadding,p=On(n._icon),S=s.getPixelBounds(),C=s.getPixelOrigin(),z=Kt(S.min._subtract(C).add(u),S.max._subtract(C).subtract(u));if(!z.contains(p)){var H=rt((Math.max(z.max.x,p.x)-z.max.x)/(S.max.x-z.max.x)-(Math.min(z.min.x,p.x)-z.min.x)/(S.min.x-z.min.x),(Math.max(z.max.y,p.y)-z.max.y)/(S.max.y-z.max.y)-(Math.min(z.min.y,p.y)-z.min.y)/(S.min.y-z.min.y)).multiplyBy(r);s.panBy(H,{animate:!1}),this._draggable._newPos._add(H),this._draggable._startPos._add(H),le(n._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=Tt(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(G(this._panRequest),this._panRequest=Tt(this._adjustPan.bind(this,t)))},_onDrag:function(t){var n=this._marker,s=n._shadow,r=On(n._icon),u=n._map.layerPointToLatLng(r);s&&le(s,r),n._latlng=u,t.latlng=u,t.oldLatLng=this._oldLatLng,n.fire("move",t).fire("drag",t)},_onDragEnd:function(t){G(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),cs=Qe.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,n){q(this,n),this._latlng=Pt(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var n=this._latlng;return this._latlng=Pt(t),this.update(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,n="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),s=t.icon.createIcon(this._icon),r=!1;s!==this._icon&&(this._icon&&this._removeIcon(),r=!0,t.title&&(s.title=t.title),s.tagName==="IMG"&&(s.alt=t.alt||"")),mt(s,n),t.keyboard&&(s.tabIndex="0",s.setAttribute("role","button")),this._icon=s,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&St(s,"focus",this._panOnFocus,this);var u=t.icon.createShadow(this._shadow),p=!1;u!==this._shadow&&(this._removeShadow(),p=!0),u&&(mt(u,n),u.alt=""),this._shadow=u,t.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),u&&p&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Jt(this._icon,"focus",this._panOnFocus,this),Yt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Yt(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&le(this._icon,t),this._shadow&&le(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(n)},_initInteraction:function(){if(this.options.interactive&&(mt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ao)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ao(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&Ie(this._icon,t),this._shadow&&Ie(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var n=this.options.icon.options,s=n.iconSize?rt(n.iconSize):rt(0,0),r=n.iconAnchor?rt(n.iconAnchor):rt(0,0);t.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:s.subtract(r)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function y(t,n){return new cs(t,n)}var d=Qe.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return q(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Z=d.extend({options:{fill:!0,radius:10},initialize:function(t,n){q(this,n),this._latlng=Pt(t),this._radius=this.options.radius},setLatLng:function(t){var n=this._latlng;return this._latlng=Pt(t),this.redraw(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var n=t&&t.radius||this._radius;return d.prototype.setStyle.call(this,t),this.setRadius(n),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,n=this._radiusY||t,s=this._clickTolerance(),r=[t+s,n+s];this._pxBounds=new yt(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function w(t,n){return new Z(t,n)}var Ht=Z.extend({initialize:function(t,n,s){if(typeof n=="number"&&(n=l({},s,{radius:n})),q(this,n),this._latlng=Pt(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new ge(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:d.prototype.setStyle,_project:function(){var t=this._latlng.lng,n=this._latlng.lat,s=this._map,r=s.options.crs;if(r.distance===Te.distance){var u=Math.PI/180,p=this._mRadius/Te.R/u,S=s.project([n+p,t]),C=s.project([n-p,t]),z=S.add(C).divideBy(2),H=s.unproject(z).lat,et=Math.acos((Math.cos(p*u)-Math.sin(n*u)*Math.sin(H*u))/(Math.cos(n*u)*Math.cos(H*u)))/u;(isNaN(et)||et===0)&&(et=p/Math.cos(Math.PI/180*n)),this._point=z.subtract(s.getPixelOrigin()),this._radius=isNaN(et)?0:z.x-s.project([H,t-et]).x,this._radiusY=z.y-S.y}else{var _t=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(_t).x}this._updateBounds()}});function Cc(t,n,s){return new Ht(t,n,s)}var Jn=d.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,n){q(this,n),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var n=1/0,s=null,r=In,u,p,S=0,C=this._parts.length;S<C;S++)for(var z=this._parts[S],H=1,et=z.length;H<et;H++){u=z[H-1],p=z[H];var _t=r(t,u,p,!0);_t<n&&(n=_t,s=r(t,u,p))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return yi(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,n){return n=n||this._defaultShape(),t=Pt(t),n.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new ge,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Le(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var n=[],s=Le(t),r=0,u=t.length;r<u;r++)s?(n[r]=Pt(t[r]),this._bounds.extend(n[r])):n[r]=this._convertLatLngs(t[r]);return n},_project:function(){var t=new yt;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),n=new Y(t,t);this._rawPxBounds&&(this._pxBounds=new yt([this._rawPxBounds.min.subtract(n),this._rawPxBounds.max.add(n)]))},_projectLatlngs:function(t,n,s){var r=t[0]instanceof Ut,u=t.length,p,S;if(r){for(S=[],p=0;p<u;p++)S[p]=this._map.latLngToLayerPoint(t[p]),s.extend(S[p]);n.push(S)}else for(p=0;p<u;p++)this._projectLatlngs(t[p],n,s)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var n=this._parts,s,r,u,p,S,C,z;for(s=0,u=0,p=this._rings.length;s<p;s++)for(z=this._rings[s],r=0,S=z.length;r<S-1;r++)C=as(z[r],z[r+1],t,r,!0),C&&(n[u]=n[u]||[],n[u].push(C[0]),(C[1]!==z[r+1]||r===S-2)&&(n[u].push(C[1]),u++))}},_simplifyPoints:function(){for(var t=this._parts,n=this.options.smoothFactor,s=0,r=t.length;s<r;s++)t[s]=Gn(t[s],n)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,n){var s,r,u,p,S,C,z=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,p=this._parts.length;s<p;s++)for(C=this._parts[s],r=0,S=C.length,u=S-1;r<S;u=r++)if(!(!n&&r===0)&&Di(t,C[u],C[r])<=z)return!0;return!1}});function Oc(t,n){return new Jn(t,n)}Jn._flat=Fi;var ds=Jn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Bi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var n=Jn.prototype._convertLatLngs.call(this,t),s=n.length;return s>=2&&n[0]instanceof Ut&&n[0].equals(n[s-1])&&n.pop(),n},_setLatLngs:function(t){Jn.prototype._setLatLngs.call(this,t),Le(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Le(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,s=new Y(n,n);if(t=new yt(t.min.subtract(s),t.max.add(s)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var r=0,u=this._rings.length,p;r<u;r++)p=Fs(this._rings[r],t,!0),p.length&&this._parts.push(p)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var n=!1,s,r,u,p,S,C,z,H;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(p=0,z=this._parts.length;p<z;p++)for(s=this._parts[p],S=0,H=s.length,C=H-1;S<H;C=S++)r=s[S],u=s[C],r.y>t.y!=u.y>t.y&&t.x<(u.x-r.x)*(t.y-r.y)/(u.y-r.y)+r.x&&(n=!n);return n||Jn.prototype._containsPoint.call(this,t,!0)}});function Ec(t,n){return new ds(t,n)}var Xn=Sn.extend({initialize:function(t,n){q(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=ut(t)?t:t.features,s,r,u;if(n){for(s=0,r=n.length;s<r;s++)u=n[s],(u.geometries||u.geometry||u.features||u.coordinates)&&this.addData(u);return this}var p=this.options;if(p.filter&&!p.filter(t))return this;var S=Io(t,p);return S?(S.feature=Do(t),S.defaultOptions=S.options,this.resetStyle(S),p.onEachFeature&&p.onEachFeature(t,S),this.addLayer(S)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=l({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(n){this._setLayerStyle(n,t)},this)},_setLayerStyle:function(t,n){t.setStyle&&(typeof n=="function"&&(n=n(t.feature)),t.setStyle(n))}});function Io(t,n){var s=t.type==="Feature"?t.geometry:t,r=s?s.coordinates:null,u=[],p=n&&n.pointToLayer,S=n&&n.coordsToLatLng||Zr,C,z,H,et;if(!r&&!s)return null;switch(s.type){case"Point":return C=S(r),Ba(p,t,C,n);case"MultiPoint":for(H=0,et=r.length;H<et;H++)C=S(r[H]),u.push(Ba(p,t,C,n));return new Sn(u);case"LineString":case"MultiLineString":return z=No(r,s.type==="LineString"?0:1,S),new Jn(z,n);case"Polygon":case"MultiPolygon":return z=No(r,s.type==="Polygon"?1:2,S),new ds(z,n);case"GeometryCollection":for(H=0,et=s.geometries.length;H<et;H++){var _t=Io({geometry:s.geometries[H],type:"Feature",properties:t.properties},n);_t&&u.push(_t)}return new Sn(u);case"FeatureCollection":for(H=0,et=s.features.length;H<et;H++){var Nt=Io(s.features[H],n);Nt&&u.push(Nt)}return new Sn(u);default:throw new Error("Invalid GeoJSON object.")}}function Ba(t,n,s,r){return t?t(n,s):new cs(s,r&&r.markersInheritOptions&&r)}function Zr(t){return new Ut(t[1],t[0],t[2])}function No(t,n,s){for(var r=[],u=0,p=t.length,S;u<p;u++)S=n?No(t[u],n-1,s):(s||Zr)(t[u]),r.push(S);return r}function $r(t,n){return t=Pt(t),t.alt!==void 0?[$(t.lng,n),$(t.lat,n),$(t.alt,n)]:[$(t.lng,n),$(t.lat,n)]}function Bo(t,n,s,r){for(var u=[],p=0,S=t.length;p<S;p++)u.push(n?Bo(t[p],Le(t[p])?0:n-1,s,r):$r(t[p],r));return!n&&s&&u.length>0&&u.push(u[0].slice()),u}function fs(t,n){return t.feature?l({},t.feature,{geometry:n}):Do(n)}function Do(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Hr={toGeoJSON:function(t){return fs(this,{type:"Point",coordinates:$r(this.getLatLng(),t)})}};cs.include(Hr),Ht.include(Hr),Z.include(Hr),Jn.include({toGeoJSON:function(t){var n=!Le(this._latlngs),s=Bo(this._latlngs,n?1:0,!1,t);return fs(this,{type:(n?"Multi":"")+"LineString",coordinates:s})}}),ds.include({toGeoJSON:function(t){var n=!Le(this._latlngs),s=n&&!Le(this._latlngs[0]),r=Bo(this._latlngs,s?2:n?1:0,!0,t);return n||(r=[r]),fs(this,{type:(s?"Multi":"")+"Polygon",coordinates:r})}}),bi.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(s){n.push(s.toGeoJSON(t).geometry.coordinates)}),fs(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var s=n==="GeometryCollection",r=[];return this.eachLayer(function(u){if(u.toGeoJSON){var p=u.toGeoJSON(t);if(s)r.push(p.geometry);else{var S=Do(p);S.type==="FeatureCollection"?r.push.apply(r,S.features):r.push(S)}}}),s?fs(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});function Da(t,n){return new Xn(t,n)}var zc=Da,Ro=Qe.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,s){this._url=t,this._bounds=qt(n),q(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(mt(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(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&rn(this._image),this},bringToBack:function(){return this._map&&yn(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=qt(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:W("img");if(mt(n,"leaflet-image-layer"),this._zoomAnimated&&mt(n,"leaflet-zoom-animated"),this.options.className&&mt(n,this.options.className),n.onselectstart=O,n.onmousemove=O,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(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ye(this._image,s,n)},_reset:function(){var t=this._image,n=new yt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=n.getSize();le(t,n.min),t.style.width=s.x+"px",t.style.height=s.y+"px"},_updateOpacity:function(){Ie(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 t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ac=function(t,n,s){return new Ro(t,n,s)},Ra=Ro.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:W("video");if(mt(n,"leaflet-image-layer"),this._zoomAnimated&&mt(n,"leaflet-zoom-animated"),this.options.className&&mt(n,this.options.className),n.onselectstart=O,n.onmousemove=O,n.onloadeddata=h(this.fire,this,"load"),t){for(var s=n.getElementsByTagName("source"),r=[],u=0;u<s.length;u++)r.push(s[u].src);this._url=s.length>0?r:[n.src];return}ut(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 p=0;p<this._url.length;p++){var S=W("source");S.src=this._url[p],n.appendChild(S)}}});function Ic(t,n,s){return new Ra(t,n,s)}var Fa=Ro.extend({_initImage:function(){var t=this._image=this._url;mt(t,"leaflet-image-layer"),this._zoomAnimated&&mt(t,"leaflet-zoom-animated"),this.options.className&&mt(t,this.options.className),t.onselectstart=O,t.onmousemove=O}});function Nc(t,n,s){return new Fa(t,n,s)}var Nn=Qe.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,n){t&&(t instanceof Ut||ut(t))?(this._latlng=Pt(t),q(this,n)):(q(this,t),this._source=n),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Ie(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Ie(this._container,1),this.bringToFront(),this.options.interactive&&(mt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Ie(this._container,0),this._removeTimeout=setTimeout(h(Yt,void 0,this._container),200)):Yt(this._container),this.options.interactive&&(te(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=Pt(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&rn(this._container),this},bringToBack:function(){return this._map&&yn(this._container),this},_prepareOpen:function(t){var n=this._source;if(!n._map)return!1;if(n instanceof Sn){n=null;var s=this._source._layers;for(var r in s)if(s[r]._map){n=s[r];break}if(!n)return!1;this._source=n}if(!t)if(n.getCenter)t=n.getCenter();else if(n.getLatLng)t=n.getLatLng();else if(n.getBounds)t=n.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,n=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof n=="string")t.innerHTML=n;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(n)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),n=rt(this.options.offset),s=this._getAnchor();this._zoomAnimated?le(this._container,t.add(s)):n=n.add(t).add(s);var r=this._containerBottom=-n.y,u=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=r+"px",this._container.style.left=u+"px"}},_getAnchor:function(){return[0,0]}});zt.include({_initOverlay:function(t,n,s,r){var u=n;return u instanceof t||(u=new t(r).setContent(n)),s&&u.setLatLng(s),u}}),Qe.include({_initOverlay:function(t,n,s,r){var u=s;return u instanceof t?(q(u,r),u._source=this):(u=n&&!r?n:new t(r,this),u.setContent(s)),u}});var Fo=Nn.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Nn.prototype.openOn.call(this,t)},onAdd:function(t){Nn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof d||this._source.on("preclick",_e))},onRemove:function(t){Nn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof d||this._source.off("preclick",_e))},getEvents:function(){var t=Nn.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",n=this._container=W("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),s=this._wrapper=W("div",t+"-content-wrapper",n);if(this._contentNode=W("div",t+"-content",s),_i(n),En(this._contentNode),St(n,"contextmenu",_e),this._tipContainer=W("div",t+"-tip-container",n),this._tip=W("div",t+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=W("a",t+"-close-button",n);r.setAttribute("role","button"),r.setAttribute("aria-label","Close popup"),r.href="#close",r.innerHTML='<span aria-hidden="true">×</span>',St(r,"click",function(u){Se(u),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,n=t.style;n.width="",n.whiteSpace="nowrap";var s=t.offsetWidth;s=Math.min(s,this.options.maxWidth),s=Math.max(s,this.options.minWidth),n.width=s+1+"px",n.whiteSpace="",n.height="";var r=t.offsetHeight,u=this.options.maxHeight,p="leaflet-popup-scrolled";u&&r>u?(n.height=u+"px",mt(t,p)):te(t,p),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),s=this._getAnchor();le(this._container,n.add(s))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Ci(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+n,r=this._containerWidth,u=new Y(this._containerLeft,-s-this._containerBottom);u._add(On(this._container));var p=t.layerPointToContainerPoint(u),S=rt(this.options.autoPanPadding),C=rt(this.options.autoPanPaddingTopLeft||S),z=rt(this.options.autoPanPaddingBottomRight||S),H=t.getSize(),et=0,_t=0;p.x+r+z.x>H.x&&(et=p.x+r-H.x+z.x),p.x-et-C.x<0&&(et=p.x-C.x),p.y+s+z.y>H.y&&(_t=p.y+s-H.y+z.y),p.y-_t-C.y<0&&(_t=p.y-C.y),(et||_t)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([et,_t]))}},_getAnchor:function(){return rt(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Bc=function(t,n){return new Fo(t,n)};zt.mergeOptions({closePopupOnClick:!0}),zt.include({openPopup:function(t,n,s){return this._initOverlay(Fo,t,n,s).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),Qe.include({bindPopup:function(t,n){return this._popup=this._initOverlay(Fo,this._popup,t,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(t){return this._popup&&(this instanceof Sn||(this._popup._source=this),this._popup._prepareOpen(t||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(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){xn(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof d)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Vo=Nn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Nn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Nn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Nn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=W("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+v(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,s,r=this._map,u=this._container,p=r.latLngToContainerPoint(r.getCenter()),S=r.layerPointToContainerPoint(t),C=this.options.direction,z=u.offsetWidth,H=u.offsetHeight,et=rt(this.options.offset),_t=this._getAnchor();C==="top"?(n=z/2,s=H):C==="bottom"?(n=z/2,s=0):C==="center"?(n=z/2,s=H/2):C==="right"?(n=0,s=H/2):C==="left"?(n=z,s=H/2):S.x<p.x?(C="right",n=0,s=H/2):(C="left",n=z+(et.x+_t.x)*2,s=H/2),t=t.subtract(rt(n,s,!0)).add(et).add(_t),te(u,"leaflet-tooltip-right"),te(u,"leaflet-tooltip-left"),te(u,"leaflet-tooltip-top"),te(u,"leaflet-tooltip-bottom"),mt(u,"leaflet-tooltip-"+C),le(u,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Ie(this._container,t)},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(n)},_getAnchor:function(){return rt(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Dc=function(t,n){return new Vo(t,n)};zt.include({openTooltip:function(t,n,s){return this._initOverlay(Vo,t,n,s).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Qe.include({bindTooltip:function(t,n){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Vo,this._tooltip,t,n),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var n=t?"off":"on",s={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?s.add=this._openTooltip:(s.mouseover=this._openTooltip,s.mouseout=this.closeTooltip,s.click=this._openTooltip,this._map?this._addFocusListeners():s.add=this._addFocusListeners),this._tooltip.options.sticky&&(s.mousemove=this._moveTooltip),this[n](s),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Sn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var n=typeof t.getElement=="function"&&t.getElement();n&&(St(n,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),St(n,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var n=typeof t.getElement=="function"&&t.getElement();n&&n.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var n=this;this._map.once("moveend",function(){n._openOnceFlag=!1,n._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var n=t.latlng,s,r;this._tooltip.options.sticky&&t.originalEvent&&(s=this._map.mouseEventToContainerPoint(t.originalEvent),r=this._map.containerPointToLayerPoint(s),n=this._map.layerPointToLatLng(r)),this._tooltip.setLatLng(n)}});var Va=ln.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var n=t&&t.tagName==="DIV"?t:document.createElement("div"),s=this.options;if(s.html instanceof Element?(Un(n),n.appendChild(s.html)):n.innerHTML=s.html!==!1?s.html:"",s.bgPos){var r=rt(s.bgPos);n.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(n,"icon"),n},createShadow:function(){return null}});function Rc(t){return new Va(t)}ln.Default=Yn;var $s=Qe.extend({options:{tileSize:256,opacity:1,updateWhenIdle:it.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){q(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),Yt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(rn(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(yn(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=P(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof Y?t:new Y(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var n=this.getPane().children,s=-t(-1/0,1/0),r=0,u=n.length,p;r<u;r++)p=n[r].style.zIndex,n[r]!==this._container&&p&&(s=t(s,+p));isFinite(s)&&(this.options.zIndex=s+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!it.ielt9){Ie(this._container,this.options.opacity);var t=+new Date,n=!1,s=!1;for(var r in this._tiles){var u=this._tiles[r];if(!(!u.current||!u.loaded)){var p=Math.min(1,(t-u.loaded)/200);Ie(u.el,p),p<1?n=!0:(u.active?s=!0:this._onOpaqueTile(u),u.active=!0)}}s&&!this._noPrune&&this._pruneTiles(),n&&(G(this._fadeFrame),this._fadeFrame=Tt(this._updateOpacity,this))}},_onOpaqueTile:O,_initContainer:function(){this._container||(this._container=W("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,n=this.options.maxZoom;if(t!==void 0){for(var s in this._levels)s=Number(s),this._levels[s].el.children.length||s===t?(this._levels[s].el.style.zIndex=n-Math.abs(t-s),this._onUpdateLevel(s)):(Yt(this._levels[s].el),this._removeTilesAtZoom(s),this._onRemoveLevel(s),delete this._levels[s]);var r=this._levels[t],u=this._map;return r||(r=this._levels[t]={},r.el=W("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=n,r.origin=u.project(u.unproject(u.getPixelOrigin()),t).round(),r.zoom=t,this._setZoomTransform(r,u.getCenter(),u.getZoom()),O(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:O,_onRemoveLevel:O,_onCreateLevel:O,_pruneTiles:function(){if(this._map){var t,n,s=this._map.getZoom();if(s>this.options.maxZoom||s<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)n=this._tiles[t],n.retain=n.current;for(t in this._tiles)if(n=this._tiles[t],n.current&&!n.active){var r=n.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var n in this._tiles)this._tiles[n].coords.z===t&&this._removeTile(n)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)Yt(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,n,s,r){var u=Math.floor(t/2),p=Math.floor(n/2),S=s-1,C=new Y(+u,+p);C.z=+S;var z=this._tileCoordsToKey(C),H=this._tiles[z];return H&&H.active?(H.retain=!0,!0):(H&&H.loaded&&(H.retain=!0),S>r?this._retainParent(u,p,S,r):!1)},_retainChildren:function(t,n,s,r){for(var u=2*t;u<2*t+2;u++)for(var p=2*n;p<2*n+2;p++){var S=new Y(u,p);S.z=s+1;var C=this._tileCoordsToKey(S),z=this._tiles[C];if(z&&z.active){z.retain=!0;continue}else z&&z.loaded&&(z.retain=!0);s+1<r&&this._retainChildren(u,p,s+1,r)}},_resetView:function(t){var n=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),n,n)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var n=this.options;return n.minNativeZoom!==void 0&&t<n.minNativeZoom?n.minNativeZoom:n.maxNativeZoom!==void 0&&n.maxNativeZoom<t?n.maxNativeZoom:t},_setView:function(t,n,s,r){var u=Math.round(n);this.options.maxZoom!==void 0&&u>this.options.maxZoom||this.options.minZoom!==void 0&&u<this.options.minZoom?u=void 0:u=this._clampZoom(u);var p=this.options.updateWhenZooming&&u!==this._tileZoom;(!r||p)&&(this._tileZoom=u,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),u!==void 0&&this._update(t),s||this._pruneTiles(),this._noPrune=!!s),this._setZoomTransforms(t,n)},_setZoomTransforms:function(t,n){for(var s in this._levels)this._setZoomTransform(this._levels[s],t,n)},_setZoomTransform:function(t,n,s){var r=this._map.getZoomScale(s,t.zoom),u=t.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(n,s)).round();it.any3d?ye(t.el,u,r):le(t.el,u)},_resetGrid:function(){var t=this._map,n=t.options.crs,s=this._tileSize=this.getTileSize(),r=this._tileZoom,u=this._map.getPixelWorldBounds(this._tileZoom);u&&(this._globalTileRange=this._pxBoundsToTileRange(u)),this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],r).x/s.x),Math.ceil(t.project([0,n.wrapLng[1]],r).x/s.y)],this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],r).y/s.x),Math.ceil(t.project([n.wrapLat[1],0],r).y/s.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var n=this._map,s=n._animatingZoom?Math.max(n._animateToZoom,n.getZoom()):n.getZoom(),r=n.getZoomScale(s,this._tileZoom),u=n.project(t,this._tileZoom).floor(),p=n.getSize().divideBy(r*2);return new yt(u.subtract(p),u.add(p))},_update:function(t){var n=this._map;if(n){var s=this._clampZoom(n.getZoom());if(t===void 0&&(t=n.getCenter()),this._tileZoom!==void 0){var r=this._getTiledPixelBounds(t),u=this._pxBoundsToTileRange(r),p=u.getCenter(),S=[],C=this.options.keepBuffer,z=new yt(u.getBottomLeft().subtract([C,-C]),u.getTopRight().add([C,-C]));if(!(isFinite(u.min.x)&&isFinite(u.min.y)&&isFinite(u.max.x)&&isFinite(u.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var H in this._tiles){var et=this._tiles[H].coords;(et.z!==this._tileZoom||!z.contains(new Y(et.x,et.y)))&&(this._tiles[H].current=!1)}if(Math.abs(s-this._tileZoom)>1){this._setView(t,s);return}for(var _t=u.min.y;_t<=u.max.y;_t++)for(var Nt=u.min.x;Nt<=u.max.x;Nt++){var He=new Y(Nt,_t);if(He.z=this._tileZoom,!!this._isValidTile(He)){var Me=this._tiles[this._tileCoordsToKey(He)];Me?Me.current=!0:S.push(He)}}if(S.sort(function(Ge,ps){return Ge.distanceTo(p)-ps.distanceTo(p)}),S.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var un=document.createDocumentFragment();for(Nt=0;Nt<S.length;Nt++)this._addTile(S[Nt],un);this._level.el.appendChild(un)}}}},_isValidTile:function(t){var n=this._map.options.crs;if(!n.infinite){var s=this._globalTileRange;if(!n.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!n.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return qt(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,s=this.getTileSize(),r=t.scaleBy(s),u=r.add(s),p=n.unproject(r,t.z),S=n.unproject(u,t.z);return[p,S]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),s=new ge(n[0],n[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),s=new Y(+n[0],+n[1]);return s.z=+n[2],s},_removeTile:function(t){var n=this._tiles[t];n&&(Yt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){mt(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=O,t.onmousemove=O,it.ielt9&&this.options.opacity<1&&Ie(t,this.options.opacity)},_addTile:function(t,n){var s=this._getTilePos(t),r=this._tileCoordsToKey(t),u=this.createTile(this._wrapCoords(t),h(this._tileReady,this,t));this._initTile(u),this.createTile.length<2&&Tt(h(this._tileReady,this,t,null,u)),le(u,s),this._tiles[r]={el:u,coords:t,current:!0},n.appendChild(u),this.fire("tileloadstart",{tile:u,coords:t})},_tileReady:function(t,n,s){n&&this.fire("tileerror",{error:n,tile:s,coords:t});var r=this._tileCoordsToKey(t);s=this._tiles[r],s&&(s.loaded=+new Date,this._map._fadeAnimated?(Ie(s.el,0),G(this._fadeFrame),this._fadeFrame=Tt(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),n||(mt(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it.ielt9||!this._map._fadeAnimated?Tt(this._pruneTiles,this):setTimeout(h(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new Y(this._wrapX?k(t.x,this._wrapX):t.x,this._wrapY?k(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new yt(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Fc(t){return new $s(t)}var hs=$s.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=q(this,n),n.detectRetina&&it.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(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var s=document.createElement("img");return St(s,"load",h(this._tileOnLoad,this,n,s)),St(s,"error",h(this._tileOnError,this,n,s)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var n={r:it.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=s),n["-y"]=s}return bt(this._url,l(n,this.options))},_tileOnLoad:function(t,n){it.ielt9?setTimeout(h(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,s){var r=this.options.errorTileUrl;r&&n.getAttribute("src")!==r&&(n.src=r),t(s,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,s=this.options.zoomReverse,r=this.options.zoomOffset;return s&&(t=n-t),t+r},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=O,n.onerror=O,!n.complete)){n.src=ft;var s=this._tiles[t].coords;Yt(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:s})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",ft),$s.prototype._removeTile.call(this,t)},_tileReady:function(t,n,s){if(!(!this._map||s&&s.getAttribute("src")===ft))return $s.prototype._tileReady.call(this,t,n,s)}});function Za(t,n){return new hs(t,n)}var $a=hs.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var s=l({},this.defaultWmsParams);for(var r in n)r in this.options||(s[r]=n[r]);n=q(this,n);var u=n.detectRetina&&it.retina?2:1,p=this.getTileSize();s.width=p.x*u,s.height=p.y*u,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,hs.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),s=this._crs,r=Kt(s.project(n[0]),s.project(n[1])),u=r.min,p=r.max,S=(this._wmsVersion>=1.3&&this._crs===Vs?[u.y,u.x,p.y,p.x]:[u.x,u.y,p.x,p.y]).join(","),C=hs.prototype.getTileUrl.call(this,t);return C+At(this.wmsParams,C,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+S},setParams:function(t,n){return l(this.wmsParams,t),n||this.redraw(),this}});function Vc(t,n){return new $a(t,n)}hs.WMS=$a,Za.wms=Vc;var Qn=Qe.extend({options:{padding:.1},initialize:function(t){q(this,t),v(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),mt(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 t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var s=this._map.getZoomScale(n,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),u=this._map.project(this._center,n),p=r.multiplyBy(-s).add(u).subtract(this._map._getNewPixelOrigin(t,n));it.any3d?ye(this._container,p,s):le(this._container,p)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),s=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new yt(s,s.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ha=Qn.extend({options:{tolerance:0},getEvents:function(){var t=Qn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Qn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");St(t,"mousemove",this._onMouseMove,this),St(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),St(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){G(this._redrawRequest),delete this._ctx,Yt(this._container),Jt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qn.prototype._update.call(this);var t=this._bounds,n=this._container,s=t.getSize(),r=it.retina?2:1;le(n,t.min),n.width=r*s.x,n.height=r*s.y,n.style.width=s.x+"px",n.style.height=s.y+"px",it.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Qn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[v(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,s=n.next,r=n.prev;s?s.prev=r:this._drawLast=r,r?r.next=s:this._drawFirst=s,delete t._order,delete this._layers[v(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),s=[],r,u;for(u=0;u<n.length;u++){if(r=Number(n[u]),isNaN(r))return;s.push(r)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||Tt(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var n=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new yt,this._redrawBounds.extend(t._pxBounds.min.subtract([n,n])),this._redrawBounds.extend(t._pxBounds.max.add([n,n]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var n=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,n.x,n.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,n=this._redrawBounds;if(this._ctx.save(),n){var s=n.getSize();this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,s.x,s.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!n||t._pxBounds&&t._pxBounds.intersects(n))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,n){if(this._drawing){var s,r,u,p,S=t._parts,C=S.length,z=this._ctx;if(C){for(z.beginPath(),s=0;s<C;s++){for(r=0,u=S[s].length;r<u;r++)p=S[s][r],z[r?"lineTo":"moveTo"](p.x,p.y);n&&z.closePath()}this._fillStroke(z,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var n=t._point,s=this._ctx,r=Math.max(Math.round(t._radius),1),u=(Math.max(Math.round(t._radiusY),1)||r)/r;u!==1&&(s.save(),s.scale(1,u)),s.beginPath(),s.arc(n.x,n.y/u,r,0,Math.PI*2,!1),u!==1&&s.restore(),this._fillStroke(s,t)}},_fillStroke:function(t,n){var s=n.options;s.fill&&(t.globalAlpha=s.fillOpacity,t.fillStyle=s.fillColor||s.color,t.fill(s.fillRule||"evenodd")),s.stroke&&s.weight!==0&&(t.setLineDash&&t.setLineDash(n.options&&n.options._dashArray||[]),t.globalAlpha=s.opacity,t.lineWidth=s.weight,t.strokeStyle=s.color,t.lineCap=s.lineCap,t.lineJoin=s.lineJoin,t.stroke())},_onClick:function(t){for(var n=this._map.mouseEventToLayerPoint(t),s,r,u=this._drawFirst;u;u=u.next)s=u.layer,s.options.interactive&&s._containsPoint(n)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(s))&&(r=s);this._fireEvent(r?[r]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var n=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,n)}},_handleMouseOut:function(t){var n=this._hoveredLayer;n&&(te(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,n){if(!this._mouseHoverThrottled){for(var s,r,u=this._drawFirst;u;u=u.next)s=u.layer,s.options.interactive&&s._containsPoint(n)&&(r=s);r!==this._hoveredLayer&&(this._handleMouseOut(t),r&&(mt(this._container,"leaflet-interactive"),this._fireEvent([r],t,"mouseover"),this._hoveredLayer=r)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(h(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,n,s){this._map._fireDOMEvent(n,s||n.type,t)},_bringToFront:function(t){var n=t._order;if(n){var s=n.next,r=n.prev;if(s)s.prev=r;else return;r?r.next=s:s&&(this._drawFirst=s),n.prev=this._drawLast,this._drawLast.next=n,n.next=null,this._drawLast=n,this._requestRedraw(t)}},_bringToBack:function(t){var n=t._order;if(n){var s=n.next,r=n.prev;if(r)r.next=s;else return;s?s.prev=r:r&&(this._drawLast=r),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)}}});function Ua(t){return it.canvas?new Ha(t):null}var Hs=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Zc={_initContainer:function(){this._container=W("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Qn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=Hs("shape");mt(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=Hs("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[v(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;Yt(n),t.removeInteractiveTarget(n),delete this._layers[v(t)]},_updateStyle:function(t){var n=t._stroke,s=t._fill,r=t.options,u=t._container;u.stroked=!!r.stroke,u.filled=!!r.fill,r.stroke?(n||(n=t._stroke=Hs("stroke")),u.appendChild(n),n.weight=r.weight+"px",n.color=r.color,n.opacity=r.opacity,r.dashArray?n.dashStyle=ut(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=r.lineCap.replace("butt","flat"),n.joinstyle=r.lineJoin):n&&(u.removeChild(n),t._stroke=null),r.fill?(s||(s=t._fill=Hs("fill")),u.appendChild(s),s.color=r.fillColor||r.color,s.opacity=r.fillOpacity):s&&(u.removeChild(s),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),s=Math.round(t._radius),r=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+s+","+r+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){rn(t._container)},_bringToBack:function(t){yn(t._container)}},Zo=it.vml?Hs:B,Us=Qn.extend({_initContainer:function(){this._container=Zo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Yt(this._container),Jt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qn.prototype._update.call(this);var t=this._bounds,n=t.getSize(),s=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,s.setAttribute("width",n.x),s.setAttribute("height",n.y)),le(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=Zo("path");t.options.className&&mt(n,t.options.className),t.options.interactive&&mt(n,"leaflet-interactive"),this._updateStyle(t),this._layers[v(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Yt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[v(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,s=t.options;n&&(s.stroke?(n.setAttribute("stroke",s.color),n.setAttribute("stroke-opacity",s.opacity),n.setAttribute("stroke-width",s.weight),n.setAttribute("stroke-linecap",s.lineCap),n.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?n.setAttribute("stroke-dasharray",s.dashArray):n.removeAttribute("stroke-dasharray"),s.dashOffset?n.setAttribute("stroke-dashoffset",s.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),s.fill?(n.setAttribute("fill",s.fillColor||s.color),n.setAttribute("fill-opacity",s.fillOpacity),n.setAttribute("fill-rule",s.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,I(t._parts,n))},_updateCircle:function(t){var n=t._point,s=Math.max(Math.round(t._radius),1),r=Math.max(Math.round(t._radiusY),1)||s,u="a"+s+","+r+" 0 1,0 ",p=t._empty()?"M0 0":"M"+(n.x-s)+","+n.y+u+s*2+",0 "+u+-s*2+",0 ";this._setPath(t,p)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){rn(t._path)},_bringToBack:function(t){yn(t._path)}});it.vml&&Us.include(Zc);function ja(t){return it.svg||it.vml?new Us(t):null}zt.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&Ua(t)||ja(t)}});var Wa=ds.extend({initialize:function(t,n){ds.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=qt(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function $c(t,n){return new Wa(t,n)}Us.create=Zo,Us.pointsToPath=I,Xn.geometryToLayer=Io,Xn.coordsToLatLng=Zr,Xn.coordsToLatLngs=No,Xn.latLngToCoords=$r,Xn.latLngsToCoords=Bo,Xn.getFeature=fs,Xn.asFeature=Do,zt.mergeOptions({boxZoom:!0});var Ka=ee.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Jt(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(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),mi(),Ns(),this._startPoint=this._map.mouseEventToContainerPoint(t),St(document,{contextmenu:xn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=W("div","leaflet-zoom-box",this._container),mt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new yt(this._point,this._startPoint),s=n.getSize();le(this._box,n.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(Yt(this._box),te(this._container,"leaflet-crosshair")),Ei(),Bs(),Jt(document,{contextmenu:xn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(h(this._resetState,this),0);var n=new ge(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});zt.addInitHook("addHandler","boxZoom",Ka),zt.mergeOptions({doubleClickZoom:!0});var qa=ee.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,s=n.getZoom(),r=n.options.zoomDelta,u=t.originalEvent.shiftKey?s-r:s+r;n.options.doubleClickZoom==="center"?n.setZoom(u):n.setZoomAround(t.containerPoint,u)}});zt.addInitHook("addHandler","doubleClickZoom",qa),zt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ga=ee.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new qe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}mt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){te(this._map._container,"leaflet-grab"),te(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 t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=qt(this._map.options.maxBounds);this._offsetLimit=Kt(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;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.x<n.min.x&&(t.x=this._viscousLimit(t.x,n.min.x)),t.y<n.min.y&&(t.y=this._viscousLimit(t.y,n.min.y)),t.x>n.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),s=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-n+s)%t+n-s,p=(r+n+s)%t-n-s,S=Math.abs(u+s)<Math.abs(p+s)?u:p;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=S},_onDragEnd:function(t){var n=this._map,s=n.options,r=!s.inertia||t.noInertia||this._times.length<2;if(n.fire("dragend",t),r)n.fire("moveend");else{this._prunePositions(+new Date);var u=this._lastPos.subtract(this._positions[0]),p=(this._lastTime-this._times[0])/1e3,S=s.easeLinearity,C=u.multiplyBy(S/p),z=C.distanceTo([0,0]),H=Math.min(s.inertiaMaxSpeed,z),et=C.multiplyBy(H/z),_t=H/(s.inertiaDeceleration*S),Nt=et.multiplyBy(-_t/2).round();!Nt.x&&!Nt.y?n.fire("moveend"):(Nt=n._limitOffset(Nt,n.options.maxBounds),Tt(function(){n.panBy(Nt,{duration:_t,easeLinearity:S,noMoveStart:!0,animate:!0})}))}}});zt.addInitHook("addHandler","dragging",Ga),zt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Ya=ee.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),St(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Jt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,n=document.documentElement,s=t.scrollTop||n.scrollTop,r=t.scrollLeft||n.scrollLeft;this._map._container.focus(),window.scrollTo(r,s)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var n=this._panKeys={},s=this.keyCodes,r,u;for(r=0,u=s.left.length;r<u;r++)n[s.left[r]]=[-1*t,0];for(r=0,u=s.right.length;r<u;r++)n[s.right[r]]=[t,0];for(r=0,u=s.down.length;r<u;r++)n[s.down[r]]=[0,t];for(r=0,u=s.up.length;r<u;r++)n[s.up[r]]=[0,-1*t]},_setZoomDelta:function(t){var n=this._zoomKeys={},s=this.keyCodes,r,u;for(r=0,u=s.zoomIn.length;r<u;r++)n[s.zoomIn[r]]=t;for(r=0,u=s.zoomOut.length;r<u;r++)n[s.zoomOut[r]]=-t},_addHooks:function(){St(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Jt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var n=t.keyCode,s=this._map,r;if(n in this._panKeys){if(!s._panAnim||!s._panAnim._inProgress)if(r=this._panKeys[n],t.shiftKey&&(r=rt(r).multiplyBy(3)),s.options.maxBounds&&(r=s._limitOffset(rt(r),s.options.maxBounds)),s.options.worldCopyJump){var u=s.wrapLatLng(s.unproject(s.project(s.getCenter()).add(r)));s.panTo(u)}else s.panBy(r)}else if(n in this._zoomKeys)s.setZoom(s.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else if(n===27&&s._popup&&s._popup.options.closeOnEscapeKey)s.closePopup();else return;xn(t)}}});zt.addInitHook("addHandler","keyboard",Ya),zt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ja=ee.extend({addHooks:function(){St(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Jt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var n=To(t),s=this._map.options.wheelDebounceTime;this._delta+=n,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(s-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(h(this._performZoom,this),r),xn(t)},_performZoom:function(){var t=this._map,n=t.getZoom(),s=this._map.options.zoomSnap||0;t._stop();var r=this._delta/(this._map.options.wheelPxPerZoomLevel*4),u=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,p=s?Math.ceil(u/s)*s:u,S=t._limitZoom(n+(this._delta>0?p:-p))-n;this._delta=0,this._startTime=null,S&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+S):t.setZoomAround(this._lastMousePos,n+S))}});zt.addInitHook("addHandler","scrollWheelZoom",Ja);var Hc=600;zt.mergeOptions({tapHold:it.touchNative&&it.safari&&it.mobile,tapTolerance:15});var Xa=ee.extend({addHooks:function(){St(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Jt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new Y(n.clientX,n.clientY),this._holdTimeout=setTimeout(h(function(){this._cancel(),this._isTapValid()&&(St(document,"touchend",Se),St(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),Hc),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Jt(document,"touchend",Se),Jt(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Jt(document,"touchend touchcancel contextmenu",this._cancel,this),Jt(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new Y(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});s._simulated=!0,n.target.dispatchEvent(s)}});zt.addInitHook("addHandler","tapHold",Xa),zt.mergeOptions({touchZoom:it.touch,bounceAtZoomLimits:!0});var Qa=ee.extend({addHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),St(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){te(this._map._container,"leaflet-touch-zoom"),Jt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var s=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(s.add(r)._divideBy(2))),this._startDist=s.distanceTo(r),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),St(document,"touchmove",this._onTouchMove,this),St(document,"touchend touchcancel",this._onTouchEnd,this),Se(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,s=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]),u=s.distanceTo(r)/this._startDist;if(this._zoom=n.getScaleZoom(u,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&u<1||this._zoom>n.getMaxZoom()&&u>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,u===1)return}else{var p=s._add(r)._divideBy(2)._subtract(this._centerPoint);if(u===1&&p.x===0&&p.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(p),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),G(this._animRequest);var S=h(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Tt(S,this,!0),Se(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,G(this._animRequest),Jt(document,"touchmove",this._onTouchMove,this),Jt(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))}});zt.addInitHook("addHandler","touchZoom",Qa),zt.BoxZoom=Ka,zt.DoubleClickZoom=qa,zt.Drag=Ga,zt.Keyboard=Ya,zt.ScrollWheelZoom=Ja,zt.TapHold=Xa,zt.TouchZoom=Qa,o.Bounds=yt,o.Browser=it,o.CRS=Pe,o.Canvas=Ha,o.Circle=Ht,o.CircleMarker=Z,o.Class=It,o.Control=$e,o.DivIcon=Va,o.DivOverlay=Nn,o.DomEvent=Lo,o.DomUtil=zr,o.Draggable=qe,o.Evented=Vt,o.FeatureGroup=Sn,o.GeoJSON=Xn,o.GridLayer=$s,o.Handler=ee,o.Icon=ln,o.ImageOverlay=Ro,o.LatLng=Ut,o.LatLngBounds=ge,o.Layer=Qe,o.LayerGroup=bi,o.LineUtil=wn,o.Map=zt,o.Marker=cs,o.Mixin=vi,o.Path=d,o.Point=Y,o.PolyUtil=Oo,o.Polygon=ds,o.Polyline=Jn,o.Popup=Fo,o.PosAnimation=Ai,o.Projection=Eo,o.Rectangle=Wa,o.Renderer=Qn,o.SVG=Us,o.SVGOverlay=Fa,o.TileLayer=hs,o.Tooltip=Vo,o.Transformation=gn,o.Util=st,o.VideoOverlay=Ra,o.bind=h,o.bounds=Kt,o.canvas=Ua,o.circle=Cc,o.circleMarker=w,o.control=Ii,o.divIcon=Rc,o.extend=l,o.featureGroup=se,o.geoJSON=Da,o.geoJson=zc,o.gridLayer=Fc,o.icon=Zs,o.imageOverlay=Ac,o.latLng=Pt,o.latLngBounds=qt,o.layerGroup=us,o.map=ss,o.marker=y,o.point=rt,o.polygon=Ec,o.polyline=Oc,o.popup=Bc,o.rectangle=$c,o.setOptions=q,o.stamp=v,o.svg=ja,o.svgOverlay=Nc,o.tileLayer=Za,o.tooltip=Dc,o.transformation=_,o.version=a,o.videoOverlay=Ic;var Uc=window.L;o.noConflict=function(){return window.L=Uc,this},window.L=o}))})(Js,Js.exports)),Js.exports}var Cp=Mp();const qo=Tp(Cp),Xl={__name:"DeviceMap",props:{position:{type:Object,default:null},trail:{type:Array,default:()=>[]}},setup(e){const i=e,o=J(null);let a,l,c;function h(){if(!a)return;const g=i.position;if(g&&(g.lat||g.lng)){const v=[g.lat,g.lng];l?l.setLatLng(v):(l=qo.marker(v).addTo(a),a.setView(v,17))}if(c&&c.remove(),i.trail.length){const v=getComputedStyle(document.documentElement).getPropertyValue("--accent").trim()||"#3D7BF0";c=qo.polyline(i.trail,{color:v,weight:3}).addTo(a)}}return Ls(()=>{a=qo.map(o.value,{zoomControl:!0}).setView([20,0],2),qo.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap",maxZoom:19}).addTo(a),setTimeout(()=>a.invalidateSize(),60),h()}),Je(()=>i.position,h,{deep:!0}),Je(()=>i.trail,h,{deep:!0}),(g,v)=>(b(),x("div",{ref_key:"el",ref:o,class:"h-[320px] w-full rounded-lg"},null,512))}},Op=["width","height","stroke-width"],Ep=["d"],tt={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},stroke:{type:[Number,String],default:2}},setup(e){const a=({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",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"}[e.name]||"").split(" M").map((l,c)=>c?"M"+l:l);return(l,c)=>(b(),x("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":e.stroke,"stroke-linecap":"round","stroke-linejoin":"round",style:{flex:"none"},"aria-hidden":"true"},[(b(!0),x(wt,null,ce(Ct(a),(h,g)=>(b(),x("path",{key:g,d:h},null,8,Ep))),128))],8,Op))}},zp=["aria-checked","disabled"],tn={__name:"Toggle",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:i}){const o=i;return(a,l)=>(b(),x("button",{type:"button",role:"switch","aria-checked":e.modelValue,disabled:e.disabled,class:Ot(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition disabled:opacity-40",e.modelValue?"bg-accent":"bg-surface-2 border border-line-strong"]),onClick:l[0]||(l[0]=c=>o("update:modelValue",!e.modelValue))},[f("span",{class:Ot(["inline-block h-4 w-4 transform rounded-full bg-white shadow-sm transition",e.modelValue?"translate-x-6":"translate-x-1"])},null,2)],10,zp))}},Ap={class:"inline-flex rounded-[10px] border border-line bg-surface-2 p-0.5"},Ip=["onClick"],dn={__name:"Segmented",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:i}){const o=i;return(a,l)=>(b(),x("div",Ap,[(b(!0),x(wt,null,ce(e.options,c=>(b(),x("button",{key:c.value,type:"button",class:Ot(["inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[13px] font-semibold transition",e.modelValue===c.value?"bg-surface-1 text-ink shadow-xs":"text-ink-secondary hover:text-ink"]),onClick:h=>o("update:modelValue",c.value)},[c.icon?(b(),oe(tt,{key:0,name:c.icon,size:15},null,8,["name"])):V("",!0),N(" "+M(c.label),1)],10,Ip))),128))]))}},Np={class:"text-sm font-semibold text-ink"},Bp={key:0,class:"mt-0.5 text-xs text-ink-muted"},lt={__name:"Row",props:{title:{type:String,default:""},desc:{type:String,default:""},keywords:{type:String,default:""},block:{type:Boolean,default:!1}},setup(e){const i=e,o=eo("settingsSearch",{value:""}),a=ht(()=>{const l=(o.value||"").trim().toLowerCase();return l?`${i.title} ${i.desc} ${i.keywords}`.toLowerCase().includes(l):!0});return(l,c)=>a.value?(b(),x("div",{key:0,class:Ot(["border-b border-line py-4 last:border-0",e.block?"":"flex items-center justify-between gap-6"])},[f("div",{class:Ot(e.block?"mb-3":"min-w-0")},[f("div",Np,M(e.title),1),e.desc?(b(),x("div",Bp,M(e.desc),1)):V("",!0)],2),f("div",{class:Ot(e.block?"":"shrink-0")},[af(l.$slots,"default")],2)],2)):V("",!0)}},Dp=(e,i)=>{const o=e.__vccOpts||e;for(const[a,l]of i)o[a]=l;return o},Rp={class:"mx-auto max-w-[1280px] p-7"},Fp={class:"mb-5 flex flex-wrap items-end justify-between gap-4"},Vp={class:"flex h-10 w-full max-w-[280px] items-center gap-2 rounded border border-line-strong bg-surface-1 px-3"},Zp={class:"grid grid-cols-[210px_1fr] gap-6 max-[760px]:grid-cols-1"},$p={class:"flex flex-col gap-0.5 max-[760px]:flex-row max-[760px]:overflow-x-auto"},Hp=["onClick"],Up={class:"whitespace-nowrap"},jp={class:"min-w-0"},Wp={key:0,class:"panel p-10 text-center text-sm text-ink-muted"},Kp={key:0,class:"eyebrow mb-2 mt-5 first:mt-0 flex items-center gap-2"},qp={key:1,class:"panel mb-5 p-5"},Gp={class:"flex items-center gap-1"},Yp={class:"flex items-center gap-2"},Jp={class:"font-mono text-sm text-ink"},Xp={class:"inline-flex items-center gap-1 rounded-full bg-amber-soft px-2 py-0.5 text-[11px] font-semibold text-amber-fg"},Qp={key:0,class:"mt-2 text-xs text-ink-muted"},tm={class:"grid max-w-[420px] gap-2"},em={class:"flex items-center gap-3"},nm={key:2,class:"panel mb-5 p-5"},im=["value"],sm=["value"],om=["value"],rm={class:"font-mono text-sm text-ink"},am={key:3},lm={key:0,class:"mb-5 flex items-center gap-1 overflow-x-auto border-b border-line"},um=["onClick"],cm={key:1,class:"panel mb-5 p-5"},dm={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},fm={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},hm={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},pm={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"},mm={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},gm={key:0},_m={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},vm={class:"font-semibold text-ink-secondary"},ym={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},bm={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"},xm={class:"flex items-center justify-between gap-3"},wm={class:"flex items-center gap-2 text-sm font-semibold text-ink"},km={key:0,class:"text-[11px] text-ink-muted"},Sm={class:"mt-2 flex items-baseline gap-1.5"},Pm={class:"font-mono text-2xl font-semibold text-ink"},Tm={class:"text-sm text-ink-muted"},Lm={class:"mt-2 h-2 w-full overflow-hidden rounded-full bg-line"},Mm={class:"mt-2 text-xs text-ink-muted"},Cm={class:"mt-2 text-sm text-ink"},Om={class:"font-semibold"},Em={class:"mt-1 text-xs text-ink-muted"},zm={key:1,class:"mt-2 text-xs text-ink-muted"},Am={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},Im={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"},Nm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Bm={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"},Dm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Rm={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"},Fm={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},Vm={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"},Zm={key:8,class:"border-b border-line py-3 text-xs text-amber-fg"},$m={class:"mt-4 flex flex-wrap items-center gap-3"},Hm=["disabled"],Um=["disabled"],jm={key:2,class:"text-xs text-danger-fg"},Wm={class:"panel mb-5 p-5"},Km={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"},Gm={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Ym={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"},Jm={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Xm={key:0},Qm={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},tg={class:"font-semibold text-ink-secondary"},eg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},ng={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},ig={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"},sg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},og={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"},rg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},ag={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"},lg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},ug={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"},dg={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"},fg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},hg={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"},pg={key:0,class:"inline-flex items-center gap-2 font-mono 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"},_g={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"},vg={key:0,class:"inline-flex items-center gap-2 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"},bg={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"},wg={class:"mt-4 flex flex-wrap items-center gap-3"},kg=["disabled"],Sg=["disabled"],Pg={key:2,class:"text-xs text-danger-fg"},Tg={key:3,class:"text-[11px] text-ink-muted"},Lg={class:"panel mb-5 p-5"},Mg={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},Cg={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},Og={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},Eg={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"},zg={key:4,class:"border-b border-line py-3 text-xs text-amber-fg"},Ag={key:0},Ig={key:5,class:"border-b border-line py-3 text-xs text-ink-muted"},Ng={class:"font-semibold text-ink-secondary"},Bg={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},Dg={key:0,class:"inline-flex items-center gap-2 break-all font-mono text-sm text-ink"},Rg={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"},Fg={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"},Zg={key:0,class:"inline-flex items-center gap-2 font-mono text-sm text-ink"},$g={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 text-sm text-ink"},Ug={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"},Wg={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"},Kg={class:"mt-4 flex flex-wrap items-center gap-3"},qg=["disabled"],Gg=["disabled"],Yg={key:2,class:"text-xs text-danger-fg"},Jg={key:3,class:"text-[11px] text-ink-muted"},Xg={key:3,class:"panel mb-5 p-5"},Qg={class:"mb-4 flex items-start gap-3 border-b border-line pb-4"},t_={class:"grid h-10 w-10 place-items-center rounded-lg bg-accent-soft text-accent-soft-fg"},e_={key:0,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},n_={key:1,class:"mb-4 rounded-lg border border-line bg-surface-2 px-4 py-3 text-xs text-ink-secondary"},i_={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"},s_={key:5,class:"border-b border-line py-3 text-xs text-amber-fg"},o_={key:0},r_={key:6,class:"border-b border-line py-3 text-xs text-ink-muted"},a_={class:"font-semibold text-ink-secondary"},l_={key:7,class:"border-b border-line py-3 text-xs text-ink-muted"},u_={class:"flex w-full flex-col gap-2"},c_={class:"break-all font-mono text-sm text-ink"},d_={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"},f_={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"},h_={key:0,class:"text-xs text-ink-muted"},p_={key:1,class:"border-b border-line py-3 text-xs text-ink-muted"},m_={key:0,class:"inline-flex items-center gap-2 text-sm text-ink"},g_={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"},__={class:"mt-4 flex flex-wrap items-center gap-3"},v_=["disabled"],y_=["disabled"],b_={key:2,class:"text-xs text-danger-fg"},x_={key:3,class:"text-[11px] text-ink-muted"},w_={key:4,class:"panel mb-5 p-5"},k_={class:"flex items-center gap-4"},S_=["src"],P_={key:1,class:"grid h-16 w-16 place-items-center rounded-full bg-[var(--navy-800)] text-lg font-bold text-white"},T_={class:"flex gap-2"},L_={class:"btn-ghost cursor-pointer"},M_={class:"mt-1 text-right text-[11px] text-ink-muted"},C_={key:5,class:"panel mb-5 p-5"},O_={class:"flex items-center gap-3"},E_={key:0,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},z_={class:"flex flex-wrap items-center gap-4"},A_={class:"min-w-0"},I_={class:"mt-1 select-all font-mono text-sm font-bold text-ink"},N_={class:"mt-3 flex items-center gap-2"},B_={key:0,class:"mt-2 text-xs text-danger-fg"},D_={key:1,class:"mt-4 rounded-lg border border-line bg-surface-2 p-4"},R_={class:"mt-2 grid grid-cols-2 gap-1 font-mono text-xs text-ink-secondary sm:grid-cols-4"},F_={class:"rounded-lg border border-line bg-surface-2 p-3"},V_={class:"flex items-center gap-3"},Z_={class:"grid h-9 w-9 place-items-center rounded-full bg-accent-soft text-accent-soft-fg"},$_={class:"min-w-0 flex-1"},H_={class:"text-sm font-semibold text-ink"},U_={class:"font-mono text-[11px] text-ink-muted"},j_={key:6,class:"mb-5"},W_={key:0,class:"panel mb-5 p-5"},K_={class:"grid max-w-[520px] gap-2"},q_={class:"flex flex-wrap gap-2"},G_=["disabled","title"],Y_=["value"],J_=["value"],X_={class:"flex items-center gap-2 py-1 text-sm text-ink-secondary"},Q_={class:"flex items-center gap-3"},tv=["disabled"],ev={key:0,class:"text-xs text-danger-fg"},nv={key:1,class:"text-xs text-ink-muted"},iv={key:1,class:"panel mb-5 p-5"},sv={class:"grid max-w-[520px] gap-2"},ov={class:"flex flex-wrap gap-2"},rv=["value"],av=["value"],lv={key:1,class:"text-xs text-ink-muted"},uv={class:"font-semibold text-ink-secondary"},cv={class:"flex items-center gap-3"},dv=["disabled"],fv={key:0,class:"text-xs text-danger-fg"},hv={class:"panel overflow-hidden p-0"},pv={class:"flex items-center justify-between px-5 py-4"},mv=["disabled"],gv={key:0,class:"px-5 pb-5 text-sm text-danger-fg"},_v={key:1,class:"px-5 pb-8 text-sm text-ink-muted"},vv={key:2,class:"overflow-x-auto"},yv={class:"w-full border-collapse text-sm"},bv={class:"text-left"},xv={class:"px-5 py-3"},wv={class:"text-ink"},kv={key:0,class:"ml-1.5 text-[11px] text-ink-muted"},Sv={class:"px-5 py-3"},Pv={class:"px-5 py-3"},Tv={class:"px-5 py-3"},Lv={class:"px-5 py-3 text-right"},Mv=["onClick"],Cv={key:1,class:"inline-flex items-center gap-1.5"},Ov=["onClick"],Ev=["onClick"],zv={key:7,class:"mb-5"},Av={key:0,class:"panel mb-5 p-5"},Iv={class:"grid max-w-[520px] gap-2"},Nv={class:"flex items-center gap-3"},Bv={key:0,class:"text-xs text-danger-fg"},Dv={key:1,class:"panel mb-5 p-5"},Rv={class:"grid max-w-[520px] gap-2"},Fv={class:"flex items-center gap-3"},Vv=["disabled"],Zv={key:0,class:"text-xs text-danger-fg"},$v={class:"panel overflow-hidden p-0"},Hv={key:0,class:"px-5 pb-8 text-sm text-ink-muted"},Uv={key:1,class:"overflow-x-auto"},jv={class:"w-full border-collapse text-sm"},Wv={class:"text-left"},Kv={class:"px-5 py-3"},qv={class:"inline-flex items-center gap-2 text-ink"},Gv={class:"px-5 py-3 text-ink-secondary"},Yv={class:"px-5 py-3 text-right"},Jv=["onClick"],Xv={key:1,class:"inline-flex items-center gap-1.5"},Qv=["onClick"],ty=["disabled","title","onClick"],ey={key:8,class:"mb-5"},ny={class:"panel mb-5 p-5"},iy={class:"btn-ghost cursor-pointer"},sy={key:0,class:"mt-2 text-xs text-ink-muted"},oy={class:"rounded-lg border p-5",style:{"border-color":"color-mix(in srgb, var(--danger) 35%, transparent)",background:"var(--danger-soft)"}},ry={class:"flex items-center gap-2 text-danger-fg"},ay={class:"mt-4 rounded-lg border border-line bg-surface-1 p-4"},ly={class:"mt-3 flex items-start gap-2 text-sm text-ink-secondary"},uy={class:"mt-3"},cy={class:"eyebrow mb-1 block"},dy={class:"text-ink"},fy=["placeholder"],hy={class:"mt-4 flex flex-wrap items-center gap-3"},py=["disabled"],my=["disabled"],gy={key:2,class:"text-xs text-ink-muted"},_y={key:0,class:"mt-3 rounded border border-line bg-surface-2 px-3 py-2 text-xs text-ink-secondary"},vy={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"},Ql="pv.opensky.health",tu="pv.filetransfer.health",eu="pv.webdav.health",nu="pv.localstorage.health",yy={__name:"Settings",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(e,{emit:i}){const o=e,a=i,l=ht(()=>o.role==="superadmin"),c=ht(()=>o.role==="admin"||o.role==="superadmin");function h(y){return y==="superadmin"?"Superadmin":y==="admin"?"Admin":"User"}function g(y){return y==="superadmin"||y==="admin"?"shield":"user"}function v(y){return y==="superadmin"||y==="admin"?P.accent:P.neutral}const P={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=ht(()=>{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 c.value&&y.push({id:"team",label:"User management",icon:"users",kw:"users team members add remove create delete role admin permissions rights organization"}),l.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}),O=J("account"),$=J("");Au("settingsSearch",$);const F=ht(()=>$.value.trim().length>0),nt=ht(()=>$.value.trim().toLowerCase());function q(y){return nt.value?(y.label+" "+y.kw).toLowerCase().includes(nt.value)||Dt(y.id):!0}const At={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 Dt(y){return nt.value?(At[y]||[]).some(d=>d.includes(nt.value)):!0}const bt=ht(()=>F.value?k.value.filter(q):k.value.filter(y=>y.id===O.value)),ut=ht({get:()=>Gi.value,set:y=>ar(y)}),X=[{value:"light",label:"Light",icon:"sun"},{value:"dark",label:"Dark",icon:"moon"},{value:"system",label:"System",icon:"monitor"}],ft=[{value:"sm",label:"Small"},{value:"md",label:"Default"},{value:"lg",label:"Large"}],jt=[{value:"12",label:"12-hour"},{value:"24",label:"24-hour"}],de=[["en","English"],["es","Español"],["de","Deutsch"],["fr","Français"],["pl","Polski"],["ja","日本語"]],me=[["US","United States"],["GB","United Kingdom"],["EU","European Union"],["CA","Canada"],["AU","Australia"],["JP","Japan"]],vt=[["MDY","MM/DD/YYYY"],["DMY","DD/MM/YYYY"],["YMD","YYYY/MM/DD"],["ISO","YYYY-MM-DD"]],Ft=J(Date.now());let Tt=null;const G=ht(()=>Gl(Ft.value)),st=xe({loaded:!1,available:!1,orgEnabled:!0,allowAnonymous:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),It=J("user"),Wt=xe({clientId:"",clientSecret:"",plan:"",bbox:""}),kt=J(""),Vt=J(!1),Y=J(!1),ue=J(null),rt=J(null),yt=ht(()=>ue.value&&ue.value.credits||null),Kt=ht(()=>{const y=yt.value;return!y||!y.daily||y.remaining==null?null:Math.max(0,Math.min(100,Math.round(y.remaining/y.daily*100)))}),ge=ht(()=>{const y=Kt.value;return y==null?"bg-accent":y<=10?"bg-danger":y<=30?"bg-amber":"bg-success"});function qt(y){return typeof y=="number"?y.toLocaleString():y}function Ut(){if(!rt.value)return"";const y=Math.max(0,Math.round((Date.now()-rt.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function Pt(){try{ue.value&&localStorage.setItem(Ql,JSON.stringify({health:ue.value,ts:rt.value}))}catch{}}function Pe(){try{const y=localStorage.getItem(Ql);if(!y)return;const d=JSON.parse(y);d&&d.health&&(ue.value=d.health,rt.value=d.ts||null)}catch{}}const Te=[{value:"",label:"Not set"},{value:"anonymous",label:"Anonymous"},{value:"standard",label:"Standard"},{value:"contributor",label:"Contributor"}],nn=[{value:"user",label:"My settings",icon:"user"},{value:"org",label:"Organization",icon:"users"}],we=ht(()=>st.isSuperadmin),gn=ht(()=>st.isSuperadmin?"user":It.value),_=ht(()=>st.scopes[gn.value]||{editableLayer:"user",fields:{}}),m=ht(()=>gn.value==="org");function T(y){return _.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function B(y){return we.value||T(y).locked}function I(y){const d=T(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function D(){Wt.clientId=T("clientId").own||"",Wt.clientSecret=T("clientSecret").own||"",Wt.plan=T("plan").own||"",Wt.bbox=T("bbox").own||""}function j(y){st.available=!!y.available,st.orgEnabled=y.orgEnabled!==!1,st.allowAnonymous=!!y.allowAnonymous,st.enabled=!!y.enabled,st.canEditOrg=!!y.canEditOrg,st.isSuperadmin=!!y.isSuperadmin,st.scopes=y.scopes||{},It.value==="org"&&!st.canEditOrg&&(It.value="user"),D(),st.loaded=!0}Je(It,()=>{kt.value="",D()});async function A(){Pe();const{ok:y,body:d}=await Gh();y&&j(d)}async function U(y){const d=m.value;d?st.orgEnabled=y:st.enabled=y;const{ok:Z,body:w}=await jl(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(j(w),Zt(d?y?"OpenSky enabled for your organization.":"OpenSky disabled for your organization.":y?"OpenSky enabled.":"OpenSky disabled.")):(d?st.orgEnabled=!y:st.enabled=!y,Zt(w.error||"Could not update."))}async function R(){kt.value="",Vt.value=!0;const y={};for(const Ht of["clientId","clientSecret","plan","bbox"])B(Ht)||(y[Ht]=Wt[Ht]);const d={scope:gn.value,config:y};m.value||(d.enabled=st.enabled);const{ok:Z,body:w}=await jl(d);if(Vt.value=!1,!Z){kt.value=w.error||"Could not save settings.";return}j(w),Zt(m.value?"Organization OpenSky settings saved.":"OpenSky settings saved.")}async function ct(){Y.value=!0,ue.value=null;const{ok:y,body:d}=await Yh();Y.value=!1,ue.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."},rt.value=Date.now(),Pt()}function Q(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const K=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),dt=J("user"),Mt=["protocol","host","port","username","password","privateKey","keyPassphrase","hostKeyFingerprint","insecureSkipVerify","basePath"],at=xe(Object.fromEntries(Mt.map(y=>[y,""]))),Rt=J(""),ne=J(!1),ae=J(!1),fe=J(null),ke=J(null),_n=[{value:"sftp",label:"SFTP"},{value:"ftps",label:"FTPS"},{value:"ftp",label:"FTP"}],ui=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],ve=ht(()=>K.isSuperadmin),Ae=ht(()=>K.isSuperadmin?"user":dt.value),Cn=ht(()=>K.scopes[Ae.value]||{editableLayer:"user",fields:{}}),Fe=ht(()=>Ae.value==="org"),Yi=ht(()=>(Ve("protocol")?Oe("protocol").effective:at.protocol)||"sftp");function Oe(y){return Cn.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function Ve(y){return ve.value||Oe(y).locked}function he(y){const d=Oe(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function xr(y){return(_n.find(d=>d.value===y)||{}).label||y||"—"}function _o(){for(const y of Mt)at[y]=Oe(y).own||"";at.protocol||(at.protocol="sftp"),at.insecureSkipVerify||(at.insecureSkipVerify="false")}function Ms(y){K.available=!!y.available,K.orgEnabled=y.orgEnabled!==!1,K.enabled=!!y.enabled,K.canEditOrg=!!y.canEditOrg,K.isSuperadmin=!!y.isSuperadmin,K.scopes=y.scopes||{},dt.value==="org"&&!K.canEditOrg&&(dt.value="user"),_o(),K.loaded=!0}Je(dt,()=>{Rt.value="",_o()});function wr(){if(!ke.value)return"";const y=Math.max(0,Math.round((Date.now()-ke.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function kr(){try{fe.value&&localStorage.setItem(tu,JSON.stringify({health:fe.value,ts:ke.value}))}catch{}}function Sr(){try{const y=localStorage.getItem(tu);if(!y)return;const d=JSON.parse(y);d&&d.health&&(fe.value=d.health,ke.value=d.ts||null)}catch{}}async function Cs(){Sr();const{ok:y,body:d}=await Jh();y&&Ms(d)}async function vo(y){const d=Fe.value;d?K.orgEnabled=y:K.enabled=y;const{ok:Z,body:w}=await Wl(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(Ms(w),Zt(d?y?"File transfer enabled for your organization.":"File transfer disabled for your organization.":y?"File transfer enabled.":"File transfer disabled.")):(d?K.orgEnabled=!y:K.enabled=!y,Zt(w.error||"Could not update."))}async function Pr(){Rt.value="",ne.value=!0;const y={};for(const Ht of Mt)Ve(Ht)||(y[Ht]=at[Ht]);const d={scope:Ae.value,config:y};Fe.value||(d.enabled=K.enabled);const{ok:Z,body:w}=await Wl(d);if(ne.value=!1,!Z){Rt.value=w.error||"Could not save settings.";return}Ms(w),Zt(Fe.value?"Organization file-transfer settings saved.":"File-transfer settings saved.")}async function Tr(){ae.value=!0,fe.value=null;const{ok:y,body:d}=await Xh();ae.value=!1,fe.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."},ke.value=Date.now(),kr()}function Lr(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const Et=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,scopes:{}}),it=J("user"),Ji=["baseURL","username","password","insecureSkipVerify","basePath"],Ee=xe(Object.fromEntries(Ji.map(y=>[y,""]))),ci=J(""),Mi=J(!1),di=J(!1),sn=J(null),Xe=J(null),yo=[{value:"false",label:"Verify certificate"},{value:"true",label:"Skip verification"}],Os=ht(()=>Et.isSuperadmin),Es=ht(()=>Et.isSuperadmin?"user":it.value),Mr=ht(()=>Et.scopes[Es.value]||{editableLayer:"user",fields:{}}),on=ht(()=>Es.value==="org");function vn(y){return Mr.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function fi(y){return Os.value||vn(y).locked}function Ze(y){const d=vn(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function bo(){for(const y of Ji)Ee[y]=vn(y).own||"";Ee.insecureSkipVerify||(Ee.insecureSkipVerify="false")}function zs(y){Et.available=!!y.available,Et.orgEnabled=y.orgEnabled!==!1,Et.enabled=!!y.enabled,Et.canEditOrg=!!y.canEditOrg,Et.isSuperadmin=!!y.isSuperadmin,Et.scopes=y.scopes||{},it.value==="org"&&!Et.canEditOrg&&(it.value="user"),bo(),Et.loaded=!0}Je(it,()=>{ci.value="",bo()});function Cr(){if(!Xe.value)return"";const y=Math.max(0,Math.round((Date.now()-Xe.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function Or(){try{sn.value&&localStorage.setItem(eu,JSON.stringify({health:sn.value,ts:Xe.value}))}catch{}}function Er(){try{const y=localStorage.getItem(eu);if(!y)return;const d=JSON.parse(y);d&&d.health&&(sn.value=d.health,Xe.value=d.ts||null)}catch{}}async function As(){Er();const{ok:y,body:d}=await ep();y&&zs(d)}async function hi(y){const d=on.value;d?Et.orgEnabled=y:Et.enabled=y;const{ok:Z,body:w}=await Kl(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(zs(w),Zt(d?y?"WebDAV enabled for your organization.":"WebDAV disabled for your organization.":y?"WebDAV enabled.":"WebDAV disabled.")):(d?Et.orgEnabled=!y:Et.enabled=!y,Zt(w.error||"Could not update."))}async function xo(){ci.value="",Mi.value=!0;const y={};for(const Ht of Ji)fi(Ht)||(y[Ht]=Ee[Ht]);const d={scope:Es.value,config:y};on.value||(d.enabled=Et.enabled);const{ok:Z,body:w}=await Kl(d);if(Mi.value=!1,!Z){ci.value=w.error||"Could not save settings.";return}zs(w),Zt(on.value?"Organization WebDAV settings saved.":"WebDAV settings saved.")}async function wo(){di.value=!0,sn.value=null;const{ok:y,body:d}=await np();di.value=!1,sn.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."},Xe.value=Date.now(),Or()}function Ci(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const W=xe({loaded:!1,available:!1,orgEnabled:!0,enabled:!1,canEditOrg:!1,isSuperadmin:!1,isOrgUser:!1,mounts:[],privateFolder:!1,privateEnabled:!1,allowPrivate:!0,rootConfigured:!1,scopes:{}}),Yt=J("user"),Un=J(""),rn=J(""),yn=J(!1),pi=J(!1),mt=J(null),te=J(null),jn=J({}),Oi=[{value:"",label:"Inherit"},{value:"false",label:"Read-write"},{value:"true",label:"Read-only"}],Ie=ht(()=>W.isSuperadmin),Is=ht(()=>W.isSuperadmin?"user":Yt.value),Xi=ht(()=>W.scopes[Is.value]||{editableLayer:"user",fields:{}}),ye=ht(()=>Is.value==="org");function le(y){return Xi.value.fields[y]||{effective:"",own:"",source:"unset",locked:!1}}function On(y){return Ie.value||le(y).locked}function mi(y){const d=le(y).source;return d==="global"?"Set by administrator":d==="org"?"Set by your organization":""}function Ei(y){return(Oi.find(d=>d.value===y)||{}).label||"Inherit"}function Qi(){Un.value=le("readOnly").own||""}function bn(y){W.available=!!y.available,W.orgEnabled=y.orgEnabled!==!1,W.enabled=!!y.enabled,W.canEditOrg=!!y.canEditOrg,W.isSuperadmin=!!y.isSuperadmin,W.isOrgUser=!!y.isOrgUser,W.mounts=Array.isArray(y.mounts)?y.mounts:[],W.privateFolder=!!y.privateFolder,W.privateEnabled=!!y.privateEnabled,W.allowPrivate=y.allowPrivate!==!1,W.rootConfigured=!!y.rootConfigured,W.scopes=y.scopes||{},Yt.value==="org"&&!W.canEditOrg&&(Yt.value="user"),Qi(),W.loaded=!0}Je(Yt,()=>{rn.value="",Qi()});function Ns(){if(!te.value)return"";const y=Math.max(0,Math.round((Date.now()-te.value)/1e3));if(y<60)return"just now";const d=Math.round(y/60);if(d<60)return`${d} min ago`;const Z=Math.round(d/60);return Z<24?`${Z} h ago`:`${Math.round(Z/24)} d ago`}function Bs(){try{mt.value&&localStorage.setItem(nu,JSON.stringify({health:mt.value,ts:te.value}))}catch{}}function ts(){try{const y=localStorage.getItem(nu);if(!y)return;const d=JSON.parse(y);d&&d.health&&(mt.value=d.health,te.value=d.ts||null)}catch{}}async function Ds(){ts();const{ok:y,body:d}=await Qh();y&&bn(d)}async function es(y){const d=ye.value;d?W.orgEnabled=y:W.enabled=y;const{ok:Z,body:w}=await Ko(d?{scope:"org",enabled:y}:{scope:"user",enabled:y});Z?(bn(w),Zt(d?y?"Local storage enabled for your organization.":"Local storage disabled for your organization.":y?"Local storage enabled.":"Local storage disabled.")):(d?W.orgEnabled=!y:W.enabled=!y,Zt(w.error||"Could not update."))}async function ns(y){W.privateFolder=y;const{ok:d,body:Z}=await Ko({scope:"user",privateFolder:y});d?(bn(Z),Zt(y?"Private folder enabled.":"Private folder disabled.")):(W.privateFolder=!y,Zt(Z.error||"Could not update."))}async function ko(y){W.allowPrivate=y;const{ok:d,body:Z}=await Ko({scope:"org",allowPrivate:y});d?(bn(Z),Zt(y?"Members may now create private folders.":"Private folders disabled for your organization.")):(W.allowPrivate=!y,Zt(Z.error||"Could not update."))}async function Rs(){rn.value="",yn.value=!0;const y={};On("readOnly")||(y.readOnly=Un.value);const d={scope:Is.value,config:y};ye.value||(d.enabled=W.enabled);const{ok:Z,body:w}=await Ko(d);if(yn.value=!1,!Z){rn.value=w.error||"Could not save settings.";return}bn(w),Zt(ye.value?"Organization local-storage settings saved.":"Local-storage settings saved.")}async function zr(){pi.value=!0,mt.value=null,jn.value={};const{ok:y,body:d}=await tp();pi.value=!1,mt.value=y&&d.health?d.health:{status:"down",detail:d.error||"Probe failed."};const Z={};if(Array.isArray(d.mounts))for(const w of d.mounts)Z[w.id]={status:w.status,detail:w.detail};jn.value=Z,te.value=Date.now(),Bs()}function St(y){return y==="ok"?P.success:y==="degraded"?P.warning:P.danger}const an=[{id:"apis-external",label:"APIs — External",icon:"globe"},{id:"drives-external",label:"Drives — External",icon:"server"},{id:"drives-local",label:"Drives — Local",icon:"monitor"}],Jt=J("apis-external");function is(y){return F.value||Jt.value===y}const gi=J("");let zi=null;function Zt(y){gi.value=y,clearTimeout(zi),zi=setTimeout(()=>gi.value="",2200)}const _e=xe({current:"",next:"",confirm:""}),En=J(""),_i=J(!1);function Se(){if(_i.value=!1,!_e.current)return En.value="Enter your current password.";if(_e.next.length<8)return En.value="New password must be at least 8 characters.";if(_e.next!==_e.confirm)return En.value="New passwords do not match.";En.value="Validated. Connecting to the account service is pending — no password endpoint yet.",_e.current=_e.next=_e.confirm=""}const xn=J("");function So(){xn.value="Verification link would be sent once the account service is wired up."}function Po(y){const d=y.target.files&&y.target.files[0];if(!d)return;if(d.size>1.5*1024*1024){Zt("Image too large (max ~1.5 MB).");return}const Z=new FileReader;Z.onload=()=>{gt.avatar=String(Z.result),Zt("Photo updated.")},Z.readAsDataURL(d)}function Ar(){gt.avatar="",Zt("Photo removed.")}const To=ht(()=>{var Z,w,Ht;const d=(gt.displayName||gt.name||o.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((Z=d[0])==null?void 0:Z[0])||"P")+(((w=d[1])==null?void 0:w[0])||((Ht=d[0])==null?void 0:Ht[1])||"V")).toUpperCase()}),Wn=J(!1),Lo=J(""),Ai=J(""),zt=J(""),ss=J([]);function $e(y){const d="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let Z="";for(let w=0;w<y;w++)Z+=d[Math.floor(Math.random()*d.length)];return Z}function Ii(){Lo.value=$e(16).replace(/(.{4})/g,"$1 ").trim(),Ai.value="",zt.value="",Wn.value=!0}function Mo(){if(!/^\d{6}$/.test(Ai.value)){zt.value="Enter the 6-digit code from your authenticator app.";return}gt.twoFactor=!0,Wn.value=!1,ss.value=Array.from({length:8},()=>$e(4).toLowerCase()+"-"+$e(4).toLowerCase()),zt.value=""}function Ir(){gt.twoFactor=!1,ss.value=[],Wn.value=!1}const Ke=navigator.userAgent;function Nr(){return/Edg\//.test(Ke)?"Edge":/OPR\//.test(Ke)?"Opera":/Chrome\//.test(Ke)?"Chrome":/Firefox\//.test(Ke)?"Firefox":/Safari\//.test(Ke)?"Safari":"Browser"}function Co(){return/Windows/.test(Ke)?"Windows":/Mac OS X/.test(Ke)?"macOS":/Android/.test(Ke)?"Android":/iPhone|iPad/.test(Ke)?"iOS":/Linux/.test(Ke)?"Linux":"Unknown OS"}const Br=Date.now(),os=J([]),Kn=J(!1),rs=J(""),ee=xe({email:"",password:"",role:"user",organization:""}),vi=J(""),Ni=J(!1),qe=J(""),Fs=ht(()=>{const y=[{value:"user",label:"User"},{value:"admin",label:"Admin"}];return l.value&&y.push({value:"superadmin",label:"Superadmin"}),y}),Bi=J([]);async function qn(){if(!c.value)return;const y=await Hh();y.ok&&(Bi.value=y.organizations.slice().sort((d,Z)=>d.name.localeCompare(Z.name)))}const Oo=ht(()=>{const y=Bi.value.map(d=>({value:d.id,label:d.name}));return l.value&&y.unshift({value:"",label:"No organization"}),y});async function Gn(){if(!c.value)return;Kn.value=!0,rs.value="";const y=await Fh();if(Kn.value=!1,!y.ok){rs.value=y.status===403?"Manager role required.":"Could not load users.";return}os.value=y.users.slice().sort((d,Z)=>d.email.localeCompare(Z.email))}function Di(y){try{const d=y.data||{},Z=Object.keys(d)[0];return Z&&d[Z]&&d[Z].message||y.message||y.error||"Invalid input."}catch{return y.error||"Could not create user."}}async function Dr(){vi.value="";const y=ee.email.trim().toLowerCase();if(!y.includes("@"))return vi.value="Enter a valid email.";if(ee.password.length<8)return vi.value="Password must be at least 8 characters.";Ni.value=!0;const d=l.value?ee.organization:o.organization,{ok:Z,body:w}=await Vh(y,ee.password,ee.role,d);if(Ni.value=!1,!Z)return vi.value=Di(w);ee.email="",ee.password="",ee.role="user",ee.organization="",Zt("User created."),Gn()}async function Rr(y){const{ok:d,body:Z}=await $h(y.id);if(qe.value="",!d)return Zt(Z.error||"Could not remove user.");Zt("User removed."),Gn()}const $t=xe({id:"",email:"",role:"user",verified:!1,password:"",organization:""}),zn=J(""),Ri=J(!1),as=ht(()=>!!$t.id&&$t.email===o.email);function ls(y){qe.value="",$t.id=y.id,$t.email=y.email,$t.role=y.role||"user",$t.verified=!!y.verified,$t.password="",$t.organization=y.organization||"",zn.value=""}function An(){$t.id="",zn.value=""}async function Fr(){zn.value="";const y=$t.email.trim().toLowerCase();if(!y.includes("@"))return zn.value="Enter a valid email.";if($t.password&&$t.password.length<8)return zn.value="New password must be at least 8 characters (or leave blank).";const d={email:y,role:$t.role,verified:$t.verified};l.value&&(d.organization=$t.organization),$t.password&&(d.password=$t.password),Ri.value=!0;const{ok:Z,body:w}=await Zh($t.id,d);if(Ri.value=!1,!Z)return zn.value=Di(w);Zt("User updated."),An(),Gn()}const In=xe({name:""}),Le=J(""),Fi=J(!1),yi=J(""),wn=xe({id:"",name:""}),kn=J(""),Vi=ht(()=>{const y={};for(const d of os.value)d.organization&&(y[d.organization]=(y[d.organization]||0)+1);return y});async function Eo(){Le.value="";const y=In.name.trim();if(!y)return Le.value="Enter an organization name.";Fi.value=!0;const{ok:d,body:Z}=await Uh(y);if(Fi.value=!1,!d)return Le.value=Di(Z);In.name="",Zt("Organization created."),qn()}function Vr(y){yi.value="",wn.id=y.id,wn.name=y.name,kn.value=""}function Vs(){wn.id="",kn.value=""}async function zo(){kn.value="";const y=wn.name.trim();if(!y)return kn.value="Enter an organization name.";const{ok:d,body:Z}=await jh(wn.id,y);if(!d)return kn.value=Di(Z);Zt("Organization renamed."),Vs(),qn(),Gn()}async function Qe(y){const{ok:d,body:Z}=await Wh(y.id);if(yi.value="",!d)return Zt(Z.error||"Could not delete organization.");Zt("Organization deleted."),qn()}function bi(){const y={_app:"PilotVault",_kind:"settings-export",exportedAt:new Date().toISOString(),email:o.email,prefs:{...gt},themeMode:Gi.value},d=new Blob([JSON.stringify(y,null,2)],{type:"application/json"}),Z=URL.createObjectURL(d),w=document.createElement("a");w.href=Z,w.download=`pilotvault-settings-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(w),w.click(),w.remove(),URL.revokeObjectURL(Z),Zt("Settings exported.")}const us=J("");function Sn(y){const d=y.target.files&&y.target.files[0];if(!d)return;const Z=new FileReader;Z.onload=()=>{try{const w=JSON.parse(String(Z.result)),Ht=w.prefs||w;if(!Tc(Ht))throw new Error("bad shape");w.themeMode&&ar(w.themeMode),za(gt.fontSize),Aa(gt.reduceMotion),us.value="Settings imported and applied."}catch{us.value="That file is not a valid PilotVault settings export."}},Z.readAsText(d),y.target.value=""}const se=xe({understand:!1,typed:"",cooldown:0,armed:!1,msg:""});let ln=null;const Zs=ht(()=>o.email||"DELETE MY ACCOUNT"),Yn=ht(()=>se.understand&&se.typed===Zs.value);function Ao(){Yn.value&&(se.armed=!0,se.cooldown=5,clearInterval(ln),ln=setInterval(()=>{se.cooldown--,se.cooldown<=0&&clearInterval(ln)},1e3))}Je(Yn,y=>{!y&&se.armed&&(se.armed=!1,se.cooldown=0,clearInterval(ln))});function cs(){if(!(!se.armed||se.cooldown>0)){try{localStorage.removeItem("pv_prefs")}catch{}se.msg="Account deletion requires the account service. Local data was cleared and you were signed out.",setTimeout(()=>a("logout"),900)}}return Ls(()=>{Tt=setInterval(()=>Ft.value=Date.now(),1e3),qn(),Gn(),A(),Cs(),As(),Ds()}),_r(()=>{clearInterval(Tt),clearInterval(ln),clearTimeout(zi)}),(y,d)=>(b(),x("div",Rp,[f("div",Fp,[d[62]||(d[62]=f("div",null,[f("div",{class:"eyebrow"},"Preferences"),f("h2",{class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},"Settings")],-1)),f("div",Vp,[E(tt,{name:"search",size:16,class:"text-ink-muted"}),xt(f("input",{"onUpdate:modelValue":d[0]||(d[0]=Z=>$.value=Z),placeholder:"Search settings…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Bt,$.value]]),$.value?(b(),x("button",{key:0,class:"text-ink-muted hover:text-ink","aria-label":"Clear search",onClick:d[1]||(d[1]=Z=>$.value="")},[E(tt,{name:"x",size:15})])):V("",!0)])]),f("div",Zp,[xt(f("nav",$p,[(b(!0),x(wt,null,ce(k.value,Z=>(b(),x("button",{key:Z.id,class:Ot(["flex items-center gap-2.5 rounded px-3 py-2.5 text-left text-sm transition",[O.value===Z.id?Z.danger?"bg-danger-soft font-semibold text-danger-fg":"bg-accent-soft font-semibold text-accent-soft-fg":Z.danger?"font-medium text-danger-fg hover:bg-danger-soft":"font-medium text-ink-secondary hover:bg-surface-2"]]),onClick:w=>O.value=Z.id},[E(tt,{name:Z.icon,size:17},null,8,["name"]),f("span",Up,M(Z.label),1)],10,Hp))),128))],512),[[oh,!F.value]]),f("div",jp,[F.value&&!bt.value.length?(b(),x("div",Wp," No settings match “"+M($.value)+"”. ",1)):V("",!0),(b(!0),x(wt,null,ce(bt.value,Z=>(b(),x(wt,{key:Z.id},[F.value?(b(),x("div",Kp,[E(tt,{name:Z.icon,size:14},null,8,["name"]),N(" "+M(Z.label),1)])):V("",!0),Z.id==="account"?(b(),x("div",qp,[E(lt,{title:"Full name",desc:"Shown to your team on flights and audit logs.",keywords:"full name account"},{default:ot(()=>[xt(f("input",{"onUpdate:modelValue":d[2]||(d[2]=w=>Ct(gt).name=w),class:"field w-56",placeholder:"Jane Operator",onBlur:d[3]||(d[3]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).name]])]),_:1}),E(lt,{title:"Username",desc:"Your unique handle within PilotVault.",keywords:"username handle"},{default:ot(()=>[f("div",Gp,[d[63]||(d[63]=f("span",{class:"text-sm text-ink-muted"},"@",-1)),xt(f("input",{"onUpdate:modelValue":d[4]||(d[4]=w=>Ct(gt).username=w),class:"field w-48",placeholder:"jane",onBlur:d[5]||(d[5]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).username]])])]),_:1}),E(lt,{title:"Email address",desc:"Used for sign-in and notifications.",keywords:"email verification verify"},{default:ot(()=>[f("div",Yp,[f("span",Jp,M(e.email||"—"),1),f("span",Xp,[E(tt,{name:"mail",size:12}),d[64]||(d[64]=N(" Unverified ",-1))])])]),_:1}),E(lt,{title:"Role",desc:"Your access level in PilotVault.",keywords:"role admin user superadmin access rights permissions"},{default:ot(()=>[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",v(e.role)])},[E(tt,{name:g(e.role),size:12},null,8,["name"]),N(M(h(e.role)),1)],2)]),_:1}),E(lt,{title:"Organization",desc:"The organization your account belongs to.",keywords:"organization org tenant company"},{default:ot(()=>[f("span",{class:Ot(["text-sm",e.organizationName?"text-ink":"text-ink-muted"])},M(e.organizationName||(l.value?"All organizations":"None")),3)]),_:1}),E(lt,{block:"",title:"Verify email",desc:"Confirm ownership to enable password resets and alerts.",keywords:"verify email resend"},{default:ot(()=>[f("button",{class:"btn-ghost",onClick:So},"Send verification link"),xn.value?(b(),x("p",Qp,M(xn.value),1)):V("",!0)]),_:1}),E(lt,{block:"",title:"Change password",desc:"Use at least 8 characters.",keywords:"password change current new"},{default:ot(()=>[f("div",tm,[xt(f("input",{"onUpdate:modelValue":d[6]||(d[6]=w=>_e.current=w),type:"password",class:"field",placeholder:"Current password"},null,512),[[Bt,_e.current]]),xt(f("input",{"onUpdate:modelValue":d[7]||(d[7]=w=>_e.next=w),type:"password",class:"field",placeholder:"New password"},null,512),[[Bt,_e.next]]),xt(f("input",{"onUpdate:modelValue":d[8]||(d[8]=w=>_e.confirm=w),type:"password",class:"field",placeholder:"Confirm new password"},null,512),[[Bt,_e.confirm]]),f("div",em,[f("button",{class:"btn-accent",onClick:Se},"Update password"),En.value?(b(),x("span",{key:0,class:Ot(["text-xs",_i.value?"text-success-fg":"text-ink-muted"])},M(En.value),3)):V("",!0)])])]),_:1})])):Z.id==="appearance"?(b(),x("div",nm,[E(lt,{title:"Theme",desc:"Light, dark, or follow your system.",keywords:"theme light dark system appearance"},{default:ot(()=>[E(dn,{modelValue:ut.value,"onUpdate:modelValue":d[9]||(d[9]=w=>ut.value=w),options:X},null,8,["modelValue"])]),_:1}),E(lt,{title:"Font size",desc:"Scales the entire interface for readability.",keywords:"font size accessibility text"},{default:ot(()=>[E(dn,{modelValue:Ct(gt).fontSize,"onUpdate:modelValue":d[10]||(d[10]=w=>Ct(gt).fontSize=w),options:ft},null,8,["modelValue"])]),_:1}),E(lt,{title:"Reduce motion",desc:"Minimise animations and transitions.",keywords:"reduce motion accessibility animation"},{default:ot(()=>[E(tn,{modelValue:Ct(gt).reduceMotion,"onUpdate:modelValue":d[11]||(d[11]=w=>Ct(gt).reduceMotion=w)},null,8,["modelValue"])]),_:1}),E(lt,{title:"Language",desc:"Interface language.",keywords:"language locale"},{default:ot(()=>[xt(f("select",{"onUpdate:modelValue":d[12]||(d[12]=w=>Ct(gt).language=w),class:"field w-48"},[(b(),x(wt,null,ce(de,([w,Ht])=>f("option",{key:w,value:w},M(Ht),9,im)),64))],512),[[wi,Ct(gt).language]])]),_:1}),E(lt,{title:"Region",desc:"Affects number, unit and date defaults.",keywords:"region country locale"},{default:ot(()=>[xt(f("select",{"onUpdate:modelValue":d[13]||(d[13]=w=>Ct(gt).region=w),class:"field w-48"},[(b(),x(wt,null,ce(me,([w,Ht])=>f("option",{key:w,value:w},M(Ht),9,sm)),64))],512),[[wi,Ct(gt).region]])]),_:1}),E(lt,{title:"Date format",desc:"How calendar dates are displayed.",keywords:"date format"},{default:ot(()=>[xt(f("select",{"onUpdate:modelValue":d[14]||(d[14]=w=>Ct(gt).dateFormat=w),class:"field w-48"},[(b(),x(wt,null,ce(vt,([w,Ht])=>f("option",{key:w,value:w},M(Ht),9,om)),64))],512),[[wi,Ct(gt).dateFormat]])]),_:1}),E(lt,{title:"Time format",desc:"12- or 24-hour clock.",keywords:"time format clock 12 24 hour"},{default:ot(()=>[E(dn,{modelValue:Ct(gt).timeFormat,"onUpdate:modelValue":d[15]||(d[15]=w=>Ct(gt).timeFormat=w),options:jt},null,8,["modelValue"])]),_:1}),E(lt,{title:"Preview",desc:"How timestamps appear across the app.",keywords:"preview date time"},{default:ot(()=>[f("span",rm,M(G.value),1)]),_:1}),d[65]||(d[65]=f("p",{class:"mt-3 text-xs text-ink-muted"}," Language & region are stored now; full localisation ships with the account service. ",-1))])):Z.id==="integrations"?(b(),x("div",am,[F.value?V("",!0):(b(),x("div",lm,[(b(),x(wt,null,ce(an,w=>f("button",{key:w.id,type:"button",class:Ot(["-mb-px inline-flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",Jt.value===w.id?"border-accent text-ink":"border-transparent text-ink-secondary hover:text-ink"]),onClick:Ht=>Jt.value=w.id},[E(tt,{name:w.icon,size:16},null,8,["name"]),N(M(w.label),1)],10,um)),64))])),is("apis-external")?(b(),x("div",cm,[f("div",dm,[f("div",fm,[E(tt,{name:"radio",size:20})]),d[66]||(d[66]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"OpenSky Network"),f("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))]),st.loaded&&!st.available?(b(),x("div",hm,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[67]||(d[67]=N(" OpenSky is currently disabled by your administrator. Contact them to enable it. ",-1))])):V("",!0),st.canEditOrg?(b(),x("div",pm,[d[68]||(d[68]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:It.value,"onUpdate:modelValue":d[16]||(d[16]=w=>It.value=w),options:nn},null,8,["modelValue"])])):V("",!0),m.value?(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":st.orgEnabled,disabled:!st.available,"onUpdate:modelValue":U},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{key:3,title:"Enable OpenSky",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin opensky"},{default:ot(()=>[E(tn,{"model-value":st.enabled,disabled:!st.available||!st.orgEnabled,"onUpdate:modelValue":U},null,8,["model-value","disabled"])]),_:1})),!m.value&&st.available&&!st.orgEnabled?(b(),x("div",mm,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[70]||(d[70]=N("OpenSky is turned off for your organization",-1)),st.canEditOrg?(b(),x("span",gm,[...d[69]||(d[69]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[71]||(d[71]=N(". ",-1))])):V("",!0),m.value?(b(),x("div",_m,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[72]||(d[72]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",vm,M(e.organizationName||"your organization"),1),d[73]||(d[73]=N(". Leave a field blank to let each user choose their own; a value set here overrides the user's. ",-1))])):we.value?(b(),x("div",ym," As a superadmin you manage the global OpenSky configuration in the API Server panel. The effective configuration is shown below. ")):V("",!0),st.available&&!m.value?(b(),x("div",bm,[f("div",xm,[f("div",wm,[E(tt,{name:"signal",size:15}),d[74]||(d[74]=N("Credit usage ",-1))]),rt.value?(b(),x("span",km,"Checked "+M(Ut()),1)):V("",!0)]),yt.value?(b(),x(wt,{key:0},[yt.value.remaining!=null?(b(),x(wt,{key:0},[f("div",Sm,[f("span",Pm,M(qt(yt.value.remaining)),1),f("span",Tm,"/ "+M(qt(yt.value.daily))+" credits left today",1)]),f("div",Lm,[f("div",{class:Ot(["h-full rounded-full transition-all",ge.value]),style:ks({width:Kt.value+"%"})},null,6)]),f("div",Mm," Used "+M(qt(yt.value.daily-yt.value.remaining))+" today · "+M(yt.value.probeCost)+" credit"+M(yt.value.probeCost===1?"":"s")+" per query · "+M(yt.value.mode),1)],64)):(b(),x(wt,{key:1},[f("div",Cm,[d[75]||(d[75]=N("Daily allowance: ",-1)),f("span",Om,M(qt(yt.value.daily)),1),d[76]||(d[76]=N(" credits",-1))]),f("div",Em,M(yt.value.probeCost)+" credit"+M(yt.value.probeCost===1?"":"s")+" per query · "+M(yt.value.mode)+". OpenSky only reports live remaining credits for authenticated requests — add OAuth2 credentials below to track usage. ",1)],64))],64)):(b(),x("div",zm,[...d[77]||(d[77]=[N(" Run ",-1),f("span",{class:"font-semibold text-ink-secondary"},"Test connection",-1),N(" below to fetch your live OpenSky credit balance. ",-1)])]))])):V("",!0),E(lt,{title:"OpenSky plan",desc:"Your account tier — sets the daily credit allowance.",keywords:"plan tier credits"},{default:ot(()=>[B("plan")?(b(),x("span",Am,[N(M((Te.find(w=>w.value===T("plan").effective)||{}).label||T("plan").effective||"—")+" ",1),I("plan")?(b(),x("span",Im,[E(tt,{name:"lock",size:10}),N(M(I("plan")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:Wt.plan,"onUpdate:modelValue":d[17]||(d[17]=w=>Wt.plan=w),options:Te},null,8,["modelValue"]))]),_:1}),E(lt,{title:"Default bounding box",desc:"lamin,lomin,lamax,lomax — used for live queries and the health probe.",keywords:"bounding box bbox area"},{default:ot(()=>[B("bbox")?(b(),x("span",Nm,[N(M(T("bbox").effective||"—")+" ",1),I("bbox")?(b(),x("span",Bm,[E(tt,{name:"lock",size:10}),N(M(I("bbox")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[18]||(d[18]=w=>Wt.bbox=w),class:"field w-64 font-mono",placeholder:"50.5,3.2,53.7,7.3"},null,512)),[[Bt,Wt.bbox]])]),_:1}),E(lt,{title:"OAuth2 client ID",desc:"Optional — leave blank for anonymous access (lower limits).",keywords:"oauth client id credentials"},{default:ot(()=>[B("clientId")?(b(),x("span",Dm,[N(M(T("clientId").effective||"—")+" ",1),I("clientId")?(b(),x("span",Rm,[E(tt,{name:"lock",size:10}),N(M(I("clientId")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[19]||(d[19]=w=>Wt.clientId=w),class:"field w-64",placeholder:"your-api-client"},null,512)),[[Bt,Wt.clientId]])]),_:1}),E(lt,{title:"OAuth2 client secret",desc:"Paired with the client ID for authenticated access.",keywords:"oauth client secret credentials password"},{default:ot(()=>[B("clientSecret")?(b(),x("span",Fm,[N(M(T("clientSecret").effective||"—")+" ",1),I("clientSecret")?(b(),x("span",Vm,[E(tt,{name:"lock",size:10}),N(M(I("clientSecret")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[20]||(d[20]=w=>Wt.clientSecret=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,Wt.clientSecret]])]),_:1}),st.available&&!st.allowAnonymous?(b(),x("div",Zm," Anonymous access is disabled by the administrator — OpenSky needs OAuth2 credentials from some layer to work. ")):V("",!0),f("div",$m,[we.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:Vt.value||!st.available,onClick:R},M(Vt.value?"Saving…":m.value?"Save organization settings":"Save settings"),9,Hm)),m.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:Y.value||!st.available,onClick:ct},M(Y.value?"Testing…":"Test connection"),9,Um)),kt.value?(b(),x("span",jm,M(kt.value),1)):V("",!0),ue.value&&!m.value?(b(),x("span",{key:3,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Q(ue.value.status)])},[d[78]||(d[78]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(ue.value.detail||ue.value.status),1)],2)):V("",!0)])])):V("",!0),is("drives-external")?(b(),x(wt,{key:2},[f("div",Wm,[f("div",Km,[f("div",qm,[E(tt,{name:"server",size:20})]),d[79]||(d[79]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"File Transfer (FTP / SFTP)"),f("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))]),K.loaded&&!K.available?(b(),x("div",Gm,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[80]||(d[80]=N(" File transfer is currently disabled by your administrator. Contact them to enable it. ",-1))])):V("",!0),K.canEditOrg?(b(),x("div",Ym,[d[81]||(d[81]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:dt.value,"onUpdate:modelValue":d[21]||(d[21]=w=>dt.value=w),options:nn},null,8,["modelValue"])])):V("",!0),Fe.value?(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":K.orgEnabled,disabled:!K.available,"onUpdate:modelValue":vo},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":K.enabled,disabled:!K.available||!K.orgEnabled,"onUpdate:modelValue":vo},null,8,["model-value","disabled"])]),_:1})),!Fe.value&&K.available&&!K.orgEnabled?(b(),x("div",Jm,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[83]||(d[83]=N("File transfer is turned off for your organization",-1)),K.canEditOrg?(b(),x("span",Xm,[...d[82]||(d[82]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[84]||(d[84]=N(". ",-1))])):V("",!0),Fe.value?(b(),x("div",Qm,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[85]||(d[85]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",tg,M(e.organizationName||"your organization"),1),d[86]||(d[86]=N(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):ve.value?(b(),x("div",eg," As a superadmin you manage the global file-transfer configuration in the API Server panel. The effective configuration is shown below. ")):V("",!0),E(lt,{title:"Protocol",desc:"SFTP (over SSH), FTPS (FTP over TLS), or plain FTP.",keywords:"protocol sftp ftps ftp"},{default:ot(()=>[Ve("protocol")?(b(),x("span",ng,[N(M(xr(Oe("protocol").effective))+" ",1),he("protocol")?(b(),x("span",ig,[E(tt,{name:"lock",size:10}),N(M(he("protocol")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:at.protocol,"onUpdate:modelValue":d[22]||(d[22]=w=>at.protocol=w),options:_n},null,8,["modelValue"]))]),_:1}),E(lt,{title:"Host",desc:"Server hostname or IP address.",keywords:"host server address"},{default:ot(()=>[Ve("host")?(b(),x("span",sg,[N(M(Oe("host").effective||"—")+" ",1),he("host")?(b(),x("span",og,[E(tt,{name:"lock",size:10}),N(M(he("host")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[23]||(d[23]=w=>at.host=w),class:"field w-64",placeholder:"files.example.com"},null,512)),[[Bt,at.host]])]),_:1}),E(lt,{title:"Port",desc:"Leave blank for the protocol default (22 for SFTP, 21 for FTP/FTPS).",keywords:"port"},{default:ot(()=>[Ve("port")?(b(),x("span",rg,[N(M(Oe("port").effective||"default")+" ",1),he("port")?(b(),x("span",ag,[E(tt,{name:"lock",size:10}),N(M(he("port")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[24]||(d[24]=w=>at.port=w),inputmode:"numeric",class:"field w-24 font-mono",placeholder:"22"},null,512)),[[Bt,at.port]])]),_:1}),E(lt,{title:"Username",desc:"Account used to authenticate.",keywords:"username login account"},{default:ot(()=>[Ve("username")?(b(),x("span",lg,[N(M(Oe("username").effective||"—")+" ",1),he("username")?(b(),x("span",ug,[E(tt,{name:"lock",size:10}),N(M(he("username")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[25]||(d[25]=w=>at.username=w),class:"field w-64",placeholder:"user"},null,512)),[[Bt,at.username]])]),_:1}),E(lt,{title:"Password",desc:"Password auth for FTP/FTPS, or SFTP password login. Leave blank to use a key.",keywords:"password secret credentials"},{default:ot(()=>[Ve("password")?(b(),x("span",cg,[N(M(Oe("password").effective||"—")+" ",1),he("password")?(b(),x("span",dg,[E(tt,{name:"lock",size:10}),N(M(he("password")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[26]||(d[26]=w=>at.password=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,at.password]])]),_:1}),Yi.value==="sftp"?(b(),oe(lt,{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:ot(()=>[Ve("privateKey")?(b(),x("span",fg,[N(M(Oe("privateKey").effective||"—")+" ",1),he("privateKey")?(b(),x("span",hg,[E(tt,{name:"lock",size:10}),N(M(he("privateKey")),1)])):V("",!0)])):xt((b(),x("textarea",{key:1,"onUpdate:modelValue":d[27]||(d[27]=w=>at.privateKey=w),rows:"3",class:"field w-full font-mono text-xs",placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----"},null,512)),[[Bt,at.privateKey]])]),_:1})):V("",!0),Yi.value==="sftp"?(b(),oe(lt,{key:8,title:"Private key passphrase",desc:"Passphrase protecting the SSH private key, if any.",keywords:"passphrase key secret"},{default:ot(()=>[Ve("keyPassphrase")?(b(),x("span",pg,[N(M(Oe("keyPassphrase").effective||"—")+" ",1),he("keyPassphrase")?(b(),x("span",mg,[E(tt,{name:"lock",size:10}),N(M(he("keyPassphrase")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[28]||(d[28]=w=>at.keyPassphrase=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,at.keyPassphrase]])]),_:1})):V("",!0),Yi.value==="sftp"?(b(),oe(lt,{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:ot(()=>[Ve("hostKeyFingerprint")?(b(),x("span",gg,[N(M(Oe("hostKeyFingerprint").effective||"—")+" ",1),he("hostKeyFingerprint")?(b(),x("span",_g,[E(tt,{name:"lock",size:10}),N(M(he("hostKeyFingerprint")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[29]||(d[29]=w=>at.hostKeyFingerprint=w),class:"field w-full font-mono text-xs",placeholder:"SHA256:…"},null,512)),[[Bt,at.hostKeyFingerprint]])]),_:1})):V("",!0),Yi.value==="ftps"?(b(),oe(lt,{key:10,title:"TLS verification",desc:"Skip only for self-signed test servers.",keywords:"tls certificate verify insecure ftps"},{default:ot(()=>[Ve("insecureSkipVerify")?(b(),x("span",vg,[N(M(Oe("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),he("insecureSkipVerify")?(b(),x("span",yg,[E(tt,{name:"lock",size:10}),N(M(he("insecureSkipVerify")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:at.insecureSkipVerify,"onUpdate:modelValue":d[30]||(d[30]=w=>at.insecureSkipVerify=w),options:ui},null,8,["modelValue"]))]),_:1})):V("",!0),E(lt,{title:"Base path",desc:"Working directory and health-check target, e.g. /uploads.",keywords:"base path directory folder root"},{default:ot(()=>[Ve("basePath")?(b(),x("span",bg,[N(M(Oe("basePath").effective||"—")+" ",1),he("basePath")?(b(),x("span",xg,[E(tt,{name:"lock",size:10}),N(M(he("basePath")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[31]||(d[31]=w=>at.basePath=w),class:"field w-64 font-mono",placeholder:"/uploads"},null,512)),[[Bt,at.basePath]])]),_:1}),f("div",wg,[ve.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:ne.value||!K.available,onClick:Pr},M(ne.value?"Saving…":Fe.value?"Save organization settings":"Save settings"),9,kg)),Fe.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:ae.value||!K.available,onClick:Tr},M(ae.value?"Testing…":"Test connection"),9,Sg)),Rt.value?(b(),x("span",Pg,M(Rt.value),1)):V("",!0),ke.value&&!Fe.value?(b(),x("span",Tg,"Checked "+M(wr()),1)):V("",!0),fe.value&&!Fe.value?(b(),x("span",{key:4,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Lr(fe.value.status)])},[d[87]||(d[87]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(fe.value.detail||fe.value.status),1)],2)):V("",!0)])]),f("div",Lg,[f("div",Mg,[f("div",Cg,[E(tt,{name:"cloud",size:20})]),d[88]||(d[88]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"WebDAV"),f("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))]),Et.loaded&&!Et.available?(b(),x("div",Og,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[89]||(d[89]=N(" WebDAV is currently disabled by your administrator. Contact them to enable it. ",-1))])):V("",!0),Et.canEditOrg?(b(),x("div",Eg,[d[90]||(d[90]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:it.value,"onUpdate:modelValue":d[32]||(d[32]=w=>it.value=w),options:nn},null,8,["modelValue"])])):V("",!0),on.value?(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":Et.orgEnabled,disabled:!Et.available,"onUpdate:modelValue":hi},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{key:3,title:"Enable WebDAV",desc:"Turn the plugin on for your account in the Web App.",keywords:"enable disable plugin webdav"},{default:ot(()=>[E(tn,{"model-value":Et.enabled,disabled:!Et.available||!Et.orgEnabled,"onUpdate:modelValue":hi},null,8,["model-value","disabled"])]),_:1})),!on.value&&Et.available&&!Et.orgEnabled?(b(),x("div",zg,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[92]||(d[92]=N("WebDAV is turned off for your organization",-1)),Et.canEditOrg?(b(),x("span",Ag,[...d[91]||(d[91]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[93]||(d[93]=N(". ",-1))])):V("",!0),on.value?(b(),x("div",Ig,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[94]||(d[94]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",Ng,M(e.organizationName||"your organization"),1),d[95]||(d[95]=N(". Leave the connection blank to let each user configure their own; a connection set here overrides the user's. ",-1))])):Os.value?(b(),x("div",Bg," As a superadmin you manage the global WebDAV configuration in the API Server panel. The effective configuration is shown below. ")):V("",!0),E(lt,{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:ot(()=>[fi("baseURL")?(b(),x("span",Dg,[N(M(vn("baseURL").effective||"—")+" ",1),Ze("baseURL")?(b(),x("span",Rg,[E(tt,{name:"lock",size:10}),N(M(Ze("baseURL")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[33]||(d[33]=w=>Ee.baseURL=w),class:"field w-full font-mono text-xs",placeholder:"https://cloud.example.com/remote.php/dav/files/alice/"},null,512)),[[Bt,Ee.baseURL]])]),_:1}),E(lt,{title:"Username",desc:"Account used to authenticate (leave blank for a public share).",keywords:"username login account"},{default:ot(()=>[fi("username")?(b(),x("span",Fg,[N(M(vn("username").effective||"—")+" ",1),Ze("username")?(b(),x("span",Vg,[E(tt,{name:"lock",size:10}),N(M(Ze("username")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[34]||(d[34]=w=>Ee.username=w),class:"field w-64",placeholder:"user"},null,512)),[[Bt,Ee.username]])]),_:1}),E(lt,{title:"Password",desc:"Password or app-specific token for HTTP Basic auth.",keywords:"password secret credentials token"},{default:ot(()=>[fi("password")?(b(),x("span",Zg,[N(M(vn("password").effective||"—")+" ",1),Ze("password")?(b(),x("span",$g,[E(tt,{name:"lock",size:10}),N(M(Ze("password")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[35]||(d[35]=w=>Ee.password=w),type:"password",class:"field w-64",placeholder:"••••••••"},null,512)),[[Bt,Ee.password]])]),_:1}),E(lt,{title:"TLS verification",desc:"Only affects HTTPS. Skip only for self-signed test servers.",keywords:"tls certificate verify insecure https"},{default:ot(()=>[fi("insecureSkipVerify")?(b(),x("span",Hg,[N(M(vn("insecureSkipVerify").effective==="true"?"Skip verification":"Verify certificate")+" ",1),Ze("insecureSkipVerify")?(b(),x("span",Ug,[E(tt,{name:"lock",size:10}),N(M(Ze("insecureSkipVerify")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:Ee.insecureSkipVerify,"onUpdate:modelValue":d[36]||(d[36]=w=>Ee.insecureSkipVerify=w),options:yo},null,8,["modelValue"]))]),_:1}),E(lt,{title:"Base path",desc:"Working directory under the server URL and health-check target, e.g. /Documents.",keywords:"base path directory folder root"},{default:ot(()=>[fi("basePath")?(b(),x("span",jg,[N(M(vn("basePath").effective||"—")+" ",1),Ze("basePath")?(b(),x("span",Wg,[E(tt,{name:"lock",size:10}),N(M(Ze("basePath")),1)])):V("",!0)])):xt((b(),x("input",{key:1,"onUpdate:modelValue":d[37]||(d[37]=w=>Ee.basePath=w),class:"field w-64 font-mono",placeholder:"/Documents"},null,512)),[[Bt,Ee.basePath]])]),_:1}),f("div",Kg,[Os.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:Mi.value||!Et.available,onClick:xo},M(Mi.value?"Saving…":on.value?"Save organization settings":"Save settings"),9,qg)),on.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:di.value||!Et.available,onClick:wo},M(di.value?"Testing…":"Test connection"),9,Gg)),ci.value?(b(),x("span",Yg,M(ci.value),1)):V("",!0),Xe.value&&!on.value?(b(),x("span",Jg,"Checked "+M(Cr()),1)):V("",!0),sn.value&&!on.value?(b(),x("span",{key:4,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Ci(sn.value.status)])},[d[96]||(d[96]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(sn.value.detail||sn.value.status),1)],2)):V("",!0)])])],64)):V("",!0),is("drives-local")?(b(),x("div",Xg,[f("div",Qg,[f("div",t_,[E(tt,{name:"monitor",size:20})]),d[97]||(d[97]=f("div",{class:"min-w-0"},[f("div",{class:"text-sm font-semibold text-ink"},"Local Storage"),f("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))]),W.loaded&&!W.available?(b(),x("div",e_,[E(tt,{name:"lock",size:14,class:"mr-1 inline"}),d[98]||(d[98]=N(" Local storage is currently disabled by your administrator. Contact them to enable it. ",-1))])):W.loaded&&!W.rootConfigured?(b(),x("div",n_,[E(tt,{name:"alertTriangle",size:14,class:"mr-1 inline"}),d[99]||(d[99]=N(" No storage root has been configured by your administrator yet. ",-1))])):V("",!0),W.canEditOrg?(b(),x("div",i_,[d[100]||(d[100]=f("div",{class:"text-xs text-ink-muted"},"Manage your own settings, or organization-wide settings that apply to every user.",-1)),E(dn,{modelValue:Yt.value,"onUpdate:modelValue":d[38]||(d[38]=w=>Yt.value=w),options:nn},null,8,["modelValue"])])):V("",!0),ye.value?(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":W.orgEnabled,disabled:!W.available,"onUpdate:modelValue":es},null,8,["model-value","disabled"])]),_:1})):(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":W.enabled,disabled:!W.available||!W.orgEnabled,"onUpdate:modelValue":es},null,8,["model-value","disabled"])]),_:1})),!ye.value&&W.available&&!W.orgEnabled?(b(),x("div",s_,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[102]||(d[102]=N("Local storage is turned off for your organization",-1)),W.canEditOrg?(b(),x("span",o_,[...d[101]||(d[101]=[N(" — switch to ",-1),f("span",{class:"font-semibold"},"Organization",-1),N(" to turn it back on",-1)])])):V("",!0),d[103]||(d[103]=N(". ",-1))])):V("",!0),ye.value?(b(),x("div",r_,[E(tt,{name:"users",size:13,class:"mr-1 inline"}),d[104]||(d[104]=N("These are organization-wide settings — they apply to everyone in ",-1)),f("span",a_,M(e.organizationName||"your organization"),1),d[105]||(d[105]=N(", who all share the organization folder. Members can additionally enable a private folder inside it. ",-1))])):Ie.value?(b(),x("div",l_," As a superadmin you manage the global storage root in the API Server panel. The effective configuration is shown below. ")):V("",!0),ye.value?(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":W.allowPrivate,disabled:!W.available,"onUpdate:modelValue":ko},null,8,["model-value","disabled"])]),_:1})):V("",!0),ye.value?V("",!0):(b(),x(wt,{key:9},[E(lt,{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:ot(()=>[f("div",u_,[(b(!0),x(wt,null,ce(W.mounts,w=>(b(),x("div",{key:w.id,class:"flex flex-wrap items-center gap-2"},[f("span",c_,M(w.path),1),w.kind==="shared"?(b(),x("span",d_,[E(tt,{name:"users",size:10}),d[106]||(d[106]=N("Shared with your organization",-1))])):(b(),x("span",f_,[E(tt,{name:"lock",size:10}),d[107]||(d[107]=N("Private to you",-1))])),jn.value[w.id]?(b(),x("span",{key:2,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-semibold",St(jn.value[w.id].status)])},[d[108]||(d[108]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(jn.value[w.id].status),1)],2)):V("",!0)]))),128)),W.mounts.length?V("",!0):(b(),x("div",h_,M(W.rootConfigured?"No folder assigned yet.":"Waiting for the administrator to configure a storage root."),1))])]),_:1}),W.isOrgUser&&W.allowPrivate?(b(),oe(lt,{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:ot(()=>[E(tn,{"model-value":W.privateFolder,disabled:!W.available||!W.orgEnabled,"onUpdate:modelValue":ns},null,8,["model-value","disabled"])]),_:1})):W.isOrgUser&&!W.allowPrivate?(b(),x("div",p_,[E(tt,{name:"lock",size:13,class:"mr-1 inline"}),d[109]||(d[109]=N("Private folders are turned off by your organization. ",-1))])):V("",!0)],64)),E(lt,{title:"Access mode",desc:"Read-only prevents uploads, deletes and folder creation.",keywords:"read only write access mode permission"},{default:ot(()=>[On("readOnly")?(b(),x("span",m_,[N(M(Ei(le("readOnly").effective))+" ",1),mi("readOnly")?(b(),x("span",g_,[E(tt,{name:"lock",size:10}),N(M(mi("readOnly")),1)])):V("",!0)])):(b(),oe(dn,{key:1,modelValue:Un.value,"onUpdate:modelValue":d[39]||(d[39]=w=>Un.value=w),options:Oi},null,8,["modelValue"]))]),_:1}),f("div",__,[Ie.value?V("",!0):(b(),x("button",{key:0,class:"btn-accent",disabled:yn.value||!W.available,onClick:Rs},M(yn.value?"Saving…":ye.value?"Save organization settings":"Save settings"),9,v_)),ye.value?V("",!0):(b(),x("button",{key:1,class:"btn-ghost",disabled:pi.value||!W.available,onClick:zr},M(pi.value?"Testing…":"Test folder"),9,y_)),rn.value?(b(),x("span",b_,M(rn.value),1)):V("",!0),te.value&&!ye.value?(b(),x("span",x_,"Checked "+M(Ns()),1)):V("",!0),mt.value&&!ye.value?(b(),x("span",{key:4,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",St(mt.value.status)])},[d[110]||(d[110]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(mt.value.detail||mt.value.status),1)],2)):V("",!0)])])):V("",!0)])):Z.id==="profile"?(b(),x("div",w_,[E(lt,{block:"",title:"Profile photo",desc:"PNG or JPG, up to ~1.5 MB. Stored on this device.",keywords:"avatar photo picture"},{default:ot(()=>[f("div",k_,[Ct(gt).avatar?(b(),x("img",{key:0,src:Ct(gt).avatar,alt:"Avatar",class:"h-16 w-16 rounded-full object-cover"},null,8,S_)):(b(),x("div",P_,M(To.value),1)),f("div",T_,[f("label",L_,[E(tt,{name:"upload",size:15,class:"mr-1.5 inline"}),d[111]||(d[111]=N("Upload ",-1)),f("input",{type:"file",accept:"image/*",class:"hidden",onChange:Po},null,32)]),Ct(gt).avatar?(b(),x("button",{key:0,class:"btn-ghost",onClick:Ar},"Remove")):V("",!0)])])]),_:1}),E(lt,{title:"Display name",desc:"The name shown on your public profile.",keywords:"display name profile"},{default:ot(()=>[xt(f("input",{"onUpdate:modelValue":d[40]||(d[40]=w=>Ct(gt).displayName=w),class:"field w-56",placeholder:"Jane O.",onBlur:d[41]||(d[41]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).displayName]])]),_:1}),E(lt,{block:"",title:"Bio",desc:"A short description others can see.",keywords:"bio about description"},{default:ot(()=>[xt(f("textarea",{"onUpdate:modelValue":d[42]||(d[42]=w=>Ct(gt).bio=w),rows:"3",maxlength:"240",class:"field w-full resize-none",placeholder:"Flight director, North yard operations…",onBlur:d[43]||(d[43]=w=>Zt("Saved."))},null,544),[[Bt,Ct(gt).bio]]),f("div",M_,M((Ct(gt).bio||"").length)+"/240",1)]),_:1}),E(lt,{title:"Show email on profile",desc:"Let teammates see your email address.",keywords:"show email public visibility"},{default:ot(()=>[E(tn,{modelValue:Ct(gt).showEmail,"onUpdate:modelValue":d[44]||(d[44]=w=>Ct(gt).showEmail=w)},null,8,["modelValue"])]),_:1})])):Z.id==="security"?(b(),x("div",C_,[E(lt,{block:"",title:"Two-factor authentication",desc:"Require a one-time code at sign-in.",keywords:"two factor 2fa authentication security"},{default:ot(()=>[f("div",O_,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Ct(gt).twoFactor?"bg-success-soft text-success-fg":"bg-surface-2 text-ink-secondary"])},[d[112]||(d[112]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(Ct(gt).twoFactor?"Enabled":"Disabled"),1)],2),!Ct(gt).twoFactor&&!Wn.value?(b(),x("button",{key:0,class:"btn-accent",onClick:Ii},"Enable 2FA")):Ct(gt).twoFactor?(b(),x("button",{key:1,class:"btn-ghost",onClick:Ir},"Disable")):V("",!0)]),Wn.value?(b(),x("div",E_,[f("div",z_,[d[114]||(d[114]=f("div",{class:"grid h-28 w-28 place-items-center rounded bg-white p-2"},[f("svg",{viewBox:"0 0 100 100",class:"h-full w-full"},[f("rect",{width:"100",height:"100",fill:"#fff"}),f("g",{fill:"#0F1E3D"},[f("rect",{x:"6",y:"6",width:"24",height:"24"}),f("rect",{x:"70",y:"6",width:"24",height:"24"}),f("rect",{x:"6",y:"70",width:"24",height:"24"}),f("rect",{x:"12",y:"12",width:"12",height:"12",fill:"#fff"}),f("rect",{x:"76",y:"12",width:"12",height:"12",fill:"#fff"}),f("rect",{x:"12",y:"76",width:"12",height:"12",fill:"#fff"}),f("rect",{x:"40",y:"10",width:"8",height:"8"}),f("rect",{x:"52",y:"20",width:"8",height:"8"}),f("rect",{x:"40",y:"40",width:"8",height:"8"}),f("rect",{x:"60",y:"44",width:"8",height:"8"}),f("rect",{x:"44",y:"60",width:"8",height:"8"}),f("rect",{x:"70",y:"60",width:"8",height:"8"}),f("rect",{x:"80",y:"72",width:"8",height:"8"}),f("rect",{x:"60",y:"80",width:"8",height:"8"})])])],-1)),f("div",A_,[d[113]||(d[113]=f("div",{class:"text-xs text-ink-secondary"},"Scan with an authenticator app, or enter this secret:",-1)),f("div",I_,M(Lo.value),1),f("div",N_,[xt(f("input",{"onUpdate:modelValue":d[45]||(d[45]=w=>Ai.value=w),inputmode:"numeric",maxlength:"6",class:"field w-28 font-mono tracking-[0.3em]",placeholder:"000000"},null,512),[[Bt,Ai.value]]),f("button",{class:"btn-accent",onClick:Mo},"Verify & enable")]),zt.value?(b(),x("p",B_,M(zt.value),1)):V("",!0)])])])):V("",!0),Ct(gt).twoFactor&&ss.value.length?(b(),x("div",D_,[d[115]||(d[115]=f("div",{class:"text-xs font-semibold text-ink"},"Recovery codes",-1)),d[116]||(d[116]=f("div",{class:"mt-0.5 text-xs text-ink-muted"},"Store these somewhere safe — each works once.",-1)),f("div",R_,[(b(!0),x(wt,null,ce(ss.value,w=>(b(),x("span",{key:w,class:"select-all"},M(w),1))),128))])])):V("",!0),d[117]||(d[117]=f("p",{class:"mt-2 text-xs text-ink-muted"},"Prototype — codes are generated locally until the account service verifies them.",-1))]),_:1}),E(lt,{block:"",title:"Active sessions",desc:"Devices currently signed in to your account.",keywords:"sessions devices logout sign out remote"},{default:ot(()=>[f("div",F_,[f("div",V_,[f("div",Z_,[E(tt,{name:"monitor",size:18})]),f("div",$_,[f("div",H_,[N(M(Nr())+" on "+M(Co())+" ",1),d[118]||(d[118]=f("span",{class:"ml-1 rounded-full bg-success-soft px-2 py-0.5 text-[10px] font-semibold text-success-fg"},"This device",-1))]),f("div",U_,"Signed in "+M(Ct(Gl)(Ct(Br))),1)]),f("button",{class:"btn-ghost",onClick:d[46]||(d[46]=w=>a("logout"))},"Log out")])]),d[119]||(d[119]=f("button",{class:"btn-ghost mt-2 opacity-60",disabled:"",title:"Requires the account service"}," Log out all other devices ",-1)),d[120]||(d[120]=f("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})])):Z.id==="team"?(b(),x("div",j_,[$t.id?(b(),x("div",W_,[E(lt,{block:"",title:`Edit user — ${$t.email}`,desc:"Update details, change role, reset password, or set verified.",keywords:"edit user update role password verified organization"},{default:ot(()=>[f("div",K_,[f("div",q_,[xt(f("input",{"onUpdate:modelValue":d[47]||(d[47]=w=>$t.email=w),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Bt,$t.email]]),xt(f("select",{"onUpdate:modelValue":d[48]||(d[48]=w=>$t.role=w),class:"field w-32",disabled:as.value,title:as.value?"You cannot change your own role":""},[(b(!0),x(wt,null,ce(Fs.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,Y_))),128))],8,G_),[[wi,$t.role]])]),l.value?xt((b(),x("select",{key:0,"onUpdate:modelValue":d[49]||(d[49]=w=>$t.organization=w),class:"field",title:"Organization"},[(b(!0),x(wt,null,ce(Oo.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,J_))),128))],512)),[[wi,$t.organization]]):V("",!0),xt(f("input",{"onUpdate:modelValue":d[50]||(d[50]=w=>$t.password=w),type:"password",class:"field",placeholder:"New password (leave blank to keep current)"},null,512),[[Bt,$t.password]]),f("label",X_,[E(tn,{modelValue:$t.verified,"onUpdate:modelValue":d[51]||(d[51]=w=>$t.verified=w)},null,8,["modelValue"]),d[121]||(d[121]=N(" Email verified ",-1))]),f("div",Q_,[f("button",{class:"btn-accent",disabled:Ri.value,onClick:Fr},M(Ri.value?"Saving…":"Save changes"),9,tv),f("button",{class:"btn-ghost",onClick:An},"Cancel"),zn.value?(b(),x("span",ev,M(zn.value),1)):V("",!0),as.value?(b(),x("span",nv,"Editing your own account — role locked.")):V("",!0)])])]),_:1},8,["title"])])):(b(),x("div",iv,[E(lt,{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:ot(()=>[f("div",sv,[f("div",ov,[xt(f("input",{"onUpdate:modelValue":d[52]||(d[52]=w=>ee.email=w),type:"email",class:"field flex-1",placeholder:"name@pilotvault.local"},null,512),[[Bt,ee.email]]),xt(f("select",{"onUpdate:modelValue":d[53]||(d[53]=w=>ee.role=w),class:"field w-32"},[(b(!0),x(wt,null,ce(Fs.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,rv))),128))],512),[[wi,ee.role]])]),l.value?xt((b(),x("select",{key:0,"onUpdate:modelValue":d[54]||(d[54]=w=>ee.organization=w),class:"field",title:"Organization"},[(b(!0),x(wt,null,ce(Oo.value,w=>(b(),x("option",{key:w.value,value:w.value},M(w.label),9,av))),128))],512)),[[wi,ee.organization]]):(b(),x("div",lv,[d[122]||(d[122]=N(" New users join your organization: ",-1)),f("span",uv,M(e.organizationName||"—"),1)])),xt(f("input",{"onUpdate:modelValue":d[55]||(d[55]=w=>ee.password=w),type:"password",class:"field",placeholder:"Temporary password (min 8 chars)"},null,512),[[Bt,ee.password]]),f("div",cv,[f("button",{class:"btn-accent",disabled:Ni.value,onClick:Dr},M(Ni.value?"Creating…":"Create user"),9,dv),vi.value?(b(),x("span",fv,M(vi.value),1)):V("",!0)])])]),_:1})])),f("div",hv,[f("div",pv,[d[123]||(d[123]=f("div",null,[f("div",{class:"eyebrow"},"Team"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All users")],-1)),f("button",{class:"btn-ghost",disabled:Kn.value,onClick:Gn},M(Kn.value?"Loading…":"Refresh"),9,mv)]),rs.value?(b(),x("div",gv,M(rs.value),1)):!os.value.length&&!Kn.value?(b(),x("div",_v,"No users yet.")):(b(),x("div",vv,[f("table",yv,[f("thead",null,[f("tr",bv,[(b(),x(wt,null,ce(["User","Role","Organization","Status",""],w=>f("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"},M(w),1)),64))])]),f("tbody",null,[(b(!0),x(wt,null,ce(os.value,w=>(b(),x("tr",{key:w.id,class:Ot(["border-b border-line last:border-0",$t.id===w.id?"bg-accent-soft":""])},[f("td",xv,[f("span",wv,M(w.email),1),w.email===e.email?(b(),x("span",kv,"(you)")):V("",!0)]),f("td",Sv,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",v(w.role||"user")])},[E(tt,{name:g(w.role||"user"),size:12},null,8,["name"]),N(M(h(w.role||"user")),1)],2)]),f("td",Pv,[f("span",{class:Ot(["text-sm",w.organizationName?"text-ink-secondary":"text-ink-muted"])},M(w.organizationName||"—"),3)]),f("td",Tv,[f("span",{class:Ot(["text-xs",w.verified?"text-success-fg":"text-ink-muted"])},M(w.verified?"Verified":"Unverified"),3)]),f("td",Lv,[qe.value===w.id?(b(),x(wt,{key:0},[d[124]||(d[124]=f("span",{class:"mr-2 text-xs text-ink-muted"},"Remove?",-1)),f("button",{class:"btn-ghost mr-1",onClick:d[56]||(d[56]=Ht=>qe.value="")},"Cancel"),f("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Ht=>Rr(w)}," Remove ",8,Mv)],64)):(b(),x("div",Cv,[f("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Ht=>ls(w)},[E(tt,{name:"settings",size:14}),d[125]||(d[125]=N(" Edit ",-1))],8,Ov),w.email!==e.email?(b(),x("button",{key:0,class:"btn-ghost inline-flex items-center gap-1.5",onClick:Ht=>qe.value=w.id},[E(tt,{name:"trash",size:14}),d[126]||(d[126]=N(" Remove ",-1))],8,Ev)):V("",!0)]))])],2))),128))])])]))])])):Z.id==="organizations"?(b(),x("div",zv,[wn.id?(b(),x("div",Av,[E(lt,{block:"",title:"Rename organization",desc:"Update the organization's display name.",keywords:"rename organization edit"},{default:ot(()=>[f("div",Iv,[xt(f("input",{"onUpdate:modelValue":d[57]||(d[57]=w=>wn.name=w),class:"field",placeholder:"Organization name",onKeyup:Vl(zo,["enter"])},null,544),[[Bt,wn.name]]),f("div",Nv,[f("button",{class:"btn-accent",onClick:zo},"Save changes"),f("button",{class:"btn-ghost",onClick:Vs},"Cancel"),kn.value?(b(),x("span",Bv,M(kn.value),1)):V("",!0)])])]),_:1})])):(b(),x("div",Dv,[E(lt,{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:ot(()=>[f("div",Rv,[xt(f("input",{"onUpdate:modelValue":d[58]||(d[58]=w=>In.name=w),class:"field",placeholder:"e.g. Northwind Aerial",onKeyup:Vl(Eo,["enter"])},null,544),[[Bt,In.name]]),f("div",Fv,[f("button",{class:"btn-accent",disabled:Fi.value,onClick:Eo},M(Fi.value?"Creating…":"Create organization"),9,Vv),Le.value?(b(),x("span",Zv,M(Le.value),1)):V("",!0)])])]),_:1})])),f("div",$v,[f("div",{class:"flex items-center justify-between px-5 py-4"},[d[127]||(d[127]=f("div",null,[f("div",{class:"eyebrow"},"Tenancy"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"All organizations")],-1)),f("button",{class:"btn-ghost",onClick:qn},"Refresh")]),Bi.value.length?(b(),x("div",Uv,[f("table",jv,[f("thead",null,[f("tr",Wv,[(b(),x(wt,null,ce(["Organization","Members",""],w=>f("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"},M(w),1)),64))])]),f("tbody",null,[(b(!0),x(wt,null,ce(Bi.value,w=>(b(),x("tr",{key:w.id,class:Ot(["border-b border-line last:border-0",wn.id===w.id?"bg-accent-soft":""])},[f("td",Kv,[f("span",qv,[E(tt,{name:"grid",size:14,class:"text-ink-muted"}),N(M(w.name),1)])]),f("td",Gv,M(Vi.value[w.id]||0),1),f("td",Yv,[yi.value===w.id?(b(),x(wt,{key:0},[d[128]||(d[128]=f("span",{class:"mr-2 text-xs text-ink-muted"},"Delete?",-1)),f("button",{class:"btn-ghost mr-1",onClick:d[59]||(d[59]=Ht=>yi.value="")},"Cancel"),f("button",{class:"rounded bg-danger px-3 py-1.5 text-sm font-semibold text-white transition hover:brightness-110",onClick:Ht=>Qe(w)}," Delete ",8,Jv)],64)):(b(),x("div",Xv,[f("button",{class:"btn-ghost inline-flex items-center gap-1.5",onClick:Ht=>Vr(w)},[E(tt,{name:"settings",size:14}),d[129]||(d[129]=N(" Rename ",-1))],8,Qv),f("button",{class:"btn-ghost inline-flex items-center gap-1.5",disabled:(Vi.value[w.id]||0)>0,title:(Vi.value[w.id]||0)>0?"Reassign or remove members first":"",onClick:Ht=>yi.value=w.id},[E(tt,{name:"trash",size:14}),d[130]||(d[130]=N(" Delete ",-1))],8,ty)]))])],2))),128))])])])):(b(),x("div",Hv,"No organizations yet."))])])):Z.id==="advanced"?(b(),x("div",ey,[f("div",ny,[E(lt,{title:"Export data",desc:"Download your settings and profile as JSON.",keywords:"export data download backup"},{default:ot(()=>[f("button",{class:"btn-ghost",onClick:bi},[E(tt,{name:"download",size:15,class:"mr-1.5 inline"}),d[131]||(d[131]=N("Export",-1))])]),_:1}),E(lt,{block:"",title:"Import data",desc:"Restore settings from a previous export.",keywords:"import data upload restore"},{default:ot(()=>[f("label",iy,[E(tt,{name:"upload",size:15,class:"mr-1.5 inline"}),d[132]||(d[132]=N("Choose file… ",-1)),f("input",{type:"file",accept:"application/json,.json",class:"hidden",onChange:Sn},null,32)]),us.value?(b(),x("p",sy,M(us.value),1)):V("",!0)]),_:1})]),f("div",oy,[f("div",ry,[E(tt,{name:"alertTriangle",size:18}),d[133]||(d[133]=f("h3",{class:"text-sm font-bold uppercase tracking-caps"},"Danger zone",-1))]),d[138]||(d[138]=f("p",{class:"mt-1 text-xs text-ink-secondary"},"Deleting your account is permanent and cannot be undone.",-1)),f("div",ay,[d[137]||(d[137]=f("div",{class:"text-sm font-semibold text-ink"},"Delete account",-1)),f("label",ly,[xt(f("input",{"onUpdate:modelValue":d[60]||(d[60]=w=>se.understand=w),type:"checkbox",class:"mt-0.5 h-4 w-4 accent-[var(--danger)]"},null,512),[[_c,se.understand]]),d[134]||(d[134]=N(" I understand this permanently deletes my account and all associated data. ",-1))]),f("div",uy,[f("label",cy,[d[135]||(d[135]=N("Type ",-1)),f("span",dy,M(Zs.value),1),d[136]||(d[136]=N(" to confirm",-1))]),xt(f("input",{"onUpdate:modelValue":d[61]||(d[61]=w=>se.typed=w),class:"field w-full max-w-[360px] font-mono",placeholder:Zs.value},null,8,fy),[[Bt,se.typed]])]),f("div",hy,[se.armed?(b(),x("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:se.cooldown>0,onClick:cs},M(se.cooldown>0?`Confirm in ${se.cooldown}s…`:"Permanently delete account"),9,my)):(b(),x("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:!Yn.value,onClick:Ao}," Delete account… ",8,py)),se.armed&&se.cooldown>0?(b(),x("span",gy,"Cooling-off period — read once more.")):V("",!0)]),se.msg?(b(),x("p",_y,M(se.msg),1)):V("",!0)])])])):V("",!0)],64))),128))])]),E(Qf,{name:"fade"},{default:ot(()=>[gi.value?(b(),x("div",vy,[E(tt,{name:"check",size:16,class:"text-success-fg"}),N(M(gi.value),1)])):V("",!0)]),_:1})]))}},by=Dp(yy,[["__scopeId","data-v-4fe25eb7"]]),xy={class:"grid h-full grid-cols-[248px_1fr] max-[900px]:grid-cols-1"},wy={class:"flex flex-col border-r border-line bg-surface-1 px-4 py-5 max-[900px]:hidden"},ky={class:"flex items-center gap-2.5 px-2 pb-5"},Sy={class:"flex flex-col gap-0.5"},Py=["onClick"],Ty={class:"mt-auto flex flex-col gap-2.5"},Ly={class:"rounded-lg bg-surface-2 p-3"},My={class:"flex items-center gap-2"},Cy={class:"text-xs font-semibold text-ink"},Oy={class:"mt-1.5 block font-mono text-[10.5px] text-ink-muted"},Ey={class:"flex items-center gap-2.5 px-2 py-1"},zy={class:"grid h-8 w-8 place-items-center rounded-full bg-[var(--navy-800)] text-xs font-bold text-white"},Ay={class:"min-w-0 flex-1"},Iy={class:"truncate text-[13px] font-semibold text-ink"},Ny={class:"flex items-center gap-1.5 text-[11px] text-ink-muted"},By=["title"],Dy={class:"overflow-y-auto"},Ry={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)"}},Fy={class:"mt-0.5 text-[22px] font-bold tracking-tightest text-ink"},Vy={class:"ml-auto flex items-center gap-3"},Zy={class:"flex h-10 w-60 items-center gap-2 rounded border border-line-strong bg-surface-1 px-3 max-[1100px]:hidden"},$y={key:0,class:"mx-auto flex max-w-[1240px] flex-col gap-5 p-7"},Hy={class:"grid grid-cols-4 gap-4 max-[1100px]:grid-cols-2 max-[560px]:grid-cols-1"},Uy={class:"flex items-center justify-between"},jy={class:"eyebrow"},Wy={class:"mt-2.5 text-[34px] font-bold leading-none tracking-tightest text-ink"},Ky={class:"grid grid-cols-[1.6fr_1fr] gap-5 max-[1100px]:grid-cols-1"},qy={class:"panel p-5"},Gy={class:"mb-3.5 flex items-center justify-between"},Yy={class:"panel p-5"},Jy={class:"mb-3.5 flex items-center justify-between"},Xy={class:"grid place-items-center py-10 text-center"},Qy={class:"panel overflow-hidden p-0"},t1={class:"flex items-center justify-between px-5 py-4"},e1={class:"flex gap-2"},n1={key:0,class:"px-5 py-12 text-center text-sm text-ink-muted"},i1={key:1,class:"overflow-x-auto"},s1={class:"w-full border-collapse text-sm"},o1={class:"text-left"},r1=["onClick"],a1={class:"px-5 py-3 font-mono font-bold text-ink"},l1={class:"px-5 py-3 text-ink-secondary"},u1={class:"px-5 py-3"},c1={class:"px-5 py-3 font-mono text-ink-secondary"},d1={class:"px-5 py-3"},f1={key:0,class:"flex items-center gap-2"},h1={class:"h-1.5 w-12 overflow-hidden rounded bg-surface-2"},p1={class:"font-mono text-xs text-ink-secondary"},m1={key:1,class:"font-mono text-xs text-ink-muted"},g1={class:"px-5 py-3 font-mono text-ink-secondary"},_1={class:"px-5 py-3 text-right"},v1=["onClick"],y1={key:1,class:"p-7"},b1={class:"mb-4 flex flex-wrap items-center gap-3"},x1={class:"font-mono text-mode font-bold text-ink"},w1={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"},k1={key:1,class:"ml-auto flex flex-wrap gap-1.5"},S1=["onClick"],P1={key:0,class:"panel grid place-items-center p-16 text-center"},T1={class:"pill"},L1={class:"pill"},M1={class:"pill"},C1={class:"mt-1 text-sm font-semibold text-ink"},O1={class:"pill"},E1={class:"mt-1 font-mono text-sm font-bold tabular text-ink"},z1={class:"grid grid-cols-2 gap-4 max-[820px]:grid-cols-1"},A1={class:"panel p-4"},I1={class:"flex items-center gap-4"},N1={class:"h-9 flex-1 overflow-hidden rounded border border-line bg-surface-2"},B1={class:"readout"},D1={class:"panel p-4"},R1={class:"readout"},F1={class:"panel p-4"},V1={class:"space-y-1.5 text-sm"},Z1={class:"flex justify-between"},$1={class:"text-ink"},H1={class:"flex justify-between"},U1={class:"text-ink"},j1={class:"flex justify-between"},W1={class:"font-mono tabular text-ink"},K1={class:"flex justify-between"},q1={class:"font-mono tabular text-ink"},G1={class:"panel p-4"},Y1={class:"space-y-1.5 text-sm"},J1={class:"flex justify-between"},X1={class:"font-mono tabular text-ink"},Q1={class:"flex justify-between"},tb={class:"font-mono tabular text-ink"},eb={class:"flex justify-between"},nb={class:"font-mono tabular text-ink"},ib={class:"panel col-span-2 p-4 max-[820px]:col-span-1"},sb={class:"panel p-4"},ob={class:"flex flex-wrap gap-2"},rb={class:"mt-2 min-h-[16px] text-xs text-ink-muted"},ab={class:"panel p-4"},lb={class:"h-[180px] overflow-y-auto font-mono text-xs"},ub={class:"text-ink-muted"},cb={class:"font-semibold text-accent"},db={class:"break-all text-ink"},fb={key:3,class:"p-7"},hb={class:"panel grid place-items-center p-16 text-center"},pb={class:"mt-3 text-sm font-medium text-ink-secondary"},mb={key:0,class:"mt-1 text-xs text-ink-muted"},gb={key:1,class:"mt-1 text-xs text-ink-muted"},_b={__name:"Dashboard",props:{email:{type:String,default:""},role:{type:String,default:"user"},organization:{type:String,default:""},organizationName:{type:String,default:""}},emits:["logout"],setup(e,{emit:i}){const o=e,a=i,l=xe({}),c=xe({}),h=J(null),g=J(!1),v=xe([]),P=J(""),k=J("Overview"),O=[["grid","Overview"],["radio","Live flights"],["route","Routes"],["calendar","Schedule"],["book","Logbook"],["fileText","Documents"],["server","Drives"],["settings","Settings"]],$=ht(()=>(O.find(([,_])=>_===k.value)||["grid"])[0]),F=J(""),nt=J(""),q=J("");let At=null,Dt=null,bt=!1;const ut=ht(()=>Object.keys(l).sort((_,m)=>(l[m].online?1:0)-(l[_].online?1:0)||_.localeCompare(m))),X=ht(()=>h.value?l[h.value]:null),ft=ht(()=>X.value&&X.value.telemetry||{}),jt=ht(()=>!!(X.value&&X.value.online)),de=ht(()=>{const _=ft.value;return typeof _.latitude=="number"&&typeof _.longitude=="number"&&(_.latitude||_.longitude)?{lat:_.latitude,lng:_.longitude}:null}),me=ht(()=>h.value&&c[h.value]||[]),vt=ht(()=>{const _=ft.value;return typeof _.velocityX=="number"&&typeof _.velocityY=="number"?Math.hypot(_.velocityX,_.velocityY):null});function Ft(_){return _.online?_.connected?["In flight","success"]:["Standby","accent"]:["Offline","neutral"]}function Tt(_){const m=_&&_.telemetry||{};return typeof m.velocityX=="number"&&typeof m.velocityY=="number"?Math.hypot(m.velocityX,m.velocityY):null}const G=ht(()=>ut.value.map(_=>{const m=l[_],T=m.telemetry||{},[B,I]=Ft(m);return{id:_,mission:m.model||(m.connected?"Drone linked":m.online?"App online":"No signal"),status:B,tone:I,alt:typeof T.altitude=="number"?T.altitude.toFixed(0)+" m":"—",battery:typeof T.batteryPercent=="number"?T.batteryPercent:null,speed:Tt(m)}})),st=ht(()=>ut.value.filter(_=>l[_].online).length),It=ht(()=>ut.value.filter(_=>l[_].online&&l[_].connected).length),Wt=ht(()=>ut.value.filter(_=>!l[_].online).length),kt=ht(()=>{const _=ut.value.map(m=>{var T;return(T=l[m].telemetry)==null?void 0:T.batteryPercent}).filter(m=>typeof m=="number");return _.length?Math.round(_.reduce((m,T)=>m+T,0)/_.length):null}),Vt=ht(()=>[{label:"Active flights",value:String(It.value),delta:`${st.value} online`,tone:"success",icon:"radio"},{label:"Avg battery",value:kt.value==null?"—":kt.value+"%",delta:kt.value==null?"no telemetry":kt.value<40?"low — watch":"nominal",tone:kt.value!=null&&kt.value<40?"danger":"neutral",icon:"battery"},{label:"Fleet size",value:String(ut.value.length),delta:`${It.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"}]),Y={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"},ue={success:"text-success-fg",danger:"text-danger-fg",warning:"text-amber-fg",neutral:"text-ink-muted",accent:"text-accent-soft-fg"},rt=ht(()=>{var T,B,I;const m=(o.email||"PV").split("@")[0].split(/[.\-_ ]+/).filter(Boolean);return((((T=m[0])==null?void 0:T[0])||"P")+(((B=m[1])==null?void 0:B[0])||((I=m[0])==null?void 0:I[1])||"V")).toUpperCase()}),yt={superadmin:"Superadmin",admin:"Admin",user:"Operator"},Kt=ht(()=>yt[o.role]||"Operator"),ge=ht(()=>o.organizationName||(o.role==="superadmin"?"All organizations":"No organization"));function qt(_){var T;l[_.deviceId]=_;const m=_.telemetry||{};typeof m.latitude=="number"&&typeof m.longitude=="number"&&(m.latitude||m.longitude)&&(c[_.deviceId]||(c[_.deviceId]=[]),c[_.deviceId].push([m.latitude,m.longitude]),c[_.deviceId].length>1e3&&c[_.deviceId].shift()),(!h.value||_.online&&!((T=l[h.value])!=null&&T.online))&&(h.value=_.deviceId)}function Ut(_){delete l[_],delete c[_],h.value===_&&(h.value=ut.value[0]||null)}function Pt(_){v.unshift({t:ql(Date.now()),tag:_.type||"?",text:JSON.stringify(Pe(_))}),v.length>200&&v.pop()}function Pe(_){const m={..._};return delete m.type,m}function Te(){const _=location.protocol==="https:"?"wss":"ws";At=new WebSocket(`${_}://${location.host}/bff/ws`),At.onopen=()=>g.value=!0,At.onclose=()=>{g.value=!1,bt||(Dt=setTimeout(Te,1500))},At.onerror=()=>At&&At.close(),At.onmessage=m=>{let T;try{T=JSON.parse(m.data)}catch{return}T.type==="snapshot"?(T.devices||[]).forEach(qt):T.type==="update"&&T.device?(qt(T.device),T.event&&T.device.deviceId===h.value&&Pt(T.event)):T.type==="removed"&&T.deviceId&&Ut(T.deviceId)}}async function nn(){if(!h.value)return q.value="No device selected.";if(!F.value.trim())return q.value="Enter a command name.";let _;if(nt.value.trim())try{_=JSON.parse(nt.value)}catch{return q.value="Payload is not valid JSON."}const{ok:m,body:T}=await ip(h.value,F.value.trim(),_);q.value=m?`Sent "${F.value.trim()}".`:`Error: ${T.error||"failed"}`}function we(_,m,T=""){return typeof _=="number"?_.toFixed(m)+T:"—"}function gn(_){h.value=_,k.value="Live flights"}return Ls(async()=>{(await Rh()).forEach(qt),Te()}),_r(()=>{bt=!0,Dt&&clearTimeout(Dt),At&&At.close()}),(_,m)=>{var T,B,I,D,j;return b(),x("div",xy,[f("aside",wy,[f("div",ky,[E(Mc,{size:26}),m[7]||(m[7]=f("span",{class:"text-[19px] tracking-tightest"},[f("span",{class:"font-medium text-ink-secondary"},"Pilot"),f("span",{class:"font-bold text-ink"},"Vault")],-1))]),f("nav",Sy,[(b(),x(wt,null,ce(O,([A,U])=>f("button",{key:U,class:Ot(["flex items-center gap-3 rounded px-3 py-2.5 text-left text-sm transition",k.value===U?"bg-accent-soft font-semibold text-accent-soft-fg":"font-medium text-ink-secondary hover:bg-surface-2"]),onClick:R=>k.value=U},[E(tt,{name:A,size:18,stroke:k.value===U?2.2:1.8},null,8,["name","stroke"]),N(" "+M(U),1)],10,Py)),64))]),f("div",Ty,[f("div",Ly,[f("div",My,[f("span",{class:Ot(["h-2 w-2 rounded-full",g.value?"bg-ready":"bg-caution"])},null,2),f("span",Cy,M(g.value?"Link healthy":"Reconnecting…"),1)]),f("span",Oy,"API gateway · "+M(g.value?"streaming":"retrying"),1)]),f("div",Ey,[f("div",zy,M(rt.value),1),f("div",Ay,[f("div",Iy,M(e.email||"Operator"),1),f("div",Ny,[E(tt,{name:"grid",size:11,class:"shrink-0"}),f("span",{class:"truncate",title:`${Kt.value} · ${ge.value}`},M(Kt.value)+" · "+M(ge.value),9,By)])]),f("button",{class:"text-ink-muted transition hover:text-ink",title:"Log out","aria-label":"Log out",onClick:m[0]||(m[0]=A=>a("logout"))},[E(tt,{name:"logout",size:16})])])])]),f("main",Dy,[f("header",Ry,[f("div",null,[m[8]||(m[8]=f("div",{class:"eyebrow"},"Live operations",-1)),f("h1",Fy,M(k.value),1)]),f("div",Vy,[f("div",Zy,[E(tt,{name:"search",size:16,class:"text-ink-muted"}),xt(f("input",{"onUpdate:modelValue":m[1]||(m[1]=A=>P.value=A),placeholder:"Search drones, routes…",class:"w-full border-none bg-transparent text-sm text-ink outline-none placeholder:text-ink-muted"},null,512),[[Bt,P.value]])]),f("button",{class:"btn-accent flex items-center gap-2",onClick:m[2]||(m[2]=A=>k.value="Live flights")},[E(tt,{name:"radio",size:16}),m[9]||(m[9]=N(" Live flights ",-1))])])]),k.value==="Overview"?(b(),x("div",$y,[f("div",Hy,[(b(!0),x(wt,null,ce(Vt.value,A=>(b(),x("div",{key:A.label,class:"panel p-5"},[f("div",Uy,[f("span",jy,M(A.label),1),E(tt,{name:A.icon,size:16,class:"text-ink-muted"},null,8,["name"])]),f("div",Wy,M(A.value),1),f("span",{class:Ot(["mt-2 block font-mono text-[11px]",ue[A.tone]])},M(A.delta),3)]))),128))]),f("div",Ky,[f("div",qy,[f("div",Gy,[m[11]||(m[11]=f("div",null,[f("div",{class:"eyebrow"},"Airspace"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Live map")],-1)),It.value?(b(),x("span",{key:0,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y.success])},[m[10]||(m[10]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(It.value)+" airborne ",1)],2)):V("",!0)]),E(Xl,{position:de.value,trail:me.value},null,8,["position","trail"])]),f("div",Yy,[f("div",Jy,[m[12]||(m[12]=f("div",null,[f("div",{class:"eyebrow"},"Today"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Schedule")],-1)),E(tt,{name:"clock",size:16,class:"text-ink-muted"})]),f("div",Xy,[E(tt,{name:"calendar",size:24,class:"text-ink-muted"}),m[13]||(m[13]=f("div",{class:"mt-2 text-sm font-medium text-ink-secondary"},"No missions scheduled",-1)),m[14]||(m[14]=f("div",{class:"mt-0.5 text-xs text-ink-muted"},"Scheduling is not wired to a backend yet.",-1))])])]),f("div",Qy,[f("div",t1,[m[17]||(m[17]=f("div",null,[f("div",{class:"eyebrow"},"Fleet"),f("div",{class:"mt-0.5 text-base font-semibold text-ink"},"Aircraft status")],-1)),f("div",e1,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y.success])},[m[15]||(m[15]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(It.value)+" in flight ",1)],2),Wt.value?(b(),x("span",{key:0,class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y.warning])},[m[16]||(m[16]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(Wt.value)+" offline ",1)],2)):V("",!0)])]),G.value.length?(b(),x("div",i1,[f("table",s1,[f("thead",null,[f("tr",o1,[(b(),x(wt,null,ce(["Aircraft","Mission","Status","Alt","Battery","Speed",""],A=>f("th",{key:A,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"},M(A),1)),64))])]),f("tbody",null,[(b(!0),x(wt,null,ce(G.value,(A,U)=>(b(),x("tr",{key:A.id,class:Ot(["cursor-pointer transition hover:bg-surface-2",U<G.value.length-1?"border-b border-line":""]),onClick:R=>gn(A.id)},[f("td",a1,M(A.id),1),f("td",l1,M(A.mission),1),f("td",u1,[f("span",{class:Ot(["inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold",Y[A.tone]])},[m[18]||(m[18]=f("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),N(M(A.status),1)],2)]),f("td",c1,M(A.alt),1),f("td",d1,[A.battery!=null?(b(),x("div",f1,[f("div",h1,[f("div",{class:Ot(["h-full",A.battery<40?"bg-caution":"bg-ready"]),style:ks({width:A.battery+"%"})},null,6)]),f("span",p1,M(A.battery)+"%",1)])):(b(),x("span",m1,"—"))]),f("td",g1,[N(M(A.speed==null?"—":A.speed.toFixed(1))+" ",1),m[19]||(m[19]=f("span",{class:"text-ink-muted"},"m/s",-1))]),f("td",_1,[f("button",{class:"btn-ghost inline-flex items-center gap-1.5 whitespace-nowrap",onClick:yc(R=>gn(A.id),["stop"])},[E(tt,{name:"play",size:14}),m[20]||(m[20]=N(" Track ",-1))],8,v1)])],10,r1))),128))])])])):(b(),x("div",n1," No aircraft connected yet. Devices appear here as they come online. "))])])):k.value==="Live flights"?(b(),x("div",y1,[f("div",b1,[f("span",x1,M(h.value||"No device selected"),1),X.value&&!jt.value?(b(),x("span",w1,"Offline")):V("",!0),ut.value.length?(b(),x("div",k1,[(b(!0),x(wt,null,ce(ut.value,A=>(b(),x("button",{key:A,class:Ot(["flex items-center gap-2 rounded border px-3 py-1.5 font-mono text-xs font-bold transition",A===h.value?"border-accent bg-accent-soft text-accent-soft-fg":"border-line bg-surface-1 text-ink-secondary hover:border-line-strong"]),onClick:U=>h.value=A},[f("span",{class:Ot(["h-2 w-2 rounded-full",l[A].online?"bg-ready":"bg-ink-muted"])},null,2),N(" "+M(A),1)],10,S1))),128))])):V("",!0)]),ut.value.length?(b(),x(wt,{key:1},[f("div",{class:Ot(["mb-4 grid gap-3",!jt.value&&X.value?"opacity-60":""]),style:{"grid-template-columns":"repeat(auto-fit, minmax(150px, 1fr))"}},[f("div",T1,[m[23]||(m[23]=f("div",{class:"eyebrow"},"Registration",-1)),f("div",{class:Ot(["mt-1 text-sm font-semibold",jt.value?((T=X.value)==null?void 0:T.registration)==="success"?"text-success-fg":"text-danger-fg":"text-ink"])},M(jt.value&&((B=X.value)!=null&&B.registration)?X.value.registration:"—"),3)]),f("div",L1,[m[24]||(m[24]=f("div",{class:"eyebrow"},"Drone link",-1)),f("div",{class:Ot(["mt-1 text-sm font-semibold",jt.value?(I=X.value)!=null&&I.connected?"text-success-fg":"text-danger-fg":"text-ink"])},M(X.value?jt.value?X.value.connected?"connected":"no drone":"app offline":"—"),3)]),f("div",M1,[m[25]||(m[25]=f("div",{class:"eyebrow"},"Model",-1)),f("div",C1,M(((D=X.value)==null?void 0:D.model)||"—"),1)]),f("div",O1,[m[26]||(m[26]=f("div",{class:"eyebrow"},"Last update",-1)),f("div",E1,M((j=X.value)!=null&&j.lastSeenMs?Ct(ql)(X.value.lastSeenMs):"—"),1)])],2),f("div",z1,[f("div",A1,[m[28]||(m[28]=f("div",{class:"mb-3 eyebrow"},"Battery",-1)),f("div",I1,[f("div",N1,[f("div",{class:Ot(["h-full transition-all",typeof ft.value.batteryPercent=="number"?ft.value.batteryPercent<20?"bg-warning":ft.value.batteryPercent<40?"bg-caution":"bg-ready":""]),style:ks({width:(typeof ft.value.batteryPercent=="number"?ft.value.batteryPercent:0)+"%"})},null,6)]),f("div",B1,[N(M(typeof ft.value.batteryPercent=="number"?ft.value.batteryPercent:"—"),1),m[27]||(m[27]=f("span",{class:"text-sm text-ink-secondary"},"%",-1))])])]),f("div",D1,[m[30]||(m[30]=f("div",{class:"mb-3 eyebrow"},"Altitude",-1)),f("div",R1,[N(M(we(ft.value.altitude,1)),1),m[29]||(m[29]=f("span",{class:"text-sm text-ink-secondary"}," m",-1))])]),f("div",F1,[m[35]||(m[35]=f("div",{class:"mb-3 eyebrow"},"Flight",-1)),f("div",V1,[f("div",Z1,[m[31]||(m[31]=f("span",{class:"text-ink-secondary"},"Mode",-1)),f("b",$1,M(ft.value.flightMode||"—"),1)]),f("div",H1,[m[32]||(m[32]=f("span",{class:"text-ink-secondary"},"Flying",-1)),f("b",U1,M(ft.value.isFlying==null?"—":ft.value.isFlying?"yes":"no"),1)]),f("div",j1,[m[33]||(m[33]=f("span",{class:"text-ink-secondary"},"GPS sats",-1)),f("b",W1,M(ft.value.satelliteCount==null?"—":ft.value.satelliteCount),1)]),f("div",K1,[m[34]||(m[34]=f("span",{class:"text-ink-secondary"},"Speed (H)",-1)),f("b",q1,M(vt.value==null?"—":we(vt.value,2," m/s")),1)])])]),f("div",G1,[m[39]||(m[39]=f("div",{class:"mb-3 eyebrow"},"Position",-1)),f("div",Y1,[f("div",J1,[m[36]||(m[36]=f("span",{class:"text-ink-secondary"},"Latitude",-1)),f("b",X1,M(we(ft.value.latitude,6)),1)]),f("div",Q1,[m[37]||(m[37]=f("span",{class:"text-ink-secondary"},"Longitude",-1)),f("b",tb,M(we(ft.value.longitude,6)),1)]),f("div",eb,[m[38]||(m[38]=f("span",{class:"text-ink-secondary"},"Vert. speed",-1)),f("b",nb,M(we(typeof ft.value.velocityZ=="number"?-ft.value.velocityZ:void 0,2," m/s")),1)])])]),f("div",ib,[m[40]||(m[40]=f("div",{class:"mb-3 eyebrow"},"Track",-1)),E(Xl,{position:de.value,trail:me.value},null,8,["position","trail"])]),f("div",sb,[m[41]||(m[41]=f("div",{class:"mb-3 eyebrow"},"Send command",-1)),f("div",ob,[xt(f("input",{"onUpdate:modelValue":m[3]||(m[3]=A=>F.value=A),class:"field flex-1",placeholder:"command (e.g. startConnection)"},null,512),[[Bt,F.value]]),xt(f("input",{"onUpdate:modelValue":m[4]||(m[4]=A=>nt.value=A),class:"field flex-1",placeholder:"payload JSON (optional)"},null,512),[[Bt,nt.value]]),f("button",{class:"btn-accent",onClick:nn},"Send")]),f("div",rb,M(q.value),1)]),f("div",ab,[m[42]||(m[42]=f("div",{class:"mb-3 eyebrow"},"Event log",-1)),f("div",lb,[(b(!0),x(wt,null,ce(v,(A,U)=>(b(),x("div",{key:U,class:"border-b border-line py-1"},[f("span",ub,M(A.t),1),f("span",cb,M(A.tag),1),f("span",db,M(A.text),1)]))),128))])])])],64)):(b(),x("div",P1,[E(tt,{name:"radio",size:28,class:"text-ink-muted"}),m[21]||(m[21]=f("div",{class:"mt-3 text-sm font-medium text-ink-secondary"},"No aircraft online",-1)),m[22]||(m[22]=f("div",{class:"mt-1 text-xs text-ink-muted"},"Live telemetry appears here once a drone connects.",-1))]))])):k.value==="Settings"?(b(),oe(by,{key:2,email:e.email,role:e.role,organization:e.organization,"organization-name":e.organizationName,onLogout:m[5]||(m[5]=A=>a("logout"))},null,8,["email","role","organization","organization-name"])):(b(),x("div",fb,[f("div",hb,[E(tt,{name:$.value,size:28,class:"text-ink-muted"},null,8,["name"]),f("div",pb,M(k.value),1),k.value==="Drives"?(b(),x("div",mb,[m[43]||(m[43]=N(" Browse and transfer files here once a drive is connected. Configure drives in ",-1)),f("button",{class:"font-semibold text-accent hover:underline",onClick:m[6]||(m[6]=A=>k.value="Settings")},"Settings → Integrations"),m[44]||(m[44]=N(". ",-1))])):(b(),x("div",gb,"This section is part of the console shell and has no backend yet."))])]))])])}}},vb={key:0,class:"h-full"},yb={key:1,class:"grid h-full place-items-center text-ink-muted text-sm"},bb={__name:"App",setup(e){const i=J(!1),o=J(null),a=J("user"),l=J(""),c=J(""),h=J("");function g(k){a.value=k&&k.role||"user",l.value=k&&k.organization||"",c.value=k&&k.organizationName||""}Ls(async()=>{h.value=(await Nh()).apiBase||"";const k=await Ul();k&&(o.value=k.email,g(k),await Yl()),i.value=!0});async function v(k){o.value=k,g(await Ul()),await Yl()}async function P(){lp(),await Dh(),o.value=null,a.value="user",l.value="",c.value=""}return(k,O)=>i.value?(b(),x("div",vb,[o.value?(b(),oe(_b,{key:0,email:o.value,role:a.value,organization:l.value,"organization-name":c.value,onLogout:P},null,8,["email","role","organization","organization-name"])):(b(),oe(Pp,{key:1,"default-api-base":h.value,onSignedIn:v},null,8,["default-api-base"]))])):(b(),x("div",yb,"Loading…"))}};Eh(bb).mount("#app");
|