2024-06-18 03:16:42 +08:00
var f1 = Object . defineProperty ; var p1 = ( e , t , s ) => t in e ? f1 ( e , t , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : s } ) : e [ t ] = s ; var it = ( e , t , s ) => ( p1 ( e , typeof t != "symbol" ? t + "" : t , s ) , s ) ; ( function ( ) { const t = document . createElement ( "link" ) . relList ; if ( t && t . supports && t . supports ( "modulepreload" ) ) return ; for ( const i of document . querySelectorAll ( 'link[rel="modulepreload"]' ) ) n ( 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" && n ( r ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function s ( 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 n ( i ) { if ( i . ep ) return ; i . ep = ! 0 ; const o = s ( i ) ; fetch ( i . href , o ) } } ) ( ) ; var Jp = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { } ; function g1 ( e ) { return e && e . _ _esModule && Object . prototype . hasOwnProperty . call ( e , "default" ) ? e . default : e } function m1 ( e ) { if ( e . _ _esModule ) return e ; var t = e . default ; if ( typeof t == "function" ) { var s = function n ( ) { return this instanceof n ? Reflect . construct ( t , arguments , this . constructor ) : t . apply ( this , arguments ) } ; s . prototype = t . prototype } else s = { } ; return Object . defineProperty ( s , "__esModule" , { value : ! 0 } ) , Object . keys ( e ) . forEach ( function ( n ) { var i = Object . getOwnPropertyDescriptor ( e , n ) ; Object . defineProperty ( s , n , i . get ? i : { enumerable : ! 0 , get : function ( ) { return e [ n ] } } ) } ) , s } var _1 = { exports : { } } , Se = "top" , Re = "bottom" , Ne = "right" , Ae = "left" , Na = "auto" , Yi = [ Se , Re , Ne , Ae ] , Jn = "start" , Ci = "end" , Qp = "clippingParents" , td = "viewport" , _i = "popper" , Zp = "reference" , lc = Yi . reduce ( function ( e , t ) { return e . concat ( [ t + "-" + Jn , t + "-" + Ci ] ) } , [ ] ) , ed = [ ] . concat ( Yi , [ Na ] ) . reduce ( function ( e , t ) { return e . concat ( [ t , t + "-" + Jn , t + "-" + Ci ] ) } , [ ] ) , tg = "beforeRead" , eg = "read" , sg = "afterRead" , ng = "beforeMain" , ig = "main" , og = "afterMain" , rg = "beforeWrite" , ag = "write" , lg = "afterWrite" , cg = [ tg , eg , sg , ng , ig , og , rg , ag , lg ] ; function bs ( e ) { return e ? ( e . nodeName || "" ) . toLowerCase ( ) : null } function Fe ( e ) { if ( e == null ) return window ; if ( e . toString ( ) !== "[object Window]" ) { var t = e . ownerDocument ; return t && t . defaultView || window } return e } function Qn ( e ) { var t = Fe ( e ) . Element ; return e instanceof t || e instanceof Element } function Xe ( e ) { var t = Fe ( e ) . HTMLElement ; return e instanceof t || e instanceof HTMLElement } function sd ( e ) { if ( typeof ShadowRoot > "u" ) return ! 1 ; var t = Fe ( e ) . ShadowRoot ; return e instanceof t || e instanceof ShadowRoot } function b1 ( e ) { var t = e . state ; Object . keys ( t . elements ) . forEach ( function ( s ) { var n = t . styles [ s ] || { } , i = t . attributes [ s ] || { } , o = t . elements [ s ] ; ! Xe ( o ) || ! bs ( o ) || ( Object . assign ( o . style , n ) , Object . keys ( i ) . forEach ( function ( r ) { var a = i [ r ] ; a === ! 1 ? o . removeAttribute ( r ) : o . setAttribute ( r , a === ! 0 ? "" : a ) } ) ) } ) } function v1 ( e ) { var t = e . state , s = { popper : { position : t . options . strategy , left : "0" , top : "0" , margin : "0" } , arrow : { position : "absolute" } , reference : { } } ; return Object . assign ( t . elements . popper . style , s . popper ) , t . styles = s , t . elements . arrow && Object . assign ( t . elements . arrow . style , s . arrow ) , function ( ) { Object . keys ( t . elements ) . forEach ( function ( n ) { var i = t . elements [ n ] , o = t . attributes [ n ] || { } , r = Object . keys ( t . styles . hasOwnProperty ( n ) ? t . styles [ n ] : s [ n ] ) , a = r . reduce ( function ( l , c ) { return l [ c ] = "" , l } , { } ) ; ! Xe ( i ) || ! bs ( i ) || ( Object . assign ( i . style , a ) , Object . keys ( o ) . forEach ( function ( l ) { i . removeAttribute ( l ) } ) ) } ) } } const nd = { name : "applyStyles" , enabled : ! 0 , phase : "write" , fn : b1 , effect : v1 , requires : [ "computeStyles" ] } ; function gs ( e ) { return e . split ( "-" ) [ 0 ] } var zn = Math . max , ma = Math . min , $i = Math . round ; function cc ( ) { 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 dg ( ) { return ! /^((?!chrome|android).)*safari/i . test ( cc ( ) ) } function Pi ( e , t , s ) { t === void 0 && ( t = ! 1 ) , s === void 0 && ( s = ! 1 ) ; var n = e . getBoundingClientRect ( ) , i = 1 , o = 1 ; t && Xe ( e ) && ( i = e . offsetWidth > 0 && $i ( n . width ) / e . offsetWidth || 1 , o = e . offsetHeight > 0 && $i ( n . height ) / e . offsetHeight || 1 ) ; var r = Qn ( e ) ? Fe ( e ) : window , a = r . visualViewport , l = ! dg ( ) && s , c = ( n . 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-06-18 03:16:42 +08:00
* /(function(e,t){(function(s,n){e.exports=n(rx)})(Jp,function(s){function n(k){const h=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const _ in k)if(_!=="default"){const O=Object.getOwnPropertyDescriptor(k,_);Object.defineProperty(h,_,O.get?O:{enumerable:!0,get:()=>k[_]})}}return h.default=k,Object.freeze(h)}const i=n(s),o=new Map,r={set(k,h,_){o.has(k)||o.set(k,new Map);const O=o.get(k);if(!O.has(h)&&O.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(O.keys())[0]}.`);return}O.set(h,_)},get(k,h){return o.has(k)&&o.get(k).get(h)||null},remove(k,h){if(!o.has(k))return;const _=o.get(k);_.delete(h),_.size===0&&o.delete(k)}},a=1e6,l=1e3,c="transitionend",d=k=>(k&&window.CSS&&window.CSS.escape&&(k=k.replace(/ # ( [ ^ \ s "#']+)/g,(h,_)=>`#${CSS.escape(_)}`)),k),u=k=>k==null?`${k}`:Object.prototype.toString.call(k).match(/\s([a-z]+)/i)[1].toLowerCase(),f=k=>{do k+=Math.floor(Math.random()*a);while(document.getElementById(k));return k},g=k=>{if(!k)return 0;let{transitionDuration:h,transitionDelay:_}=window.getComputedStyle(k);const O=Number.parseFloat(h),U=Number.parseFloat(_);return!O&&!U?0:(h=h.split(" , ")[0],_=_.split(" , ")[0],(Number.parseFloat(h)+Number.parseFloat(_))*l)},m=k=>{k.dispatchEvent(new Event(c))},b=k=>!k||typeof k!=" object "?!1:(typeof k.jquery<" u "&&(k=k[0]),typeof k.nodeType<" u "),v=k=>b(k)?k.jquery?k[0]:k:typeof k==" string "&&k.length>0?document.querySelector(d(k)):null,w=k=>{if(!b(k)||k.getClientRects().length===0)return!1;const h=getComputedStyle(k).getPropertyValue(" visibility ")===" visible ",_=k.closest(" details : not ( [ open ] ) ");if(!_)return h;if(_!==k){const O=k.closest(" summary ");if(O&&O.parentNode!==_||O===null)return!1}return h},E=k=>!k||k.nodeType!==Node.ELEMENT_NODE||k.classList.contains(" disabled ")?!0:typeof k.disabled<" u "?k.disabled:k.hasAttribute(" disabled ")&&k.getAttribute(" disabled ")!==" false ",$=k=>{if(!document.documentElement.attachShadow)return null;if(typeof k.getRootNode==" function "){const h=k.getRootNode();return h instanceof ShadowRoot?h:null}return k instanceof ShadowRoot?k:k.parentNode?$(k.parentNode):null},T=()=>{},y=k=>{k.offsetHeight},x=()=>window.jQuery&&!document.body.hasAttribute(" data - bs - no - jquery ")?window.jQuery:null,C=[],S=k=>{document.readyState===" loading "?(C.length||document.addEventListener(" DOMContentLoaded ",()=>{for(const h of C)h()}),C.push(k)):k()},P=()=>document.documentElement.dir===" rtl ",M=k=>{S(()=>{const h=x();if(h){const _=k.NAME,O=h.fn[_];h.fn[_]=k.jQueryInterface,h.fn[_].Constructor=k,h.fn[_].noConflict=()=>(h.fn[_]=O,k.jQueryInterface)}})},I=(k,h=[],_=k)=>typeof k==" function "?k(...h):_,N=(k,h,_=!0)=>{if(!_){I(k);return}const U=g(h)+5;let nt=!1;const et=({target:$t})=>{$t===h&&(nt=!0,h.removeEventListener(c,et),I(k))};h.addEventListener(c,et),setTimeout(()=>{nt||m(h)},U)},Q=(k,h,_,O)=>{const U=k.length;let nt=k.indexOf(h);return nt===-1?!_&&O?k[U-1]:k[0]:(nt+=_?1:-1,O&&(nt=(nt+U)%U),k[Math.max(0,Math.min(nt,U-1))])},G=/[^.]*(?=\..*)\.|.*/,V=/\..*/,L=/::\d+$/,W={};let K=1;const ot={mouseenter:" mouseover ",mouseleave:" mouseout "},ut=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 bt ( k , h ) { return h && ` ${ h } :: ${ K ++ } ` || k . uidEvent || K ++ } function _t ( k ) { const h = bt ( k ) ; return k . uidEvent = h , W [ h ] = W [ h ] || { } , W [ h ] } function Pt ( k , h ) { return function _ ( O ) { return Mt ( O , { delegateTarget : k } ) , _ . oneOff && B . off ( k , O . type , h ) , h . apply ( k , [ O ] ) } } function At ( k , h , _ ) { return function O ( U ) { const nt = k . querySelectorAll ( h ) ; for ( let { target : et } = U ; et && et !== this ; et = et . parentNode ) for ( const $t of nt ) if ( $t === et ) return Mt ( U , { delegateTarget : et } )
* @ vue / shared v3 . 4.29
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * //*! #__NO_SIDE_EFFECTS__ */function hd(e,t){const s=new Set(e.split(","));return t?n=>s.has(n.toLowerCase()):n=>s.has(n)}const Yt={},yi=[],Ye=()=>{},ax=()=>!1,Va=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),fd=e=>e.startsWith("onUpdate:"),ee=Object.assign,pd=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},lx=Object.prototype.hasOwnProperty,Nt=(e,t)=>lx.call(e,t),gt=Array.isArray,xi=e=>tr(e)==="[object Map]",qi=e=>tr(e)==="[object Set]",lh=e=>tr(e)==="[object Date]",wt=e=>typeof e=="function",se=e=>typeof e=="string",Ns=e=>typeof e=="symbol",Ut=e=>e!==null&&typeof e=="object",wg=e=>(Ut(e)||wt(e))&&wt(e.then)&&wt(e.catch),Eg=Object.prototype.toString,tr=e=>Eg.call(e),cx=e=>tr(e).slice(8,-1),Sg=e=>tr(e)==="[object Object]",gd=e=>se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,So=hd(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ha=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},dx=/-(\w)/g,vs=Ha(e=>e.replace(dx,(t,s)=>s?s.toUpperCase():"")),ux=/\B([A-Z])/g,Gi=Ha(e=>e.replace(ux,"-$1").toLowerCase()),ja=Ha(e=>e.charAt(0).toUpperCase()+e.slice(1)),Tl=Ha(e=>e?`on${ja(e)}`:""),pn=(e,t)=>!Object.is(e,t),ta=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Ag=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},_a=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Cg=e=>{const t=se(e)?Number(e):NaN;return isNaN(t)?e:t};let ch;const $g=()=>ch||(ch=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mi(e){if(gt(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=se(n)?gx(n):Mi(n);if(i)for(const o in i)t[o]=i[o]}return t}else if(se(e)||Ut(e))return e}const hx=/;(?![^(]*\))/g,fx=/:([^]+)/,px=/\/\*[^]*?\*\//g;function gx(e){const t={};return e.replace(px,"").split(hx).forEach(s=>{if(s){const n=s.split(fx);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Rt(e){let t="";if(se(e))t=e;else if(gt(e))for(let s=0;s<e.length;s++){const n=Rt(e[s]);n&&(t+=n+" ")}else if(Ut(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const mx="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",_x=hd(mx);function Pg(e){return!!e||e===""}function bx(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=Zn(e[n],t[n]);return s}function Zn(e,t){if(e===t)return!0;let s=lh(e),n=lh(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Ns(e),n=Ns(t),s||n)return e===t;if(s=gt(e),n=gt(t),s||n)return s&&n?bx(e,t):!1;if(s=Ut(e),n=Ut(t),s||n){if(!s||!n)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||!Zn(e[r],t[r]))return!1}}return String(e)===String(t)}function md(e,t){return e.findIndex(s=>Zn(s,t))}const lt=e=>se(e)?e:e==null?"":gt(e)||Ut(e)&&(e.toString===Eg||!wt(e.toString))?JSON.stringify(e,kg,2):String(e),kg=(e,t)=>t&&t.__v_isRef?kg(e,t.value):xi(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Ml(n,o)+" =>"]=i,s),{})}:qi(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ml(s))}:Ns(t)?Ml(t):Ut(t)&&!gt(t)&&!Sg(t)?String(t):t,Ml=(e,t="")=>{var s;return Ns(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
* @ vue / reactivity v3 . 4.29
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * / l e t D e ; c l a s s T g { c o n s t r u c t o r ( t = ! 1 ) { t h i s . d e t a c h e d = t , t h i s . _ a c t i v e = ! 0 , t h i s . e f f e c t s = [ ] , t h i s . c l e a n u p s = [ ] , t h i s . p a r e n t = D e , ! t & & D e & & ( t h i s . i n d e x = ( D e . s c o p e s | | ( D e . s c o p e s = [ ] ) ) . p u s h ( t h i s ) - 1 ) } g e t a c t i v e ( ) { r e t u r n t h i s . _ a c t i v e } r u n ( t ) { i f ( t h i s . _ a c t i v e ) { c o n s t s = D e ; t r y { r e t u r n D e = t h i s , t ( ) } f i n a l l y { D e = s } } } o n ( ) { D e = t h i s } o f f ( ) { D e = t h i s . p a r e n t } s t o p ( t ) { i f ( t h i s . _ a c t i v e ) { l e t s , n ; f o r ( s = 0 , n = t h i s . e f f e c t s . l e n g t h ; s < n ; s + + ) t h i s . e f f e c t s [ s ] . s t o p ( ) ; f o r ( s = 0 , n = t h i s . c l e a n u p s . l e n g t h ; s < n ; s + + ) t h i s . c l e a n u p s [ s ] ( ) ; i f ( t h i s . s c o p e s ) f o r ( s = 0 , n = t h i s . s c o p e s . l e n g t h ; s < n ; s + + ) t h i s . s c o p e s [ s ] . s t o p ( ! 0 ) ; i f ( ! t h i s . d e t a c h e d & & t h i s . p a r e n t & & ! t ) { c o n s t i = t h i s . p a r e n t . s c o p e s . p o p ( ) ; i & & i ! = = t h i s & & ( t h i s . p a r e n t . s c o p e s [ t h i s . i n d e x ] = i , i . i n d e x = t h i s . i n d e x ) } t h i s . p a r e n t = v o i d 0 , t h i s . _ a c t i v e = ! 1 } } } f u n c t i o n M g ( e ) { r e t u r n n e w T g ( e ) } f u n c t i o n v x ( e , t = D e ) { t & & t . a c t i v e & & t . e f f e c t s . p u s h ( e ) } f u n c t i o n _ d ( ) { r e t u r n D e } f u n c t i o n O g ( e ) { D e & & D e . c l e a n u p s . p u s h ( e ) } l e t U n ; c l a s s b d { c o n s t r u c t o r ( t , s , n , i ) { t h i s . f n = t , t h i s . t r i g g e r = s , t h i s . s c h e d u l e r = n , t h i s . a c t i v e = ! 0 , t h i s . d e p s = [ ] , t h i s . _ d i r t y L e v e l = 5 , t h i s . _ t r a c k I d = 0 , t h i s . _ r u n n i n g s = 0 , t h i s . _ s h o u l d S c h e d u l e = ! 1 , t h i s . _ d e p s L e n g t h = 0 , v x ( t h i s , i ) } g e t d i r t y ( ) { i f ( t h i s . _ d i r t y L e v e l = = = 2 ) r e t u r n ! 1 ; i f ( t h i s . _ d i r t y L e v e l = = = 3 | | t h i s . _ d i r t y L e v e l = = = 4 ) { t h i s . _ d i r t y L e v e l = 1 , y n ( ) ; f o r ( l e t t = 0 ; t < t h i s . _ d e p s L e n g t h ; t + + ) { c o n s t s = t h i s . d e p s [ t ] ; i f ( s . c o m p u t e d ) { i f ( s . c o m p u t e d . e f f e c t . _ d i r t y L e v e l = = = 2 ) r e t u r n ! 0 ; i f ( y x ( s . c o m p u t e d ) , t h i s . _ d i r t y L e v e l > = 5 ) b r e a k } } t h i s . _ d i r t y L e v e l = = = 1 & & ( t h i s . _ d i r t y L e v e l = 0 ) , x n ( ) } r e t u r n t h i s . _ d i r t y L e v e l > = 5 } s e t d i r t y ( t ) { t h i s . _ d i r t y L e v e l = t ? 5 : 0 } r u n ( ) { i f ( t h i s . _ d i r t y L e v e l = 0 , ! t h i s . a c t i v e ) r e t u r n t h i s . f n ( ) ; l e t t = d n , s = U n ; t r y { r e t u r n d n = ! 0 , U n = t h i s , t h i s . _ r u n n i n g s + + , d h ( t h i s ) , t h i s . f n ( ) } f i n a l l y { u h ( t h i s ) , t h i s . _ r u n n i n g s - - , U n = s , d n = t } } s t o p ( ) { t h i s . a c t i v e & & ( d h ( t h i s ) , u h ( t h i s ) , t h i s . o n S t o p & & t h i s . o n S t o p ( ) , t h i s . a c t i v e = ! 1 ) } } f u n c t i o n y x ( e ) { r e t u r n e . v a l u e } f u n c t i o n d h ( e ) { e . _ t r a c k I d + + , e . _ d e p s L e n g t h = 0 } f u n c t i o n u h ( e ) { i f ( e . d e p s . l e n g t h > e . _ d e p s L e n g t h ) { f o r ( l e t t = e . _ d e p s L e n g t h ; t < e . d e p s . l e n g t h ; t + + ) D g ( e . d e p s [ t ] , e ) ; e . d e p s . l e n g t h = e . _ d e p s L e n g t h } } f u n c t i o n D g ( e , t ) { c o n s t s = e . g e t ( t ) ; s ! = = v o i d 0 & & t . _ t r a c k I d ! = = s & & ( e . d e l e t e ( t ) , e . s i z e = = = 0 & & e . c l e a n u p ( ) ) } l e t d n = ! 0 , u c = 0 ; c o n s t I g = [ ] ; f u n c t i o n y n ( ) { I g . p u s h ( d n ) , d n = ! 1 } f u n c t i o n x n ( ) { c o n s t e = I g . p o p ( ) ; d n = e = = = v o i d 0 ? ! 0 : e } f u n c t i o n v d ( ) { u c + + } f u n c t i o n y d ( ) { f o r ( u c - - ; ! u c & & h c . l e n g t h ; ) h c . s h i f t ( ) ( ) } f u n c t i o n L g ( e , t , s ) { i f ( t . g e t ( e ) ! = = e . _ t r a c k I d ) { t . s e t ( e , e . _ t r a c k I d ) ; c o n s t n = e . d e p s [ e . _ d e p s L e n g t h ] ; n ! = = t ? ( n & & D g ( n , e ) , e . d e p s [ e . _ d e p s L e n g t h + + ] = t ) : e . _ d e p s L e n g t h + + } } c o n s t h c = [ ] ; f u n c t i o n R g ( e , t , s ) { v d ( ) ; f o r ( c o n s t n o f e . k e y s ( ) ) { i f ( ! e . c o m p u t e d & & n . c o m p u t e d & & e . g e t ( n ) = = = n . _ t r a c k I d & & n . _ r u n n i n g s > 0 ) { n . _ d i r t y L e v e l = 2 ; c o n t i n u e } l e t i ; n . _ d i r t y L e v e l < t & & ( i ? ? ( i = e . g e t ( n ) = = = n . _ t r a c k I d ) ) & & ( n . _ s h o u l d S c h e d u l e | | ( n . _ s h o u l d S c h e d u l e = n . _ d i r t y L e v e l = = = 0 ) , n . c o m p u t e d & & n . _ d i r t y L e v e l = = = 2 & & ( n . _ s h o u l d S c h e d u l e = ! 0 ) , n . _ d i r t y L e v e l = t ) , n . _ s h o u l d S c h e d u l e & & ( i ? ? ( i = e . g e t ( n ) = = = n . _ t r a c k I d ) ) & & ( n . t r i g g e r ( ) , ( ! n . _ r u n n i n g s | | n . a l l o w R e c u r s e ) & & n . _ d i r t y L e v e l ! = = 3 & & ( n . _ s h o u l d S c h e d u l e = ! 1 , n . s c h e d u l e r & & h c . p u s h ( n . s c h e d u l e r ) ) ) } y d ( ) } c o n s t N g = ( e , t ) = > { c o n s t s = n e w M a p ; r e t u r n s . c l e a n u p = e , s . c o m p u t e d = t , s } , b a = n e w W e a k M a p , K n = S y m b o l ( " " ) , f c = S y m b o l ( " " ) ; f u n c t i o n M e ( e , t , s ) { i f ( d n & & U n ) { l e t n = b a . g e t ( e ) ; n | | b a . s e t ( e , n = n e w M a p ) ; l e t i = n . g e t ( s ) ; i | | n . s e t ( s , i = N g ( ( ) = > n . d e l e t e ( s ) ) ) , L g ( U n , i ) } } f u n c t i o n L s ( e , t , s , n , i , o ) { c o n s t r = b a . g e t ( e ) ; i f ( ! r ) r e t u r n ; l e t a = [ ] ; i f ( t = = = " c l e a r " ) a = [ . . . r . v a l u e s ( ) ] ; e l s e i f ( s = = = " l e n g t h " & & g t ( e ) ) { c o n s t l = N u m b e r ( n ) ; r . f o r E a c h ( ( c , d ) = > { ( d = = = " l e n g t h " | | ! N s ( d ) & & d > = l ) & & a . p u s h ( c ) } ) } e l s e s w i t c h ( s ! = = v o i d 0 & & a . p u s h ( r . g e t ( s ) ) , t ) { c a s e " a d d " : g t ( e ) ? g d ( s ) & & a . p u s h ( r . g e t ( " l e n g t h " ) ) : ( a . p u s h ( r . g e t ( K n ) ) , x i ( e ) & & a . p u s h ( r . g e t ( f c ) ) ) ; b r e a k ; c a s e " d e l e t e " : g t ( e ) | | ( a . p u s h ( r . g e t ( K n ) ) , x i ( e ) & & a . p u s h ( r . g e t ( f c ) ) ) ; b r e a k ; c a s e " s e t " : x i ( e ) & & a . p u s h ( r . g e t ( K n ) ) ; b r e a k } v d ( ) ; f o r ( c o n s t l o f a ) l & & R g ( l , 5 ) ; y d ( ) } f u n c t i o n x x ( e , t ) { c o n s t s = b a . g e t ( e ) ; r e t u r n s & & s . g e t ( t ) } c o n s t w x = h d ( " _ _ p r o t o _ _ , _ _ v _ i s R e f , _ _ i s V u e " ) , F g = n e w S e t ( O b j e c t . g e t O w n P r o p e r t y N a m e s ( S y m b o l ) . f i l t e r ( e = > e ! = = " a r g u m e n t s " & & e ! = = " c a l l e r " ) . m a p ( e = > S y m b o l [ e ] ) . f i l t e r ( N s ) ) , h h = E x ( ) ; f u n c t i o n E x ( ) { c o n s t e = { } ; r e t u r n [ " i n c l u d e s " , " i n d e x O f " , " l a s t I n d e x O f " ] . f o r E a c h ( t = > { e [ t ] = f u n c t i o n ( . . . s ) { c o n s t n = T t ( t h i s ) ; f o r ( l e t o = 0 , r = t h i s . l e n g t h ; o < r ; o + + ) M e ( n , " g e t " , o + " " ) ; c o n s t i = n [ t ] ( . . . s ) ; r e t u r n i = = = - 1 | | i = = = ! 1 ? n [ t ] ( . . . s . m a p ( T t ) ) : i } } ) , [ " p u s h " , " p o p "
* @ vue / runtime - core v3 . 4.29
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * /function hn(e,t,s,n){try{return n?e(...n):e()}catch(i){sr(i,t,s)}}function Je(e,t,s,n){if(wt(e)){const i=hn(e,t,s,n);return i&&wg(i)&&i.catch(o=>{sr(o,t,s)}),i}if(gt(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Je(e[o],t,s,n));return i}}function sr(e,t,s,n=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const r=t.proxy,a=`https:/ / vuejs . org / error - reference / # runtime - $ { s } ` ;for(;o;){const c=o.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,r,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){yn(),hn(l,null,10,[e,r,a]),xn();return}}Kx(e,s,i,n)}function Kx(e,t,s,n=!0){console.error(e)}let Bo=!1,pc=!1;const me=[];let hs=0;const wi=[];let Qs=null,jn=0;const Xg=Promise.resolve();let Cd=null;function nr(e){const t=Cd||Xg;return e?t.then(this?e.bind(this):e):t}function Yx(e){let t=hs+1,s=me.length;for(;t<s;){const n=t+s>>>1,i=me[n],o=Vo(i);o<e||o===e&&i.pre?t=n+1:s=n}return t}function $ d(e){(!me.length||!me.includes(e,Bo&&e.allowRecurse?hs+1:hs))&&(e.id==null?me.push(e):me.splice(Yx(e.id),0,e),Jg())}function Jg(){!Bo&&!pc&&(pc=!0,Cd=Xg.then(Zg))}function qx(e){const t=me.indexOf(e);t>hs&&me.splice(t,1)}function gc(e){gt(e)?wi.push(...e):(!Qs||!Qs.includes(e,e.allowRecurse?jn+1:jn))&&wi.push(e),Jg()}function _h(e,t,s=Bo?hs+1:0){for(;s<me.length;s++){const n=me[s];if(n&&n.pre){if(e&&n.id!==e.uid)continue;me.splice(s,1),s--,n()}}}function Qg(e){if(wi.length){const t=[...new Set(wi)].sort((s,n)=>Vo(s)-Vo(n));if(wi.length=0,Qs){Qs.push(...t);return}for(Qs=t,jn=0;jn<Qs.length;jn++){const s=Qs[jn];s.active!==!1&&s()}Qs=null,jn=0}}const Vo=e=>e.id==null?1/0:e.id,Gx=(e,t)=>{const s=Vo(e)-Vo(t);if(s===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return s};function Zg(e){pc=!1,Bo=!0,me.sort(Gx);try{for(hs=0;hs<me.length;hs++){const t=me[hs];t&&t.active!==!1&&hn(t,null,14)}}finally{hs=0,me.length=0,Qg(),Bo=!1,Cd=null,(me.length||wi.length)&&Zg()}}function Xx(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Yt;let i=s;const o=t.startsWith("update:"),r=o&&t.slice(7);if(r&&r in n){const d= ` $ { r === "modelValue" ? "model" : r } Modifiers ` ,{number:u,trim:f}=n[d]||Yt;f&&(i=s.map(g=>se(g)?g.trim():g)),u&&(i=s.map(_a))}let a,l=n[a=Tl(t)]||n[a=Tl(vs(t))];!l&&o&&(l=n[a=Tl(Gi(t))]),l&&Je(l,e,6,i);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Je(c,e,6,i)}}function tm(e,t,s=!1){const n=t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},a=!1;if(!wt(e)){const l=c=>{const d=tm(c,t,!0);d&&(a=!0,ee(r,d))};!s&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Ut(e)&&n.set(e,null),null):(gt(o)?o.forEach(l=>r[l]=null):ee(r,o),Ut(e)&&n.set(e,r),r)}function Ka(e,t){return!e||!Va(t)?!1:(t=t.slice(2).replace(/Once $ /,""),Nt(e,t[0].toLowerCase()+t.slice(1))||Nt(e,Gi(t))||Nt(e,t))}let Ee=null,Ya=null;function ya(e){const t=Ee;return Ee=e,Ya=e&&e.type.__scopeId||null,t}function Bs(e){Ya=e}function Vs(){Ya=null}function Bt(e,t=Ee,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&Mh(-1);const o=ya(t);let r;try{r=e(...i)}finally{ya(o),n._d&&Mh(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function Ol(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:d,props:u,data:f,setupState:g,ctx:m,inheritAttrs:b}=e,v=ya(e);let w,E;try{if(s.shapeFlag&4){const T=i||n,y=T;w=ss(c.call(y,T,d,u,g,f,m)),E=a}else{const T=t;w=ss(T.length>1?T(u,{attrs:a,slots:r,emit:l}):T(u,null)),E=t.props?a:Qx(a)}}catch(T){Co.length=0,sr(T,e,1),w=dt(we)}let $ =w;if(E&&b!==!1){const T=Object.keys(E),{shapeFlag:y}= $ ;T.length&&y&7&&(o&&T.some(fd)&&(E=Zx(E,o)), $ =gn( $ ,E,!1,!0))}return s.dirs&&( $ =gn( $ ,null,!1,!0), $ .dirs= $ .dirs? $ .dirs.concat(s.dirs):s.dirs),s.transition&&( $ .transition=s.transition),w= $ ,ya(v),w}function Jx(e,t=!0){let s;for(let n=0;n<e.length;n++){const i=e[n];if(wa(i)){if(i.type!==we||i.children==="v-if"){if(s)return;s=i}}else return}return s}const Qx=e=>{let t;for(const s in e)(s==="class"||s==="style"||Va(s))&&((t||(t={}))[s]=e[s]);return t},Zx=(e,t)=>{const s={};for(const n in e)(!fd(n)||
* @ vue / runtime - dom v3 . 4.29
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * /const tE="http:/ / www . w3 . org / 2000 / svg ",eE=" http : //www.w3.org/1998/Math/MathML",ks=typeof document<"u"?document:null,Ih=ks&&ks.createElement("template"),sE={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const i=t==="svg"?ks.createElementNS(tE,e):t==="mathml"?ks.createElementNS(eE,e):s?ks.createElement(e,{is:s}):ks.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>ks.createTextNode(e),createComment:e=>ks.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ks.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Ih.innerHTML=n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e;const a=Ih.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Ys="transition",ro="animation",Ri=Symbol("_vtc"),is=(e,{slots:t})=>Li(Vw,Om(e),t);is.displayName="Transition";const Mm={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},nE=is.props=ee({},xm,Mm),Ln=(e,t=[])=>{gt(e)?e.forEach(s=>s(...t)):e&&e(...t)},Lh=e=>e?gt(e)?e.some(t=>t.length>1):e.length>1:!1;function Om(e){const t={};for(const N in e)N in Mm||(t[N]=e[N]);if(e.css===!1)return t;const{name:s="v",type:n,duration:i,enterFromClass:o=`${s}-enter-from`,enterActiveClass:r=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:d=a,leaveFromClass:u=`${s}-leave-from`,leaveActiveClass:f=`${s}-leave-active`,leaveToClass:g=`${s}-leave-to`}=e,m=iE(i),b=m&&m[0],v=m&&m[1],{onBeforeEnter:w,onEnter:E,onEnterCancelled:$,onLeave:T,onLeaveCancelled:y,onBeforeAppear:x=w,onAppear:C=E,onAppearCancelled:S=$}=t,P=(N,Q,G)=>{Xs(N,Q?d:a),Xs(N,Q?c:r),G&&G()},M=(N,Q)=>{N._isLeaving=!1,Xs(N,u),Xs(N,g),Xs(N,f),Q&&Q()},I=N=>(Q,G)=>{const V=N?C:E,L=()=>P(Q,N,G);Ln(V,[Q,L]),Rh(()=>{Xs(Q,N?l:o),Cs(Q,N?d:a),Lh(V)||Nh(Q,n,b,L)})};return ee(t,{onBeforeEnter(N){Ln(w,[N]),Cs(N,o),Cs(N,r)},onBeforeAppear(N){Ln(x,[N]),Cs(N,l),Cs(N,c)},onEnter:I(!1),onAppear:I(!0),onLeave(N,Q){N._isLeaving=!0;const G=()=>M(N,Q);Cs(N,u),Cs(N,f),Im(),Rh(()=>{N._isLeaving&&(Xs(N,u),Cs(N,g),Lh(T)||Nh(N,n,v,G))}),Ln(T,[N,G])},onEnterCancelled(N){P(N,!1),Ln($,[N])},onAppearCancelled(N){P(N,!0),Ln(S,[N])},onLeaveCancelled(N){M(N),Ln(y,[N])}})}function iE(e){if(e==null)return null;if(Ut(e))return[Nl(e.enter),Nl(e.leave)];{const t=Nl(e);return[t,t]}}function Nl(e){return Cg(e)}function Cs(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Ri]||(e[Ri]=new Set)).add(t)}function Xs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Ri];s&&(s.delete(t),s.size||(e[Ri]=void 0))}function Rh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let oE=0;function Nh(e,t,s,n){const i=e._endId=++oE,o=()=>{i===e._endId&&n()};if(s)return setTimeout(o,s);const{type:r,timeout:a,propCount:l}=Dm(e,t);if(!r)return n();const c=r+"end";let d=0;const u=()=>{e.removeEventListener(c,f),o()},f=g=>{g.target===e&&++d>=l&&u()};setTimeout(()=>{d<l&&u()},a+1),e.addEventListener(c,f)}function Dm(e,t){const s=window.getComputedStyle(e),n=m=>(s[m]||"").split(", "),i=n(`${Ys}Delay`),o=n(`${Ys}Duration`),r=Fh(i,o),a=n(`${ro}Delay`),l=n(`${ro}Duration`),c=Fh(a,l);let d=null,u=0,f=0;t===Ys?r>0&&(d=Ys,u=r,f=o.length):t===ro?c>0&&(d=ro,u=c,f=l.length):(u=Math.max(r,c),d=u>0?r>c?Ys:ro:null,f=d?d===Ys?o.length:l.length:0);const g=d===Ys&&/\b(transform|all)(,|$)/.test(n(`${Ys}Property`).toString(
2024-03-21 02:03:08 -04:00
* pinia v2 . 1.7
* ( c ) 2023 Eduardo San Martin Morote
* @ license MIT
2024-06-18 03:16:42 +08:00
* /let Bm;const el=e=>Bm=e,Vm=Symbol();function Sc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var $o;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})($o||($o={}));function NE(){const e=Mg(!0),t=e.run(()=>Oi({}));let s=[],n=[];const i=Ua({install(o){el(i),i._a=o,o.provide(Vm,i),o.config.globalProperties.$pinia=i,n.forEach(r=>s.push(r)),n=[]},use(o){return!this._a&&!RE?n.push(o):s.push(o),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return i}const Hm=()=>{};function Zh(e,t,s,n=Hm){e.push(t);const i=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),n())};return!s&&_d()&&Og(i),i}function fi(e,...t){e.slice().forEach(s=>{s(...t)})}const FE=e=>e();function Ac(e,t){e instanceof Map&&t instanceof Map&&t.forEach((s,n)=>e.set(n,s)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const s in t){if(!t.hasOwnProperty(s))continue;const n=t[s],i=e[s];Sc(i)&&Sc(n)&&e.hasOwnProperty(s)&&!ae(n)&&!Yn(n)?e[s]=Ac(i,n):e[s]=n}return e}const BE=Symbol();function VE(e){return!Sc(e)||!e.hasOwnProperty(BE)}const{assign:Js}=Object;function HE(e){return!!(ae(e)&&e.effect)}function jE(e,t,s,n){const{state:i,actions:o,getters:r}=t,a=s.state.value[e];let l;function c(){a||(s.state.value[e]=i?i():{});const d=Wx(s.state.value[e]);return Js(d,o,Object.keys(r||{}).reduce((u,f)=>(u[f]=Ua(Ke(()=>{el(s);const g=s._s.get(e);return r[f].call(g,g)})),u),{}))}return l=jm(e,c,t,s,n,!0),l}function jm(e,t,s={},n,i,o){let r;const a=Js({actions:{}},s),l={deep:!0};let c,d,u=[],f=[],g;const m=n.state.value[e];!o&&!m&&(n.state.value[e]={}),Oi({});let b;function v(S){let P;c=d=!1,typeof S=="function"?(S(n.state.value[e]),P={type:$o.patchFunction,storeId:e,events:g}):(Ac(n.state.value[e],S),P={type:$o.patchObject,payload:S,storeId:e,events:g});const M=b=Symbol();nr().then(()=>{b===M&&(c=!0)}),d=!0,fi(u,P,n.state.value[e])}const w=o?function(){const{state:P}=s,M=P?P():{};this.$patch(I=>{Js(I,M)})}:Hm;function E(){r.stop(),u=[],f=[],n._s.delete(e)}function $(S,P){return function(){el(n);const M=Array.from(arguments),I=[],N=[];function Q(L){I.push(L)}function G(L){N.push(L)}fi(f,{args:M,name:S,store:y,after:Q,onError:G});let V;try{V=P.apply(this&&this.$id===e?this:y,M)}catch(L){throw fi(N,L),L}return V instanceof Promise?V.then(L=>(fi(I,L),L)).catch(L=>(fi(N,L),Promise.reject(L))):(fi(I,V),V)}}const T={_p:n,$id:e,$onAction:Zh.bind(null,f),$patch:v,$reset:w,$subscribe(S,P={}){const M=Zh(u,S,P.detached,()=>I()),I=r.run(()=>qn(()=>n.state.value[e],N=>{(P.flush==="sync"?d:c)&&S({storeId:e,type:$o.direct,events:g},N)},Js({},l,P)));return M},$dispose:E},y=er(T);n._s.set(e,y);const C=(n._a&&n._a.runWithContext||FE)(()=>n._e.run(()=>(r=Mg()).run(t)));for(const S in C){const P=C[S];if(ae(P)&&!HE(P)||Yn(P))o||(m&&VE(P)&&(ae(P)?P.value=m[S]:Ac(P,m[S])),n.state.value[e][S]=P);else if(typeof P=="function"){const M=$(S,P);C[S]=M,a.actions[S]=P}}return Js(y,C),Js(Tt(y),C),Object.defineProperty(y,"$state",{get:()=>n.state.value[e],set:S=>{v(P=>{Js(P,S)})}}),n._p.forEach(S=>{Js(y,r.run(()=>S({store:y,app:n._a,pinia:n,options:a})))}),m&&o&&s.hydrate&&s.hydrate(y.$state,m),c=!0,d=!0,y}function Fd(e,t,s){let n,i;const o=typeof t=="function";typeof e=="string"?(n=e,i=o?s:t):(i=e,n=e.id);function r(a,l){const c=Ew();return a=a||(c?ms(Vm,null):null),a&&el(a),a=Bm,a._s.has(n)||(o?jm(n,t,i,a):jE(n,i,a)),a._s.get(n)}return r.$id=n,r}/ * !
2024-03-21 02:03:08 -04:00
* vue - router v4 . 2.5
* ( c ) 2023 Eduardo San Martin Morote
* @ license MIT
2024-06-18 03:16:42 +08:00
* /const bi=typeof window<"u";function WE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Wt=Object.assign;function Vl(e,t){const s={};for(const n in t){const i=t[n];s[n]=rs(i)?i.map(e):e(i)}return s}const Po=()=>{},rs=Array.isArray,zE=/ \ / $ / , UE = e => e . replace ( zE , "" ) ; function Hl ( e , t , s = "/" ) { let n , i = { } , o = "" , r = "" ; const a = t . indexOf ( "#" ) ; let l = t . indexOf ( "?" ) ; return a < l && a >= 0 && ( l = - 1 ) , l > - 1 && ( n = t . slice ( 0 , l ) , o = t . slice ( l + 1 , a > - 1 ? a : t . length ) , i = e ( o ) ) , a > - 1 && ( n = n || t . slice ( 0 , a ) , r = t . slice ( a , t . length ) ) , n = GE ( n ? ? t , s ) , { fullPath : n + ( o && "?" ) + o + r , path : n , query : i , hash : r } } function KE ( e , t ) { const s = t . query ? e ( t . query ) : "" ; return t . path + ( s && "?" ) + s + ( t . hash || "" ) } function tf ( e , t ) { return ! t || ! e . toLowerCase ( ) . startsWith ( t . toLowerCase ( ) ) ? e : e . slice ( t . length ) || "/" } function YE ( e , t , s ) { const n = t . matched . length - 1 , i = s . matched . length - 1 ; return n > - 1 && n === i && Fi ( t . matched [ n ] , s . matched [ i ] ) && Wm ( t . params , s . params ) && e ( t . query ) === e ( s . query ) && t . hash === s . hash } function Fi ( e , t ) { return ( e . aliasOf || e ) === ( t . aliasOf || t ) } function Wm ( e , t ) { if ( Object . keys ( e ) . length !== Object . keys ( t ) . length ) return ! 1 ; for ( const s in e ) if ( ! qE ( e [ s ] , t [ s ] ) ) return ! 1 ; return ! 0 } function qE ( e , t ) { return rs ( e ) ? ef ( e , t ) : rs ( t ) ? ef ( t , e ) : e === t } function ef ( e , t ) { return rs ( t ) ? e . length === t . length && e . every ( ( s , n ) => s === t [ n ] ) : e . length === 1 && e [ 0 ] === t } function GE ( e , t ) { if ( e . startsWith ( "/" ) ) return e ; if ( ! e ) return t ; const s = t . split ( "/" ) , n = e . split ( "/" ) , i = n [ n . length - 1 ] ; ( i === ".." || i === "." ) && n . push ( "" ) ; let o = s . length - 1 , r , a ; for ( r = 0 ; r < n . length ; r ++ ) if ( a = n [ r ] , a !== "." ) if ( a === ".." ) o > 1 && o -- ; else break ; return s . slice ( 0 , o ) . join ( "/" ) + "/" + n . slice ( r - ( r === n . length ? 1 : 0 ) ) . join ( "/" ) } var Wo ; ( function ( e ) { e . pop = "pop" , e . push = "push" } ) ( Wo || ( Wo = { } ) ) ; var ko ; ( function ( e ) { e . back = "back" , e . forward = "forward" , e . unknown = "" } ) ( ko || ( ko = { } ) ) ; function XE ( e ) { if ( ! e ) if ( bi ) { const t = document . querySelector ( "base" ) ; e = t && t . getAttribute ( "href" ) || "/" , e = e . replace ( /^\w+:\/\/[^\/]+/ , "" ) } else e = "/" ; return e [ 0 ] !== "/" && e [ 0 ] !== "#" && ( e = "/" + e ) , UE ( e ) } const JE = /^[^#]+#/ ; function QE ( e , t ) { return e . replace ( JE , "#" ) + t } function ZE ( e , t ) { const s = document . documentElement . getBoundingClientRect ( ) , n = e . getBoundingClientRect ( ) ; return { behavior : t . behavior , left : n . left - s . left - ( t . left || 0 ) , top : n . top - s . top - ( t . top || 0 ) } } const sl = ( ) => ( { left : window . pageXOffset , top : window . pageYOffset } ) ; function tS ( e ) { let t ; if ( "el" in e ) { const s = e . el , n = typeof s == "string" && s . startsWith ( "#" ) , i = typeof s == "string" ? n ? document . getElementById ( s . slice ( 1 ) ) : document . querySelector ( s ) : s ; if ( ! i ) return ; t = ZE ( 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 sf ( e , t ) { return ( history . state ? history . state . position - t : - 1 ) + e } const Cc = new Map ; function eS ( e , t ) { Cc . set ( e , t ) } function sS ( e ) { const t = Cc . get ( e ) ; return Cc . delete ( e ) , t } let nS = ( ) => location . protocol + "//" + location . host ; function zm ( e , t ) { const { pathname : s , search : n , 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 ) , tf ( l , "" ) } return tf ( s , e ) + n + i } function iS ( e , t , s , n ) { let i = [ ] , o = [ ] , r = null ; const a = ( { state : f } ) => { const g = zm ( e , location ) , m = s . value , b = t . value ; let v = 0 ; if ( f ) { if ( s . value = g , t . value = f , r && r === m ) { r = null ; return } v = b ? f . position - b . position : 0 } else n ( g ) ; i . forEach ( w => { w ( s . value , m , { delta : v , type : Wo . pop , direction : v ? v > 0 ? ko . forward : ko . back : ko . unknown } ) } ) } ; function l ( ) { r = s . value } function c ( f ) { i . push ( f ) ; const g = ( ) => { const m = i . indexOf ( f ) ; m > - 1 && i . splice ( m , 1 ) } ; return o . push ( g ) , g } function d ( ) { const { history : f } = window ; f . state && f . replaceState ( Wt ( { } , f . state , { scroll : sl ( ) } ) , "" ) } function u ( ) { for ( const f of o ) f ( ) ; o = [ ] , window . removeEventListener ( "popstate" , a ) , window . removeEventListener ( "beforeunload" , d ) } return window . addEventListener ( "popstate" , a ) , window . addEventListener ( "beforeunload" , d , { passive : ! 0 } ) , { pauseListeners : l , listen : c , destroy : u } } function nf ( e , t , s , n = ! 1 , i = ! 1 ) { return { back : e , current : t , forward : s , replaced : n , position : window . history . length , scroll : i ? sl ( ) : null } } function oS ( e ) { const { history : t , location : s } = window , n = { value : zm ( e , s ) } , i = { value : t . state } ; i . value || o ( n . value , { back : null , current : n . value , forward : null , position : t . length - 1 , replace
2024-04-03 01:16:56 -04:00
( ? :
2024-06-18 03:16:42 +08:00
( ? : $ { ie } : ) { 7 } ( ? : $ { ie } | : ) | // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
( ? : $ { ie } : ) { 6 } ( ? : $ { es } | : $ { ie } | : ) | // 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
( ? : $ { ie } : ) { 5 } ( ? : : $ { es } | ( ? : : $ { ie } ) { 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
( ? : $ { ie } : ) { 4 } ( ? : ( ? : : $ { ie } ) { 0 , 1 } : $ { es } | ( ? : : $ { ie } ) { 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
( ? : $ { ie } : ) { 3 } ( ? : ( ? : : $ { ie } ) { 0 , 2 } : $ { es } | ( ? : : $ { ie } ) { 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
( ? : $ { ie } : ) { 2 } ( ? : ( ? : : $ { ie } ) { 0 , 3 } : $ { es } | ( ? : : $ { ie } ) { 1 , 5 } | : ) | // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
( ? : $ { ie } : ) { 1 } ( ? : ( ? : : $ { ie } ) { 0 , 4 } : $ { es } | ( ? : : $ { ie } ) { 1 , 6 } | : ) | // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
( ? : : ( ? : ( ? : : $ { ie } ) { 0 , 5 } : $ { es } | ( ? : : $ { ie } ) { 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 - 9 a - zA - Z ] { 1 , } ) ? // %eth0 %1
2024-06-18 03:16:42 +08:00
` .replace(/ \s * \/ \/ .* $ /gm,"").replace(/ \n /g,"").trim(),ZS=new RegExp( ` ( ? : ^ $ { es } $ ) | ( ? : ^ $ { nl } $ ) ` ),tA=new RegExp( ` ^ $ { es } $ ` ),eA=new RegExp( ` ^ $ { nl } $ ` ),il=e=>e&&e.exact?ZS:new RegExp( ` ( ? : $ { nn ( e ) } $ { es } $ { nn ( e ) } ) | ( ? : $ { nn ( e ) } $ { nl } $ { nn ( e ) } ) ` ,"g");il.v4=e=>e&&e.exact?tA:new RegExp( ` $ { nn ( e ) } $ { es } $ { nn ( e ) } ` ,"g");il.v6=e=>e&&e.exact?eA:new RegExp( ` $ { nn ( e ) } $ { nl } $ { nn ( e ) } ` ,"g");const e_={exact:!1},s_= ` $ { il . v4 ( ) . source } \ \ / ( 3 [ 0 - 2 ] | [ 12 ] ? [ 0 - 9 ] ) ` ,n_= ` $ { il . v6 ( ) . source } \ \ / ( 12 [ 0 - 8 ] | 1 [ 01 ] [ 0 - 9 ] | [ 1 - 9 ] ? [ 0 - 9 ] ) ` ,sA=new RegExp( ` ^ $ { s _ } $ ` ),nA=new RegExp( ` ^ $ { n _ } $ ` ),iA=({exact:e}=e_)=>e?sA:new RegExp(s_,"g"),oA=({exact:e}=e_)=>e?nA:new RegExp(n_,"g"),i_=iA({exact:!0}),o_=oA({exact:!0}),Hd=e=>i_.test(e)?4:o_.test(e)?6:0;Hd.v4=e=>i_.test(e);Hd.v6=e=>o_.test(e);const as=Fd("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:""}),actions:{async getConfigurations(){await he("/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 Hd(e)!==0}}}),kt=(e,t)=>{const s=e.__vccOpts||e;for(const[n,i]of t)s[n]=i;return s},rA={name:"navbar",setup(){const e=as(),t=Jt();return{wireguardConfigurationsStore:e,dashboardConfigurationStore:t}}},aA={class:"col-md-3 col-lg-2 d-md-block p-3"},lA={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow"},cA={class:"sidebar-sticky pt-3"},dA={class:"nav flex-column"},uA={class:"nav-item"},hA={class:"nav-item"},fA=p("hr",null,null,-1),pA=p("h6",{class:"sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"},[p("span",null,"Configurations")],-1),gA={class:"nav flex-column"},mA={class:"nav-item"},_A=p("hr",null,null,-1),bA=p("h6",{class:"sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"},[p("span",null,"Tools")],-1),vA={class:"nav flex-column"},yA={class:"nav-item"},xA={class:"nav-item"},wA=p("hr",null,null,-1),EA={class:"nav flex-column"},SA={class:"nav-item"},AA=p("ul",{class:"nav flex-column"},[p("li",{class:"nav-item"},[p("a",{href:"https://github.com/donaldzou/WGDashboard/releases/tag/"},[p("small",{class:"nav-link text-muted"})])])],-1);function CA(e,t,s,n,i,o){const r=Dt("RouterLink");return H(),q("div",aA,[p("nav",lA,[p("div",cA,[p("ul",dA,[p("li",uA,[dt(r,{class:"nav-link",to:"/","exact-active-class":"active"},{default:Bt(()=>[ht("Home")]),_:1})]),p("li",hA,[dt(r,{class:"nav-link",to:"/settings","exact-active-class":"active"},{default:Bt(()=>[ht("Settings")]),_:1})])]),fA,pA,p("ul",gA,[p("li",mA,[(H(!0),q(Ht,null,_e(this.wireguardConfigurationsStore.Configurations,a=>(H(),oe(r,{to:"/configuration/"+a.Name+"/peers",class:"nav-link nav-conf-link","active-class":"active"},{default:Bt(()=>[p("samp",null,lt(a.Name),1)]),_:2},1032,["to"]))),256))])]),_A,bA,p("ul",vA,[p("li",yA,[dt(r,{to:"/ping",class:"nav-link","active-class":"active"},{default:Bt(()=>[h
] ) ) + ` ;ys.KANJI=new RegExp(zo,"g");ys.BYTE_KANJI=new RegExp("[^A-Z0-9 $ %*+ \\ -./:]+","g");ys.BYTE=new RegExp(kP,"g");ys.NUMERIC=new RegExp(p_,"g");ys.ALPHANUMERIC=new RegExp(PP,"g");const TP=new RegExp("^"+zo+" $ "),MP=new RegExp("^"+p_+" $ "),OP=new RegExp("^[A-Z0-9 $ %*+ \\ -./:]+ $ ");ys.testKanji=function(t){return TP.test(t)};ys.testNumeric=function(t){return MP.test(t)};ys.testAlphanumeric=function(t){return OP.test(t)};(function(e){const t=zd,s=ys;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 s.testNumeric(o)?e.NUMERIC:s.testAlphanumeric(o)?e.ALPHANUMERIC:s.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 n(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 n(o)}catch{return r}}})(wn);(function(e){const t=Be,s=rl,n=ol,i=wn,o=zd,r=7973,a=t.getBCHDigit(r);function l(f,g,m){for(let b=1;b<=40;b++)if(g<=e.getCapacity(b,m,f))return b}function c(f,g){return i.getCharCountIndicator(f,g)+4}function d(f,g){let m=0;return f.forEach(function(b){const v=c(b.mode,g);m+=v+b.getBitsLength()}),m}function u(f,g){for(let m=1;m<=40;m++)if(d(f,m)<=e.getCapacity(m,g,i.MIXED))return m}e.from=function(g,m){return o.isValid(g)?parseInt(g,10):m},e.getCapacity=function(g,m,b){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof b>"u"&&(b=i.BYTE);const v=t.getSymbolTotalCodewords(g),w=s.getTotalCodewordsCount(g,m),E=(v-w)*8;if(b===i.MIXED)return E;const $ =E-c(b,g);switch(b){case i.NUMERIC:return Math.floor( $ /10*3);case i.ALPHANUMERIC:return Math.floor( $ /11*2);case i.KANJI:return Math.floor( $ /13);case i.BYTE:default:return Math.floor( $ /8)}},e.getBestVersionForData=function(g,m){let b;const v=n.from(m,n.M);if(Array.isArray(g)){if(g.length>1)return u(g,v);if(g.length===0)return 1;b=g[0]}else b=g;return l(b.mode,b.getLength(),v)},e.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let m=g<<12;for(;t.getBCHDigit(m)-a>=0;)m^=r<<t.getBCHDigit(m)-a;return g<<12|m}})(f_);var g_={};const kc=Be,m_=1335,DP=21522,yf=kc.getBCHDigit(m_);g_.getEncodedBits=function(t,s){const n=t.bit<<3|s;let i=n<<10;for(;kc.getBCHDigit(i)-yf>=0;)i^=m_<<kc.getBCHDigit(i)-yf;return(n<<10|i)^DP};var __={};const IP=wn;function Vi(e){this.mode=IP.NUMERIC,this.data=e.toString()}Vi.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Vi.prototype.getLength=function(){return this.data.length};Vi.prototype.getBitsLength=function(){return Vi.getBitsLength(this.data.length)};Vi.prototype.write=function(t){let s,n,i;for(s=0;s+3<=this.data.length;s+=3)n=this.data.substr(s,3),i=parseInt(n,10),t.put(i,10);const o=this.data.length-s;o>0&&(n=this.data.substr(s),i=parseInt(n,10),t.put(i,o*3+1))};var LP=Vi;const RP=wn,Wl=["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 Hi(e){this.mode=RP.ALPHANUMERIC,this.data=e}Hi.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Hi.prototype.getLength=function(){return this.data.length};Hi.prototype.getBitsLength=function(){return Hi.getBitsLength(this.data.length)};Hi.prototype.write=function(t){let s;for(s=0;s+2<=this.data.length;s+=2){let n=Wl.indexOf(this.data[s])*45;n+=Wl.indexOf(this.data[s+1]),t.put(n,11)}this.data.length%2&&t.put(Wl.indexOf(this.data[s]),6)};var NP
Make sure your charset is UTF - 8 ` );s=(s>>>8&255)*192+(s&255),e.put(s,13)}};var zP=Wi,b_={exports:{}};(function(e){var t={single_source_shortest_paths:function(s,n,i){var o={},r={};r[n]=0;var a=t.PriorityQueue.make();a.push(n,0);for(var l,c,d,u,f,g,m,b,v;!a.empty();){l=a.pop(),c=l.value,u=l.cost,f=s[c]||{};for(d in f)f.hasOwnProperty(d)&&(g=f[d],m=u+g,b=r[d],v=typeof r[d]>"u",(v||b>m)&&(r[d]=m,a.push(d,m),o[d]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var w=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(w)}return o},extract_shortest_path_from_predecessor_list:function(s,n){for(var i=[],o=n;o;)i.push(o),s[o],o=s[o];return i.reverse(),i},find_path:function(s,n,i){var o=t.single_source_shortest_paths(s,n,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(s){var n=t.PriorityQueue,i={},o;s=s||{};for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.queue=[],i.sorter=s.sorter||n.default_sorter,i},default_sorter:function(s,n){return s.cost-n.cost},push:function(s,n){var i={value:s,cost:n};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})(b_);var UP=b_.exports;(function(e){const t=wn,s=LP,n=NP,i=HP,o=zP,r=ys,a=Be,l=UP;function c(w){return unescape(encodeURIComponent(w)).length}function d(w,E, $ ){const T=[];let y;for(;(y=w.exec( $ ))!==null;)T.push({data:y[0],index:y.index,mode:E,length:y[0].length});return T}function u(w){const E=d(r.NUMERIC,t.NUMERIC,w), $ =d(r.ALPHANUMERIC,t.ALPHANUMERIC,w);let T,y;return a.isKanjiModeEnabled()?(T=d(r.BYTE,t.BYTE,w),y=d(r.KANJI,t.KANJI,w)):(T=d(r.BYTE_KANJI,t.BYTE,w),y=[]),E.concat( $ ,T,y).sort(function(C,S){return C.index-S.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function f(w,E){switch(E){case t.NUMERIC:return s.getBitsLength(w);case t.ALPHANUMERIC:return n.getBitsLength(w);case t.KANJI:return o.getBitsLength(w);case t.BYTE:return i.getBitsLength(w)}}function g(w){return w.reduce(function(E, $ ){const T=E.length-1>=0?E[E.length-1]:null;return T&&T.mode=== $ .mode?(E[E.length-1].data+= $ .data,E):(E.push( $ ),E)},[])}function m(w){const E=[];for(let $ =0; $ <w.length; $ ++){const T=w[ $ ];switch(T.mode){case t.NUMERIC:E.push([T,{data:T.data,mode:t.ALPHANUMERIC,length:T.length},{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.ALPHANUMERIC:E.push([T,{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.KANJI:E.push([T,{data:T.data,mode:t.BYTE,length:c(T.data)}]);break;case t.BYTE:E.push([{data:T.data,mode:t.BYTE,length:c(T.data)}])}}return E}function b(w,E){const $ ={},T={start:{}};let y=["start"];for(let x=0;x<w.length;x++){const C=w[x],S=[];for(let P=0;P<C.length;P++){const M=C[P],I=""+x+P;S.push(I), $ [I]={node:M,lastCount:0},T[I]={};for(let N=0;N<y.length;N++){const Q=y[N]; $ [Q]&& $ [Q].node.mode===M.mode?(T[Q][I]=f( $ [Q].lastCount+M.length,M.mode)-f( $ [Q].lastCount,M.mode), $ [Q].lastCount+=M.length):( $ [Q]&&( $ [Q].lastCount=M.length),T[Q][I]=f(M.length,M.mode)+4+t.getCharCountIndicator(M.mode,E))}}y=S}for(let x=0;x<y.length;x++)T[y[x]].end=0;return{map:T,table: $ }}function v(w,E){let $ ;const T=t.getBestModeForData(w);if( $ =t.from(E,T), $ !==t.BYTE&& $ .bit<T.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString( $ )+ ` .
Suggested mode is : ` +t.toString(T));switch( $ ===t.KANJI&&!a.isKanjiModeEnabled()&&( $ =t.BYTE), $ ){case t.NUMERIC:return new s(w);case t.ALPHANUMERIC:return new n(w);case t.KANJI:return new o(w);case t.BYTE:return new i(w)}}e.fromArray=function(E){return E.reduce(function( $ ,T){return typeof T=="string"? $ .push(v(T,null)):T.data&& $ .push(v(T.data,T.mode)), $ },[])},e.fromString=function(E, $ ){const T=u(E,a.isKanjiModeEnabled()),y=m(T),x=b(y, $ ),C=l.find_path(x.map,"start","end"),S=[];for(let P=1;P<C.length-1;P++)S.push(x.table[C[P]].node);return e.fromArray(g(S))},e.rawSplit=function(E){return e.fromArray(u(E,a.isKanjiModeEnabled()))}})(__);const ll=Be,zl=ol,KP=SP,YP=AP,qP=l_,GP=c_,Tc=d_,Mc=rl,XP= $ P, $ a=f_,JP=g_,QP=wn,Ul=__;function ZP(e,t){const s=e.size,n=GP.getPositions(t);for(let i=0;i<n.length;i++){const o=n[i][0],r=n[i][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||s<=o+a))for(let l=-1;l<=7;l++)r+l<=-1||s<=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 tk(e){const t=e.size;for(let s=8;s<t-8;s++){const n=s%2===0;e.set(s,6,n,!0),e.set(6,s,n,!0)}}function ek(e,t){const s=qP.getPositions(t);for(let n=0;n<s.length;n++){const i=s[n][0],o=s[n][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 sk(e,t){const s=e.size,n= $ a.getEncodedBits(t);let i,o,r;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+s-8-3,r=(n>>a&1)===1,e.set(i,o,r,!0),e.set(o,i,r,!0)}function Kl(e,t,s){const n=e.size,i=JP.getEncodedBits(t,s);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(n-15+o,8,r,!0),o<8?e.set(8,n-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(n-8,8,1,!0)}function nk(e,t){const s=e.size;let n=-1,i=s-1,o=7,r=0;for(let a=s-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+=n,i<0||s<=i){i-=n,n=-n;break}}}function ik(e,t,s){const n=new KP;s.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),QP.getCharCountIndicator(l.mode,e)),l.write(n)});const i=ll.getSymbolTotalCodewords(e),o=Mc.getTotalCodewordsCount(e,t),r=(i-o)*8;for(n.getLengthInBits()+4<=r&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const a=(r-n.getLengthInBits())/8;for(let l=0;l<a;l++)n.put(l%2?17:236,8);return ok(n,e,t)}function ok(e,t,s){const n=ll.getSymbolTotalCodewords(t),i=Mc.getTotalCodewordsCount(t,s),o=n-i,r=Mc.getBlocksCount(t,s),a=n%r,l=r-a,c=Math.floor(n/r),d=Math.floor(o/r),u=d+1,f=c-d,g=new XP(f);let m=0;const b=new Array(r),v=new Array(r);let w=0;const E=new Uint8Array(e.buffer);for(let C=0;C<r;C++){const S=C<l?d:u;b[C]=E.slice(m,m+S),v[C]=g.encode(b[C]),m+=S,w=Math.max(w,S)}const $ =new Uint8Array(n);let T=0,y,x;for(y=0;y<w;y++)for(x=0;x<r;x++)y<b[x].length&&( $ [T++]=b[x][y]);for(y=0;y<f;y++)for(x=0;x<r;x++) $ [T++]=v[x][y];return $ }function rk(e,t,s,n){let i;if(Array.isArray(e))i=Ul.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const d=Ul.rawSplit(e);c= $ a.getBestVersionForData(d,s)}i=Ul.fromString(e,c||40)}else throw new Error("Invalid data");const o= $ a.getBestVersionForData(i,s);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-03-21 02:03:08 -04:00
The chosen QR Code version cannot contain this amount of data .
Minimum version required to store current data is : ` +o+ ` .
2024-06-18 03:16:42 +08:00
` );const r=ik(t,s,i),a=ll.getSymbolSize(t),l=new YP(a);return ZP(l,t),tk(l),ek(l,t),Kl(l,s,0),t>=7&&sk(l,t),nk(l,r),isNaN(n)&&(n=Tc.getBestMask(l,Kl.bind(null,l,s))),Tc.applyMask(n,l),Kl(l,s,n),{modules:l,version:t,errorCorrectionLevel:s,maskPattern:n,segments:i}}r_.create=function(t,s){if(typeof t>"u"||t==="")throw new Error("No input text");let n=zl.M,i,o;return typeof s<"u"&&(n=zl.from(s.errorCorrectionLevel,zl.M),i= $ a.from(s.version),o=Tc.from(s.maskPattern),s.toSJISFunc&&ll.setToSJISFunction(s.toSJISFunc)),rk(t,i,n,o)};var v_={},Ud={};(function(e){function t(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");let n=s.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+s);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(o){return[o,o]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,o=n.width&&n.width>=21?n.width:void 0,r=n.scale||4;return{width:o,scale:o?4:r,margin:i,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},e.getImageWidth=function(n,i){const o=e.getScale(n,i);return Math.floor((n+i.margin*2)*o)},e.qrToImageData=function(n,i,o){const r=i.modules.size,a=i.modules.data,l=e.getScale(r,o),c=Math.floor((r+o.margin*2)*l),d=o.margin*l,u=[o.color.light,o.color.dark];for(let f=0;f<c;f++)for(let g=0;g<c;g++){let m=(f*c+g)*4,b=o.color.light;if(f>=d&&g>=d&&f<c-d&&g<c-d){const v=Math.floor((f-d)/l),w=Math.floor((g-d)/l);b=u[a[v*r+w]?1:0]}n[m++]=b.r,n[m++]=b.g,n[m++]=b.b,n[m]=b.a}}})(Ud);(function(e){const t=Ud;function s(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 n(){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=n()),l=t.getOptions(l);const d=t.getImageWidth(o.modules.size,l),u=c.getContext("2d"),f=u.createImageData(d,d);return t.qrToImageData(f.data,o,l),s(u,c,d),u.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),d=l.type||"image/png",u=l.rendererOpts||{};return c.toDataURL(d,u.quality)}})(v_);var y_={};const ak=Ud;function xf(e,t){const s=e.a/255,n=t+'="'+e.hex+'"';return s<1?n+" "+t+'-opacity="'+s.toFixed(2).slice(1)+'"':n}function Yl(e,t,s){let n=e+t;return typeof s<"u"&&(n+=" "+s),n}function lk(e,t,s){let n="",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]||(n+=o?Yl("M",l+s,.5+c+s):Yl("m",i,0),i=0,o=!1),l+1<t&&e[a+1]||(n+=Yl("h",r),r=0)):i++}return n}y_.render=function(t,s,n){const i=ak.getOptions(s),o=t.modules.size,r=t.modules.data,a=o+i.margin*2,l=i.color.light.a?"<path "+xf(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+xf(i.color.dark,"stroke")+' d="'+lk(r,o,i.margin)+'"/>',d='viewBox="0 0 '+a+" "+a+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+c+ ` < / s v g >
` ;return typeof n=="function"&&n(null,f),f};const ck=wP,Oc=r_,x_=v_,dk=y_;function Kd(e,t,s,n,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!ck())throw new Error("Callback required as last argument");if(a){if(r<2)throw new Error("Too few arguments provided");r===2?(i=s,s=t,t=n=void 0):r===3&&(t.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=s,s=t,t=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(s=t,t=n=void 0):r===2&&!t.getContext&&(n=s,s=t,t=void 0),new Promise(function(l,c){try{const d=Oc.create(s,n);l(e(d,t,n))}catch(d){c(d)}})}try{const l=Oc.create(s,n);i(null,e(l,t,n))}catch(l){i(l)}}Qi.create=Oc.create;Qi.toCanvas=Kd.bind(null,x_.render);Qi.toDataURL=Kd.bind(null,x_.renderToDataURL);Qi.toString=Kd.bind(null,function(e,t,s){return dk.render(e,s)});const uk={name:"totp",async setup(){let e="";return await he("/api/Welcome_GetTotpLink",{},t=>{t.status&&(e=t.data)}),{l:e}},mounted(){this.l&&Qi.toCanvas(document.getElementById("qrcode"),this.l,function(e){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(e){const t=document.querySelector("#totp");t.classList.remove("is-invalid","is-valid"),e.length===6&&(console.log(e),/[0-9]{6}/.test(e)?ue("/api/Welcome_VerifyTotpLink",{totp:e},s=>{s.status?(this.verified=!0,t.classList.add("is-valid"),this. $ emit("verified")):(t.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(t.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},hk={class:"mb-3"},fk=p("p",{class:"mb-2"},[p("small",{class:"text-muted"},"1. Please scan the following QR Code to generate TOTP")],-1),pk=p("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),gk={class:"p-3 bg-body-secondary rounded-3 border mb-3"},mk=p("p",{class:"text-muted mb-0"},[p("small",null,"Or you can click the link below:")],-1),_k=["href"],bk={style:{"line-break":"anywhere"}},vk=p("label",{for:"totp",class:"mb-2"},[p("small",{class:"text-muted"},"2. Enter the TOTP generated by your authenticator to verify")],-1),yk={class:"form-group"},xk=["disabled"],wk={class:"invalid-feedback"},Ek=p("div",{class:"valid-feedback"}," TOTP verified! ",-1);function Sk(e,t,s,n,i,o){return H(),q("div",hk,[fk,pk,p("div",gk,[mk,p("a",{href:this.l},[p("code",bk,lt(this.l),1)],8,_k)]),vk,p("div",yk,[mt(p("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":t[0]||(t[0]=r=>this.totp=r),disabled:this.verified},null,8,xk),[[yt,this.totp]]),p("div",wk,lt(this.totpInvalidMessage),1),Ek])])}const Ak=kt(uk,[["render",Sk]]),Ck={name:"setup",components:{Totp:Ak},setup(){return{store:Jt()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!1,verified_totp:!1},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword&&(this.setup.enable_totp&&this.setup.verified_totp||!this.setup.enable_totp)}},methods:{submit(){this.loading=!0,ue("/api/Welcome_Finish",this.setup,e=>{e.status?(this.done=!0,setTimeout(()=>{this. $ router.push("/")},500)):(document.querySelectorAll("#createAccount input").forEach(t=>t.classList.add("is-invalid")),this.errorMessage=e.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}}, $ k=["data-bs-theme"],Pk={class:"mx-auto text-body",style:{width:"500px"}},kk=p("span",{class:"dashboardLogo display-4"},"Nice to meet you!",-1),Tk=p("p",{class:"mb-5"},"Please fill in the following fields to finish setup 😊",-1),Mk=p("h3",null,"Create an account",-1),Ok={key:0,class:"alert alert-danger"},Dk={class:"d-flex flex-column gap-3"},Ik={id:"createAccount",class:"d-flex flex-column gap-2"},Lk={class:"form-group text-body"},Rk=p("label",{for:"username",class:"mb-1 text-muted"},[p("small",null,"Pick an username you like")],-1),Nk={class:
2024-03-21 02:03:08 -04:00
*
* Copyright ( C ) 2015 - 2020 Jason A . Donenfeld < Jason @ zx2c4 . com > . All Rights Reserved .
2024-06-18 03:16:42 +08:00
* / ( f u n c t i o n ( ) { f u n c t i o n e ( y ) { v a r x = n e w F l o a t 6 4 A r r a y ( 1 6 ) ; i f ( y ) f o r ( v a r C = 0 ; C < y . l e n g t h ; + + C ) x [ C ] = y [ C ] ; r e t u r n x } f u n c t i o n t ( y , x ) { f o r ( v a r C , S = e ( ) , P = e ( ) , M = 0 ; M < 1 6 ; + + M ) P [ M ] = x [ M ] ; s ( P ) , s ( P ) , s ( P ) ; f o r ( v a r I = 0 ; I < 2 ; + + I ) { S [ 0 ] = P [ 0 ] - 6 5 5 1 7 ; f o r ( v a r M = 1 ; M < 1 5 ; + + M ) S [ M ] = P [ M ] - 6 5 5 3 5 - ( S [ M - 1 ] > > 1 6 & 1 ) , S [ M - 1 ] & = 6 5 5 3 5 ; S [ 1 5 ] = P [ 1 5 ] - 3 2 7 6 7 - ( S [ 1 4 ] > > 1 6 & 1 ) , C = S [ 1 5 ] > > 1 6 & 1 , S [ 1 4 ] & = 6 5 5 3 5 , n ( P , S , 1 - C ) } f o r ( v a r M = 0 ; M < 1 6 ; + + M ) y [ 2 * M ] = P [ M ] & 2 5 5 , y [ 2 * M + 1 ] = P [ M ] > > 8 } f u n c t i o n s ( y ) { f o r ( v a r x = 0 ; x < 1 6 ; + + x ) y [ ( x + 1 ) % 1 6 ] + = ( x < 1 5 ? 1 : 3 8 ) * M a t h . f l o o r ( y [ x ] / 6 5 5 3 6 ) , y [ x ] & = 6 5 5 3 5 } f u n c t i o n n ( y , x , C ) { f o r ( v a r S , P = ~ ( C - 1 ) , M = 0 ; M < 1 6 ; + + M ) S = P & ( y [ M ] ^ x [ M ] ) , y [ M ] ^ = S , x [ M ] ^ = S } f u n c t i o n i ( y , x , C ) { f o r ( v a r S = 0 ; S < 1 6 ; + + S ) y [ S ] = x [ S ] + C [ S ] | 0 } f u n c t i o n o ( y , x , C ) { f o r ( v a r S = 0 ; S < 1 6 ; + + S ) y [ S ] = x [ S ] - C [ S ] | 0 } f u n c t i o n r ( y , x , C ) { f o r ( v a r S = n e w F l o a t 6 4 A r r a y ( 3 1 ) , P = 0 ; P < 1 6 ; + + P ) f o r ( v a r M = 0 ; M < 1 6 ; + + M ) S [ P + M ] + = x [ P ] * C [ M ] ; f o r ( v a r P = 0 ; P < 1 5 ; + + P ) S [ P ] + = 3 8 * S [ P + 1 6 ] ; f o r ( v a r P = 0 ; P < 1 6 ; + + P ) y [ P ] = S [ P ] ; s ( y ) , s ( y ) } f u n c t i o n a ( y , x ) { f o r ( v a r C = e ( ) , S = 0 ; S < 1 6 ; + + S ) C [ S ] = x [ S ] ; f o r ( v a r S = 2 5 3 ; S > = 0 ; - - S ) r ( C , C , C ) , S ! = = 2 & & S ! = = 4 & & r ( C , C , x ) ; f o r ( v a r S = 0 ; S < 1 6 ; + + S ) y [ S ] = C [ S ] } f u n c t i o n l ( y ) { y [ 3 1 ] = y [ 3 1 ] & 1 2 7 | 6 4 , y [ 0 ] & = 2 4 8 } f u n c t i o n c ( y ) { f o r ( v a r x , C = n e w U i n t 8 A r r a y ( 3 2 ) , S = e ( [ 1 ] ) , P = e ( [ 9 ] ) , M = e ( ) , I = e ( [ 1 ] ) , N = e ( ) , Q = e ( ) , G = e ( [ 5 6 1 2 9 , 1 ] ) , V = e ( [ 9 ] ) , L = 0 ; L < 3 2 ; + + L ) C [ L ] = y [ L ] ; l ( C ) ; f o r ( v a r L = 2 5 4 ; L > = 0 ; - - L ) x = C [ L > > > 3 ] > > > ( L & 7 ) & 1 , n ( S , P , x ) , n ( M , I , x ) , i ( N , S , M ) , o ( S , S , M ) , i ( M , P , I ) , o ( P , P , I ) , r ( I , N , N ) , r ( Q , S , S ) , r ( S , M , S ) , r ( M , P , N ) , i ( N , S , M ) , o ( S , S , M ) , r ( P , S , S ) , o ( M , I , Q ) , r ( S , M , G ) , i ( S , S , I ) , r ( M , M , S ) , r ( S , I , Q ) , r ( I , P , V ) , r ( P , N , N ) , n ( S , P , x ) , n ( M , I , x ) ; r e t u r n a ( M , M ) , r ( S , S , M ) , t ( C , S ) , C } f u n c t i o n d ( ) { v a r y = n e w U i n t 8 A r r a y ( 3 2 ) ; r e t u r n w i n d o w . c r y p t o . g e t R a n d o m V a l u e s ( y ) , y } f u n c t i o n u ( ) { v a r y = d ( ) ; r e t u r n l ( y ) , y } f u n c t i o n f ( y , x ) { f o r ( v a r C = U i n t 8 A r r a y . f r o m ( [ x [ 0 ] > > 2 & 6 3 , ( x [ 0 ] < < 4 | x [ 1 ] > > 4 ) & 6 3 , ( x [ 1 ] < < 2 | x [ 2 ] > > 6 ) & 6 3 , x [ 2 ] & 6 3 ] ) , S = 0 ; S < 4 ; + + S ) y [ S ] = C [ S ] + 6 5 + ( 2 5 - C [ S ] > > 8 & 6 ) - ( 5 1 - C [ S ] > > 8 & 7 5 ) - ( 6 1 - C [ S ] > > 8 & 1 5 ) + ( 6 2 - C [ S ] > > 8 & 3 ) } f u n c t i o n g ( y ) { v a r x , C = n e w U i n t 8 A r r a y ( 4 4 ) ; f o r ( x = 0 ; x < 3 2 / 3 ; + + x ) f ( C . s u b a r r a y ( x * 4 ) , y . s u b a r r a y ( x * 3 ) ) ; r e t u r n f ( C . s u b a r r a y ( x * 4 ) , U i n t 8 A r r a y . f r o m ( [ y [ x * 3 + 0 ] , y [ x * 3 + 1 ] , 0 ] ) ) , C [ 4 3 ] = 6 1 , S t r i n g . f r o m C h a r C o d e . a p p l y ( n u l l , C ) } f u n c t i o n m ( y ) { l e t x = w i n d o w . a t o b ( y ) , C = x . l e n g t h , S = n e w U i n t 8 A r r a y ( C ) ; f o r ( l e t M = 0 ; M < C ; M + + ) S [ M ] = x . c h a r C o d e A t ( M ) ; r e t u r n n e w U i n t 8 A r r a y ( S . b u f f e r ) } f u n c t i o n b ( y , x ) { y . p u s h ( x & 2 5 5 , x > > > 8 & 2 5 5 , x > > > 1 6 & 2 5 5 , x > > > 2 4 & 2 5 5 ) } f u n c t i o n v ( y , x ) { y . p u s h ( x & 2 5 5 , x > > > 8 & 2 5 5 ) } f u n c t i o n w ( y , x ) { f o r ( v a r C = 0 ; C < x . l e n g t h ; + + C ) y . p u s h ( x [ C ] & 2 5 5 ) } f u n c t i o n E ( y ) { f o r ( v a r x = u n e s c a p e ( e n c o d e U R I C o m p o n e n t ( y ) ) , C = n e w U i n t 8 A r r a y ( x . l e n g t h ) , S = 0 ; S < x . l e n g t h ; + + S ) C [ S ] = x . c h a r C o d e A t ( S ) ; r e t u r n C } f u n c t i o n $ ( y ) { i f ( ! $ . t a b l e ) { $ . t a b l e = [ ] ; f o r ( v a r x = 0 , C = 0 ; C < 2 5 6 ; x = + + C ) { f o r ( v a r S = 0 ; S < 8 ; + + S ) x = x & 1 ? 3 9 8 8 2 9 2 3 8 4 ^ x > > > 1 : x > > > 1 ; $ . t a b l e [ C ] = x } } f o r ( v a r P = - 1 , M = 0 ; M < y . l e n g t h ; + + M ) P = P > > > 8 ^ $ . t a b l e [ ( P ^ y [ M ] ) & 2 5 5 ] ; r e t u r n ( P ^ - 1 ) > > > 0 } f u n c t i o n T ( y ) { f o r ( v a r x = [ ] , C = [ ] , S = 0 , P = 0 ; P < y . l e n g t h ; + + P ) { v a r M = E ( y [ P ] . f i l e N a m e ) , I = E ( y [ P ] . f i l e ) , N = $ ( I ) ; b ( x , 6 7 3 2 4 7 5 2 ) , v ( x , 2 0 ) , v ( x , 0 ) , v ( x , 0 ) , v ( x , 0 ) , v ( x , 0 ) , b ( x , N ) , b ( x , I . l e n g t h ) , b ( x , I . l e n g t h ) , v ( x , M . l e n g t h ) , v ( x , 0 ) , w ( x , M ) , w ( x , I ) , b ( C , 3 3 6 3 9 2 4 8 ) , v ( C , 0 ) , v ( C , 2 0 ) , v ( C , 0 ) , v ( C , 0 ) , v ( C , 0 ) , v ( C , 0 ) , b ( C , N ) , b ( C , I . l e n g t h ) , b ( C , I . l e n g t h ) , v ( C , M . l e n g t h ) , v ( C , 0 ) , v ( C , 0 ) , v ( C , 0 ) , v ( C , 0 ) , b ( C , 3 2 ) , b ( C , S ) , w ( C , M ) , S + = 3 0 + I . l e n g t h + M . l e n g t h } r e t u r n w ( x , C ) , b ( x , 1 0 1 0 1 0 2 5 6 ) , v ( x , 0 ) , v ( x , 0 ) , v ( x , y . l e n g t h ) , v ( x , y . l e n g t h ) , b ( x , C . l e n g t h ) , b ( x , S ) , v ( x , 0 ) , U i n t 8 A r r a y . f r o m ( x ) } w i n d o w . w i r e g u a r d = { g e n e r a t e K e y p a i r : f u n c t i o n ( ) { v a r y = u ( ) , x = c ( y ) , C = d ( ) ; r e t u r n { p u b l i c K e y : g ( x ) , p r i v a t e K e y : g ( y ) , p r e s h a r e d K e y : g ( C ) } } , g e n e r a t e P u b l i c K e y : f u n c t i o n ( y ) { r e t u r n y = m ( y ) , g ( c ( y ) ) } , g e n e r a t e Z i p F i l e s : f u n c t i o n ( y , x ) { v a r C = y . d a t a , S = T ( C ) , P = n e w B l o b ( [ S ] , { t y p e : " a p p l i c a t i o n / z i p " } ) , M = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; M . d o w n l o a d = x , M . h r e f = U R L . c r e a t e O b j e c t U R L ( P ) , M . s t y l e . d i s p l a y = " n o n e " , d o c u m e n t . b o d y . a p p e n d C h i l d ( M ) , M . c l i c k ( ) , d o c u m e n t . b o d y . r e m o v e C h i l d ( M ) } } } ) ( ) ; c o n s t e T = { n a m e : " n e w C o n f i g u r a t i o n " , s e t u p ( ) { r e t u r n { s t o r e : a s ( ) } } , d a t a ( ) { r e t u r n { n e w C o n f i g u r a t i o n : { C o n f i g u r a t i o n N a m e : " " , A d d r e s s : " " , L i s t e n P o r t : " " , P r i v a t e K e y : " " , P u b l i c K e y : " " , P r e s h a r e d K e y : " " , P r e U p : " " , P r e D o w n : " " , P o s t U p : " " , P o s t D o w n : " " } , n u m b e r O f A v a i l a b l e I P s : " 0 " , e r r o r : ! 1 , e r r o r M e s s a g e : " " , s u c c e s s : ! 1 , l o a d i n g : ! 1 } } , c r e a t e d ( ) { t h i s . w i r e g u a r d G e n e r a t e K e y p a i r ( ) } , m e t h o d s : { w i r e g u a r d G e n e r a t e K e y p a i r ( ) { c o n s t e = w i n d o w . w i r e g u a r d . g e n e r a t e K e y p a i r ( ) ; t h i s . n e w C o n f i g u r a t i o n . P r i v a t e K e y = e . p r i v a t e K e y , t h i s . n e w C o n f i g u r a t i o n . P u b l i c K e y = e . p
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-06-18 03:16:42 +08:00
* / f u n c t i o n a r ( e ) { r e t u r n e + . 5 | 0 } c o n s t r n = ( e , t , s ) = > M a t h . m a x ( M a t h . m i n ( e , s ) , t ) ; f u n c t i o n m o ( e ) { r e t u r n r n ( a r ( e * 2 . 5 5 ) , 0 , 2 5 5 ) } f u n c t i o n f n ( e ) { r e t u r n r n ( a r ( e * 2 5 5 ) , 0 , 2 5 5 ) } f u n c t i o n T s ( e ) { r e t u r n r n ( a r ( e / 2 . 5 5 ) / 1 0 0 , 0 , 1 ) } f u n c t i o n S f ( e ) { r e t u r n r n ( a r ( e * 1 0 0 ) , 0 , 1 0 0 ) } c o n s t U e = { 0 : 0 , 1 : 1 , 2 : 2 , 3 : 3 , 4 : 4 , 5 : 5 , 6 : 6 , 7 : 7 , 8 : 8 , 9 : 9 , A : 1 0 , B : 1 1 , C : 1 2 , D : 1 3 , E : 1 4 , F : 1 5 , a : 1 0 , b : 1 1 , c : 1 2 , d : 1 3 , e : 1 4 , f : 1 5 } , D c = [ . . . " 0 1 2 3 4 5 6 7 8 9 A B C D E F " ] , u D = e = > D c [ e & 1 5 ] , h D = e = > D c [ ( e & 2 4 0 ) > > 4 ] + D c [ e & 1 5 ] , F r = e = > ( e & 2 4 0 ) > > 4 = = = ( e & 1 5 ) , f D = e = > F r ( e . r ) & & F r ( e . g ) & & F r ( e . b ) & & F r ( e . a ) ; f u n c t i o n p D ( e ) { v a r t = e . l e n g t h , s ; r e t u r n e [ 0 ] = = = " # " & & ( t = = = 4 | | t = = = 5 ? s = { r : 2 5 5 & U e [ e [ 1 ] ] * 1 7 , g : 2 5 5 & U e [ e [ 2 ] ] * 1 7 , b : 2 5 5 & U e [ e [ 3 ] ] * 1 7 , a : t = = = 5 ? U e [ e [ 4 ] ] * 1 7 : 2 5 5 } : ( t = = = 7 | | t = = = 9 ) & & ( s = { r : U e [ e [ 1 ] ] < < 4 | U e [ e [ 2 ] ] , g : U e [ e [ 3 ] ] < < 4 | U e [ e [ 4 ] ] , b : U e [ e [ 5 ] ] < < 4 | U e [ e [ 6 ] ] , a : t = = = 9 ? U e [ e [ 7 ] ] < < 4 | U e [ e [ 8 ] ] : 2 5 5 } ) ) , s } c o n s t g D = ( e , t ) = > e < 2 5 5 ? t ( e ) : " " ; f u n c t i o n m D ( e ) { v a r t = f D ( e ) ? u D : h D ; r e t u r n e ? " # " + t ( e . r ) + t ( e . g ) + t ( e . b ) + g D ( e . a , t ) : v o i d 0 } c o n s t _ D = / ^ ( h s l a ? | h w b | h s v ) \ ( \ s * ( [ - + . e \ d ] + ) ( ? : d e g ) ? [ \ s , ] + ( [ - + . e \ d ] + ) % [ \ s , ] + ( [ - + . e \ d ] + ) % ( ? : [ \ s , ] + ( [ - + . e \ d ] + ) ( % ) ? ) ? \ s * \ ) $ / ; f u n c t i o n A _ ( e , t , s ) { c o n s t n = t * M a t h . m i n ( s , 1 - s ) , i = ( o , r = ( o + e / 3 0 ) % 1 2 ) = > s - n * M a t h . m a x ( M a t h . m i n ( r - 3 , 9 - r , 1 ) , - 1 ) ; r e t u r n [ i ( 0 ) , i ( 8 ) , i ( 4 ) ] } f u n c t i o n b D ( e , t , s ) { c o n s t n = ( i , o = ( i + e / 6 0 ) % 6 ) = > s - s * t * M a t h . m a x ( M a t h . m i n ( o , 4 - o , 1 ) , 0 ) ; r e t u r n [ n ( 5 ) , n ( 3 ) , n ( 1 ) ] } f u n c t i o n v D ( e , t , s ) { c o n s t n = A _ ( e , 1 , . 5 ) ; l e t i ; f o r ( t + s > 1 & & ( i = 1 / ( t + s ) , t * = i , s * = i ) , i = 0 ; i < 3 ; i + + ) n [ i ] * = 1 - t - s , n [ i ] + = t ; r e t u r n n } f u n c t i o n y D ( e , t , s , n , i ) { r e t u r n e = = = i ? ( t - s ) / n + ( t < s ? 6 : 0 ) : t = = = i ? ( s - e ) / n + 2 : ( e - t ) / n + 4 } f u n c t i o n q d ( e ) { c o n s t s = e . r / 2 5 5 , n = e . g / 2 5 5 , i = e . b / 2 5 5 , o = M a t h . m a x ( s , n , i ) , r = M a t h . m i n ( s , n , i ) , a = ( o + r ) / 2 ; l e t l , c , d ; r e t u r n o ! = = r & & ( d = o - r , c = a > . 5 ? d / ( 2 - o - r ) : d / ( o + r ) , l = y D ( s , n , i , d , o ) , l = l * 6 0 + . 5 ) , [ l | 0 , c | | 0 , a ] } f u n c t i o n G d ( e , t , s , n ) { r e t u r n ( A r r a y . i s A r r a y ( t ) ? e ( t [ 0 ] , t [ 1 ] , t [ 2 ] ) : e ( t , s , n ) ) . m a p ( f n ) } f u n c t i o n X d ( e , t , s ) { r e t u r n G d ( A _ , e , t , s ) } f u n c t i o n x D ( e , t , s ) { r e t u r n G d ( v D , e , t , s ) } f u n c t i o n w D ( e , t , s ) { r e t u r n G d ( b D , e , t , s ) } f u n c t i o n C _ ( e ) { r e t u r n ( e % 3 6 0 + 3 6 0 ) % 3 6 0 } f u n c t i o n E D ( e ) { c o n s t t = _ D . e x e c ( e ) ; l e t s = 2 5 5 , n ; i f ( ! t ) r e t u r n ; t [ 5 ] ! = = n & & ( s = t [ 6 ] ? m o ( + t [ 5 ] ) : f n ( + t [ 5 ] ) ) ; c o n s t i = C _ ( + t [ 2 ] ) , o = + t [ 3 ] / 1 0 0 , r = + t [ 4 ] / 1 0 0 ; r e t u r n t [ 1 ] = = = " h w b " ? n = x D ( i , o , r ) : t [ 1 ] = = = " h s v " ? n = w D ( i , o , r ) : n = X d ( i , o , r ) , { r : n [ 0 ] , g : n [ 1 ] , b : n [ 2 ] , a : s } } f u n c t i o n S D ( e , t ) { v a r s = q d ( e ) ; s [ 0 ] = C _ ( s [ 0 ] + t ) , s = X d ( s ) , e . r = s [ 0 ] , e . g = s [ 1 ] , e . b = s [ 2 ] } f u n c t i o n A D ( e ) { i f ( ! e ) r e t u r n ; c o n s t t = q d ( e ) , s = t [ 0 ] , n = S f ( t [ 1 ] ) , i = S f ( t [ 2 ] ) ; r e t u r n e . a < 2 5 5 ? ` h s l a ( $ { s } , $ { n } % , $ { i } % , $ { T s ( e . a ) } ) ` : ` h s l ( $ { s } , $ { n } % , $ { i } % ) ` } c o n s t A f = { x : " d a r k " , Z : " l i g h t " , Y : " r e " , X : " b l u " , W : " g r " , V : " m e d i u m " , U : " s l a t e " , A : " e e " , T : " o l " , S : " o r " , B : " r a " , C : " l a t e g " , D : " i g h t s " , R : " i n " , Q : " t u r q u o i s " , E : " h i " , P : " r o " , O : " a l " , N : " l e " , M : " d e " , L : " y e l l o " , F : " e n " , K : " c h " , G : " a r k s " , H : " e a " , I : " i g h t g " , J : " w h " } , C f = { O i c e X e : " f 0 f 8 f f " , a n t i q u e w E t e : " f a e b d 7 " , a q u a : " f f f f " , a q u a m a r R e : " 7 f f f d 4 " , a z u Y : " f 0 f f f f " , b e i g e : " f 5 f 5 d c " , b i s q u e : " f f e 4 c 4 " , b l a c k : " 0 " , b l a n K e d O m o n d : " f f e b c d " , X e : " f f " , X e v i T e t : " 8 a 2 b e 2 " , b P w n : " a 5 2 a 2 a " , b u r l y w o o d : " d e b 8 8 7 " , c a M t X e : " 5 f 9 e a 0 " , K a r t Y u s e : " 7 f f f 0 0 " , K o c T a t e : " d 2 6 9 1 e " , c S O : " f f 7 f 5 0 " , c S n f l o w e r X e : " 6 4 9 5 e d " , c S n s i l k : " f f f 8 d c " , c r i m s o n : " d c 1 4 3 c " , c y a n : " f f f f " , x X e : " 8 b " , x c y a n : " 8 b 8 b " , x g T M n P d : " b 8 8 6 0 b " , x W a y : " a 9 a 9 a 9 " , x g Y F : " 6 4 0 0 " , x g Y y : " a 9 a 9 a 9 " , x k h a k i : " b d b 7 6 b " , x m a g F t a : " 8 b 0 0 8 b " , x T i v e g Y F : " 5 5 6 b 2 f " , x S a n g e : " f f 8 c 0 0 " , x S c E d : " 9 9 3 2 c c " , x Y d : " 8 b 0 0 0 0 " , x s O m o n : " e 9 9 6 7 a " , x s H g Y F : " 8 f b c 8 f " , x U X e : " 4 8 3 d 8 b " , x U W a y : " 2 f 4 f 4 f " , x U g Y y : " 2 f 4 f 4 f " , x Q e : " c e d 1 " , x v i T e t : " 9 4 0 0 d 3 " , d A p p R k : " f f 1 4 9 3 " , d A p s k y X e : " b f f f " , d i m W a y : " 6 9 6 9 6 9 " , d i m g Y y : " 6 9 6 9 6 9 " , d o d g e r X e : " 1 e 9 0 f f " , f i Y b r i c k : " b 2 2 2 2 2 " , f l S O w E t e : " f f f a f 0 " , f o Y s t W A n : " 2 2 8 b 2 2 " , f u K s i a : " f f 0 0 f f " , g a R s b S o : " d c d c d c " , g h o s t w E t e : " f 8 f 8 f f " , g T d : " f f d 7 0 0 " , g T M n P d : " d a a 5 2 0 " , W a y : " 8 0 8 0 8 0 " , g Y F : " 8 0 0 0 " , g Y F L w : " a d f f 2 f " , g Y y : " 8 0 8 0 8 0 " , h o n e y M w : " f 0 f f f 0 " , h o t p R k : " f f 6 9 b 4 " , R d i a n Y d : " c d 5 c 5 c " , R d i g o : " 4 b 0 0 8 2 " , i v S y : " f f f f f 0 " , k h a k i : " f 0 e 6 8 c " , l a v F M r : " e 6 e 6 f a " , l a v F M r X s h : " f f f 0 f 5 " , l a w n g Y F : " 7 c f c 0 0 " , N m o n c E f f o n : " f f f a c d " , Z X e : " a d d 8 e 6 " , Z c S O : " f 0 8 0 8 0 " , Z c y a n : " e 0 f f f f " , Z g T M n P d L w : " f a f a d 2 " , Z W a y : " d 3 d 3 d 3 " , Z g Y F : " 9 0 e e 9 0 " , Z g Y y : " d 3 d 3 d 3 " , Z p R k : " f f b 6 c 1 " , Z s O m o n : " f f a 0 7 a " , Z s H g Y F : " 2 0 b 2 a a " , Z s k y X e : " 8 7 c e f a " , Z U W a y : " 7 7 8 8 9 9 " , Z U g Y y : " 7 7 8 8 9 9 " , Z s t A l X e : " b 0 c 4 d e " , Z L w : " f f f f e 0 " , l i m e : " f f 0 0 " , l i m e g Y F : " 3 2 c d 3 2 " , l R F : " f a f 0 e 6 " , m a g F t a : " f f 0 0 f f " , m a P o n : " 8 0 0 0 0 0 " , V a q u a m a r R e : " 6 6 c d a a " , V X e : " c d " , V S c E d : " b a 5 5 d 3 " , V p u r p N : " 9 3 7 0 d b " , V s H g Y F : " 3 c b 3 7 1 " , V U X e : " 7 b 6 8 e e " , V s p r R g g Y F : " f a 9 a " , V Q e : " 4 8 d 1 c c " , V v i T e t Y d : " c 7 1 5 8 5 " , m i d n i g h t X e : " 1 9 1 9 7 0 " , m R t c Y a m : " f 5 f f f a " , m i s t y P s e : "
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-06-18 03:16:42 +08:00
* / f u n c t i o n A s ( ) { } c o n s t D D = ( ( ) = > { l e t e = 0 ; r e t u r n ( ) = > e + + } ) ( ) ; f u n c t i o n F t ( e ) { r e t u r n e = = = n u l l | | t y p e o f e > " u " } f u n c t i o n q t ( e ) { i f ( A r r a y . i s A r r a y & & A r r a y . i s A r r a y ( e ) ) r e t u r n ! 0 ; c o n s t t = O b j e c t . p r o t o t y p e . t o S t r i n g . c a l l ( e ) ; r e t u r n t . s l i c e ( 0 , 7 ) = = = " [ o b j e c t " & & t . s l i c e ( - 6 ) = = = " A r r a y ] " } f u n c t i o n I t ( e ) { r e t u r n e ! = = n u l l & & O b j e c t . p r o t o t y p e . t o S t r i n g . c a l l ( e ) = = = " [ o b j e c t O b j e c t ] " } f u n c t i o n Q t ( e ) { r e t u r n ( t y p e o f e = = " n u m b e r " | | e i n s t a n c e o f N u m b e r ) & & i s F i n i t e ( + e ) } f u n c t i o n O e ( e , t ) { r e t u r n Q t ( e ) ? e : t } f u n c t i o n S t ( e , t ) { r e t u r n t y p e o f e > " u " ? t : e } c o n s t I D = ( e , t ) = > t y p e o f e = = " s t r i n g " & & e . e n d s W i t h ( " % " ) ? p a r s e F l o a t ( e ) / 1 0 0 : + e / t , P _ = ( e , t ) = > t y p e o f e = = " s t r i n g " & & e . e n d s W i t h ( " % " ) ? p a r s e F l o a t ( e ) / 1 0 0 * t : + e ; f u n c t i o n K t ( e , t , s ) { i f ( e & & t y p e o f e . c a l l = = " f u n c t i o n " ) r e t u r n e . a p p l y ( s , t ) } f u n c t i o n z t ( e , t , s , n ) { l e t i , o , r ; i f ( q t ( e ) ) i f ( o = e . l e n g t h , n ) f o r ( i = o - 1 ; i > = 0 ; i - - ) t . c a l l ( s , e [ i ] , i ) ; e l s e f o r ( i = 0 ; i < o ; i + + ) t . c a l l ( s , e [ i ] , i ) ; e l s e i f ( I t ( e ) ) f o r ( r = O b j e c t . k e y s ( e ) , o = r . l e n g t h , i = 0 ; i < o ; i + + ) t . c a l l ( s , e [ r [ i ] ] , r [ i ] ) } f u n c t i o n P a ( e , t ) { l e t s , n , i , o ; i f ( ! e | | ! t | | e . l e n g t h ! = = t . l e n g t h ) r e t u r n ! 1 ; f o r ( s = 0 , n = e . l e n g t h ; s < n ; + + s ) i f ( i = e [ s ] , o = t [ s ] , i . d a t a s e t I n d e x ! = = o . d a t a s e t I n d e x | | i . i n d e x ! = = o . i n d e x ) r e t u r n ! 1 ; r e t u r n ! 0 } f u n c t i o n k a ( e ) { i f ( q t ( e ) ) r e t u r n e . m a p ( k a ) ; i f ( I t ( e ) ) { c o n s t t = O b j e c t . c r e a t e ( n u l l ) , s = O b j e c t . k e y s ( e ) , n = s . l e n g t h ; l e t i = 0 ; f o r ( ; i < n ; + + i ) t [ s [ i ] ] = k a ( e [ s [ i ] ] ) ; r e t u r n t } r e t u r n e } f u n c t i o n k _ ( e ) { r e t u r n [ " _ _ p r o t o _ _ " , " p r o t o t y p e " , " c o n s t r u c t o r " ] . i n d e x O f ( e ) = = = - 1 } f u n c t i o n L D ( e , t , s , n ) { i f ( ! k _ ( e ) ) r e t u r n ; c o n s t i = t [ e ] , o = s [ e ] ; I t ( i ) & & I t ( o ) ? K o ( i , o , n ) : t [ e ] = k a ( o ) } f u n c t i o n K o ( e , t , s ) { c o n s t n = q t ( t ) ? t : [ t ] , i = n . l e n g t h ; i f ( ! I t ( e ) ) r e t u r n e ; s = s | | { } ; c o n s t o = s . m e r g e r | | L D ; l e t r ; f o r ( l e t a = 0 ; a < i ; + + a ) { i f ( r = n [ a ] , ! I t ( r ) ) c o n t i n u e ; c o n s t l = O b j e c t . k e y s ( r ) ; f o r ( l e t c = 0 , d = l . l e n g t h ; c < d ; + + c ) o ( l [ c ] , e , r , s ) } r e t u r n e } f u n c t i o n M o ( e , t ) { r e t u r n K o ( e , t , { m e r g e r : R D } ) } f u n c t i o n R D ( e , t , s ) { i f ( ! k _ ( e ) ) r e t u r n ; c o n s t n = t [ e ] , i = s [ e ] ; I t ( n ) & & I t ( i ) ? M o ( n , i ) : O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( t , e ) | | ( t [ e ] = k a ( i ) ) } c o n s t P f = { " " : e = > e , x : e = > e . x , y : e = > e . y } ; f u n c t i o n N D ( e ) { c o n s t t = e . s p l i t ( " . " ) , s = [ ] ; l e t n = " " ; f o r ( c o n s t i o f t ) n + = i , n . e n d s W i t h ( " \ \ " ) ? n = n . s l i c e ( 0 , - 1 ) + " . " : ( s . p u s h ( n ) , n = " " ) ; r e t u r n s } f u n c t i o n F D ( e ) { c o n s t t = N D ( e ) ; r e t u r n s = > { f o r ( c o n s t n o f t ) { i f ( n = = = " " ) b r e a k ; s = s & & s [ n ] } r e t u r n s } } f u n c t i o n _ n ( e , t ) { r e t u r n ( P f [ t ] | | ( P f [ t ] = F D ( t ) ) ) ( e ) } f u n c t i o n J d ( e ) { r e t u r n e . c h a r A t ( 0 ) . t o U p p e r C a s e ( ) + e . s l i c e ( 1 ) } c o n s t Y o = e = > t y p e o f e < " u " , b n = e = > t y p e o f e = = " f u n c t i o n " , k f = ( e , t ) = > { i f ( e . s i z e ! = = t . s i z e ) r e t u r n ! 1 ; f o r ( c o n s t s o f e ) i f ( ! t . h a s ( s ) ) r e t u r n ! 1 ; r e t u r n ! 0 } ; f u n c t i o n B D ( e ) { r e t u r n e . t y p e = = = " m o u s e u p " | | e . t y p e = = = " c l i c k " | | e . t y p e = = = " c o n t e x t m e n u " } c o n s t X t = M a t h . P I , G t = 2 * X t , V D = G t + X t , T a = N u m b e r . P O S I T I V E _ I N F I N I T Y , H D = X t / 1 8 0 , t e = X t / 2 , R n = X t / 4 , T f = X t * 2 / 3 , a n = M a t h . l o g 1 0 , _ s = M a t h . s i g n ; f u n c t i o n O o ( e , t , s ) { r e t u r n M a t h . a b s ( e - t ) < s } f u n c t i o n M f ( e ) { c o n s t t = M a t h . r o u n d ( e ) ; e = O o ( e , t , e / 1 e 3 ) ? t : e ; c o n s t s = M a t h . p o w ( 1 0 , M a t h . f l o o r ( a n ( e ) ) ) , n = e / s ; r e t u r n ( n < = 1 ? 1 : n < = 2 ? 2 : n < = 5 ? 5 : 1 0 ) * s } f u n c t i o n j D ( e ) { c o n s t t = [ ] , s = M a t h . s q r t ( e ) ; l e t n ; f o r ( n = 1 ; n < s ; n + + ) e % n = = = 0 & & ( t . p u s h ( n ) , t . p u s h ( e / n ) ) ; r e t u r n s = = = ( s | 0 ) & & t . p u s h ( s ) , t . s o r t ( ( i , o ) = > i - o ) . p o p ( ) , t } f u n c t i o n z i ( e ) { r e t u r n ! i s N a N ( p a r s e F l o a t ( e ) ) & & i s F i n i t e ( e ) } f u n c t i o n W D ( e , t ) { c o n s t s = M a t h . r o u n d ( e ) ; r e t u r n s - t < = e & & s + t > = e } f u n c t i o n T _ ( e , t , s ) { l e t n , i , o ; f o r ( n = 0 , i = e . l e n g t h ; n < i ; n + + ) o = e [ n ] [ s ] , i s N a N ( o ) | | ( t . m i n = M a t h . m i n ( t . m i n , o ) , t . m a x = M a t h . m a x ( t . m a x , o ) ) } f u n c t i o n n s ( e ) { r e t u r n e * ( X t / 1 8 0 ) } f u n c t i o n Q d ( e ) { r e t u r n e * ( 1 8 0 / X t ) } f u n c t i o n O f ( e ) { i f ( ! Q t ( e ) ) r e t u r n ; l e t t = 1 , s = 0 ; f o r ( ; M a t h . r o u n d ( e * t ) / t ! = = e ; ) t * = 1 0 , s + + ; r e t u r n s } f u n c t i o n M _ ( e , t ) { c o n s t s = t . x - e . x , n = t . y - e . y , i = M a t h . s q r t ( s * s + n * n ) ; l e t o = M a t h . a t a n 2 ( n , s ) ; r e t u r n o < - . 5 * X t & & ( o + = G t ) , { a n g l e : o , d i s t a n c e : i } } f u n c t i o n I c ( e , t ) { r e t u r n M a t h . s q r t ( M a t h . p o w ( t . x - e . x , 2 ) + M a t h . p o w ( t . y - e . y , 2 ) ) } f u n c t i o n z D ( e , t ) { r e t u r n ( e - t + V D ) % G t - X t } f u n c t i o n I e ( e ) { r e t u r n ( e % G t + G t ) % G t } f u n c t i o n q o ( e , t , s , n ) { c o n s t i = I e ( e ) , o = I e ( t ) , r = I e ( s ) , a = I e ( o - i ) , l = I e ( r - i ) , c = I e ( i - o ) , d = I e ( i - r ) ; r e t u r n i = = = o | | i = = = r | | n & & o = = = r | | a > l & & c < d } f u n c t i o n d e ( e , t , s ) { r e t u r n M a t h . m a x ( t , M a t h . m i n ( s , e ) ) } f u n c t i o n U D ( e ) { r e t u r n d e ( e , - 3 2 7 6 8 , 3 2 7 6 7 ) } f u n c t i o n O s ( e , t , s , n = 1 e - 6 ) { r e t u r n e > = M a t h . m i n ( t , s ) - n & & e < = M a t h . m a x ( t , s ) + n } f u n c t i o n Z d ( e , t , s ) { s = s | | ( r = > e [ r ] < t ) ; l e t n = e . l e n g t h - 1 , i = 0 , o ; f o r ( ; n - i > 1 ; ) o = i + n > > 1 , s ( o ) ? i = o : n = o ; r e t u r n { l o : i , h i : n } } c o n s t D s = ( e , t , s , n ) = > Z d ( e , s , n ? i = > { c o n s t o = e [ i ] [ t ] ; r e t u r n o < s | | o = = = s & & e [ i + 1 ] [ t ] = = = s } : i = > e [ i ] [ t ] < s ) , K D = ( e , t , s ) = > Z d
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-06-18 03:16:42 +08:00
* / c l a s s X I { c o n s t r u c t o r ( ) { t h i s . _ r e q u e s t = n u l l , t h i s . _ c h a r t s = n e w M a p , t h i s . _ r u n n i n g = ! 1 , t h i s . _ l a s t D a t e = v o i d 0 } _ n o t i f y ( t , s , n , i ) { c o n s t o = s . l i s t e n e r s [ i ] , r = s . d u r a t i o n ; o . f o r E a c h ( a = > a ( { c h a r t : t , i n i t i a l : s . i n i t i a l , n u m S t e p s : r , c u r r e n t S t e p : M a t h . m i n ( n - s . s t a r t , r ) } ) ) } _ r e f r e s h ( ) { t h i s . _ r e q u e s t | | ( t h i s . _ r u n n i n g = ! 0 , t h i s . _ r e q u e s t = I _ . c a l l ( w i n d o w , ( ) = > { t h i s . _ u p d a t e ( ) , t h i s . _ r e q u e s t = n u l l , t h i s . _ r u n n i n g & & t h i s . _ r e f r e s h ( ) } ) ) } _ u p d a t e ( t = D a t e . n o w ( ) ) { l e t s = 0 ; t h i s . _ c h a r t s . f o r E a c h ( ( n , i ) = > { i f ( ! n . r u n n i n g | | ! n . i t e m s . l e n g t h ) r e t u r n ; c o n s t o = n . i t e m s ; l e t r = o . l e n g t h - 1 , a = ! 1 , l ; f o r ( ; r > = 0 ; - - r ) l = o [ r ] , l . _ a c t i v e ? ( l . _ t o t a l > n . d u r a t i o n & & ( n . d u r a t i o n = l . _ t o t a l ) , l . t i c k ( t ) , a = ! 0 ) : ( o [ r ] = o [ o . l e n g t h - 1 ] , o . p o p ( ) ) ; a & & ( i . d r a w ( ) , t h i s . _ n o t i f y ( i , n , t , " p r o g r e s s " ) ) , o . l e n g t h | | ( n . r u n n i n g = ! 1 , t h i s . _ n o t i f y ( i , n , t , " c o m p l e t e " ) , n . i n i t i a l = ! 1 ) , s + = o . l e n g t h } ) , t h i s . _ l a s t D a t e = t , s = = = 0 & & ( t h i s . _ r u n n i n g = ! 1 ) } _ g e t A n i m s ( t ) { c o n s t s = t h i s . _ c h a r t s ; l e t n = s . g e t ( t ) ; r e t u r n n | | ( n = { r u n n i n g : ! 1 , i n i t i a l : ! 0 , i t e m s : [ ] , l i s t e n e r s : { c o m p l e t e : [ ] , p r o g r e s s : [ ] } } , s . s e t ( t , n ) ) , n } l i s t e n ( t , s , n ) { t h i s . _ g e t A n i m s ( t ) . l i s t e n e r s [ s ] . p u s h ( n ) } a d d ( t , s ) { ! s | | ! s . l e n g t h | | t h i s . _ g e t A n i m s ( t ) . i t e m s . p u s h ( . . . s ) } h a s ( t ) { r e t u r n t h i s . _ g e t A n i m s ( t ) . i t e m s . l e n g t h > 0 } s t a r t ( t ) { c o n s t s = t h i s . _ c h a r t s . g e t ( t ) ; s & & ( s . r u n n i n g = ! 0 , s . s t a r t = D a t e . n o w ( ) , s . d u r a t i o n = s . i t e m s . r e d u c e ( ( n , i ) = > M a t h . m a x ( n , i . _ d u r a t i o n ) , 0 ) , t h i s . _ r e f r e s h ( ) ) } r u n n i n g ( t ) { i f ( ! t h i s . _ r u n n i n g ) r e t u r n ! 1 ; c o n s t s = t h i s . _ c h a r t s . g e t ( t ) ; r e t u r n ! ( ! s | | ! s . r u n n i n g | | ! s . i t e m s . l e n g t h ) } s t o p ( t ) { c o n s t s = t h i s . _ c h a r t s . g e t ( t ) ; i f ( ! s | | ! s . i t e m s . l e n g t h ) r e t u r n ; c o n s t n = s . i t e m s ; l e t i = n . l e n g t h - 1 ; f o r ( ; i > = 0 ; - - i ) n [ i ] . c a n c e l ( ) ; s . i t e m s = [ ] , t h i s . _ n o t i f y ( t , s , D a t e . n o w ( ) , " c o m p l e t e " ) } r e m o v e ( t ) { r e t u r n t h i s . _ c h a r t s . d e l e t e ( t ) } } v a r $ s = n e w X I ; c o n s t K f = " t r a n s p a r e n t " , J I = { b o o l e a n ( e , t , s ) { r e t u r n s > . 5 ? t : e } , c o l o r ( e , t , s ) { c o n s t n = R f ( e | | K f ) , i = n . v a l i d & & R f ( t | | K f ) ; r e t u r n i & & i . v a l i d ? i . m i x ( n , s ) . h e x S t r i n g ( ) : t } , n u m b e r ( e , t , s ) { r e t u r n e + ( t - e ) * s } } ; c l a s s Q I { c o n s t r u c t o r ( t , s , n , i ) { c o n s t o = s [ n ] ; i = _ o ( [ t . t o , i , o , t . f r o m ] ) ; c o n s t r = _ o ( [ t . f r o m , o , i ] ) ; t h i s . _ a c t i v e = ! 0 , t h i s . _ f n = t . f n | | J I [ t . t y p e | | t y p e o f r ] , t h i s . _ e a s i n g = D o [ t . e a s i n g ] | | D o . l i n e a r , t h i s . _ s t a r t = M a t h . f l o o r ( D a t e . n o w ( ) + ( t . d e l a y | | 0 ) ) , t h i s . _ d u r a t i o n = t h i s . _ t o t a l = M a t h . f l o o r ( t . d u r a t i o n ) , t h i s . _ l o o p = ! ! t . l o o p , t h i s . _ t a r g e t = s , t h i s . _ p r o p = n , t h i s . _ f r o m = r , t h i s . _ t o = i , t h i s . _ p r o m i s e s = v o i d 0 } a c t i v e ( ) { r e t u r n t h i s . _ a c t i v e } u p d a t e ( t , s , n ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ n o t i f y ( ! 1 ) ; c o n s t i = t h i s . _ t a r g e t [ t h i s . _ p r o p ] , o = n - t h i s . _ s t a r t , r = t h i s . _ d u r a t i o n - o ; t h i s . _ s t a r t = n , t h i s . _ d u r a t i o n = M a t h . f l o o r ( M a t h . m a x ( r , t . d u r a t i o n ) ) , t h i s . _ t o t a l + = o , t h i s . _ l o o p = ! ! t . l o o p , t h i s . _ t o = _ o ( [ t . t o , s , i , t . f r o m ] ) , t h i s . _ f r o m = _ o ( [ t . f r o m , i , s ] ) } } c a n c e l ( ) { t h i s . _ a c t i v e & & ( t h i s . t i c k ( D a t e . n o w ( ) ) , t h i s . _ a c t i v e = ! 1 , t h i s . _ n o t i f y ( ! 1 ) ) } t i c k ( t ) { c o n s t s = t - t h i s . _ s t a r t , n = t h i s . _ d u r a t i o n , i = t h i s . _ p r o p , o = t h i s . _ f r o m , r = t h i s . _ l o o p , a = t h i s . _ t o ; l e t l ; i f ( t h i s . _ a c t i v e = o ! = = a & & ( r | | s < n ) , ! t h i s . _ a c t i v e ) { t h i s . _ t a r g e t [ i ] = a , t h i s . _ n o t i f y ( ! 0 ) ; r e t u r n } i f ( s < 0 ) { t h i s . _ t a r g e t [ i ] = o ; r e t u r n } l = s / n % 2 , l = r & & l > 1 ? 2 - l : l , l = t h i s . _ e a s i n g ( M a t h . m i n ( 1 , M a t h . m a x ( 0 , l ) ) ) , t h i s . _ t a r g e t [ i ] = t h i s . _ f n ( o , a , l ) } w a i t ( ) { c o n s t t = t h i s . _ p r o m i s e s | | ( t h i s . _ p r o m i s e s = [ ] ) ; r e t u r n n e w P r o m i s e ( ( s , n ) = > { t . p u s h ( { r e s : s , r e j : n } ) } ) } _ n o t i f y ( t ) { c o n s t s = t ? " r e s " : " r e j " , n = t h i s . _ p r o m i s e s | | [ ] ; f o r ( l e t i = 0 ; i < n . l e n g t h ; i + + ) n [ i ] [ s ] ( ) } } c l a s s Q _ { c o n s t r u c t o r ( t , s ) { t h i s . _ c h a r t = t , t h i s . _ p r o p e r t i e s = n e w M a p , t h i s . c o n f i g u r e ( s ) } c o n f i g u r e ( t ) { i f ( ! I t ( t ) ) r e t u r n ; c o n s t s = O b j e c t . k e y s ( Z t . a n i m a t i o n ) , n = t h i s . _ p r o p e r t i e s ; O b j e c t . g e t O w n P r o p e r t y N a m e s ( t ) . f o r E a c h ( i = > { c o n s t o = t [ i ] ; i f ( ! I t ( o ) ) r e t u r n ; c o n s t r = { } ; f o r ( c o n s t a o f s ) r [ a ] = o [ a ] ; ( q t ( o . p r o p e r t i e s ) & & o . p r o p e r t i e s | | [ i ] ) . f o r E a c h ( a = > { ( a = = = i | | ! n . h a s ( a ) ) & & n . s e t ( a , r ) } ) } ) } _ a n i m a t e O p t i o n s ( t , s ) { c o n s t n = s . o p t i o n s , i = t 2 ( t , n ) ; i f ( ! i ) r e t u r n [ ] ; c o n s t o = t h i s . _ c r e a t e A n i m a t i o n s ( i , n ) ; r e t u r n n . $ s h a r e d & & Z I ( t . o p t i o n s . $ a n i m a t i o n s , n ) . t h e n ( ( ) = > { t . o p t i o n s = n } , ( ) = > { } ) , o } _ c r e a t e A n i m a t i o n s ( t , s ) { c o n s t n = t h i s . _ p r o p e r t i e s , i = [ ] , o = t . $ a n i m a t i o n s | | ( t . $ a n i m a t i o n s = { } ) , r = O b j e c t . k e y s ( s ) , a = D a t e . n o w ( ) ; l e t l ; f o r ( l = r . l e n g t h - 1 ; l > = 0 ; - - l ) { c o n s t c = r [ l ] ; i f ( c . c h a r A t ( 0 ) = = = " $ " ) c o n t i n u e ; i f ( c = = = " o p t i o n s " ) { i . p u s h ( . . . t h i s . _ a n i m a t e O p t i o n s ( t , s ) ) ; c o n t i n u e } c o n s t d = s [ c ] ; l e t u = o [ c ] ; c o n s t f = n . g e t ( c ) ; i f ( u ) i f ( f & & u . a c t i v e ( ) ) { u . u p d a t e ( f , d , a ) ; c o n t i n u e } e l s e u . c a n c e l ( ) ; i f ( ! f | | ! f . d u r a t i o n ) { t [ c ] = d ; c o n t i n u e } o [ c ] = u = n e w Q I ( f , t , c , d ) , i . p u s h ( u ) } r e t u r n i } u p d a t e ( t , s ) { i f ( t h i s . _ p r o p e r t i e s . s i z e
2024-03-21 02:03:08 -04:00
` )>-1?e.split( `
2024-06-18 03:16:42 +08:00
` ):e}function PR(e,t){const{element:s,datasetIndex:n,index:i}=t,o=e.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:e,label:r,parsed:o.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:s}}function Tp(e,t){const s=e.chart.ctx,{body:n,footer:i,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=re(t.bodyFont),c=re(t.titleFont),d=re(t.footerFont),u=o.length,f=i.length,g=n.length,m=be(t.padding);let b=m.height,v=0,w=n.reduce((T,y)=>T+y.before.length+y.lines.length+y.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,u&&(b+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),w){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;b+=g*T+(w-g)*l.lineHeight+(w-1)*t.bodySpacing}f&&(b+=t.footerMarginTop+f*d.lineHeight+(f-1)*t.footerSpacing);let E=0;const $ =function(T){v=Math.max(v,s.measureText(T).width+E)};return s.save(),s.font=c.string,zt(e.title, $ ),s.font=l.string,zt(e.beforeBody.concat(e.afterBody), $ ),E=t.displayColors?r+2+t.boxPadding:0,zt(n,T=>{zt(T.before, $ ),zt(T.lines, $ ),zt(T.after, $ )}),E=0,s.font=d.string,zt(e.footer, $ ),s.restore(),v+=m.width,{width:v,height:b}}function kR(e,t){const{y:s,height:n}=t;return s<n/2?"top":s>e.height-n/2?"bottom":"center"}function TR(e,t,s,n){const{x:i,width:o}=n,r=s.caretSize+s.caretPadding;if(e==="left"&&i+o+r>t.width||e==="right"&&i-o-r<0)return!0}function MR(e,t,s,n){const{x:i,width:o}=s,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return n==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),TR(c,e,t,s)&&(c="center"),c}function Mp(e,t,s){const n=s.yAlign||t.yAlign||kR(e,s);return{xAlign:s.xAlign||t.xAlign||MR(e,t,s,n),yAlign:n}}function OR(e,t){let{x:s,width:n}=e;return t==="right"?s-=n:t==="center"&&(s-=n/2),s}function DR(e,t,s){let{y:n,height:i}=e;return t==="top"?n+=s:t==="bottom"?n-=i+s:n-=i/2,n}function Op(e,t,s,n){const{caretSize:i,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=s,c=i+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=Gn(r);let m=OR(t,a);const b=DR(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+i:a==="right"&&(m+=Math.max(u,g)+i),{x:de(m,0,n.width-t.width),y:de(b,0,n.height-t.height)}}function Gr(e,t,s){const n=be(s.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function Dp(e){return ds([],Ps(e))}function IR(e,t,s){return En(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function Ip(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}const bb={beforeTitle:As,title(e){if(e.length>0){const t=e[0],s=t.chart.data.labels,n=s?s.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return s[t.dataIndex]}return""},afterTitle:As,beforeBody:As,beforeLabel:As,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 s=e.formattedValue;return Ft(s)||(t+=s),t},labelColor(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:As,afterBody:As,beforeFooter:As,footer:As,afterFooter:As};function Pe(e,t,s,n){const i=e[t].call(s,n);return typeof i>"u"?bb[t].call(s,n):i}class jc extends js{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
$ { 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){he("/api/getWireguardConfigurationInfo",{configurationName:e},t=>{if(this.configurationInfo=t.data.configurationInfo,this.configurationPeers=t.data.configurationPeers,this.configurationPeers.forEach(s=>{s.restricted=!1}),t.data.configurationRestrictedPeers.forEach(s=>{s.restricted=!0,this.configurationPeers.push(s)}),this.loading=!1,this.configurationPeers.length>0){const s=this.configurationPeers.map(i=>i.total_sent+i.cumu_sent).reduce((i,o)=>i+o).toFixed(4),n=this.configurationPeers.map(i=>i.total_receive+i.cumu_receive).reduce((i,o)=>i+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==s&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,Xp().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((s-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:" #198754",tension:0}]}),this.historyDataSentDifference.push(s)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==n&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,Xp().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((n-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(n))}})},setInterval(){this.interval=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.map(e=>e.total_data+e.cumu_data).reduce((e,t)=>e+t):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.map(e=>e.total_receive+e.cumu_receive).reduce((e,t)=>e+t):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.map(e=>e.total_sent+e.cumu_sent).reduce((e,t)=>e+t):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 Zi(this.configurationPeers,{keys:["name","id","allowed_ip"]}),t=this.wireguardConfigurationStore.searchString?e.search(this.wireguardConfigurationStore.searchString).map(s=>s.item):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((s,n)=>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]>n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((s,n)=>s[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]<n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:s[this.dashboardConfigurationStore.Configuration.Serve