77 lines
763 KiB
JavaScript
Raw Normal View History

2024-09-09 23:43:55 +08:00
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Q_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function iS(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}),n}var oS={exports:{}},bn="top",Ln="bottom",Nn="right",yn="left",Tc="auto",Dr=[bn,Ln,Nn,yn],So="start",lr="end",Z_="clippingParents",fh="viewport",Qo="popper",ev="reference",bd=Dr.reduce(function(t,e){return t.concat([e+"-"+So,e+"-"+lr])},[]),ph=[].concat(Dr,[Tc]).reduce(function(t,e){return t.concat([e,e+"-"+So,e+"-"+lr])},[]),tv="beforeRead",nv="read",sv="afterRead",iv="beforeMain",ov="main",rv="afterMain",av="beforeWrite",lv="write",cv="afterWrite",uv=[tv,nv,sv,iv,ov,rv,av,lv,cv];function Cs(t){return t?(t.nodeName||"").toLowerCase():null}function Fn(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function $o(t){var e=Fn(t).Element;return t instanceof e||t instanceof Element}function Gn(t){var e=Fn(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function gh(t){if(typeof ShadowRoot>"u")return!1;var e=Fn(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function rS(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var s=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Gn(o)||!Cs(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function aS(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(s){var i=e.elements[s],o=e.attributes[s]||{},r=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!Gn(i)||!Cs(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const mh={name:"applyStyles",enabled:!0,phase:"write",fn:rS,effect:aS,requires:["computeStyles"]};function Ss(t){return t.split("-")[0]}var mo=Math.max,rc=Math.min,cr=Math.round;function yd(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function dv(){return!/^((?!chrome|android).)*safari/i.test(yd())}function ur(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var s=t.getBoundingClientRect(),i=1,o=1;e&&Gn(t)&&(i=t.offsetWidth>0&&cr(s.width)/t.offsetWidth||1,o=t.offsetHeight>0&&cr(s.height)/t.offsetHeight||1);var r=$o(t)?Fn(t):window,a=r.visualViewport,l=!dv()&&n,c=(s.left+(l&&a?a.offsetLeft:0))/i,u=(s.top+(l&&a?a.offsetTop:0))/o,d=s.width/i,f=s.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function _h(t){var e=ur(t),n=t.offsetWidth,s=
* Bootstrap v5.3.2 (https://getbootstrap.com/)
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2024-09-09 23:43:55 +08:00
*/(function(t,e){(function(n,s){t.exports=s(qS)})(Q_,function(n){function s(z){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(z){for(const k in z)if(k!=="default"){const K=Object.getOwnPropertyDescriptor(z,k);Object.defineProperty(p,k,K.get?K:{enumerable:!0,get:()=>z[k]})}}return p.default=z,Object.freeze(p)}const i=s(n),o=new Map,r={set(z,p,k){o.has(z)||o.set(z,new Map);const K=o.get(z);if(!K.has(p)&&K.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(K.keys())[0]}.`);return}K.set(p,k)},get(z,p){return o.has(z)&&o.get(z).get(p)||null},remove(z,p){if(!o.has(z))return;const k=o.get(z);k.delete(p),k.size===0&&o.delete(z)}},a=1e6,l=1e3,c="transitionend",u=z=>(z&&window.CSS&&window.CSS.escape&&(z=z.replace(/#([^\s"#']+)/g,(p,k)=>`#${CSS.escape(k)}`)),z),d=z=>z==null?`${z}`:Object.prototype.toString.call(z).match(/\s([a-z]+)/i)[1].toLowerCase(),f=z=>{do z+=Math.floor(Math.random()*a);while(document.getElementById(z));return z},g=z=>{if(!z)return 0;let{transitionDuration:p,transitionDelay:k}=window.getComputedStyle(z);const K=Number.parseFloat(p),pe=Number.parseFloat(k);return!K&&!pe?0:(p=p.split(",")[0],k=k.split(",")[0],(Number.parseFloat(p)+Number.parseFloat(k))*l)},_=z=>{z.dispatchEvent(new Event(c))},m=z=>!z||typeof z!="object"?!1:(typeof z.jquery<"u"&&(z=z[0]),typeof z.nodeType<"u"),b=z=>m(z)?z.jquery?z[0]:z:typeof z=="string"&&z.length>0?document.querySelector(u(z)):null,w=z=>{if(!m(z)||z.getClientRects().length===0)return!1;const p=getComputedStyle(z).getPropertyValue("visibility")==="visible",k=z.closest("details:not([open])");if(!k)return p;if(k!==z){const K=z.closest("summary");if(K&&K.parentNode!==k||K===null)return!1}return p},$=z=>!z||z.nodeType!==Node.ELEMENT_NODE||z.classList.contains("disabled")?!0:typeof z.disabled<"u"?z.disabled:z.hasAttribute("disabled")&&z.getAttribute("disabled")!=="false",A=z=>{if(!document.documentElement.attachShadow)return null;if(typeof z.getRootNode=="function"){const p=z.getRootNode();return p instanceof ShadowRoot?p:null}return z instanceof ShadowRoot?z:z.parentNode?A(z.parentNode):null},D=()=>{},x=z=>{z.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,S=[],E=z=>{document.readyState==="loading"?(S.length||document.addEventListener("DOMContentLoaded",()=>{for(const p of S)p()}),S.push(z)):z()},T=()=>document.documentElement.dir==="rtl",C=z=>{E(()=>{const p=y();if(p){const k=z.NAME,K=p.fn[k];p.fn[k]=z.jQueryInterface,p.fn[k].Constructor=z,p.fn[k].noConflict=()=>(p.fn[k]=K,z.jQueryInterface)}})},B=(z,p=[],k=z)=>typeof z=="function"?z(...p):k,J=(z,p,k=!0)=>{if(!k){B(z);return}const pe=g(p)+5;let Ee=!1;const Ae=({target:Je})=>{Je===p&&(Ee=!0,p.removeEventListener(c,Ae),B(z))};p.addEventListener(c,Ae),setTimeout(()=>{Ee||_(p)},pe)},ae=(z,p,k,K)=>{const pe=z.length;let Ee=z.indexOf(p);return Ee===-1?!k&&K?z[pe-1]:z[0]:(Ee+=k?1:-1,K&&(Ee=(Ee+pe)%pe),z[Math.max(0,Math.min(Ee,pe-1))])},Y=/[^.]*(?=\..*)\.|.*/,L=/\..*/,I=/::\d+$/,V={};let Q=1;const Z={mouseenter:"mouseover",mouseleave:"mouseout"},le=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ye(z,p){return p&&`${p}::${Q++}`||z.uidEvent||Q++}function U(z){const p=ye(z);return z.uidEvent=p,V[p]=V[p]||{},V[p]}function X(z,p){return function k(K){return he(K,{delegateTarget:z}),k.oneOff&&N.off(z,K.type,p),p.apply(z,[K])}}function R(z,p,k){return function K(pe){const Ee=z.querySelectorAll(p);for(let{target:Ae}=pe;Ae&&Ae!==this;Ae=Ae.parentNode)for(const Je of Ee)if(Je===Ae)return he(pe,{delegateTa
2024-06-18 03:16:42 +08:00
* @vue/shared v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-09-09 23:43:55 +08:00
**//*! #__NO_SIDE_EFFECTS__ */function $h(t,e){const n=new Set(t.split(","));return e?s=>n.has(s.toLowerCase()):s=>n.has(s)}const _t={},nr=[],Un=()=>{},GS=()=>!1,Oc=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ah=t=>t.startsWith("onUpdate:"),Lt=Object.assign,Ch=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},JS=Object.prototype.hasOwnProperty,st=(t,e)=>JS.call(t,e),Fe=Array.isArray,sr=t=>Ka(t)==="[object Map]",Or=t=>Ka(t)==="[object Set]",zp=t=>Ka(t)==="[object Date]",Ye=t=>typeof t=="function",St=t=>typeof t=="string",Xs=t=>typeof t=="symbol",ut=t=>t!==null&&typeof t=="object",kv=t=>(ut(t)||Ye(t))&&Ye(t.then)&&Ye(t.catch),Sv=Object.prototype.toString,Ka=t=>Sv.call(t),XS=t=>Ka(t).slice(8,-1),$v=t=>Ka(t)==="[object Object]",Eh=t=>St(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ua=$h(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ic=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},QS=/-(\w)/g,Es=Ic(t=>t.replace(QS,(e,n)=>n?n.toUpperCase():"")),ZS=/\B([A-Z])/g,To=Ic(t=>t.replace(ZS,"-$1").toLowerCase()),Rc=Ic(t=>t.charAt(0).toUpperCase()+t.slice(1)),Tu=Ic(t=>t?`on${Rc(t)}`:""),Ti=(t,e)=>!Object.is(t,e),Gl=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},Av=(t,e,n,s=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:s,value:n})},ac=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cv=t=>{const e=St(t)?Number(t):NaN;return isNaN(e)?t:e};let Yp;const Ev=()=>Yp||(Yp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function jt(t){if(Fe(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],i=St(s)?s$(s):jt(s);if(i)for(const o in i)e[o]=i[o]}return e}else if(St(t)||ut(t))return t}const e$=/;(?![^(]*\))/g,t$=/:([^]+)/,n$=/\/\*[^]*?\*\//g;function s$(t){const e={};return t.replace(n$,"").split(e$).forEach(n=>{if(n){const s=n.split(t$);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Ce(t){let e="";if(St(t))e=t;else if(Fe(t))for(let n=0;n<t.length;n++){const s=Ce(t[n]);s&&(e+=s+" ")}else if(ut(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Qt(t){if(!t)return null;let{class:e,style:n}=t;return e&&!St(e)&&(t.class=Ce(e)),n&&(t.style=jt(n)),t}const i$="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",o$=$h(i$);function Pv(t){return!!t||t===""}function r$(t,e){if(t.length!==e.length)return!1;let n=!0;for(let s=0;n&&s<t.length;s++)n=Ao(t[s],e[s]);return n}function Ao(t,e){if(t===e)return!0;let n=zp(t),s=zp(e);if(n||s)return n&&s?t.getTime()===e.getTime():!1;if(n=Xs(t),s=Xs(e),n||s)return t===e;if(n=Fe(t),s=Fe(e),n||s)return n&&s?r$(t,e):!1;if(n=ut(t),s=ut(e),n||s){if(!n||!s)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const r in t){const a=t.hasOwnProperty(r),l=e.hasOwnProperty(r);if(a&&!l||!a&&l||!Ao(t[r],e[r]))return!1}}return String(t)===String(e)}function Ph(t,e){return t.findIndex(n=>Ao(n,e))}const me=t=>St(t)?t:t==null?"":Fe(t)||ut(t)&&(t.toString===Sv||!Ye(t.toString))?JSON.stringify(t,Tv,2):String(t),Tv=(t,e)=>e&&e.__v_isRef?Tv(t,e.value):sr(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[s,i],o)=>(n[Mu(s,o)+" =>"]=i,n),{})}:Or(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Mu(n))}:Xs(e)?Mu(e):ut(e)&&!Fe(e)&&!$v(e)?String(e):e,Mu=(t,e="")=>{var n;return Xs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
2024-06-18 03:16:42 +08:00
* @vue/reactivity v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-09-09 23:43:55 +08:00
**/let Dn;class Mv{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Dn,!e&&Dn&&(this.index=(Dn.scopes||(Dn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Dn;try{return Dn=this,e()}finally{Dn=n}}}on(){Dn=this}off(){Dn=this.parent}stop(e){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Dv(t){return new Mv(t)}function a$(t,e=Dn){e&&e.active&&e.effects.push(t)}function Lc(){return Dn}function Th(t){Dn&&Dn.cleanups.push(t)}let _o;class Mh{constructor(e,n,s,i){this.fn=e,this.trigger=n,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=5,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,a$(this,i)}get dirty(){if(this._dirtyLevel===2)return!1;if(this._dirtyLevel===3||this._dirtyLevel===4){this._dirtyLevel=1,Ni();for(let e=0;e<this._depsLength;e++){const n=this.deps[e];if(n.computed){if(n.computed.effect._dirtyLevel===2)return!0;if(l$(n.computed),this._dirtyLevel>=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Fi()}return this._dirtyLevel>=5}set dirty(e){this._dirtyLevel=e?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=$i,n=_o;try{return $i=!0,_o=this,this._runnings++,Up(this),this.fn()}finally{Kp(this),this._runnings--,_o=n,$i=e}}stop(){this.active&&(Up(this),Kp(this),this.onStop&&this.onStop(),this.active=!1)}}function l$(t){return t.value}function Up(t){t._trackId++,t._depsLength=0}function Kp(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)Ov(t.deps[e],t);t.deps.length=t._depsLength}}function Ov(t,e){const n=t.get(e);n!==void 0&&e._trackId!==n&&(t.delete(e),t.size===0&&t.cleanup())}let $i=!0,xd=0;const Iv=[];function Ni(){Iv.push($i),$i=!1}function Fi(){const t=Iv.pop();$i=t===void 0?!0:t}function Dh(){xd++}function Oh(){for(xd--;!xd&&kd.length;)kd.shift()()}function Rv(t,e,n){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&Ov(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const kd=[];function Lv(t,e,n){Dh();for(const s of t.keys()){if(!t.computed&&s.computed&&t.get(s)===s._trackId&&s._runnings>0){s._dirtyLevel=2;continue}let i;s._dirtyLevel<e&&(i??(i=t.get(s)===s._trackId))&&(s._shouldSchedule||(s._shouldSchedule=s._dirtyLevel===0),s.computed&&s._dirtyLevel===2&&(s._shouldSchedule=!0),s._dirtyLevel=e),s._shouldSchedule&&(i??(i=t.get(s)===s._trackId))&&(s.trigger(),(!s._runnings||s.allowRecurse)&&s._dirtyLevel!==3&&(s._shouldSchedule=!1,s.scheduler&&kd.push(s.scheduler)))}Oh()}const Nv=(t,e)=>{const n=new Map;return n.cleanup=t,n.computed=e,n},lc=new WeakMap,vo=Symbol(""),Sd=Symbol("");function Pn(t,e,n){if($i&&_o){let s=lc.get(t);s||lc.set(t,s=new Map);let i=s.get(n);i||s.set(n,i=Nv(()=>s.delete(n))),Rv(_o,i)}}function Gs(t,e,n,s,i,o){const r=lc.get(t);if(!r)return;let a=[];if(e==="clear")a=[...r.values()];else if(n==="length"&&Fe(t)){const l=Number(s);r.forEach((c,u)=>{(u==="length"||!Xs(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(r.get(n)),e){case"add":Fe(t)?Eh(n)&&a.push(r.get("length")):(a.push(r.get(vo)),sr(t)&&a.push(r.get(Sd)));break;case"delete":Fe(t)||(a.push(r.get(vo)),sr(t)&&a.push(r.get(Sd)));break;case"set":sr(t)&&a.push(r.get(vo));break}Dh();for(const l of a)l&&Lv(l,5);Oh()}function c$(t,e){const n=lc.get(t);return n&&n.get(e)}const u$=$h("__proto__,__v_isRef,__isVue"),Fv=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Xs)),qp=d$();function d$(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const s=Ze(this);for(let o=0,r=this.length;o<r;o++)Pn(s,"get",o+"");const i=s[e](...n);return i===-1||i===!1?s[e](...n.map(Ze)):i}}),["push","pop"
2024-06-18 03:16:42 +08:00
* @vue/runtime-core v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-09-09 23:43:55 +08:00
**/function Ai(t,e,n,s){try{return s?t(...s):t()}catch(i){qa(i,e,n)}}function Jn(t,e,n,s){if(Ye(t)){const i=Ai(t,e,n,s);return i&&kv(i)&&i.catch(o=>{qa(o,e,n)}),i}if(Fe(t)){const i=[];for(let o=0;o<t.length;o++)i.push(Jn(t[o],e,n,s));return i}}function qa(t,e,n,s=!0){const i=e?e.vnode:null;if(e){let o=e.parent;const r=e.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](t,r,a)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){Ni(),Ai(l,null,10,[t,r,a]),Fi();return}}I$(t,n,i,s)}function I$(t,e,n,s=!0){console.error(t)}let Ea=!1,$d=!1;const cn=[];let vs=0;const ir=[];let pi=null,fo=0;const Xv=Promise.resolve();let Bh=null;function en(t){const e=Bh||Xv;return t?e.then(this?t.bind(this):t):e}function R$(t){let e=vs+1,n=cn.length;for(;e<n;){const s=e+n>>>1,i=cn[s],o=Pa(i);o<t||o===t&&i.pre?e=s+1:n=s}return e}function Vh(t){(!cn.length||!cn.includes(t,Ea&&t.allowRecurse?vs+1:vs))&&(t.id==null?cn.push(t):cn.splice(R$(t.id),0,t),Qv())}function Qv(){!Ea&&!$d&&($d=!0,Bh=Xv.then(eb))}function L$(t){const e=cn.indexOf(t);e>vs&&cn.splice(e,1)}function Ad(t){Fe(t)?ir.push(...t):(!pi||!pi.includes(t,t.allowRecurse?fo+1:fo))&&ir.push(t),Qv()}function Zp(t,e,n=Ea?vs+1:0){for(;n<cn.length;n++){const s=cn[n];if(s&&s.pre){if(t&&s.id!==t.uid)continue;cn.splice(n,1),n--,s()}}}function Zv(t){if(ir.length){const e=[...new Set(ir)].sort((n,s)=>Pa(n)-Pa(s));if(ir.length=0,pi){pi.push(...e);return}for(pi=e,fo=0;fo<pi.length;fo++){const n=pi[fo];n.active!==!1&&n()}pi=null,fo=0}}const Pa=t=>t.id==null?1/0:t.id,N$=(t,e)=>{const n=Pa(t)-Pa(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function eb(t){$d=!1,Ea=!0,cn.sort(N$);try{for(vs=0;vs<cn.length;vs++){const e=cn[vs];e&&e.active!==!1&&Ai(e,null,14)}}finally{vs=0,cn.length=0,Zv(),Ea=!1,Bh=null,(cn.length||ir.length)&&eb()}}function F$(t,e,...n){if(t.isUnmounted)return;const s=t.vnode.props||_t;let i=n;const o=e.startsWith("update:"),r=o&&e.slice(7);if(r&&r in s){const u=`${r==="modelValue"?"model":r}Modifiers`,{number:d,trim:f}=s[u]||_t;f&&(i=n.map(g=>St(g)?g.trim():g)),d&&(i=n.map(ac))}let a,l=s[a=Tu(e)]||s[a=Tu(Es(e))];!l&&o&&(l=s[a=Tu(To(e))]),l&&Jn(l,t,6,i);const c=s[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Jn(c,t,6,i)}}function tb(t,e,n=!1){const s=e.emitsCache,i=s.get(t);if(i!==void 0)return i;const o=t.emits;let r={},a=!1;if(!Ye(t)){const l=c=>{const u=tb(c,e,!0);u&&(a=!0,Lt(r,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(ut(t)&&s.set(t,null),null):(Fe(o)?o.forEach(l=>r[l]=null):Lt(r,o),ut(t)&&s.set(t,r),r)}function Vc(t,e){return!t||!Oc(e)?!1:(e=e.slice(2).replace(/Once$/,""),st(t,e[0].toLowerCase()+e.slice(1))||st(t,To(e))||st(t,e))}let Wt=null,Hc=null;function uc(t){const e=Wt;return Wt=t,Hc=t&&t.type.__scopeId||null,e}function Ut(t){Hc=t}function Kt(){Hc=null}function Pe(t,e=Wt,n){if(!e||t._n)return t;const s=(...i)=>{s._d&&gg(-1);const o=uc(e);let r;try{r=t(...i)}finally{uc(o),s._d&&gg(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Du(t){const{type:e,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:g,ctx:_,inheritAttrs:m}=t,b=uc(t);let w,$;try{if(n.shapeFlag&4){const D=i||s,x=D;w=ss(c.call(x,D,u,d,g,f,_)),$=a}else{const D=e;w=ss(D.length>1?D(d,{attrs:a,slots:r,emit:l}):D(d,null)),$=e.props?a:V$(a)}}catch(D){pa.length=0,qa(D,t,1),w=Se(un)}let A=w;if($&&m!==!1){const D=Object.keys($),{shapeFlag:x}=A;D.length&&x&7&&(o&&D.some(Ah)&&($=H$($,o)),A=Mi(A,$,!1,!0))}return n.dirs&&(A=Mi(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),w=A,uc(b),w}function B$(t,e=!0){let n;for(let s=0;s<t.length;s++){const i=t[s];if(Da(i)){if(i.type!==un||i.children==="v-if"){if(n)return;n=i}}else return}return n}const V$=t=>{let e;for(const n in t)(n==="class"||n==="style"||Oc(n))&&((e||(e={}))[n]=t[n]);return e},H$=(t,e)=>{const n={};for(const s in t)(!Ah(s)||
2024-06-18 03:16:42 +08:00
* @vue/runtime-dom v3.4.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2024-09-09 23:43:55 +08:00
**/const WA="http://www.w3.org/2000/svg",zA="http://www.w3.org/1998/Math/MathML",Hs=typeof document<"u"?document:null,vg=Hs&&Hs.createElement("template"),YA={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,s)=>{const i=e==="svg"?Hs.createElementNS(WA,t):e==="mathml"?Hs.createElementNS(zA,t):n?Hs.createElement(t,{is:n}):Hs.createElement(t);return t==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:t=>Hs.createTextNode(t),createComment:t=>Hs.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Hs.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,s,i,o){const r=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{vg.innerHTML=s==="svg"?`<svg>${t}</svg>`:s==="mathml"?`<math>${t}</math>`:t;const a=vg.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[r?r.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},li="transition",Yr="animation",gr=Symbol("_vtc"),At=(t,{slots:e})=>Co(EA,Rb(t),e);At.displayName="Transition";const Ib={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},UA=At.props=Lt({},kb,Ib),so=(t,e=[])=>{Fe(t)?t.forEach(n=>n(...e)):t&&t(...e)},bg=t=>t?Fe(t)?t.some(e=>e.length>1):t.length>1:!1;function Rb(t){const e={};for(const J in t)J in Ib||(e[J]=t[J]);if(t.css===!1)return e;const{name:n="v",type:s,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=t,_=KA(i),m=_&&_[0],b=_&&_[1],{onBeforeEnter:w,onEnter:$,onEnterCancelled:A,onLeave:D,onLeaveCancelled:x,onBeforeAppear:y=w,onAppear:S=$,onAppearCancelled:E=A}=e,T=(J,ae,Y)=>{hi(J,ae?u:a),hi(J,ae?c:r),Y&&Y()},C=(J,ae)=>{J._isLeaving=!1,hi(J,d),hi(J,g),hi(J,f),ae&&ae()},B=J=>(ae,Y)=>{const L=J?S:$,I=()=>T(ae,J,Y);so(L,[ae,I]),yg(()=>{hi(ae,J?l:o),Fs(ae,J?u:a),bg(L)||wg(ae,s,m,I)})};return Lt(e,{onBeforeEnter(J){so(w,[J]),Fs(J,o),Fs(J,r)},onBeforeAppear(J){so(y,[J]),Fs(J,l),Fs(J,c)},onEnter:B(!1),onAppear:B(!0),onLeave(J,ae){J._isLeaving=!0;const Y=()=>C(J,ae);Fs(J,d),Fs(J,f),Nb(),yg(()=>{J._isLeaving&&(hi(J,d),Fs(J,g),bg(D)||wg(J,s,b,Y))}),so(D,[J,Y])},onEnterCancelled(J){T(J,!1),so(A,[J])},onAppearCancelled(J){T(J,!0),so(E,[J])},onLeaveCancelled(J){C(J),so(x,[J])}})}function KA(t){if(t==null)return null;if(ut(t))return[Lu(t.enter),Lu(t.leave)];{const e=Lu(t);return[e,e]}}function Lu(t){return Cv(t)}function Fs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[gr]||(t[gr]=new Set)).add(e)}function hi(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.remove(s));const n=t[gr];n&&(n.delete(e),n.size||(t[gr]=void 0))}function yg(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let qA=0;function wg(t,e,n,s){const i=t._endId=++qA,o=()=>{i===t._endId&&s()};if(n)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=Lb(t,e);if(!r)return s();const c=r+"end";let u=0;const d=()=>{t.removeEventListener(c,f),o()},f=g=>{g.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,f)}function Lb(t,e){const n=window.getComputedStyle(t),s=_=>(n[_]||"").split(", "),i=s(`${li}Delay`),o=s(`${li}Duration`),r=xg(i,o),a=s(`${Yr}Delay`),l=s(`${Yr}Duration`),c=xg(a,l);let u=null,d=0,f=0;e===li?r>0&&(u=li,d=r,f=o.length):e===Yr?c>0&&(u=Yr,d=c,f=l.length):(d=Math.max(r,c),u=d>0?r>c?li:Yr:null,f=u?u===li?o.length:l.length:0);const g=u===li&&/\b(transform|all)(,|$)/.test(s(`${li}Proper
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-09-09 23:43:55 +08:00
*/let zb;const Kc=t=>zb=t,Yb=Symbol();function Ld(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var ga;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(ga||(ga={}));function EC(){const t=Dv(!0),e=t.run(()=>ve({}));let n=[],s=[];const i=Bc({install(o){Kc(i),i._a=o,o.provide(Yb,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!CC?s.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}const Ub=()=>{};function Ng(t,e,n,s=Ub){t.push(e);const i=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),s())};return!n&&Lc()&&Th(i),i}function Uo(t,...e){t.slice().forEach(n=>{n(...e)})}const PC=t=>t();function Nd(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,s)=>t.set(s,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],i=t[n];Ld(i)&&Ld(s)&&t.hasOwnProperty(n)&&!Pt(s)&&!bo(s)?t[n]=Nd(i,s):t[n]=s}return t}const TC=Symbol();function MC(t){return!Ld(t)||!t.hasOwnProperty(TC)}const{assign:fi}=Object;function DC(t){return!!(Pt(t)&&t.effect)}function OC(t,e,n,s){const{state:i,actions:o,getters:r}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=i?i():{});const u=M$(n.state.value[t]);return fi(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=Bc(_e(()=>{Kc(n);const g=n._s.get(t);return r[f].call(g,g)})),d),{}))}return l=Kb(t,c,e,n,s,!0),l}function Kb(t,e,n={},s,i,o){let r;const a=fi({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],g;const _=s.state.value[t];!o&&!_&&(s.state.value[t]={}),ve({});let m;function b(E){let T;c=u=!1,typeof E=="function"?(E(s.state.value[t]),T={type:ga.patchFunction,storeId:t,events:g}):(Nd(s.state.value[t],E),T={type:ga.patchObject,payload:E,storeId:t,events:g});const C=m=Symbol();en().then(()=>{m===C&&(c=!0)}),u=!0,Uo(d,T,s.state.value[t])}const w=o?function(){const{state:T}=n,C=T?T():{};this.$patch(B=>{fi(B,C)})}:Ub;function $(){r.stop(),d=[],f=[],s._s.delete(t)}function A(E,T){return function(){Kc(s);const C=Array.from(arguments),B=[],J=[];function ae(I){B.push(I)}function Y(I){J.push(I)}Uo(f,{args:C,name:E,store:x,after:ae,onError:Y});let L;try{L=T.apply(this&&this.$id===t?this:x,C)}catch(I){throw Uo(J,I),I}return L instanceof Promise?L.then(I=>(Uo(B,I),I)).catch(I=>(Uo(J,I),Promise.reject(I))):(Uo(B,L),L)}}const D={_p:s,$id:t,$onAction:Ng.bind(null,f),$patch:b,$reset:w,$subscribe(E,T={}){const C=Ng(d,E,T.detached,()=>B()),B=r.run(()=>Bt(()=>s.state.value[t],J=>{(T.flush==="sync"?u:c)&&E({storeId:t,type:ga.direct,events:g},J)},fi({},l,T)));return C},$dispose:$},x=Ts(D);s._s.set(t,x);const S=(s._a&&s._a.runWithContext||PC)(()=>s._e.run(()=>(r=Dv()).run(e)));for(const E in S){const T=S[E];if(Pt(T)&&!DC(T)||bo(T))o||(_&&MC(T)&&(Pt(T)?T.value=_[E]:Nd(T,_[E])),s.state.value[t][E]=T);else if(typeof T=="function"){const C=A(E,T);S[E]=C,a.actions[E]=T}}return fi(x,S),fi(Ze(x),S),Object.defineProperty(x,"$state",{get:()=>s.state.value[t],set:E=>{b(T=>{fi(T,E)})}}),s._p.forEach(E=>{fi(x,r.run(()=>E({store:x,app:s._a,pinia:s,options:a})))}),_&&o&&n.hydrate&&n.hydrate(x.$state,_),c=!0,u=!0,x}function Qh(t,e,n){let s,i;const o=typeof e=="function";typeof t=="string"?(s=t,i=o?n:e):(i=t,s=t.id);function r(a,l){const c=dA();return a=a||(c?as(Yb,null):null),a&&Kc(a),a=zb,a._s.has(s)||(o?Kb(s,e,i,a):OC(s,i,a)),a._s.get(s)}return r.$id=s,r}/*!
* vue-router v4.2.5
* (c) 2023 Eduardo San Martin Morote
* @license MIT
2024-09-09 23:43:55 +08:00
*/const Zo=typeof window<"u";function IC(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const lt=Object.assign;function Bu(t,e){const n={};for(const s in e){const i=e[s];n[s]=cs(i)?i.map(t):t(i)}return n}const ma=()=>{},cs=Array.isArray,RC=/\/$/,LC=t=>t.replace(RC,"");function Vu(t,e,n="/"){let s,i={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),i=t(o)),a>-1&&(s=s||e.slice(0,a),r=e.slice(a,e.length)),s=VC(s??e,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function NC(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Fg(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function FC(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&_r(e.matched[s],n.matched[i])&&qb(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function _r(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function qb(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!BC(t[n],e[n]))return!1;return!0}function BC(t,e){return cs(t)?Bg(t,e):cs(e)?Bg(e,t):t===e}function Bg(t,e){return cs(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function VC(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let o=n.length-1,r,a;for(r=0;r<s.length;r++)if(a=s[r],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(r-(r===s.length?1:0)).join("/")}var Ia;(function(t){t.pop="pop",t.push="push"})(Ia||(Ia={}));var _a;(function(t){t.back="back",t.forward="forward",t.unknown=""})(_a||(_a={}));function HC(t){if(!t)if(Zo){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),LC(t)}const jC=/^[^#]+#/;function WC(t,e){return t.replace(jC,"#")+e}function zC(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const qc=()=>({left:window.pageXOffset,top:window.pageYOffset});function YC(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=zC(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function Vg(t,e){return(history.state?history.state.position-e:-1)+t}const Fd=new Map;function UC(t,e){Fd.set(t,e)}function KC(t){const e=Fd.get(t);return Fd.delete(t),e}let qC=()=>location.protocol+"//"+location.host;function Gb(t,e){const{pathname:n,search:s,hash:i}=e,o=t.indexOf("#");if(o>-1){let a=i.includes(t.slice(o))?t.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Fg(l,"")}return Fg(n,t)+s+i}function GC(t,e,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const g=Gb(t,location),_=n.value,m=e.value;let b=0;if(f){if(n.value=g,e.value=f,r&&r===_){r=null;return}b=m?f.position-m.position:0}else s(g);i.forEach(w=>{w(n.value,_,{delta:b,type:Ia.pop,direction:b?b>0?_a.forward:_a.back:_a.unknown})})};function l(){r=n.value}function c(f){i.push(f);const g=()=>{const _=i.indexOf(f);_>-1&&i.splice(_,1)};return o.push(g),g}function u(){const{history:f}=window;f.state&&f.replaceState(lt({},f.state,{scroll:qc()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Hg(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?qc():null}}function JC(t){const{history:e,location:n}=window,s={value:Gb(t,n)},i={value:e.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replace
2024-04-03 01:16:56 -04:00
(?:
2024-09-09 23:43:55 +08:00
(?:${Ft}:){7}(?:${Ft}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:${Ft}:){6}(?:${ns}|:${Ft}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:${Ft}:){5}(?::${ns}|(?::${Ft}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:${Ft}:){4}(?:(?::${Ft}){0,1}:${ns}|(?::${Ft}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:${Ft}:){3}(?:(?::${Ft}){0,2}:${ns}|(?::${Ft}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:${Ft}:){2}(?:(?::${Ft}){0,3}:${ns}|(?::${Ft}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:${Ft}:){1}(?:(?::${Ft}){0,4}:${ns}|(?::${Ft}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::${Ft}){0,5}:${ns}|(?::${Ft}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
2024-04-03 01:16:56 -04:00
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
2024-09-09 23:43:55 +08:00
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),BE=new RegExp(`(?:^${ns}$)|(?:^${Gc}$)`),VE=new RegExp(`^${ns}$`),HE=new RegExp(`^${Gc}$`),Jc=t=>t&&t.exact?BE:new RegExp(`(?:${bi(t)}${ns}${bi(t)})|(?:${bi(t)}${Gc}${bi(t)})`,"g");Jc.v4=t=>t&&t.exact?VE:new RegExp(`${bi(t)}${ns}${bi(t)}`,"g");Jc.v6=t=>t&&t.exact?HE:new RegExp(`${bi(t)}${Gc}${bi(t)}`,"g");const oy={exact:!1},ry=`${Jc.v4().source}\\/(3[0-2]|[12]?[0-9])`,ay=`${Jc.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,jE=new RegExp(`^${ry}$`),WE=new RegExp(`^${ay}$`),zE=({exact:t}=oy)=>t?jE:new RegExp(ry,"g"),YE=({exact:t}=oy)=>t?WE:new RegExp(ay,"g"),ly=zE({exact:!0}),cy=YE({exact:!0}),nf=t=>ly.test(t)?4:cy.test(t)?6:0;nf.v4=t=>ly.test(t);nf.v6=t=>cy.test(t);const Tn=Qh("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:"Total Received",value:"total_receive",unit:"GB",type:"number"},{display:"Total Sent",value:"total_sent",unit:"GB",type:"number"},{display:"Total Data",value:"total_data",unit:"GB",type:"number"},{display:"Date",value:"date",type:"date"}],Operator:[{display:"equal",value:"eq"},{display:"not equal",value:"neq"},{display:"larger than",value:"lgt"},{display:"less than",value:"lst"}],Action:[{display:"Restrict Peer",value:"restrict"},{display:"Delete Peer",value:"delete"}]}}}),actions:{async getConfigurations(){await wt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(t)},checkCIDR(t){return nf(t)!==0}}}),We=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n},UE={name:"navbar",setup(){const t=Tn(),e=Xe();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){wt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage="Failed to check available update",console.log(`Failed to get update: ${t.message}`))})}},Vi=t=>(Ut("data-v-a0b378dd"),t=t(),Kt(),t),KE=["data-bs-theme"],qE={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},GE={class:"sidebar-sticky pt-3"},JE={class:"nav flex-column px-2"},XE={class:"nav-item"},QE=Vi(()=>h("i",{class:"bi bi-house me-2"},null,-1)),ZE={class:"nav-item"},eP=Vi(()=>h("i",{class:"bi bi-gear me-2"},null,-1)),tP=Vi(()=>h("hr",{class:"text-body"},null,-1)),nP=Vi(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-body-text me-2"}),be(" Configurations ")],-1)),sP={class:"nav flex-column px-2"},iP={class:"nav-item"},oP=Vi(()=>h("hr",{class:"text-body"},null,-1)),rP=Vi(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-tools me-2"}
*
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
2024-09-09 23:43:55 +08:00
*/(function(){function t(x){var y=new Float64Array(16);if(x)for(var S=0;S<x.length;++S)y[S]=x[S];return y}function e(x,y){for(var S,E=t(),T=t(),C=0;C<16;++C)T[C]=y[C];n(T),n(T),n(T);for(var B=0;B<2;++B){E[0]=T[0]-65517;for(var C=1;C<15;++C)E[C]=T[C]-65535-(E[C-1]>>16&1),E[C-1]&=65535;E[15]=T[15]-32767-(E[14]>>16&1),S=E[15]>>16&1,E[14]&=65535,s(T,E,1-S)}for(var C=0;C<16;++C)x[2*C]=T[C]&255,x[2*C+1]=T[C]>>8}function n(x){for(var y=0;y<16;++y)x[(y+1)%16]+=(y<15?1:38)*Math.floor(x[y]/65536),x[y]&=65535}function s(x,y,S){for(var E,T=~(S-1),C=0;C<16;++C)E=T&(x[C]^y[C]),x[C]^=E,y[C]^=E}function i(x,y,S){for(var E=0;E<16;++E)x[E]=y[E]+S[E]|0}function o(x,y,S){for(var E=0;E<16;++E)x[E]=y[E]-S[E]|0}function r(x,y,S){for(var E=new Float64Array(31),T=0;T<16;++T)for(var C=0;C<16;++C)E[T+C]+=y[T]*S[C];for(var T=0;T<15;++T)E[T]+=38*E[T+16];for(var T=0;T<16;++T)x[T]=E[T];n(x),n(x)}function a(x,y){for(var S=t(),E=0;E<16;++E)S[E]=y[E];for(var E=253;E>=0;--E)r(S,S,S),E!==2&&E!==4&&r(S,S,y);for(var E=0;E<16;++E)x[E]=S[E]}function l(x){x[31]=x[31]&127|64,x[0]&=248}function c(x){for(var y,S=new Uint8Array(32),E=t([1]),T=t([9]),C=t(),B=t([1]),J=t(),ae=t(),Y=t([56129,1]),L=t([9]),I=0;I<32;++I)S[I]=x[I];l(S);for(var I=254;I>=0;--I)y=S[I>>>3]>>>(I&7)&1,s(E,T,y),s(C,B,y),i(J,E,C),o(E,E,C),i(C,T,B),o(T,T,B),r(B,J,J),r(ae,E,E),r(E,C,E),r(C,T,J),i(J,E,C),o(E,E,C),r(T,E,E),o(C,B,ae),r(E,C,Y),i(E,E,B),r(C,C,E),r(E,B,ae),r(B,T,L),r(T,J,J),s(E,T,y),s(C,B,y);return a(C,C),r(E,E,C),e(S,E),S}function u(){var x=new Uint8Array(32);return window.crypto.getRandomValues(x),x}function d(){var x=u();return l(x),x}function f(x,y){for(var S=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),E=0;E<4;++E)x[E]=S[E]+65+(25-S[E]>>8&6)-(51-S[E]>>8&75)-(61-S[E]>>8&15)+(62-S[E]>>8&3)}function g(x){var y,S=new Uint8Array(44);for(y=0;y<32/3;++y)f(S.subarray(y*4),x.subarray(y*3));return f(S.subarray(y*4),Uint8Array.from([x[y*3+0],x[y*3+1],0])),S[43]=61,String.fromCharCode.apply(null,S)}function _(x){let y=window.atob(x),S=y.length,E=new Uint8Array(S);for(let C=0;C<S;C++)E[C]=y.charCodeAt(C);return new Uint8Array(E.buffer)}function m(x,y){x.push(y&255,y>>>8&255,y>>>16&255,y>>>24&255)}function b(x,y){x.push(y&255,y>>>8&255)}function w(x,y){for(var S=0;S<y.length;++S)x.push(y[S]&255)}function $(x){for(var y=unescape(encodeURIComponent(x)),S=new Uint8Array(y.length),E=0;E<y.length;++E)S[E]=y.charCodeAt(E);return S}function A(x){if(!A.table){A.table=[];for(var y=0,S=0;S<256;y=++S){for(var E=0;E<8;++E)y=y&1?3988292384^y>>>1:y>>>1;A.table[S]=y}}for(var T=-1,C=0;C<x.length;++C)T=T>>>8^A.table[(T^x[C])&255];return(T^-1)>>>0}function D(x){for(var y=[],S=[],E=0,T=0;T<x.length;++T){var C=$(x[T].fileName),B=$(x[T].file),J=A(B);m(y,67324752),b(y,20),b(y,0),b(y,0),b(y,0),b(y,0),m(y,J),m(y,B.length),m(y,B.length),b(y,C.length),b(y,0),w(y,C),w(y,B),m(S,33639248),b(S,0),b(S,20),b(S,0),b(S,0),b(S,0),b(S,0),m(S,J),m(S,B.length),m(S,B.length),b(S,C.length),b(S,0),b(S,0),b(S,0),b(S,0),m(S,32),m(S,E),w(S,C),E+=30+B.length+C.length}return w(y,S),m(y,101010256),b(y,0),b(y,0),b(y,x.length),b(y,x.length),m(y,S.length),m(y,E),b(y,0),Uint8Array.from(y)}window.wireguard={generateKeypair:function(){var x=d(),y=c(x),S=u();return{publicKey:g(y),privateKey:g(x),presharedKey:g(S)}},generatePublicKey:function(x){return x=_(x),g(c(x))},generateZipFiles:function(x,y){var S=x.data,E=D(S),T=new Blob([E],{type:"application/zip"}),C=document.createElement("a");C.download=y,C.href=URL.createObjectURL(T),C.style.display="none",document.body.appendChild(C),C.click(),document.body.removeChild(C)}}})();const J3={name:"newConfiguration",setup(){return{store:Tn()}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:""},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1}},created(){this.wireguardGenerateKeypair()},methods:{wireguardGenerateKeypair(){const t=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=t.privateKey,this.newConfiguration.PublicKey
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
2024-09-09 23:43:55 +08:00
*/function tl(t){return t+.5|0}const wi=(t,e,n)=>Math.max(Math.min(t,n),e);function ia(t){return wi(tl(t*2.55),0,255)}function Pi(t){return wi(tl(t*255),0,255)}function Ws(t){return wi(tl(t/2.55)/100,0,1)}function xm(t){return wi(tl(t*100),0,100)}const Yn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Kd=[..."0123456789ABCDEF"],zF=t=>Kd[t&15],YF=t=>Kd[(t&240)>>4]+Kd[t&15],Dl=t=>(t&240)>>4===(t&15),UF=t=>Dl(t.r)&&Dl(t.g)&&Dl(t.b)&&Dl(t.a);function KF(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Yn[t[1]]*17,g:255&Yn[t[2]]*17,b:255&Yn[t[3]]*17,a:e===5?Yn[t[4]]*17:255}:(e===7||e===9)&&(n={r:Yn[t[1]]<<4|Yn[t[2]],g:Yn[t[3]]<<4|Yn[t[4]],b:Yn[t[5]]<<4|Yn[t[6]],a:e===9?Yn[t[7]]<<4|Yn[t[8]]:255})),n}const qF=(t,e)=>t<255?e(t):"";function GF(t){var e=UF(t)?zF:YF;return t?"#"+e(t.r)+e(t.g)+e(t.b)+qF(t.a,e):void 0}const JF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function i0(t,e,n){const s=e*Math.min(n,1-n),i=(o,r=(o+t/30)%12)=>n-s*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function XF(t,e,n){const s=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function QF(t,e,n){const s=i0(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function ZF(t,e,n,s,i){return t===i?(e-n)/s+(e<n?6:0):e===i?(n-t)/s+2:(t-e)/s+4}function kf(t){const n=t.r/255,s=t.g/255,i=t.b/255,o=Math.max(n,s,i),r=Math.min(n,s,i),a=(o+r)/2;let l,c,u;return o!==r&&(u=o-r,c=a>.5?u/(2-o-r):u/(o+r),l=ZF(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function Sf(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(Pi)}function $f(t,e,n){return Sf(i0,t,e,n)}function eB(t,e,n){return Sf(QF,t,e,n)}function tB(t,e,n){return Sf(XF,t,e,n)}function o0(t){return(t%360+360)%360}function nB(t){const e=JF.exec(t);let n=255,s;if(!e)return;e[5]!==s&&(n=e[6]?ia(+e[5]):Pi(+e[5]));const i=o0(+e[2]),o=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?s=eB(i,o,r):e[1]==="hsv"?s=tB(i,o,r):s=$f(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function sB(t,e){var n=kf(t);n[0]=o0(n[0]+e),n=$f(n),t.r=n[0],t.g=n[1],t.b=n[2]}function iB(t){if(!t)return;const e=kf(t),n=e[0],s=xm(e[1]),i=xm(e[2]);return t.a<255?`hsla(${n}, ${s}%, ${i}%, ${Ws(t.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const km={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Sm={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-09-09 23:43:55 +08:00
*/function Ns(){}const hB=(()=>{let t=0;return()=>t++})();function it(t){return t===null||typeof t>"u"}function vt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function nt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Ct(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Mn(t,e){return Ct(t)?t:e}function qe(t,e){return typeof t>"u"?e:t}const fB=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,a0=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ft(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ct(t,e,n,s){let i,o,r;if(vt(t))if(o=t.length,s)for(i=o-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<o;i++)e.call(n,t[i],i);else if(nt(t))for(r=Object.keys(t),o=r.length,i=0;i<o;i++)e.call(n,t[r[i]],r[i])}function bc(t,e){let n,s,i,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,s=t.length;n<s;++n)if(i=t[n],o=e[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function yc(t){if(vt(t))return t.map(yc);if(nt(t)){const e=Object.create(null),n=Object.keys(t),s=n.length;let i=0;for(;i<s;++i)e[n[i]]=yc(t[n[i]]);return e}return t}function l0(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function pB(t,e,n,s){if(!l0(t))return;const i=e[t],o=n[t];nt(i)&&nt(o)?Ba(i,o,s):e[t]=yc(o)}function Ba(t,e,n){const s=vt(e)?e:[e],i=s.length;if(!nt(t))return t;n=n||{};const o=n.merger||pB;let r;for(let a=0;a<i;++a){if(r=s[a],!nt(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],t,r,n)}return t}function ya(t,e){return Ba(t,e,{merger:gB})}function gB(t,e,n){if(!l0(t))return;const s=e[t],i=n[t];nt(s)&&nt(i)?ya(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=yc(i))}const Am={"":t=>t,x:t=>t.x,y:t=>t.y};function mB(t){const e=t.split("."),n=[];let s="";for(const i of e)s+=i,s.endsWith("\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function _B(t){const e=mB(t);return n=>{for(const s of e){if(s==="")break;n=n&&n[s]}return n}}function Ii(t,e){return(Am[e]||(Am[e]=_B(e)))(t)}function Af(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Va=t=>typeof t<"u",Ri=t=>typeof t=="function",Cm=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function vB(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const yt=Math.PI,bt=2*yt,bB=bt+yt,wc=Number.POSITIVE_INFINITY,yB=yt/180,Rt=yt/2,io=yt/4,Em=yt*2/3,xi=Math.log10,As=Math.sign;function wa(t,e,n){return Math.abs(t-e)<n}function Pm(t){const e=Math.round(t);t=wa(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(xi(t))),s=t/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function wB(t){const e=[],n=Math.sqrt(t);let s;for(s=1;s<n;s++)t%s===0&&(e.push(s),e.push(t/s));return n===(n|0)&&e.push(n),e.sort((i,o)=>i-o).pop(),e}function $r(t){return!isNaN(parseFloat(t))&&isFinite(t)}function xB(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function c0(t,e,n){let s,i,o;for(s=0,i=t.length;s<i;s++)o=t[s][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function rs(t){return t*(yt/180)}function Cf(t){return t*(180/yt)}function Tm(t){if(!Ct(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function u0(t,e){const n=e.x-t.x,s=e.y-t.y,i=Math.sqrt(n*n+s*s);let o=Math.atan2(s,n);return o<-.5*yt&&(o+=bt),{angle:o,distance:i}}function qd(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kB(t,e){return(t-e+bB)%bt-yt}function On(t){return(t%bt+bt)%bt}function Ha(t,e,n,s){const i=On(t),o=On(e),r=On(n),a=On(o-i),l=On(r-i),c=On(i-o),u=On(i-r);return i===o||i===r||s&&o===r||a>l&&c<u}function Zt(t,e,n){return Math.max(e,Math.min(n,t))}function SB(t){return Zt(t,-32768,32767)}function Us(t,e,n,s=1e-6){return t>=Math.min(e,n)-s&&t<=Math.max(e,n)+s}function Ef(t,e,n){n=n||(r=>t[r]<e);let s=t.length-1,i=0,o;for(;s-i>1;)o=i+s>>1,n(o)?i=o:s=o;return{lo:i,hi:s}}const Ks=(t,e,n,s)=>Ef(t,n,s?i=>{const o=t[i][e];return o<n||o===n&&t[i+1][e]===n}:i=>t[i][e]<n),$B=(t,e,n)=>Ef
* Chart.js v4.4.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
2024-09-09 23:43:55 +08:00
*/class P4{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,s,i){const o=n.listeners[i],r=n.duration;o.forEach(a=>a({chart:e,initial:n.initial,numSteps:r,currentStep:Math.min(s-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=f0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(e),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,s,e,"progress")),o.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let s=n.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,s)),s}listen(e,n,s){this._getAnims(e).listeners[n].push(s)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Bs=new P4;const zm="transparent",T4={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const s=Im(t||zm),i=s.valid&&Im(e||zm);return i&&i.valid?i.mix(s,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class M4{constructor(e,n,s,i){const o=n[s];i=oa([e.to,i,o,e.from]);const r=oa([e.from,o,i]);this._active=!0,this._fn=e.fn||T4[e.type||typeof r],this._easing=xa[e.easing]||xa.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=s,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=oa([e.to,n,i,e.from]),this._from=oa([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,s=this._duration,i=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||n<s),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,s)=>{e.push({res:n,rej:s})})}_notify(e){const n=e?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class M0{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!nt(e))return;const n=Object.keys(Et.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const o=e[i];if(!nt(o))return;const r={};for(const a of n)r[a]=o[a];(vt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(e,n){const s=n.options,i=O4(e,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&D4(e.options.$animations,s).then(()=>{e.options=s},()=>{}),o}_createAnimations(e,n){const s=this._properties,i=[],o=e.$animations||(e.$animations={}),r=Object.keys(n),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){e[c]=u;continue}o[c]=d=new M4(f,e,c,u),i.push(d)}return i}update(e,n){if(this._properties.size
`)>-1?t.split(`
`):t}function gH(t,e){const{element:n,datasetIndex:s,index:i}=e,o=t.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:t,label:r,parsed:o.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function E_(t,e){const n=t.chart.ctx,{body:s,footer:i,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=Yt(e.bodyFont),c=Yt(e.titleFont),u=Yt(e.footerFont),d=o.length,f=i.length,g=s.length,_=hn(e.padding);let m=_.height,b=0,w=s.reduce((D,x)=>D+x.before.length+x.lines.length+x.after.length,0);if(w+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),w){const D=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=g*D+(w-g)*l.lineHeight+(w-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let $=0;const A=function(D){b=Math.max(b,n.measureText(D).width+$)};return n.save(),n.font=c.string,ct(t.title,A),n.font=l.string,ct(t.beforeBody.concat(t.afterBody),A),$=e.displayColors?r+2+e.boxPadding:0,ct(s,D=>{ct(D.before,A),ct(D.lines,A),ct(D.after,A)}),$=0,n.font=u.string,ct(t.footer,A),n.restore(),b+=_.width,{width:b,height:m}}function mH(t,e){const{y:n,height:s}=e;return n<s/2?"top":n>t.height-s/2?"bottom":"center"}function _H(t,e,n,s){const{x:i,width:o}=s,r=n.caretSize+n.caretPadding;if(t==="left"&&i+o+r>e.width||t==="right"&&i-o-r<0)return!0}function vH(t,e,n,s){const{x:i,width:o}=n,{width:r,chartArea:{left:a,right:l}}=t;let c="center";return s==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),_H(c,t,e,n)&&(c="center"),c}function P_(t,e,n){const s=n.yAlign||e.yAlign||mH(t,n);return{xAlign:n.xAlign||e.xAlign||vH(t,e,n,s),yAlign:s}}function bH(t,e){let{x:n,width:s}=t;return e==="right"?n-=s:e==="center"&&(n-=s/2),n}function yH(t,e,n){let{y:s,height:i}=t;return e==="top"?s+=n:e==="bottom"?s-=i+n:s-=i/2,s}function T_(t,e,n,s){const{caretSize:i,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:g}=xo(r);let _=bH(e,a);const m=yH(e,l,c);return l==="center"?a==="left"?_+=c:a==="right"&&(_-=c):a==="left"?_-=Math.max(u,f)+i:a==="right"&&(_+=Math.max(d,g)+i),{x:Zt(_,0,s.width-e.width),y:Zt(m,0,s.height-e.height)}}function Wl(t,e,n){const s=hn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function M_(t){return ms([],Vs(t))}function wH(t,e,n){return Wi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function D_(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const e1={beforeTitle:Ns,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return n[e.dataIndex]}return""},afterTitle:Ns,beforeBody:Ns,beforeLabel:Ns,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return it(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ns,afterBody:Ns,beforeFooter:Ns,footer:Ns,afterFooter:Ns};function Sn(t,e,n,s){const i=t[e].call(n,s);return typeof i>"u"?e1[e].call(n,s):i}class O_ extends si{static positioners=aa;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void
]))+`;Ms.KANJI=new RegExp(Ya,"g");Ms.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ms.BYTE=new RegExp(Uj,"g");Ms.NUMERIC=new RegExp(k1,"g");Ms.ALPHANUMERIC=new RegExp(Yj,"g");const Kj=new RegExp("^"+Ya+"$"),qj=new RegExp("^"+k1+"$"),Gj=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ms.testKanji=function(e){return Kj.test(e)};Ms.testNumeric=function(e){return qj.test(e)};Ms.testAlphanumeric=function(e){return Gj.test(e)};(function(t){const e=jf,n=Ms;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,r){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?o.ccBits[0]:r<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function s(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(o,r){if(t.isValid(o))return o;try{return s(o)}catch{return r}}})(Ui);(function(t){const e=Bn,n=uu,s=cu,i=Ui,o=jf,r=7973,a=e.getBCHDigit(r);function l(f,g,_){for(let m=1;m<=40;m++)if(g<=t.getCapacity(m,_,f))return m}function c(f,g){return i.getCharCountIndicator(f,g)+4}function u(f,g){let _=0;return f.forEach(function(m){const b=c(m.mode,g);_+=b+m.getBitsLength()}),_}function d(f,g){for(let _=1;_<=40;_++)if(u(f,_)<=t.getCapacity(_,g,i.MIXED))return _}t.from=function(g,_){return o.isValid(g)?parseInt(g,10):_},t.getCapacity=function(g,_,m){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=i.BYTE);const b=e.getSymbolTotalCodewords(g),w=n.getTotalCodewordsCount(g,_),$=(b-w)*8;if(m===i.MIXED)return $;const A=$-c(m,g);switch(m){case i.NUMERIC:return Math.floor(A/10*3);case i.ALPHANUMERIC:return Math.floor(A/11*2);case i.KANJI:return Math.floor(A/13);case i.BYTE:default:return Math.floor(A/8)}},t.getBestVersionForData=function(g,_){let m;const b=s.from(_,s.M);if(Array.isArray(g)){if(g.length>1)return d(g,b);if(g.length===0)return 1;m=g[0]}else m=g;return l(m.mode,m.getLength(),b)},t.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let _=g<<12;for(;e.getBCHDigit(_)-a>=0;)_^=r<<e.getBCHDigit(_)-a;return g<<12|_}})(x1);var S1={};const ch=Bn,$1=1335,Jj=21522,J_=ch.getBCHDigit($1);S1.getEncodedBits=function(e,n){const s=e.bit<<3|n;let i=s<<10;for(;ch.getBCHDigit(i)-J_>=0;)i^=$1<<ch.getBCHDigit(i)-J_;return(s<<10|i)^Jj};var A1={};const Xj=Ui;function Er(t){this.mode=Xj.NUMERIC,this.data=t.toString()}Er.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Er.prototype.getLength=function(){return this.data.length};Er.prototype.getBitsLength=function(){return Er.getBitsLength(this.data.length)};Er.prototype.write=function(e){let n,s,i;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),i=parseInt(s,10),e.put(i,10);const o=this.data.length-n;o>0&&(s=this.data.substr(n),i=parseInt(s,10),e.put(i,o*3+1))};var Qj=Er;const Zj=Ui,pd=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Pr(t){this.mode=Zj.ALPHANUMERIC,this.data=t}Pr.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Pr.prototype.getLength=function(){return this.data.length};Pr.prototype.getBitsLength=function(){return Pr.getBitsLength(this.data.length)};Pr.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let s=pd.indexOf(this.data[n])*45;s+=pd.indexOf(this.data[n+1]),e.put(s,11)}this.data.length%2&&e.put(pd.indexOf(this.data[n]),6)};var eW
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var aW=Mr,C1={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,s,i){var o={},r={};r[s]=0;var a=e.PriorityQueue.make();a.push(s,0);for(var l,c,u,d,f,g,_,m,b;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(g=f[u],_=d+g,m=r[u],b=typeof r[u]>"u",(b||m>_)&&(r[u]=_,a.push(u,_),o[u]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var w=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(n,s){for(var i=[],o=s;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,s,i){var o=e.single_source_shortest_paths(n,s,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var s=e.PriorityQueue,i={},o;n=n||{};for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);return i.queue=[],i.sorter=n.sorter||s.default_sorter,i},default_sorter:function(n,s){return n.cost-s.cost},push:function(n,s){var i={value:n,cost:s};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(C1);var lW=C1.exports;(function(t){const e=Ui,n=Qj,s=eW,i=iW,o=aW,r=Ms,a=Bn,l=lW;function c(w){return unescape(encodeURIComponent(w)).length}function u(w,$,A){const D=[];let x;for(;(x=w.exec(A))!==null;)D.push({data:x[0],index:x.index,mode:$,length:x[0].length});return D}function d(w){const $=u(r.NUMERIC,e.NUMERIC,w),A=u(r.ALPHANUMERIC,e.ALPHANUMERIC,w);let D,x;return a.isKanjiModeEnabled()?(D=u(r.BYTE,e.BYTE,w),x=u(r.KANJI,e.KANJI,w)):(D=u(r.BYTE_KANJI,e.BYTE,w),x=[]),$.concat(A,D,x).sort(function(S,E){return S.index-E.index}).map(function(S){return{data:S.data,mode:S.mode,length:S.length}})}function f(w,$){switch($){case e.NUMERIC:return n.getBitsLength(w);case e.ALPHANUMERIC:return s.getBitsLength(w);case e.KANJI:return o.getBitsLength(w);case e.BYTE:return i.getBitsLength(w)}}function g(w){return w.reduce(function($,A){const D=$.length-1>=0?$[$.length-1]:null;return D&&D.mode===A.mode?($[$.length-1].data+=A.data,$):($.push(A),$)},[])}function _(w){const $=[];for(let A=0;A<w.length;A++){const D=w[A];switch(D.mode){case e.NUMERIC:$.push([D,{data:D.data,mode:e.ALPHANUMERIC,length:D.length},{data:D.data,mode:e.BYTE,length:D.length}]);break;case e.ALPHANUMERIC:$.push([D,{data:D.data,mode:e.BYTE,length:D.length}]);break;case e.KANJI:$.push([D,{data:D.data,mode:e.BYTE,length:c(D.data)}]);break;case e.BYTE:$.push([{data:D.data,mode:e.BYTE,length:c(D.data)}])}}return $}function m(w,$){const A={},D={start:{}};let x=["start"];for(let y=0;y<w.length;y++){const S=w[y],E=[];for(let T=0;T<S.length;T++){const C=S[T],B=""+y+T;E.push(B),A[B]={node:C,lastCount:0},D[B]={};for(let J=0;J<x.length;J++){const ae=x[J];A[ae]&&A[ae].node.mode===C.mode?(D[ae][B]=f(A[ae].lastCount+C.length,C.mode)-f(A[ae].lastCount,C.mode),A[ae].lastCount+=C.length):(A[ae]&&(A[ae].lastCount=C.length),D[ae][B]=f(C.length,C.mode)+4+e.getCharCountIndicator(C.mode,$))}}x=E}for(let y=0;y<x.length;y++)D[x[y]].end=0;return{map:D,table:A}}function b(w,$){let A;const D=e.getBestModeForData(w);if(A=e.from($,D),A!==e.BYTE&&A.bit<D.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(A)+`.
Suggested mode is: `+e.toString(D));switch(A===e.KANJI&&!a.isKanjiModeEnabled()&&(A=e.BYTE),A){case e.NUMERIC:return new n(w);case e.ALPHANUMERIC:return new s(w);case e.KANJI:return new o(w);case e.BYTE:return new i(w)}}t.fromArray=function($){return $.reduce(function(A,D){return typeof D=="string"?A.push(b(D,null)):D.data&&A.push(b(D.data,D.mode)),A},[])},t.fromString=function($,A){const D=d($,a.isKanjiModeEnabled()),x=_(D),y=m(x,A),S=l.find_path(y.map,"start","end"),E=[];for(let T=1;T<S.length-1;T++)E.push(y.table[S[T]].node);return t.fromArray(g(E))},t.rawSplit=function($){return t.fromArray(d($,a.isKanjiModeEnabled()))}})(A1);const hu=Bn,gd=cu,cW=Hj,uW=jj,dW=_1,hW=v1,uh=b1,dh=uu,fW=zj,Pc=x1,pW=S1,gW=Ui,md=A1;function mW(t,e){const n=t.size,s=hW.getPositions(e);for(let i=0;i<s.length;i++){const o=s[i][0],r=s[i][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||n<=o+a))for(let l=-1;l<=7;l++)r+l<=-1||n<=r+l||(a>=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(o+a,r+l,!0,!0):t.set(o+a,r+l,!1,!0))}}function _W(t){const e=t.size;for(let n=8;n<e-8;n++){const s=n%2===0;t.set(n,6,s,!0),t.set(6,n,s,!0)}}function vW(t,e){const n=dW.getPositions(e);for(let s=0;s<n.length;s++){const i=n[s][0],o=n[s][1];for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)r===-2||r===2||a===-2||a===2||r===0&&a===0?t.set(i+r,o+a,!0,!0):t.set(i+r,o+a,!1,!0)}}function bW(t,e){const n=t.size,s=Pc.getEncodedBits(e);let i,o,r;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+n-8-3,r=(s>>a&1)===1,t.set(i,o,r,!0),t.set(o,i,r,!0)}function _d(t,e,n){const s=t.size,i=pW.getEncodedBits(e,n);let o,r;for(o=0;o<15;o++)r=(i>>o&1)===1,o<6?t.set(o,8,r,!0):o<8?t.set(o+1,8,r,!0):t.set(s-15+o,8,r,!0),o<8?t.set(8,s-o-1,r,!0):o<9?t.set(8,15-o-1+1,r,!0):t.set(8,15-o-1,r,!0);t.set(s-8,8,1,!0)}function yW(t,e){const n=t.size;let s=-1,i=n-1,o=7,r=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(i,a-l)){let c=!1;r<e.length&&(c=(e[r]>>>o&1)===1),t.set(i,a-l,c),o--,o===-1&&(r++,o=7)}if(i+=s,i<0||n<=i){i-=s,s=-s;break}}}function wW(t,e,n){const s=new cW;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),gW.getCharCountIndicator(l.mode,t)),l.write(s)});const i=hu.getSymbolTotalCodewords(t),o=dh.getTotalCodewordsCount(t,e),r=(i-o)*8;for(s.getLengthInBits()+4<=r&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);const a=(r-s.getLengthInBits())/8;for(let l=0;l<a;l++)s.put(l%2?17:236,8);return xW(s,t,e)}function xW(t,e,n){const s=hu.getSymbolTotalCodewords(e),i=dh.getTotalCodewordsCount(e,n),o=s-i,r=dh.getBlocksCount(e,n),a=s%r,l=r-a,c=Math.floor(s/r),u=Math.floor(o/r),d=u+1,f=c-u,g=new fW(f);let _=0;const m=new Array(r),b=new Array(r);let w=0;const $=new Uint8Array(t.buffer);for(let S=0;S<r;S++){const E=S<l?u:d;m[S]=$.slice(_,_+E),b[S]=g.encode(m[S]),_+=E,w=Math.max(w,E)}const A=new Uint8Array(s);let D=0,x,y;for(x=0;x<w;x++)for(y=0;y<r;y++)x<m[y].length&&(A[D++]=m[y][x]);for(x=0;x<f;x++)for(y=0;y<r;y++)A[D++]=b[y][x];return A}function kW(t,e,n,s){let i;if(Array.isArray(t))i=md.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const u=md.rawSplit(t);c=Pc.getBestVersionForData(u,n)}i=md.fromString(t,c||40)}else throw new Error("Invalid data");const o=Pc.getBestVersionForData(i,n);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
2024-08-05 15:39:11 -04:00
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+o+`.
2024-09-09 23:43:55 +08:00
`);const r=wW(e,n,i),a=hu.getSymbolSize(e),l=new uW(a);return mW(l,e),_W(l),vW(l,e),_d(l,n,0),e>=7&&bW(l,e),yW(l,r),isNaN(s)&&(s=uh.getBestMask(l,_d.bind(null,l,n))),uh.applyMask(s,l),_d(l,n,s),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:s,segments:i}}g1.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let s=gd.M,i,o;return typeof n<"u"&&(s=gd.from(n.errorCorrectionLevel,gd.M),i=Pc.from(n.version),o=uh.from(n.maskPattern),n.toSJISFunc&&hu.setToSJISFunction(n.toSJISFunc)),kW(e,i,s,o)};var E1={},Wf={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let s=n.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+n);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(o){return[o,o]}))),s.length===6&&s.push("F","F");const i=parseInt(s.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+s.slice(0,6).join("")}}t.getOptions=function(s){s||(s={}),s.color||(s.color={});const i=typeof s.margin>"u"||s.margin===null||s.margin<0?4:s.margin,o=s.width&&s.width>=21?s.width:void 0,r=s.scale||4;return{width:o,scale:o?4:r,margin:i,color:{dark:e(s.color.dark||"#000000ff"),light:e(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},t.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},t.getImageWidth=function(s,i){const o=t.getScale(s,i);return Math.floor((s+i.margin*2)*o)},t.qrToImageData=function(s,i,o){const r=i.modules.size,a=i.modules.data,l=t.getScale(r,o),c=Math.floor((r+o.margin*2)*l),u=o.margin*l,d=[o.color.light,o.color.dark];for(let f=0;f<c;f++)for(let g=0;g<c;g++){let _=(f*c+g)*4,m=o.color.light;if(f>=u&&g>=u&&f<c-u&&g<c-u){const b=Math.floor((f-u)/l),w=Math.floor((g-u)/l);m=d[a[b*r+w]?1:0]}s[_++]=m.r,s[_++]=m.g,s[_++]=m.b,s[_]=m.a}}})(Wf);(function(t){const e=Wf;function n(i,o,r){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=r,o.width=r,o.style.height=r+"px",o.style.width=r+"px"}function s(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,r,a){let l=a,c=r;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),r||(c=s()),l=e.getOptions(l);const u=e.getImageWidth(o.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return e.qrToImageData(f.data,o,l),n(d,c,u),d.putImageData(f,0,0),c},t.renderToDataURL=function(o,r,a){let l=a;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),l||(l={});const c=t.render(o,r,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(E1);var P1={};const SW=Wf;function X_(t,e){const n=t.a/255,s=e+'="'+t.hex+'"';return n<1?s+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function vd(t,e,n){let s=t+e;return typeof n<"u"&&(s+=" "+n),s}function $W(t,e,n){let s="",i=0,o=!1,r=0;for(let a=0;a<t.length;a++){const l=Math.floor(a%e),c=Math.floor(a/e);!l&&!o&&(o=!0),t[a]?(r++,a>0&&l>0&&t[a-1]||(s+=o?vd("M",l+n,.5+c+n):vd("m",i,0),i=0,o=!1),l+1<e&&t[a+1]||(s+=vd("h",r),r=0)):i++}return s}P1.render=function(e,n,s){const i=SW.getOptions(n),o=e.modules.size,r=e.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+X_(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+X_(i.color.dark,"stroke")+' d="'+$W(r,o,i.margin)+'"/>',u='viewBox="0 0 '+a+" "+a+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+u+' shape-rendering="crispEdges">'+l+c+`</svg>
`;return typeof s=="function"&&s(null,f),f};const AW=Bj,hh=g1,T1=E1,CW=P1;function zf(t,e,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!AW())throw new Error("Callback required as last argument");if(a){if(r<2)throw new Error("Too few arguments provided");r===2?(i=n,n=e,e=s=void 0):r===3&&(e.getContext&&typeof i>"u"?(i=s,s=void 0):(i=s,s=n,n=e,e=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(n=e,e=s=void 0):r===2&&!e.getContext&&(s=n,n=e,e=void 0),new Promise(function(l,c){try{const u=hh.create(n,s);l(t(u,e,s))}catch(u){c(u)}})}try{const l=hh.create(n,s);i(null,t(l,e,s))}catch(l){i(l)}}Lo.create=hh.create;Lo.toCanvas=zf.bind(null,T1.render);Lo.toDataURL=zf.bind(null,T1.renderToDataURL);Lo.toString=zf.bind(null,function(t,e,n){return CW.render(t,n)});const EW={name:"peerQRCode",props:{peerConfigData:String},mounted(){Lo.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},PW={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},TW={class:"container d-flex h-100 w-100"},MW={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},DW={class:"card rounded-3 shadow"},OW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},IW=h("h4",{class:"mb-0"},"QR Code",-1),RW={class:"card-body"},LW={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function NW(t,e,n,s,i,o){return M(),F("div",PW,[h("div",TW,[h("div",MW,[h("div",DW,[h("div",OW,[IW,h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=r=>this.$emit("close"))})]),h("div",RW,[h("canvas",LW,null,512)])])])])])}const FW=We(EW,[["render",NW]]),BW={name:"nameInput",props:{bulk:Boolean,data:Object,saving:Boolean}},VW=h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1),HW=["disabled"];function jW(t,e,n,s,i,o){return M(),F("div",{class:Ce({inactiveField:this.bulk})},[VW,Oe(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data.name=r),id:"peer_name_textbox",placeholder:""},null,8,HW),[[je,this.data.name]])],2)}const WW=We(BW,[["render",jW]]),zW={name:"privatePublicKeyInput",props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:Xe()}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},checkMatching(){try{window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey&&(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private Key and Public Key does not match.","danger"))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},YW=h("label",{for:"peer_private_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},[be("Private Key "),h("code",null,"(Required for QR Code and Download)")])],-1),UW={class:"input-group"},KW=["disabled"],qW=["disabled"],GW=h("i",{class:"bi bi-arrow-repeat"},null,-1),JW=[GW],XW={class:"d-flex"},QW=h("label",{for:"public_key",class:"form-label"},[h("small",{class:"text-muted"},[be("Public Key "),h("code",null,"(Required)")])],-1),ZW={class:"form-check form-switch ms-auto"},ez=["disabled"],tz=h("label",{class:"form-check-label",for:"enablePublicKeyEdit"},[h("small",null,"Edit")],-1),nz=["disabled"];function sz(t,e,n,s,i,o){return M(),F("div",{class:Ce(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[YW,h("div",UW,[Oe(h("input",{type:"text",class:Ce(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[0]||(e[0]=r=>this.keypair.privateKey=r),disabled:!this.editKey||this.bulk,onBlur:e[1]||(e[1]=r=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,KW),[
${t.data?"is on":"is off"}`,"Success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.configurationInfo.Status=t.data,this.configurationToggling=!1})},getPeers(t=this.$route.params.id){wt("/api/getWireguardConfigurationInfo",{configurationName:t},e=>{if(this.configurationInfo=e.data.configurationInfo,this.configurationPeers=e.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),e.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(i=>i.total_sent+i.cumu_sent).reduce((i,o)=>i+o).toFixed(4),s=this.configurationPeers.map(i=>i.total_receive+i.cumu_receive).reduce((i,o)=>i+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==s&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((s-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(s))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_data+e.cumu_data).reduce((e,n)=>e+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_receive+e.cumu_receive).reduce((e,n)=>e+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_sent+e.cumu_sent).reduce((e,n)=>e+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(t=>t.name?t.name:`Untitled Peer - ${t.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(t=>t.cumu_data+t.total_data),backgroundColor:this.configurationPeers.map(t=>"#0dcaf0"),tooltip:{callbacks:{label:t=>`${t.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>`${t.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} MB/s`},grid:{display:!1}}}}},searchPeers(){new Nr(this.configurationPeers,{keys:["name","id","allowed_ip"]});const t=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(e=>e.name.includes(this.wireguardConfigurationStore.searchString)||e.id.includes(this.wireguardConfigurationStore.searchString)||e.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:e[this.dashboardConfigurationStore.Configuration.Server.da