2024-09-14 15:21:10 +08:00
|
|
|
var bS=Object.defineProperty;var yS=(e,t,n)=>t in e?bS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>(yS(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 _v=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xS(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var kS={exports:{}},bn="top",Ln="bottom",Nn="right",yn="left",Kc="auto",Lr=[bn,Ln,Nn,yn],Co="start",hr="end",vv="clippingParents",Oh="viewport",tr="popper",bv="reference",Id=Lr.reduce(function(e,t){return e.concat([t+"-"+Co,t+"-"+hr])},[]),Ih=[].concat(Lr,[Kc]).reduce(function(e,t){return e.concat([t,t+"-"+Co,t+"-"+hr])},[]),yv="beforeRead",wv="read",xv="afterRead",kv="beforeMain",Sv="main",$v="afterMain",Av="beforeWrite",Cv="write",Ev="afterWrite",Pv=[yv,wv,xv,kv,Sv,$v,Av,Cv,Ev];function Ps(e){return e?(e.nodeName||"").toLowerCase():null}function Fn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Eo(e){var t=Fn(e).Element;return e instanceof t||e instanceof Element}function Jn(e){var t=Fn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Rh(e){if(typeof ShadowRoot>"u")return!1;var t=Fn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function SS(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Jn(o)||!Ps(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 $S(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],o=t.attributes[s]||{},r=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!Jn(i)||!Ps(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Lh={name:"applyStyles",enabled:!0,phase:"write",fn:SS,effect:$S,requires:["computeStyles"]};function As(e){return e.split("-")[0]}var bo=Math.max,xc=Math.min,fr=Math.round;function Rd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Mv(){return!/^((?!chrome|android).)*safari/i.test(Rd())}function pr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),i=1,o=1;t&&Jn(e)&&(i=e.offsetWidth>0&&fr(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&fr(s.height)/e.offsetHeight||1);var r=Eo(e)?Fn(e):window,a=r.visualViewport,l=!Mv()&&n,c=(s.left+(l&&a?a.offsetLeft:0))
|
2024-03-21 02:03:08 -04:00
|
|
|
* 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-14 15:21:10 +08:00
|
|
|
*/(function(e,t){(function(n,s){e.exports=s(h$)})(_v,function(n){function s(z){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(z){for(const S in z)if(S!=="default"){const U=Object.getOwnPropertyDescriptor(z,S);Object.defineProperty(g,S,U.get?U:{enumerable:!0,get:()=>z[S]})}}return g.default=z,Object.freeze(g)}const i=s(n),o=new Map,r={set(z,g,S){o.has(z)||o.set(z,new Map);const U=o.get(z);if(!U.has(g)&&U.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(U.keys())[0]}.`);return}U.set(g,S)},get(z,g){return o.has(z)&&o.get(z).get(g)||null},remove(z,g){if(!o.has(z))return;const S=o.get(z);S.delete(g),S.size===0&&o.delete(z)}},a=1e6,l=1e3,c="transitionend",u=z=>(z&&window.CSS&&window.CSS.escape&&(z=z.replace(/#([^\s"#']+)/g,(g,S)=>`#${CSS.escape(S)}`)),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},p=z=>{if(!z)return 0;let{transitionDuration:g,transitionDelay:S}=window.getComputedStyle(z);const U=Number.parseFloat(g),ge=Number.parseFloat(S);return!U&&!ge?0:(g=g.split(",")[0],S=S.split(",")[0],(Number.parseFloat(g)+Number.parseFloat(S))*l)},m=z=>{z.dispatchEvent(new Event(c))},_=z=>!z||typeof z!="object"?!1:(typeof z.jquery<"u"&&(z=z[0]),typeof z.nodeType<"u"),b=z=>_(z)?z.jquery?z[0]:z:typeof z=="string"&&z.length>0?document.querySelector(u(z)):null,w=z=>{if(!_(z)||z.getClientRects().length===0)return!1;const g=getComputedStyle(z).getPropertyValue("visibility")==="visible",S=z.closest("details:not([open])");if(!S)return g;if(S!==z){const U=z.closest("summary");if(U&&U.parentNode!==S||U===null)return!1}return g},$=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 g=z.getRootNode();return g instanceof ShadowRoot?g:null}return z instanceof ShadowRoot?z:z.parentNode?A(z.parentNode):null},T=()=>{},k=z=>{z.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,x=[],C=z=>{document.readyState==="loading"?(x.length||document.addEventListener("DOMContentLoaded",()=>{for(const g of x)g()}),x.push(z)):z()},P=()=>document.documentElement.dir==="rtl",E=z=>{C(()=>{const g=y();if(g){const S=z.NAME,U=g.fn[S];g.fn[S]=z.jQueryInterface,g.fn[S].Constructor=z,g.fn[S].noConflict=()=>(g.fn[S]=U,z.jQueryInterface)}})},B=(z,g=[],S=z)=>typeof z=="function"?z(...g):S,G=(z,g,S=!0)=>{if(!S){B(z);return}const ge=p(g)+5;let Pe=!1;const Ce=({target:Xe})=>{Xe===g&&(Pe=!0,g.removeEventListener(c,Ce),B(z))};g.addEventListener(c,Ce),setTimeout(()=>{Pe||m(g)},ge)},ae=(z,g,S,U)=>{const ge=z.length;let Pe=z.indexOf(g);return Pe===-1?!S&&U?z[ge-1]:z[0]:(Pe+=S?1:-1,U&&(Pe=(Pe+ge)%ge),z[Math.max(0,Math.min(Pe,ge-1))])},Y=/[^.]*(?=\..*)\.|.*/,L=/\..*/,I=/::\d+$/,V={};let Q=1;const Z={mouseenter:"mouseover",mouseleave:"mouseout"},ce=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 we(z,g){return g&&`${g}::${Q++}`||z.uidEvent||Q++}function K(z){const g=we(z);return z.uidEvent=g,V[g]=V[g]||{},V[g]}function X(z,g){return function S(U){return fe(U,{delegateTarget:z}),S.oneOff&&N.off(z,U.type,g),g.apply(z,[U])}}function R(z,g,S){return function U(ge){const Pe=z.querySelectorAll(g);for(let{target:Ce}=ge;Ce&&Ce!==this;Ce=Ce.parentNode)for(const Xe of Pe)if(Xe===Ce)return fe(ge,{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-14 15:21:10 +08:00
|
|
|
**//*! #__NO_SIDE_EFFECTS__ */function Yh(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const vt={},rr=[],Un=()=>{},f$=()=>!1,Gc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Kh=e=>e.startsWith("onUpdate:"),Nt=Object.assign,Uh=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},p$=Object.prototype.hasOwnProperty,it=(e,t)=>p$.call(e,t),Be=Array.isArray,ar=e=>nl(e)==="[object Map]",Nr=e=>nl(e)==="[object Set]",ug=e=>nl(e)==="[object Date]",Ke=e=>typeof e=="function",$t=e=>typeof e=="string",Zs=e=>typeof e=="symbol",dt=e=>e!==null&&typeof e=="object",jv=e=>(dt(e)||Ke(e))&&Ke(e.then)&&Ke(e.catch),Wv=Object.prototype.toString,nl=e=>Wv.call(e),g$=e=>nl(e).slice(8,-1),zv=e=>nl(e)==="[object Object]",qh=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ma=Yh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jc=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},m$=/-(\w)/g,Ms=Jc(e=>e.replace(m$,(t,n)=>n?n.toUpperCase():"")),_$=/\B([A-Z])/g,Oo=Jc(e=>e.replace(_$,"-$1").toLowerCase()),Xc=Jc(e=>e.charAt(0).toUpperCase()+e.slice(1)),Yu=Jc(e=>e?`on${Xc(e)}`:""),Ii=(e,t)=>!Object.is(e,t),oc=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Yv=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},kc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Kv=e=>{const t=$t(e)?Number(e):NaN;return isNaN(t)?e:t};let dg;const Uv=()=>dg||(dg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Wt(e){if(Be(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=$t(s)?w$(s):Wt(s);if(i)for(const o in i)t[o]=i[o]}return t}else if($t(e)||dt(e))return e}const v$=/;(?![^(]*\))/g,b$=/:([^]+)/,y$=/\/\*[^]*?\*\//g;function w$(e){const t={};return e.replace(y$,"").split(v$).forEach(n=>{if(n){const s=n.split(b$);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ee(e){let t="";if($t(e))t=e;else if(Be(e))for(let n=0;n<e.length;n++){const s=Ee(e[n]);s&&(t+=s+" ")}else if(dt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Zt(e){if(!e)return null;let{class:t,style:n}=e;return t&&!$t(t)&&(e.class=Ee(t)),n&&(e.style=Wt(n)),e}const x$="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",k$=Yh(x$);function qv(e){return!!e||e===""}function S$(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Po(e[s],t[s]);return n}function Po(e,t){if(e===t)return!0;let n=ug(e),s=ug(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Zs(e),s=Zs(t),n||s)return e===t;if(n=Be(e),s=Be(t),n||s)return n&&s?S$(e,t):!1;if(n=dt(e),s=dt(t),n||s){if(!n||!s)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!Po(e[r],t[r]))return!1}}return String(e)===String(t)}function Gh(e,t){return e.findIndex(n=>Po(n,t))}const _e=e=>$t(e)?e:e==null?"":Be(e)||dt(e)&&(e.toString===Wv||!Ke(e.toString))?JSON.stringify(e,Gv,2):String(e),Gv=(e,t)=>t&&t.__v_isRef?Gv(e,t.value):ar(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],o)=>(n[Ku(s,o)+" =>"]=i,n),{})}:Nr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ku(n))}:Zs(t)?Ku(t):dt(t)&&!Be(t)&&!zv(t)?String(t):t,Ku=(e,t="")=>{var n;return Zs(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
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-14 15:21:10 +08:00
|
|
|
**/let Tn;class Jv{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Tn,!t&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Tn;try{return Tn=this,t()}finally{Tn=n}}}on(){Tn=this}off(){Tn=this.parent}stop(t){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&&!t){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 Xv(e){return new Jv(e)}function $$(e,t=Tn){t&&t.active&&t.effects.push(e)}function Qc(){return Tn}function Jh(e){Tn&&Tn.cleanups.push(e)}let yo;class Xh{constructor(t,n,s,i){this.fn=t,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,$$(this,i)}get dirty(){if(this._dirtyLevel===2)return!1;if(this._dirtyLevel===3||this._dirtyLevel===4){this._dirtyLevel=1,Hi();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed){if(n.computed.effect._dirtyLevel===2)return!0;if(A$(n.computed),this._dirtyLevel>=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),ji()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Pi,n=yo;try{return Pi=!0,yo=this,this._runnings++,hg(this),this.fn()}finally{fg(this),this._runnings--,yo=n,Pi=t}}stop(){this.active&&(hg(this),fg(this),this.onStop&&this.onStop(),this.active=!1)}}function A$(e){return e.value}function hg(e){e._trackId++,e._depsLength=0}function fg(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Qv(e.deps[t],e);e.deps.length=e._depsLength}}function Qv(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Pi=!0,Nd=0;const Zv=[];function Hi(){Zv.push(Pi),Pi=!1}function ji(){const e=Zv.pop();Pi=e===void 0?!0:e}function Qh(){Nd++}function Zh(){for(Nd--;!Nd&&Fd.length;)Fd.shift()()}function eb(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const s=e.deps[e._depsLength];s!==t?(s&&Qv(s,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Fd=[];function tb(e,t,n){Qh();for(const s of e.keys()){if(!e.computed&&s.computed&&e.get(s)===s._trackId&&s._runnings>0){s._dirtyLevel=2;continue}let i;s._dirtyLevel<t&&(i??(i=e.get(s)===s._trackId))&&(s._shouldSchedule||(s._shouldSchedule=s._dirtyLevel===0),s.computed&&s._dirtyLevel===2&&(s._shouldSchedule=!0),s._dirtyLevel=t),s._shouldSchedule&&(i??(i=e.get(s)===s._trackId))&&(s.trigger(),(!s._runnings||s.allowRecurse)&&s._dirtyLevel!==3&&(s._shouldSchedule=!1,s.scheduler&&Fd.push(s.scheduler)))}Zh()}const nb=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Sc=new WeakMap,wo=Symbol(""),Bd=Symbol("");function Pn(e,t,n){if(Pi&&yo){let s=Sc.get(e);s||Sc.set(e,s=new Map);let i=s.get(n);i||s.set(n,i=nb(()=>s.delete(n))),eb(yo,i)}}function Xs(e,t,n,s,i,o){const r=Sc.get(e);if(!r)return;let a=[];if(t==="clear")a=[...r.values()];else if(n==="length"&&Be(e)){const l=Number(s);r.forEach((c,u)=>{(u==="length"||!Zs(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":Be(e)?qh(n)&&a.push(r.get("length")):(a.push(r.get(wo)),ar(e)&&a.push(r.get(Bd)));break;case"delete":Be(e)||(a.push(r.get(wo)),ar(e)&&a.push(r.get(Bd)));break;case"set":ar(e)&&a.push(r.get(wo));break}Qh();for(const l of a)l&&tb(l,5);Zh()}function C$(e,t){const n=Sc.get(e);return n&&n.get(t)}const E$=Yh("__proto__,__v_isRef,__isVue"),sb=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Zs)),pg=P$();function P$(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=Ze(this);for(let o=0,r=this.length;o<r;o++)Pn(s,"get",o+"");const i=s[t](...n);return i===-1||i===!1?s[t](...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-14 15:21:10 +08:00
|
|
|
**/function Mi(e,t,n,s){try{return s?e(...s):e()}catch(i){sl(i,t,n)}}function Xn(e,t,n,s){if(Ke(e)){const i=Mi(e,t,n,s);return i&&jv(i)&&i.catch(o=>{sl(o,t,n)}),i}if(Be(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Xn(e[o],t,n,s));return i}}function sl(e,t,n,s=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const r=t.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](e,r,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){Hi(),Mi(l,null,10,[e,r,a]),ji();return}}Q$(e,n,i,s)}function Q$(e,t,n,s=!0){console.error(e)}let La=!1,Vd=!1;const un=[];let ys=0;const lr=[];let _i=null,mo=0;const mb=Promise.resolve();let rf=null;function tn(e){const t=rf||mb;return e?t.then(this?e.bind(this):e):t}function Z$(e){let t=ys+1,n=un.length;for(;t<n;){const s=t+n>>>1,i=un[s],o=Na(i);o<e||o===e&&i.pre?t=s+1:n=s}return t}function af(e){(!un.length||!un.includes(e,La&&e.allowRecurse?ys+1:ys))&&(e.id==null?un.push(e):un.splice(Z$(e.id),0,e),_b())}function _b(){!La&&!Vd&&(Vd=!0,rf=mb.then(bb))}function eA(e){const t=un.indexOf(e);t>ys&&un.splice(t,1)}function Hd(e){Be(e)?lr.push(...e):(!_i||!_i.includes(e,e.allowRecurse?mo+1:mo))&&lr.push(e),_b()}function bg(e,t,n=La?ys+1:0){for(;n<un.length;n++){const s=un[n];if(s&&s.pre){if(e&&s.id!==e.uid)continue;un.splice(n,1),n--,s()}}}function vb(e){if(lr.length){const t=[...new Set(lr)].sort((n,s)=>Na(n)-Na(s));if(lr.length=0,_i){_i.push(...t);return}for(_i=t,mo=0;mo<_i.length;mo++){const n=_i[mo];n.active!==!1&&n()}_i=null,mo=0}}const Na=e=>e.id==null?1/0:e.id,tA=(e,t)=>{const n=Na(e)-Na(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function bb(e){Vd=!1,La=!0,un.sort(tA);try{for(ys=0;ys<un.length;ys++){const t=un[ys];t&&t.active!==!1&&Mi(t,null,14)}}finally{ys=0,un.length=0,vb(),La=!1,rf=null,(un.length||lr.length)&&bb()}}function nA(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||vt;let i=n;const o=t.startsWith("update:"),r=o&&t.slice(7);if(r&&r in s){const u=`${r==="modelValue"?"model":r}Modifiers`,{number:d,trim:f}=s[u]||vt;f&&(i=n.map(p=>$t(p)?p.trim():p)),d&&(i=n.map(kc))}let a,l=s[a=Yu(t)]||s[a=Yu(Ms(t))];!l&&o&&(l=s[a=Yu(Oo(t))]),l&&Xn(l,e,6,i);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Xn(c,e,6,i)}}function yb(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const o=e.emits;let r={},a=!1;if(!Ke(e)){const l=c=>{const u=yb(c,t,!0);u&&(a=!0,Nt(r,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(dt(e)&&s.set(e,null),null):(Be(o)?o.forEach(l=>r[l]=null):Nt(r,o),dt(e)&&s.set(e,r),r)}function nu(e,t){return!e||!Gc(t)?!1:(t=t.slice(2).replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,Oo(t))||it(e,t))}let zt=null,su=null;function Ac(e){const t=zt;return zt=e,su=e&&e.type.__scopeId||null,t}function Ut(e){su=e}function qt(){su=null}function Me(e,t=zt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&Rg(-1);const o=Ac(t);let r;try{r=e(...i)}finally{Ac(o),s._d&&Rg(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Uu(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:_}=e,b=Ac(e);let w,$;try{if(n.shapeFlag&4){const T=i||s,k=T;w=is(c.call(k,T,u,d,p,f,m)),$=a}else{const T=t;w=is(T.length>1?T(d,{attrs:a,slots:r,emit:l}):T(d,null)),$=t.props?a:iA(a)}}catch(T){ya.length=0,sl(T,e,1),w=$e(dn)}let A=w;if($&&_!==!1){const T=Object.keys($),{shapeFlag:k}=A;T.length&&k&7&&(o&&T.some(Kh)&&($=oA($,o)),A=Ri(A,$,!1,!0))}return n.dirs&&(A=Ri(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),w=A,Ac(b),w}function sA(e,t=!0){let n;for(let s=0;s<e.length;s++){const i=e[s];if(Va(i)){if(i.type!==dn||i.children==="v-if"){if(n)return;n=i}}else return}return n}const iA=e=>{let t;for(const n in e)(n==="class"||n==="style"||Gc(n))&&((t||(t={}))[n]=e[n]);return t},oA=(e,t)=>{const n={};for(const s in e)(!Kh(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-14 15:21:10 +08:00
|
|
|
**/const aC="http://www.w3.org/2000/svg",lC="http://www.w3.org/1998/Math/MathML",Ws=typeof document<"u"?document:null,Fg=Ws&&Ws.createElement("template"),cC={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t==="svg"?Ws.createElementNS(aC,e):t==="mathml"?Ws.createElementNS(lC,e):n?Ws.createElement(e,{is:n}):Ws.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Ws.createTextNode(e),createComment:e=>Ws.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ws.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,o){const r=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Fg.innerHTML=s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e;const a=Fg.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ui="transition",Gr="animation",br=Symbol("_vtc"),Ct=(e,{slots:t})=>Mo(KA,ey(e),t);Ct.displayName="Transition";const Zb={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},uC=Ct.props=Nt({},jb,Zb),ro=(e,t=[])=>{Be(e)?e.forEach(n=>n(...t)):e&&e(...t)},Bg=e=>e?Be(e)?e.some(t=>t.length>1):e.length>1:!1;function ey(e){const t={};for(const G in e)G in Zb||(t[G]=e[G]);if(e.css===!1)return t;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:p=`${n}-leave-to`}=e,m=dC(i),_=m&&m[0],b=m&&m[1],{onBeforeEnter:w,onEnter:$,onEnterCancelled:A,onLeave:T,onLeaveCancelled:k,onBeforeAppear:y=w,onAppear:x=$,onAppearCancelled:C=A}=t,P=(G,ae,Y)=>{gi(G,ae?u:a),gi(G,ae?c:r),Y&&Y()},E=(G,ae)=>{G._isLeaving=!1,gi(G,d),gi(G,p),gi(G,f),ae&&ae()},B=G=>(ae,Y)=>{const L=G?x:$,I=()=>P(ae,G,Y);ro(L,[ae,I]),Vg(()=>{gi(ae,G?l:o),Vs(ae,G?u:a),Bg(L)||Hg(ae,s,_,I)})};return Nt(t,{onBeforeEnter(G){ro(w,[G]),Vs(G,o),Vs(G,r)},onBeforeAppear(G){ro(y,[G]),Vs(G,l),Vs(G,c)},onEnter:B(!1),onAppear:B(!0),onLeave(G,ae){G._isLeaving=!0;const Y=()=>E(G,ae);Vs(G,d),Vs(G,f),ny(),Vg(()=>{G._isLeaving&&(gi(G,d),Vs(G,p),Bg(T)||Hg(G,s,b,Y))}),ro(T,[G,Y])},onEnterCancelled(G){P(G,!1),ro(A,[G])},onAppearCancelled(G){P(G,!0),ro(C,[G])},onLeaveCancelled(G){E(G),ro(k,[G])}})}function dC(e){if(e==null)return null;if(dt(e))return[Xu(e.enter),Xu(e.leave)];{const t=Xu(e);return[t,t]}}function Xu(e){return Kv(e)}function Vs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[br]||(e[br]=new Set)).add(t)}function gi(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[br];n&&(n.delete(t),n.size||(e[br]=void 0))}function Vg(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hC=0;function Hg(e,t,n,s){const i=e._endId=++hC,o=()=>{i===e._endId&&s()};if(n)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=ty(e,t);if(!r)return s();const c=r+"end";let u=0;const d=()=>{e.removeEventListener(c,f),o()},f=p=>{p.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,f)}function ty(e,t){const n=window.getComputedStyle(e),s=m=>(n[m]||"").split(", "),i=s(`${ui}Delay`),o=s(`${ui}Duration`),r=jg(i,o),a=s(`${Gr}Delay`),l=s(`${Gr}Duration`),c=jg(a,l);let u=null,d=0,f=0;t===ui?r>0&&(u=ui,d=r,f=o.length):t===Gr?c>0&&(u=Gr,d=c,f=l.length):(d=Math.max(r,c),u=d>0?r>c?ui:Gr:null,f=u?u===ui?o.length:l.length:0);const p=u===ui&&/\b(transform|all)(,|$)/.test(s(`${ui}Proper
|
2024-03-21 02:03:08 -04:00
|
|
|
* pinia v2.1.7
|
|
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
|
|
* @license MIT
|
2024-09-14 15:21:10 +08:00
|
|
|
*/let cy;const cu=e=>cy=e,uy=Symbol();function Xd(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var wa;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(wa||(wa={}));function KC(){const e=Xv(!0),t=e.run(()=>be({}));let n=[],s=[];const i=tu({install(o){cu(i),i._a=o,o.provide(uy,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!YC?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const dy=()=>{};function sm(e,t,n,s=dy){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Qc()&&Jh(i),i}function Go(e,...t){e.slice().forEach(n=>{n(...t)})}const UC=e=>e();function Qd(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,s)=>e.set(s,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],i=e[n];Xd(i)&&Xd(s)&&e.hasOwnProperty(n)&&!Mt(s)&&!xo(s)?e[n]=Qd(i,s):e[n]=s}return e}const qC=Symbol();function GC(e){return!Xd(e)||!e.hasOwnProperty(qC)}const{assign:mi}=Object;function JC(e){return!!(Mt(e)&&e.effect)}function XC(e,t,n,s){const{state:i,actions:o,getters:r}=t,a=n.state.value[e];let l;function c(){a||(n.state.value[e]=i?i():{});const u=G$(n.state.value[e]);return mi(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=tu(ve(()=>{cu(n);const p=n._s.get(e);return r[f].call(p,p)})),d),{}))}return l=hy(e,c,t,n,s,!0),l}function hy(e,t,n={},s,i,o){let r;const a=mi({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],p;const m=s.state.value[e];!o&&!m&&(s.state.value[e]={}),be({});let _;function b(C){let P;c=u=!1,typeof C=="function"?(C(s.state.value[e]),P={type:wa.patchFunction,storeId:e,events:p}):(Qd(s.state.value[e],C),P={type:wa.patchObject,payload:C,storeId:e,events:p});const E=_=Symbol();tn().then(()=>{_===E&&(c=!0)}),u=!0,Go(d,P,s.state.value[e])}const w=o?function(){const{state:P}=n,E=P?P():{};this.$patch(B=>{mi(B,E)})}:dy;function $(){r.stop(),d=[],f=[],s._s.delete(e)}function A(C,P){return function(){cu(s);const E=Array.from(arguments),B=[],G=[];function ae(I){B.push(I)}function Y(I){G.push(I)}Go(f,{args:E,name:C,store:k,after:ae,onError:Y});let L;try{L=P.apply(this&&this.$id===e?this:k,E)}catch(I){throw Go(G,I),I}return L instanceof Promise?L.then(I=>(Go(B,I),I)).catch(I=>(Go(G,I),Promise.reject(I))):(Go(B,L),L)}}const T={_p:s,$id:e,$onAction:sm.bind(null,f),$patch:b,$reset:w,$subscribe(C,P={}){const E=sm(d,C,P.detached,()=>B()),B=r.run(()=>Vt(()=>s.state.value[e],G=>{(P.flush==="sync"?u:c)&&C({storeId:e,type:wa.direct,events:p},G)},mi({},l,P)));return E},$dispose:$},k=Ds(T);s._s.set(e,k);const x=(s._a&&s._a.runWithContext||UC)(()=>s._e.run(()=>(r=Xv()).run(t)));for(const C in x){const P=x[C];if(Mt(P)&&!JC(P)||xo(P))o||(m&&GC(P)&&(Mt(P)?P.value=m[C]:Qd(P,m[C])),s.state.value[e][C]=P);else if(typeof P=="function"){const E=A(C,P);x[C]=E,a.actions[C]=P}}return mi(k,x),mi(Ze(k),x),Object.defineProperty(k,"$state",{get:()=>s.state.value[e],set:C=>{b(P=>{mi(P,C)})}}),s._p.forEach(C=>{mi(k,r.run(()=>C({store:k,app:s._a,pinia:s,options:a})))}),m&&o&&n.hydrate&&n.hydrate(k.$state,m),c=!0,u=!0,k}function bf(e,t,n){let s,i;const o=typeof t=="function";typeof e=="string"?(s=e,i=o?n:t):(i=e,s=e.id);function r(a,l){const c=PA();return a=a||(c?ls(uy,null):null),a&&cu(a),a=cy,a._s.has(s)||(o?hy(s,t,i,a):XC(s,i,a)),a._s.get(s)}return r.$id=s,r}/*!
|
2024-03-21 02:03:08 -04:00
|
|
|
* vue-router v4.2.5
|
|
|
|
* (c) 2023 Eduardo San Martin Morote
|
|
|
|
* @license MIT
|
2024-09-14 15:21:10 +08:00
|
|
|
*/const nr=typeof window<"u";function QC(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ct=Object.assign;function ed(e,t){const n={};for(const s in t){const i=t[s];n[s]=ds(i)?i.map(e):e(i)}return n}const xa=()=>{},ds=Array.isArray,ZC=/\/$/,eE=e=>e.replace(ZC,"");function td(e,t,n="/"){let s,i={},o="",r="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=t.slice(0,l),o=t.slice(l+1,a>-1?a:t.length),i=e(o)),a>-1&&(s=s||t.slice(0,a),r=t.slice(a,t.length)),s=iE(s??t,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function tE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function im(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function nE(e,t,n){const s=t.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&wr(t.matched[s],n.matched[i])&&fy(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function wr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function fy(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!sE(e[n],t[n]))return!1;return!0}function sE(e,t){return ds(e)?om(e,t):ds(t)?om(t,e):e===t}function om(e,t){return ds(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function iE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.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 ja;(function(e){e.pop="pop",e.push="push"})(ja||(ja={}));var ka;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ka||(ka={}));function oE(e){if(!e)if(nr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),eE(e)}const rE=/^[^#]+#/;function aE(e,t){return e.replace(rE,"#")+t}function lE(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const uu=()=>({left:window.pageXOffset,top:window.pageYOffset});function cE(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=lE(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function rm(e,t){return(history.state?history.state.position-t:-1)+e}const Zd=new Map;function uE(e,t){Zd.set(e,t)}function dE(e){const t=Zd.get(e);return Zd.delete(e),t}let hE=()=>location.protocol+"//"+location.host;function py(e,t){const{pathname:n,search:s,hash:i}=t,o=e.indexOf("#");if(o>-1){let a=i.includes(e.slice(o))?e.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),im(l,"")}return im(n,e)+s+i}function fE(e,t,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const p=py(e,location),m=n.value,_=t.value;let b=0;if(f){if(n.value=p,t.value=f,r&&r===m){r=null;return}b=_?f.position-_.position:0}else s(p);i.forEach(w=>{w(n.value,m,{delta:b,type:ja.pop,direction:b?b>0?ka.forward:ka.back:ka.unknown})})};function l(){r=n.value}function c(f){i.push(f);const p=()=>{const m=i.indexOf(f);m>-1&&i.splice(m,1)};return o.push(p),p}function u(){const{history:f}=window;f.state&&f.replaceState(ct({},f.state,{scroll:uu()}),"")}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 am(e,t,n,s=!1,i=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:i?uu():null}}function pE(e){const{history:t,location:n}=window,s={value:py(e,n)},i={value:t.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replace
|
2024-04-03 01:16:56 -04:00
|
|
|
(?:
|
2024-08-14 22:45:36 -04:00
|
|
|
(?:${Bt}:){7}(?:${Bt}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
|
|
(?:${Bt}:){6}(?:${ss}|:${Bt}|:)| // 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
|
|
|
|
(?:${Bt}:){5}(?::${ss}|(?::${Bt}){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
|
|
|
|
(?:${Bt}:){4}(?:(?::${Bt}){0,1}:${ss}|(?::${Bt}){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
|
|
|
|
(?:${Bt}:){3}(?:(?::${Bt}){0,2}:${ss}|(?::${Bt}){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
|
|
|
|
(?:${Bt}:){2}(?:(?::${Bt}){0,3}:${ss}|(?::${Bt}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
|
|
(?:${Bt}:){1}(?:(?::${Bt}){0,4}:${ss}|(?::${Bt}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
|
|
(?::(?:(?::${Bt}){0,5}:${ss}|(?::${Bt}){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-14 15:21:10 +08:00
|
|
|
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),sP=new RegExp(`(?:^${ss}$)|(?:^${du}$)`),iP=new RegExp(`^${ss}$`),oP=new RegExp(`^${du}$`),hu=e=>e&&e.exact?sP:new RegExp(`(?:${xi(e)}${ss}${xi(e)})|(?:${xi(e)}${du}${xi(e)})`,"g");hu.v4=e=>e&&e.exact?iP:new RegExp(`${xi(e)}${ss}${xi(e)}`,"g");hu.v6=e=>e&&e.exact?oP:new RegExp(`${xi(e)}${du}${xi(e)}`,"g");const Sy={exact:!1},$y=`${hu.v4().source}\\/(3[0-2]|[12]?[0-9])`,Ay=`${hu.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,rP=new RegExp(`^${$y}$`),aP=new RegExp(`^${Ay}$`),lP=({exact:e}=Sy)=>e?rP:new RegExp($y,"g"),cP=({exact:e}=Sy)=>e?aP:new RegExp(Ay,"g"),Cy=lP({exact:!0}),Ey=cP({exact:!0}),kf=e=>Cy.test(e)?4:Ey.test(e)?6:0;kf.v4=e=>Cy.test(e);kf.v6=e=>Ey.test(e);const Bn=bf("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 xt("/api/getWireguardConfigurations",{},e=>{e.status&&(this.Configurations=e.data)})},regexCheckIP(e){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(e)},checkCIDR(e){return kf(e)!==0}}}),ze=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},uP={name:"navbar",setup(){const e=Bn(),t=et();return{wireguardConfigurationsStore:e,dashboardConfigurationStore:t}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){xt("/api/getDashboardUpdate",{},e=>{e.status?(e.data&&(this.updateAvailable=!0,this.updateUrl=e.data),this.updateMessage=e.message):(this.updateMessage="Failed to check available update",console.log(`Failed to get update: ${e.message}`))})}},zi=e=>(Ut("data-v-a0b378dd"),e=e(),qt(),e),dP=["data-bs-theme"],hP={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},fP={class:"sidebar-sticky pt-3"},pP={class:"nav flex-column px-2"},gP={class:"nav-item"},mP=zi(()=>h("i",{class:"bi bi-house me-2"},null,-1)),_P={class:"nav-item"},vP=zi(()=>h("i",{class:"bi bi-gear me-2"},null,-1)),bP=zi(()=>h("hr",{class:"text-body"},null,-1)),yP=zi(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-body-text me-2"}),ye(" Configurations ")],-1)),wP={class:"nav flex-column px-2"},xP={class:"nav-item"},kP=zi(()=>h("hr",{class:"text-body"},null,-1)),SP=zi(()=>h("h6",{class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},[h("i",{class:"bi bi-tools me-2"}
|
2024-03-21 02:03:08 -04:00
|
|
|
*
|
|
|
|
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
2024-09-14 15:21:10 +08:00
|
|
|
*/(function(){function e(k){var y=new Float64Array(16);if(k)for(var x=0;x<k.length;++x)y[x]=k[x];return y}function t(k,y){for(var x,C=e(),P=e(),E=0;E<16;++E)P[E]=y[E];n(P),n(P),n(P);for(var B=0;B<2;++B){C[0]=P[0]-65517;for(var E=1;E<15;++E)C[E]=P[E]-65535-(C[E-1]>>16&1),C[E-1]&=65535;C[15]=P[15]-32767-(C[14]>>16&1),x=C[15]>>16&1,C[14]&=65535,s(P,C,1-x)}for(var E=0;E<16;++E)k[2*E]=P[E]&255,k[2*E+1]=P[E]>>8}function n(k){for(var y=0;y<16;++y)k[(y+1)%16]+=(y<15?1:38)*Math.floor(k[y]/65536),k[y]&=65535}function s(k,y,x){for(var C,P=~(x-1),E=0;E<16;++E)C=P&(k[E]^y[E]),k[E]^=C,y[E]^=C}function i(k,y,x){for(var C=0;C<16;++C)k[C]=y[C]+x[C]|0}function o(k,y,x){for(var C=0;C<16;++C)k[C]=y[C]-x[C]|0}function r(k,y,x){for(var C=new Float64Array(31),P=0;P<16;++P)for(var E=0;E<16;++E)C[P+E]+=y[P]*x[E];for(var P=0;P<15;++P)C[P]+=38*C[P+16];for(var P=0;P<16;++P)k[P]=C[P];n(k),n(k)}function a(k,y){for(var x=e(),C=0;C<16;++C)x[C]=y[C];for(var C=253;C>=0;--C)r(x,x,x),C!==2&&C!==4&&r(x,x,y);for(var C=0;C<16;++C)k[C]=x[C]}function l(k){k[31]=k[31]&127|64,k[0]&=248}function c(k){for(var y,x=new Uint8Array(32),C=e([1]),P=e([9]),E=e(),B=e([1]),G=e(),ae=e(),Y=e([56129,1]),L=e([9]),I=0;I<32;++I)x[I]=k[I];l(x);for(var I=254;I>=0;--I)y=x[I>>>3]>>>(I&7)&1,s(C,P,y),s(E,B,y),i(G,C,E),o(C,C,E),i(E,P,B),o(P,P,B),r(B,G,G),r(ae,C,C),r(C,E,C),r(E,P,G),i(G,C,E),o(C,C,E),r(P,C,C),o(E,B,ae),r(C,E,Y),i(C,C,B),r(E,E,C),r(C,B,ae),r(B,P,L),r(P,G,G),s(C,P,y),s(E,B,y);return a(E,E),r(C,C,E),t(x,C),x}function u(){var k=new Uint8Array(32);return window.crypto.getRandomValues(k),k}function d(){var k=u();return l(k),k}function f(k,y){for(var x=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),C=0;C<4;++C)k[C]=x[C]+65+(25-x[C]>>8&6)-(51-x[C]>>8&75)-(61-x[C]>>8&15)+(62-x[C]>>8&3)}function p(k){var y,x=new Uint8Array(44);for(y=0;y<32/3;++y)f(x.subarray(y*4),k.subarray(y*3));return f(x.subarray(y*4),Uint8Array.from([k[y*3+0],k[y*3+1],0])),x[43]=61,String.fromCharCode.apply(null,x)}function m(k){let y=window.atob(k),x=y.length,C=new Uint8Array(x);for(let E=0;E<x;E++)C[E]=y.charCodeAt(E);return new Uint8Array(C.buffer)}function _(k,y){k.push(y&255,y>>>8&255,y>>>16&255,y>>>24&255)}function b(k,y){k.push(y&255,y>>>8&255)}function w(k,y){for(var x=0;x<y.length;++x)k.push(y[x]&255)}function $(k){for(var y=unescape(encodeURIComponent(k)),x=new Uint8Array(y.length),C=0;C<y.length;++C)x[C]=y.charCodeAt(C);return x}function A(k){if(!A.table){A.table=[];for(var y=0,x=0;x<256;y=++x){for(var C=0;C<8;++C)y=y&1?3988292384^y>>>1:y>>>1;A.table[x]=y}}for(var P=-1,E=0;E<k.length;++E)P=P>>>8^A.table[(P^k[E])&255];return(P^-1)>>>0}function T(k){for(var y=[],x=[],C=0,P=0;P<k.length;++P){var E=$(k[P].fileName),B=$(k[P].file),G=A(B);_(y,67324752),b(y,20),b(y,0),b(y,0),b(y,0),b(y,0),_(y,G),_(y,B.length),_(y,B.length),b(y,E.length),b(y,0),w(y,E),w(y,B),_(x,33639248),b(x,0),b(x,20),b(x,0),b(x,0),b(x,0),b(x,0),_(x,G),_(x,B.length),_(x,B.length),b(x,E.length),b(x,0),b(x,0),b(x,0),b(x,0),_(x,32),_(x,C),w(x,E),C+=30+B.length+E.length}return w(y,x),_(y,101010256),b(y,0),b(y,0),b(y,k.length),b(y,k.length),_(y,x.length),_(y,C),b(y,0),Uint8Array.from(y)}window.wireguard={generateKeypair:function(){var k=d(),y=c(k),x=u();return{publicKey:p(y),privateKey:p(k),presharedKey:p(x)}},generatePublicKey:function(k){return k=m(k),p(c(k))},generateZipFiles:function(k,y){var x=k.data,C=T(x),P=new Blob([C],{type:"application/zip"}),E=document.createElement("a");E.download=y,E.href=URL.createObjectURL(P),E.style.display="none",document.body.appendChild(E),E.click(),document.body.removeChild(E)}}})();const lN={name:"newConfiguration",setup(){return{store:Bn()}},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 e=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=e.privateKey,this.newConfiguration.PublicKey
|
2024-03-21 02:03:08 -04:00
|
|
|
* @kurkle/color v0.3.2
|
|
|
|
* https://github.com/kurkle/color#readme
|
|
|
|
* (c) 2023 Jukka Kurkela
|
|
|
|
* Released under the MIT License
|
2024-09-14 15:21:10 +08:00
|
|
|
*/function ul(e){return e+.5|0}const Si=(e,t,n)=>Math.max(Math.min(e,n),t);function la(e){return Si(ul(e*2.55),0,255)}function Oi(e){return Si(ul(e*255),0,255)}function Ys(e){return Si(ul(e/2.55)/100,0,1)}function jm(e){return Si(ul(e*100),0,100)}const Kn={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},lh=[..."0123456789ABCDEF"],nB=e=>lh[e&15],sB=e=>lh[(e&240)>>4]+lh[e&15],Hl=e=>(e&240)>>4===(e&15),iB=e=>Hl(e.r)&&Hl(e.g)&&Hl(e.b)&&Hl(e.a);function oB(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Kn[e[1]]*17,g:255&Kn[e[2]]*17,b:255&Kn[e[3]]*17,a:t===5?Kn[e[4]]*17:255}:(t===7||t===9)&&(n={r:Kn[e[1]]<<4|Kn[e[2]],g:Kn[e[3]]<<4|Kn[e[4]],b:Kn[e[5]]<<4|Kn[e[6]],a:t===9?Kn[e[7]]<<4|Kn[e[8]]:255})),n}const rB=(e,t)=>e<255?t(e):"";function aB(e){var t=iB(e)?nB:sB;return e?"#"+t(e.r)+t(e.g)+t(e.b)+rB(e.a,t):void 0}const lB=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function k0(e,t,n){const s=t*Math.min(n,1-n),i=(o,r=(o+e/30)%12)=>n-s*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function cB(e,t,n){const s=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function uB(e,t,n){const s=k0(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)s[i]*=1-t-n,s[i]+=t;return s}function dB(e,t,n,s,i){return e===i?(t-n)/s+(t<n?6:0):t===i?(n-e)/s+2:(e-t)/s+4}function Wf(e){const n=e.r/255,s=e.g/255,i=e.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=dB(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function zf(e,t,n,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,s)).map(Oi)}function Yf(e,t,n){return zf(k0,e,t,n)}function hB(e,t,n){return zf(uB,e,t,n)}function fB(e,t,n){return zf(cB,e,t,n)}function S0(e){return(e%360+360)%360}function pB(e){const t=lB.exec(e);let n=255,s;if(!t)return;t[5]!==s&&(n=t[6]?la(+t[5]):Oi(+t[5]));const i=S0(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=hB(i,o,r):t[1]==="hsv"?s=fB(i,o,r):s=Yf(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function gB(e,t){var n=Wf(e);n[0]=S0(n[0]+t),n=Yf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function mB(e){if(!e)return;const t=Wf(e),n=t[0],s=jm(t[1]),i=jm(t[2]);return e.a<255?`hsla(${n}, ${s}%, ${i}%, ${Ys(e.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const Wm={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"},zm={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:"
|
2024-03-21 02:03:08 -04:00
|
|
|
* Chart.js v4.4.1
|
|
|
|
* https://www.chartjs.org
|
|
|
|
* (c) 2023 Chart.js Contributors
|
|
|
|
* Released under the MIT License
|
2024-09-14 15:21:10 +08:00
|
|
|
*/function Bs(){}const SB=(()=>{let e=0;return()=>e++})();function ot(e){return e===null||typeof e>"u"}function bt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function st(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Et(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Mn(e,t){return Et(e)?e:t}function Ge(e,t){return typeof e>"u"?t:e}const $B=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,A0=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function pt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ut(e,t,n,s){let i,o,r;if(bt(e))if(o=e.length,s)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(st(e))for(r=Object.keys(e),o=r.length,i=0;i<o;i++)t.call(n,e[r[i]],r[i])}function Rc(e,t){let n,s,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,s=e.length;n<s;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Lc(e){if(bt(e))return e.map(Lc);if(st(e)){const t=Object.create(null),n=Object.keys(e),s=n.length;let i=0;for(;i<s;++i)t[n[i]]=Lc(e[n[i]]);return t}return e}function C0(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function AB(e,t,n,s){if(!C0(e))return;const i=t[e],o=n[e];st(i)&&st(o)?Ua(i,o,s):t[e]=Lc(o)}function Ua(e,t,n){const s=bt(t)?t:[t],i=s.length;if(!st(e))return e;n=n||{};const o=n.merger||AB;let r;for(let a=0;a<i;++a){if(r=s[a],!st(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],e,r,n)}return e}function Aa(e,t){return Ua(e,t,{merger:CB})}function CB(e,t,n){if(!C0(e))return;const s=t[e],i=n[e];st(s)&&st(i)?Aa(s,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Lc(i))}const Km={"":e=>e,x:e=>e.x,y:e=>e.y};function EB(e){const t=e.split("."),n=[];let s="";for(const i of t)s+=i,s.endsWith("\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function PB(e){const t=EB(e);return n=>{for(const s of t){if(s==="")break;n=n&&n[s]}return n}}function Fi(e,t){return(Km[t]||(Km[t]=PB(t)))(e)}function Kf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const qa=e=>typeof e<"u",Bi=e=>typeof e=="function",Um=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function MB(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const wt=Math.PI,yt=2*wt,TB=yt+wt,Nc=Number.POSITIVE_INFINITY,DB=wt/180,Lt=wt/2,ao=wt/4,qm=wt*2/3,$i=Math.log10,Es=Math.sign;function Ca(e,t,n){return Math.abs(e-t)<n}function Gm(e){const t=Math.round(e);e=Ca(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor($i(e))),s=e/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function OB(e){const t=[],n=Math.sqrt(e);let s;for(s=1;s<n;s++)e%s===0&&(t.push(s),t.push(e/s));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Pr(e){return!isNaN(parseFloat(e))&&isFinite(e)}function IB(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function E0(e,t,n){let s,i,o;for(s=0,i=e.length;s<i;s++)o=e[s][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function as(e){return e*(wt/180)}function Uf(e){return e*(180/wt)}function Jm(e){if(!Et(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function P0(e,t){const n=t.x-e.x,s=t.y-e.y,i=Math.sqrt(n*n+s*s);let o=Math.atan2(s,n);return o<-.5*wt&&(o+=yt),{angle:o,distance:i}}function ch(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function RB(e,t){return(e-t+TB)%yt-wt}function Dn(e){return(e%yt+yt)%yt}function Ga(e,t,n,s){const i=Dn(e),o=Dn(t),r=Dn(n),a=Dn(o-i),l=Dn(r-i),c=Dn(i-o),u=Dn(i-r);return i===o||i===r||s&&o===r||a>l&&c<u}function en(e,t,n){return Math.max(t,Math.min(n,e))}function LB(e){return en(e,-32768,32767)}function qs(e,t,n,s=1e-6){return e>=Math.min(t,n)-s&&e<=Math.max(t,n)+s}function qf(e,t,n){n=n||(r=>e[r]<t);let s=e.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 Gs=(e,t,n,s)=>qf(e,n,s?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),NB=(e,t,n)=>qf
|
2024-03-21 02:03:08 -04:00
|
|
|
* Chart.js v4.4.1
|
|
|
|
* https://www.chartjs.org
|
|
|
|
* (c) 2023 Chart.js Contributors
|
|
|
|
* Released under the MIT License
|
2024-09-14 15:21:10 +08:00
|
|
|
*/class H4{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,s,i){const o=n.listeners[i],r=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(s-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=D0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=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(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,s,t,"progress")),o.length||(s.running=!1,this._notify(i,s,t,"complete"),s.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let s=n.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,s)),s}listen(t,n,s){this._getAnims(t).listeners[n].push(s)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);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(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Hs=new H4;const u_="transparent",j4={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const s=e_(e||u_),i=s.valid&&e_(t||u_);return i&&i.valid?i.mix(s,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class W4{constructor(t,n,s,i){const o=n[s];i=ca([t.to,i,o,t.from]);const r=ca([t.from,o,i]);this._active=!0,this._fn=t.fn||j4[t.type||typeof r],this._easing=Ea[t.easing]||Ea.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=s,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(t,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,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ca([t.to,n,i,t.from]),this._from=ca([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-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 t=this._promises||(this._promises=[]);return new Promise((n,s)=>{t.push({res:n,rej:s})})}_notify(t){const n=t?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class J0{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!st(t))return;const n=Object.keys(Pt.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!st(o))return;const r={};for(const a of n)r[a]=o[a];(bt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,n){const s=n.options,i=Y4(t,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&z4(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,n){const s=this._properties,i=[],o=t.$animations||(t.$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(t,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){t[c]=u;continue}o[c]=d=new W4(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size
|
2024-03-21 02:03:08 -04:00
|
|
|
`)>-1?e.split(`
|
2024-09-14 15:21:10 +08:00
|
|
|
`):e}function bH(e,t){const{element:n,datasetIndex:s,index:i}=t,o=e.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:e,label:r,parsed:o.getParsed(i),raw:e.data.datasets[s].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function q_(e,t){const n=e.chart.ctx,{body:s,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=Kt(t.bodyFont),c=Kt(t.titleFont),u=Kt(t.footerFont),d=o.length,f=i.length,p=s.length,m=fn(t.padding);let _=m.height,b=0,w=s.reduce((T,k)=>T+k.before.length+k.lines.length+k.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,d&&(_+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),w){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;_+=p*T+(w-p)*l.lineHeight+(w-1)*t.bodySpacing}f&&(_+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let $=0;const A=function(T){b=Math.max(b,n.measureText(T).width+$)};return n.save(),n.font=c.string,ut(e.title,A),n.font=l.string,ut(e.beforeBody.concat(e.afterBody),A),$=t.displayColors?r+2+t.boxPadding:0,ut(s,T=>{ut(T.before,A),ut(T.lines,A),ut(T.after,A)}),$=0,n.font=u.string,ut(e.footer,A),n.restore(),b+=m.width,{width:b,height:_}}function yH(e,t){const{y:n,height:s}=t;return n<s/2?"top":n>e.height-s/2?"bottom":"center"}function wH(e,t,n,s){const{x:i,width:o}=s,r=n.caretSize+n.caretPadding;if(e==="left"&&i+o+r>t.width||e==="right"&&i-o-r<0)return!0}function xH(e,t,n,s){const{x:i,width:o}=n,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return s==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),wH(c,e,t,n)&&(c="center"),c}function G_(e,t,n){const s=n.yAlign||t.yAlign||yH(e,n);return{xAlign:n.xAlign||t.xAlign||xH(e,t,n,s),yAlign:s}}function kH(e,t){let{x:n,width:s}=e;return t==="right"?n-=s:t==="center"&&(n-=s/2),n}function SH(e,t,n){let{y:s,height:i}=e;return t==="top"?s+=n:t==="bottom"?s-=i+n:s-=i/2,s}function J_(e,t,n,s){const{caretSize:i,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=$o(r);let m=kH(t,a);const _=SH(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,f)+i:a==="right"&&(m+=Math.max(d,p)+i),{x:en(m,0,s.width-t.width),y:en(_,0,s.height-t.height)}}function Ql(e,t,n){const s=fn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function X_(e){return vs([],js(e))}function $H(e,t,n){return Ui(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Q_(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const m1={beforeTitle:Bs,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return n[t.dataIndex]}return""},afterTitle:Bs,beforeBody:Bs,beforeLabel:Bs,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return ot(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Bs,afterBody:Bs,beforeFooter:Bs,footer:Bs,afterFooter:Bs};function Sn(e,t,n,s){const i=e[t].call(n,s);return typeof i>"u"?m1[t].call(n,s):i}class _h extends oi{constructor(t){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=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void
|
|
|
|
]))+`;Os.KANJI=new RegExp(el,"g");Os.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Os.BYTE=new RegExp(Yj,"g");Os.NUMERIC=new RegExp(B1,"g");Os.ALPHANUMERIC=new RegExp(zj,"g");const Kj=new RegExp("^"+el+"$"),Uj=new RegExp("^"+B1+"$"),qj=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Os.testKanji=function(t){return Kj.test(t)};Os.testNumeric=function(t){return Uj.test(t)};Os.testAlphanumeric=function(t){return qj.test(t)};(function(e){const t=lp,n=Os;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,r){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?o.ccBits[0]:r<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.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 e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(o,r){if(e.isValid(o))return o;try{return s(o)}catch{return r}}})(Gi);(function(e){const t=Vn,n=$u,s=Su,i=Gi,o=lp,r=7973,a=t.getBCHDigit(r);function l(f,p,m){for(let _=1;_<=40;_++)if(p<=e.getCapacity(_,m,f))return _}function c(f,p){return i.getCharCountIndicator(f,p)+4}function u(f,p){let m=0;return f.forEach(function(_){const b=c(_.mode,p);m+=b+_.getBitsLength()}),m}function d(f,p){for(let m=1;m<=40;m++)if(u(f,m)<=e.getCapacity(m,p,i.MIXED))return m}e.from=function(p,m){return o.isValid(p)?parseInt(p,10):m},e.getCapacity=function(p,m,_){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=i.BYTE);const b=t.getSymbolTotalCodewords(p),w=n.getTotalCodewordsCount(p,m),$=(b-w)*8;if(_===i.MIXED)return $;const A=$-c(_,p);switch(_){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)}},e.getBestVersionForData=function(p,m){let _;const b=s.from(m,s.M);if(Array.isArray(p)){if(p.length>1)return d(p,b);if(p.length===0)return 1;_=p[0]}else _=p;return l(_.mode,_.getLength(),b)},e.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let m=p<<12;for(;t.getBCHDigit(m)-a>=0;)m^=r<<t.getBCHDigit(m)-a;return p<<12|m}})(F1);var V1={};const Ph=Vn,H1=1335,Gj=21522,gv=Ph.getBCHDigit(H1);V1.getEncodedBits=function(t,n){const s=t.bit<<3|n;let i=s<<10;for(;Ph.getBCHDigit(i)-gv>=0;)i^=H1<<Ph.getBCHDigit(i)-gv;return(s<<10|i)^Gj};var j1={};const Jj=Gi;function Dr(e){this.mode=Jj.NUMERIC,this.data=e.toString()}Dr.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Dr.prototype.getLength=function(){return this.data.length};Dr.prototype.getBitsLength=function(){return Dr.getBitsLength(this.data.length)};Dr.prototype.write=function(t){let n,s,i;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),i=parseInt(s,10),t.put(i,10);const o=this.data.length-n;o>0&&(s=this.data.substr(n),i=parseInt(s,10),t.put(i,o*3+1))};var Xj=Dr;const Qj=Gi,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 Or(e){this.mode=Qj.ALPHANUMERIC,this.data=e}Or.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Or.prototype.getLength=function(){return this.data.length};Or.prototype.getBitsLength=function(){return Or.getBitsLength(this.data.length)};Or.prototype.write=function(t){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]),t.put(s,11)}this.data.length%2&&t.put(Pd.indexOf(this.data[n]),6)};var Zj
|
|
|
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var rW=Rr,W1={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,s,i){var o={},r={};r[s]=0;var a=t.PriorityQueue.make();a.push(s,0);for(var l,c,u,d,f,p,m,_,b;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(p=f[u],m=d+p,_=r[u],b=typeof r[u]>"u",(b||_>m)&&(r[u]=m,a.push(u,m),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=t.single_source_shortest_paths(n,s,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var s=t.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}}};e.exports=t})(W1);var aW=W1.exports;(function(e){const t=Gi,n=Xj,s=Zj,i=sW,o=rW,r=Os,a=Vn,l=aW;function c(w){return unescape(encodeURIComponent(w)).length}function u(w,$,A){const T=[];let k;for(;(k=w.exec(A))!==null;)T.push({data:k[0],index:k.index,mode:$,length:k[0].length});return T}function d(w){const $=u(r.NUMERIC,t.NUMERIC,w),A=u(r.ALPHANUMERIC,t.ALPHANUMERIC,w);let T,k;return a.isKanjiModeEnabled()?(T=u(r.BYTE,t.BYTE,w),k=u(r.KANJI,t.KANJI,w)):(T=u(r.BYTE_KANJI,t.BYTE,w),k=[]),$.concat(A,T,k).sort(function(x,C){return x.index-C.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function f(w,$){switch($){case t.NUMERIC:return n.getBitsLength(w);case t.ALPHANUMERIC:return s.getBitsLength(w);case t.KANJI:return o.getBitsLength(w);case t.BYTE:return i.getBitsLength(w)}}function p(w){return w.reduce(function($,A){const T=$.length-1>=0?$[$.length-1]:null;return T&&T.mode===A.mode?($[$.length-1].data+=A.data,$):($.push(A),$)},[])}function m(w){const $=[];for(let A=0;A<w.length;A++){const T=w[A];switch(T.mode){case t.NUMERIC:$.push([T,{data:T.data,mode:t.ALPHANUMERIC,length:T.length},{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.ALPHANUMERIC:$.push([T,{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.KANJI:$.push([T,{data:T.data,mode:t.BYTE,length:c(T.data)}]);break;case t.BYTE:$.push([{data:T.data,mode:t.BYTE,length:c(T.data)}])}}return $}function _(w,$){const A={},T={start:{}};let k=["start"];for(let y=0;y<w.length;y++){const x=w[y],C=[];for(let P=0;P<x.length;P++){const E=x[P],B=""+y+P;C.push(B),A[B]={node:E,lastCount:0},T[B]={};for(let G=0;G<k.length;G++){const ae=k[G];A[ae]&&A[ae].node.mode===E.mode?(T[ae][B]=f(A[ae].lastCount+E.length,E.mode)-f(A[ae].lastCount,E.mode),A[ae].lastCount+=E.length):(A[ae]&&(A[ae].lastCount=E.length),T[ae][B]=f(E.length,E.mode)+4+t.getCharCountIndicator(E.mode,$))}}k=C}for(let y=0;y<k.length;y++)T[k[y]].end=0;return{map:T,table:A}}function b(w,$){let A;const T=t.getBestModeForData(w);if(A=t.from($,T),A!==t.BYTE&&A.bit<T.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString(A)+`.
|
|
|
|
Suggested mode is: `+t.toString(T));switch(A===t.KANJI&&!a.isKanjiModeEnabled()&&(A=t.BYTE),A){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new s(w);case t.KANJI:return new o(w);case t.BYTE:return new i(w)}}e.fromArray=function($){return $.reduce(function(A,T){return typeof T=="string"?A.push(b(T,null)):T.data&&A.push(b(T.data,T.mode)),A},[])},e.fromString=function($,A){const T=d($,a.isKanjiModeEnabled()),k=m(T),y=_(k,A),x=l.find_path(y.map,"start","end"),C=[];for(let P=1;P<x.length-1;P++)C.push(y.table[x[P]].node);return e.fromArray(p(C))},e.rawSplit=function($){return e.fromArray(d($,a.isKanjiModeEnabled()))}})(j1);const Cu=Vn,Md=Su,lW=Vj,cW=Hj,uW=O1,dW=I1,Mh=R1,Th=$u,hW=Wj,Yc=F1,fW=V1,pW=Gi,Td=j1;function gW(e,t){const n=e.size,s=dW.getPositions(t);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?e.set(o+a,r+l,!0,!0):e.set(o+a,r+l,!1,!0))}}function mW(e){const t=e.size;for(let n=8;n<t-8;n++){const s=n%2===0;e.set(n,6,s,!0),e.set(6,n,s,!0)}}function _W(e,t){const n=uW.getPositions(t);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?e.set(i+r,o+a,!0,!0):e.set(i+r,o+a,!1,!0)}}function vW(e,t){const n=e.size,s=Yc.getEncodedBits(t);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,e.set(i,o,r,!0),e.set(o,i,r,!0)}function Dd(e,t,n){const s=e.size,i=fW.getEncodedBits(t,n);let o,r;for(o=0;o<15;o++)r=(i>>o&1)===1,o<6?e.set(o,8,r,!0):o<8?e.set(o+1,8,r,!0):e.set(s-15+o,8,r,!0),o<8?e.set(8,s-o-1,r,!0):o<9?e.set(8,15-o-1+1,r,!0):e.set(8,15-o-1,r,!0);e.set(s-8,8,1,!0)}function bW(e,t){const n=e.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(!e.isReserved(i,a-l)){let c=!1;r<t.length&&(c=(t[r]>>>o&1)===1),e.set(i,a-l,c),o--,o===-1&&(r++,o=7)}if(i+=s,i<0||n<=i){i-=s,s=-s;break}}}function yW(e,t,n){const s=new lW;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),pW.getCharCountIndicator(l.mode,e)),l.write(s)});const i=Cu.getSymbolTotalCodewords(e),o=Th.getTotalCodewordsCount(e,t),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 wW(s,e,t)}function wW(e,t,n){const s=Cu.getSymbolTotalCodewords(t),i=Th.getTotalCodewordsCount(t,n),o=s-i,r=Th.getBlocksCount(t,n),a=s%r,l=r-a,c=Math.floor(s/r),u=Math.floor(o/r),d=u+1,f=c-u,p=new hW(f);let m=0;const _=new Array(r),b=new Array(r);let w=0;const $=new Uint8Array(e.buffer);for(let x=0;x<r;x++){const C=x<l?u:d;_[x]=$.slice(m,m+C),b[x]=p.encode(_[x]),m+=C,w=Math.max(w,C)}const A=new Uint8Array(s);let T=0,k,y;for(k=0;k<w;k++)for(y=0;y<r;y++)k<_[y].length&&(A[T++]=_[y][k]);for(k=0;k<f;k++)for(y=0;y<r;y++)A[T++]=b[y][k];return A}function xW(e,t,n,s){let i;if(Array.isArray(e))i=Td.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=Td.rawSplit(e);c=Yc.getBestVersionForData(u,n)}i=Td.fromString(e,c||40)}else throw new Error("Invalid data");const o=Yc.getBestVersionForData(i,n);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=o;else if(t<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-14 15:21:10 +08:00
|
|
|
`);const r=yW(t,n,i),a=Cu.getSymbolSize(t),l=new cW(a);return gW(l,t),mW(l),_W(l,t),Dd(l,n,0),t>=7&&vW(l,t),bW(l,r),isNaN(s)&&(s=Mh.getBestMask(l,Dd.bind(null,l,n))),Mh.applyMask(s,l),Dd(l,n,s),{modules:l,version:t,errorCorrectionLevel:n,maskPattern:s,segments:i}}T1.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=Md.M,i,o;return typeof n<"u"&&(s=Md.from(n.errorCorrectionLevel,Md.M),i=Yc.from(n.version),o=Mh.from(n.maskPattern),n.toSJISFunc&&Cu.setToSJISFunction(n.toSJISFunc)),xW(t,i,s,o)};var z1={},cp={};(function(e){function t(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("")}}e.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:t(s.color.dark||"#000000ff"),light:t(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},e.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},e.getImageWidth=function(s,i){const o=e.getScale(s,i);return Math.floor((s+i.margin*2)*o)},e.qrToImageData=function(s,i,o){const r=i.modules.size,a=i.modules.data,l=e.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 p=0;p<c;p++){let m=(f*c+p)*4,_=o.color.light;if(f>=u&&p>=u&&f<c-u&&p<c-u){const b=Math.floor((f-u)/l),w=Math.floor((p-u)/l);_=d[a[b*r+w]?1:0]}s[m++]=_.r,s[m++]=_.g,s[m++]=_.b,s[m]=_.a}}})(cp);(function(e){const t=cp;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")}}e.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=t.getOptions(l);const u=t.getImageWidth(o.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return t.qrToImageData(f.data,o,l),n(d,c,u),d.putImageData(f,0,0),c},e.renderToDataURL=function(o,r,a){let l=a;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),l||(l={});const c=e.render(o,r,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(z1);var Y1={};const kW=cp;function mv(e,t){const n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function Od(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}function SW(e,t,n){let s="",i=0,o=!1,r=0;for(let a=0;a<e.length;a++){const l=Math.floor(a%t),c=Math.floor(a/t);!l&&!o&&(o=!0),e[a]?(r++,a>0&&l>0&&e[a-1]||(s+=o?Od("M",l+n,.5+c+n):Od("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(s+=Od("h",r),r=0)):i++}return s}Y1.render=function(t,n,s){const i=kW.getOptions(n),o=t.modules.size,r=t.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+mv(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+mv(i.color.dark,"stroke")+' d="'+SW(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 $W=Fj,Dh=T1,K1=z1,AW=Y1;function up(e,t,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!$W())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=t,t=s=void 0):r===3&&(t.getContext&&typeof i>"u"?(i=s,s=void 0):(i=s,s=n,n=t,t=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(n=t,t=s=void 0):r===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(l,c){try{const u=Dh.create(n,s);l(e(u,t,s))}catch(u){c(u)}})}try{const l=Dh.create(n,s);i(null,e(l,t,s))}catch(l){i(l)}}Bo.create=Dh.create;Bo.toCanvas=up.bind(null,K1.render);Bo.toDataURL=up.bind(null,K1.renderToDataURL);Bo.toString=up.bind(null,function(e,t,n){return AW.render(e,n)});const CW={name:"peerQRCode",props:{peerConfigData:String},mounted(){Bo.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,e=>{e&&console.error(e)})}},EW={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},PW={class:"container d-flex h-100 w-100"},MW={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},TW={class:"card rounded-3 shadow"},DW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},OW=h("h4",{class:"mb-0"},"QR Code",-1),IW={class:"card-body"},RW={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function LW(e,t,n,s,i,o){return D(),F("div",EW,[h("div",PW,[h("div",MW,[h("div",TW,[h("div",DW,[OW,h("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=r=>this.$emit("close"))})]),h("div",IW,[h("canvas",RW,null,512)])])])])])}const NW=ze(CW,[["render",LW]]),FW={name:"nameInput",props:{bulk:Boolean,data:Object,saving:Boolean}},BW=h("label",{for:"peer_name_textbox",class:"form-label"},[h("small",{class:"text-muted"},"Name")],-1),VW=["disabled"];function HW(e,t,n,s,i,o){return D(),F("div",{class:Ee({inactiveField:this.bulk})},[BW,Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":t[0]||(t[0]=r=>this.data.name=r),id:"peer_name_textbox",placeholder:""},null,8,VW),[[We,this.data.name]])],2)}const jW=ze(FW,[["render",HW]]),WW={name:"privatePublicKeyInput",props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:et()}},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},testKey(e){return/^[A-Za-z0-9+/]{43}=?=?$/.test(e)},checkMatching(){try{this.keypair.privateKey&&this.testKey(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),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")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}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()}}}},zW=h("label",{for:"peer_private_key_textbox",class:"form-label"},[h("small",{class:"text-muted"},[ye("Private Key "),h("code",null,"(Required for QR Code and Download)")])],-1),YW={class:"input-group"},KW=["disabled"],UW=["disabled"],qW=h("i",{class:"bi bi-arrow-repeat"},null,-1),GW=[qW],JW={class:"d-flex"},XW=h("label",{for:"public_key",class:"form-label"},[h("small",{class:"text-muted"},[ye("Public Key "),h("code",null,"(Required)")])],-1),QW={class:"form-check form-switch ms-auto"},ZW=["disabled"],ez=h("label",{class:"form-check-label",for:"enablePublicKeyEdit"},[h("small",null,"Edit")],-1),tz=["disabled"];function nz(e,t,n,s,i,o){return D(),F("div",{class:Ee(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[zW,h("div",YW,[Re(h(
|
|
|
|
${e.data?"is on":"is off"}`,"Success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.configurationInfo.Status=e.data,this.configurationToggling=!1})},getPeers(e=this.$route.params.id){xt("/api/getWireguardConfigurationInfo",{configurationName:e},t=>{if(this.configurationInfo=t.data.configurationInfo,this.configurationPeers=t.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),t.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(t=>t.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_data+t.cumu_data).reduce((t,n)=>t+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_receive+t.cumu_receive).reduce((t,n)=>t+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_sent+t.cumu_sent).reduce((t,n)=>t+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(e=>e.name?e.name:`Untitled Peer - ${e.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(e=>e.cumu_data+e.total_data),backgroundColor:this.configurationPeers.map(e=>"#0dcaf0"),tooltip:{callbacks:{label:e=>`${e.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(e,t)=>`${e} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>`${e.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(e,t)=>`${e} MB/s`},grid:{display:!1}}}}},searchPeers(){const e=new Hr(this.configurationPeers,{keys:["name","id","allowed_ip"]}),t=this.wireguardConfigurationStore.searchString?e.search(this.wireguardConfigurationStore.searchString).map(n=>n.item):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((n,s)=>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((n,s)=>n[this.dashboardConfigurationStore.Configur
|