2024-10-29 14:57:29 +08:00
( function ( ) { const e = document . createElement ( "link" ) . relList ; if ( e && e . supports && e . supports ( "modulepreload" ) ) return ; for ( const s of document . querySelectorAll ( 'link[rel="modulepreload"]' ) ) i ( s ) ; new MutationObserver ( s => { for ( const r of s ) if ( r . type === "childList" ) for ( const o of r . addedNodes ) o . tagName === "LINK" && o . rel === "modulepreload" && i ( o ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function n ( s ) { const r = { } ; return s . integrity && ( r . integrity = s . integrity ) , s . referrerPolicy && ( r . referrerPolicy = s . referrerPolicy ) , s . crossOrigin === "use-credentials" ? r . credentials = "include" : s . crossOrigin === "anonymous" ? r . credentials = "omit" : r . credentials = "same-origin" , r } function i ( s ) { if ( s . ep ) return ; s . ep = ! 0 ; const r = n ( s ) ; fetch ( s . href , r ) } } ) ( ) ; var sx = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { } ; function VM ( t ) { return t && t . _ _esModule && Object . prototype . hasOwnProperty . call ( t , "default" ) ? t . default : t } function zM ( t ) { if ( t . _ _esModule ) return t ; var e = t . default ; if ( typeof e == "function" ) { var n = function i ( ) { return this instanceof i ? Reflect . construct ( e , arguments , this . constructor ) : e . apply ( this , arguments ) } ; n . prototype = e . prototype } else n = { } ; return Object . defineProperty ( n , "__esModule" , { value : ! 0 } ) , Object . keys ( t ) . forEach ( function ( i ) { var s = Object . getOwnPropertyDescriptor ( t , i ) ; Object . defineProperty ( n , i , s . get ? s : { enumerable : ! 0 , get : function ( ) { return t [ i ] } } ) } ) , n } var WM = { exports : { } } , ri = "top" , Mi = "bottom" , Ii = "right" , oi = "left" , ef = "auto" , Kl = [ ri , Mi , Ii , oi ] , aa = "start" , gl = "end" , rx = "clippingParents" , Ym = "viewport" , Ua = "popper" , ox = "reference" , Dp = Kl . reduce ( function ( t , e ) { return t . concat ( [ e + "-" + aa , e + "-" + gl ] ) } , [ ] ) , Hm = [ ] . concat ( Kl , [ ef ] ) . reduce ( function ( t , e ) { return t . concat ( [ e , e + "-" + aa , e + "-" + gl ] ) } , [ ] ) , ax = "beforeRead" , lx = "read" , cx = "afterRead" , ux = "beforeMain" , dx = "main" , hx = "afterMain" , fx = "beforeWrite" , gx = "write" , px = "afterWrite" , mx = [ ax , lx , cx , ux , dx , hx , fx , gx , px ] ; function Ns ( t ) { return t ? ( t . nodeName || "" ) . toLowerCase ( ) : null } function Di ( t ) { if ( t == null ) return window ; if ( t . toString ( ) !== "[object Window]" ) { var e = t . ownerDocument ; return e && e . defaultView || window } return t } function la ( t ) { var e = Di ( t ) . Element ; return t instanceof e || t instanceof Element } function Yi ( t ) { var e = Di ( t ) . HTMLElement ; return t instanceof e || t instanceof HTMLElement } function jm ( t ) { if ( typeof ShadowRoot > "u" ) return ! 1 ; var e = Di ( t ) . ShadowRoot ; return t instanceof e || t instanceof ShadowRoot } function YM ( t ) { var e = t . state ; Object . keys ( e . elements ) . forEach ( function ( n ) { var i = e . styles [ n ] || { } , s = e . attributes [ n ] || { } , r = e . elements [ n ] ; ! Yi ( r ) || ! Ns ( r ) || ( Object . assign ( r . style , i ) , Object . keys ( s ) . forEach ( function ( o ) { var a = s [ o ] ; a === ! 1 ? r . removeAttribute ( o ) : r . setAttribute ( o , a === ! 0 ? "" : a ) } ) ) } ) } function HM ( t ) { var e = t . state , n = { popper : { position : e . options . strategy , left : "0" , top : "0" , margin : "0" } , arrow : { position : "absolute" } , reference : { } } ; return Object . assign ( e . elements . popper . style , n . popper ) , e . styles = n , e . elements . arrow && Object . assign ( e . elements . arrow . style , n . arrow ) , function ( ) { Object . keys ( e . elements ) . forEach ( function ( i ) { var s = e . elements [ i ] , r = e . attributes [ i ] || { } , o = Object . keys ( e . styles . hasOwnProperty ( i ) ? e . styles [ i ] : n [ i ] ) , a = o . reduce ( function ( l , c ) { return l [ c ] = "" , l } , { } ) ; ! Yi ( s ) || ! Ns ( s ) || ( Object . assign ( s . style , a ) , Object . keys ( r ) . forEach ( function ( l ) { s . removeAttribute ( l ) } ) ) } ) } } const Km = { name : "applyStyles" , enabled : ! 0 , phase : "write" , fn : YM , effect : HM , requires : [ "computeStyles" ] } ; function Rs ( t ) { return t . split ( "-" ) [ 0 ] } var ea = Math . max , gh = Math . min , pl = Math . round ; function Rp ( ) { var t = navigator . userAgentData ; return t != null && t . brands && Array . isArray ( t . brands ) ? t . brands . map ( function ( e ) { return e . brand + "/" + e . version } ) . join ( " " ) : navigator . userAgent } function _x ( ) { return ! /^((?!chrome|android).)*safari/i . test ( Rp ( ) ) } function ml ( t , e , n ) { e === void 0 && ( e = ! 1 ) , n === void 0 && ( n = ! 1 ) ; var i = t . getBoundingClientRect ( ) , s = 1 , r = 1 ; e && Yi ( t ) && ( s = t . offsetWidth > 0 && pl ( i . width ) / t . offsetWidth || 1 , r = t . offsetHeight > 0 && pl ( i . height ) / t . offsetHeight || 1 ) ; var o = la ( t ) ? Di ( t ) : window , a = o . visualViewport , l = ! _x ( ) && n , c = ( i . left + ( l && a ? a . offsetLeft : 0 ) ) / s , u = ( i . top + ( l && a ? a . offsetTop : 0 ) ) / r , d = i . width / s , f = i . height / r ; return { width : d , height : f , top : u , right : c + d , bottom : u + f , left : c , x : c , y : u } } function Um ( t ) { var e = ml ( t ) , n = t . offsetWidth , i =
2024-10-04 16:58:47 +08:00
* Bootstrap v5 . 3.3 ( https : //getbootstrap.com/)
* Copyright 2011 - 2024 The Bootstrap Authors ( https : //github.com/twbs/bootstrap/graphs/contributors)
2024-03-21 02:03:08 -04:00
* Licensed under MIT ( https : //github.com/twbs/bootstrap/blob/main/LICENSE)
2024-10-29 14:57:29 +08:00
* /(function(t,e){(function(n,i){t.exports=i(II)})(sx,function(n){function i(G){const _=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(G){for(const M in G)if(M!=="default"){const q=Object.getOwnPropertyDescriptor(G,M);Object.defineProperty(_,M,q.get?q:{enumerable:!0,get:()=>G[M]})}}return _.default=G,Object.freeze(_)}const s=i(n),r=new Map,o={set(G,_,M){r.has(G)||r.set(G,new Map);const q=r.get(G);if(!q.has(_)&&q.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(q.keys())[0]}.`);return}q.set(_,M)},get(G,_){return r.has(G)&&r.get(G).get(_)||null},remove(G,_){if(!r.has(G))return;const M=r.get(G);M.delete(_),M.size===0&&r.delete(G)}},a=1e6,l=1e3,c="transitionend",u=G=>(G&&window.CSS&&window.CSS.escape&&(G=G.replace(/ # ( [ ^ \ s "#']+)/g,(_,M)=>`#${CSS.escape(M)}`)),G),d=G=>G==null?`${G}`:Object.prototype.toString.call(G).match(/\s([a-z]+)/i)[1].toLowerCase(),f=G=>{do G+=Math.floor(Math.random()*a);while(document.getElementById(G));return G},g=G=>{if(!G)return 0;let{transitionDuration:_,transitionDelay:M}=window.getComputedStyle(G);const q=Number.parseFloat(_),ye=Number.parseFloat(M);return!q&&!ye?0:(_=_.split(" , ")[0],M=M.split(" , ")[0],(Number.parseFloat(_)+Number.parseFloat(M))*l)},p=G=>{G.dispatchEvent(new Event(c))},m=G=>!G||typeof G!=" object "?!1:(typeof G.jquery<" u "&&(G=G[0]),typeof G.nodeType<" u "),v=G=>m(G)?G.jquery?G[0]:G:typeof G==" string "&&G.length>0?document.querySelector(u(G)):null,y=G=>{if(!m(G)||G.getClientRects().length===0)return!1;const _=getComputedStyle(G).getPropertyValue(" visibility ")===" visible ",M=G.closest(" details : not ( [ open ] ) ");if(!M)return _;if(M!==G){const q=G.closest(" summary ");if(q&&q.parentNode!==M||q===null)return!1}return _},x=G=>!G||G.nodeType!==Node.ELEMENT_NODE||G.classList.contains(" disabled ")?!0:typeof G.disabled<" u "?G.disabled:G.hasAttribute(" disabled ")&&G.getAttribute(" disabled ")!==" false ",E=G=>{if(!document.documentElement.attachShadow)return null;if(typeof G.getRootNode==" function "){const _=G.getRootNode();return _ instanceof ShadowRoot?_:null}return G instanceof ShadowRoot?G:G.parentNode?E(G.parentNode):null},w=()=>{},b=G=>{G.offsetHeight},C=()=>window.jQuery&&!document.body.hasAttribute(" data - bs - no - jquery ")?window.jQuery:null,k=[],T=G=>{document.readyState===" loading "?(k.length||document.addEventListener(" DOMContentLoaded ",()=>{for(const _ of k)_()}),k.push(G)):G()},A=()=>document.documentElement.dir===" rtl ",I=G=>{T(()=>{const _=C();if(_){const M=G.NAME,q=_.fn[M];_.fn[M]=G.jQueryInterface,_.fn[M].Constructor=G,_.fn[M].noConflict=()=>(_.fn[M]=q,G.jQueryInterface)}})},V=(G,_=[],M=G)=>typeof G==" function "?G(..._):M,Y=(G,_,M=!0)=>{if(!M){V(G);return}const ye=g(_)+5;let Oe=!1;const $e=({target:rt})=>{rt===_&&(Oe=!0,_.removeEventListener(c,$e),V(G))};_.addEventListener(c,$e),setTimeout(()=>{Oe||p(_)},ye)},ne=(G,_,M,q)=>{const ye=G.length;let Oe=G.indexOf(_);return Oe===-1?!M&&q?G[ye-1]:G[0]:(Oe+=M?1:-1,q&&(Oe=(Oe+ye)%ye),G[Math.max(0,Math.min(Oe,ye-1))])},N=/[^.]*(?=\..*)\.|.*/,B=/\..*/,R=/::\d+$/,z={};let X=1;const J={mouseenter:" mouseover ",mouseleave:" mouseout "},H=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 ce ( G , _ ) { return _ && ` ${ _ } :: ${ X ++ } ` || G . uidEvent || X ++ } function ie ( G ) { const _ = ce ( G ) ; return G . uidEvent = _ , z [ _ ] = z [ _ ] || { } , z [ _ ] } function te ( G , _ ) { return function M ( q ) { return fe ( q , { delegateTarget : G } ) , M . oneOff && W . off ( G , q . type , _ ) , _ . apply ( G , [ q ] ) } } function D ( G , _ , M ) { return function q ( ye ) { const Oe = G . querySelectorAll ( _ ) ; for ( let { target : $e } = ye ; $e && $e !== this ; $e = $e . parentNode ) for ( const rt of Oe ) if ( rt === $e ) return fe ( ye , { delegateT
2024-10-04 16:58:47 +08:00
* @ vue / shared v3 . 5.11
2024-06-18 03:16:42 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-10-29 14:57:29 +08:00
* * //*! #__NO_SIDE_EFFECTS__ */function t_(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const Mt={},rl=[],$s=()=>{},DI=()=>!1,sf=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),n_=t=>t.startsWith("onUpdate:"),vn=Object.assign,i_=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},RI=Object.prototype.hasOwnProperty,wt=(t,e)=>RI.call(t,e),Ke=Array.isArray,ol=t=>Lu(t)==="[object Map]",Ul=t=>Lu(t)==="[object Set]",Gy=t=>Lu(t)==="[object Date]",Je=t=>typeof t=="function",jt=t=>typeof t=="string",Fs=t=>typeof t=="symbol",It=t=>t!==null&&typeof t=="object",Px=t=>(It(t)||Je(t))&&Je(t.then)&&Je(t.catch),Mx=Object.prototype.toString,Lu=t=>Mx.call(t),$I=t=>Lu(t).slice(8,-1),Ix=t=>Lu(t)==="[object Object]",s_=t=>jt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Lc=t_(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),rf=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},LI=/-(\w)/g,Ui=rf(t=>t.replace(LI,(e,n)=>n?n.toUpperCase():"")),OI=/\B([A-Z])/g,go=rf(t=>t.replace(OI,"-$1").toLowerCase()),of=rf(t=>t.charAt(0).toUpperCase()+t.slice(1)),vg=rf(t=>t?`on${of(t)}`:""),so=(t,e)=>!Object.is(t,e),nh=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},Dx=(t,e,n,i=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},ph=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Rx=t=>{const e=jt(t)?Number(t):NaN;return isNaN(e)?t:e};let Xy;const $x=()=>Xy||(Xy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mn(t){if(Ke(t)){const e={};for(let n=0;n<t.length;n++){const i=t[n],s=jt(i)?VI(i):Mn(i);if(s)for(const r in s)e[r]=s[r]}return e}else if(jt(t)||It(t))return t}const NI=/;(?![^(]*\))/g,FI=/:([^]+)/,BI=/\/\*[^]*?\*\//g;function VI(t){const e={};return t.replace(BI,"").split(NI).forEach(n=>{if(n){const i=n.split(FI);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Se(t){let e="";if(jt(t))e=t;else if(Ke(t))for(let n=0;n<t.length;n++){const i=Se(t[n]);i&&(e+=i+" ")}else if(It(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function In(t){if(!t)return null;let{class:e,style:n}=t;return e&&!jt(e)&&(t.class=Se(e)),n&&(t.style=Mn(n)),t}const zI="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",WI=t_(zI);function Lx(t){return!!t||t===""}function YI(t,e){if(t.length!==e.length)return!1;let n=!0;for(let i=0;n&&i<t.length;i++)n=ca(t[i],e[i]);return n}function ca(t,e){if(t===e)return!0;let n=Gy(t),i=Gy(e);if(n||i)return n&&i?t.getTime()===e.getTime():!1;if(n=Fs(t),i=Fs(e),n||i)return t===e;if(n=Ke(t),i=Ke(e),n||i)return n&&i?YI(t,e):!1;if(n=It(t),i=It(e),n||i){if(!n||!i)return!1;const s=Object.keys(t).length,r=Object.keys(e).length;if(s!==r)return!1;for(const o in t){const a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!ca(t[o],e[o]))return!1}}return String(t)===String(e)}function r_(t,e){return t.findIndex(n=>ca(n,e))}const Ox=t=>!!(t&&t.__v_isRef===!0),pe=t=>jt(t)?t:t==null?"":Ke(t)||It(t)&&(t.toString===Mx||!Je(t.toString))?Ox(t)?pe(t.value):JSON.stringify(t,Nx,2):String(t),Nx=(t,e)=>Ox(e)?Nx(t,e.value):ol(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[yg(i,r)+" =>"]=s,n),{})}:Ul(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>yg(n))}:Fs(e)?yg(e):It(e)&&!Ke(e)&&!Ix(e)?String(e):e,yg=(t,e="")=>{var n;return Fs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
2024-10-04 16:58:47 +08:00
* @ vue / reactivity v3 . 5.11
2024-06-18 03:16:42 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-10-29 14:57:29 +08:00
* * / l e t e i ; c l a s s F x { c o n s t r u c t o r ( e = ! 1 ) { t h i s . d e t a c h e d = e , 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 . _ i s P a u s e d = ! 1 , t h i s . p a r e n t = e i , ! e & & e i & & ( t h i s . i n d e x = ( e i . s c o p e s | | ( e i . 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 } p a u s e ( ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ i s P a u s e d = ! 0 ; l e t e , n ; i f ( t h i s . s c o p e s ) f o r ( e = 0 , n = t h i s . s c o p e s . l e n g t h ; e < n ; e + + ) t h i s . s c o p e s [ e ] . p a u s e ( ) ; f o r ( e = 0 , n = t h i s . e f f e c t s . l e n g t h ; e < n ; e + + ) t h i s . e f f e c t s [ e ] . p a u s e ( ) } } r e s u m e ( ) { i f ( t h i s . _ a c t i v e & & t h i s . _ i s P a u s e d ) { t h i s . _ i s P a u s e d = ! 1 ; l e t e , n ; i f ( t h i s . s c o p e s ) f o r ( e = 0 , n = t h i s . s c o p e s . l e n g t h ; e < n ; e + + ) t h i s . s c o p e s [ e ] . r e s u m e ( ) ; f o r ( e = 0 , n = t h i s . e f f e c t s . l e n g t h ; e < n ; e + + ) t h i s . e f f e c t s [ e ] . r e s u m e ( ) } } r u n ( e ) { i f ( t h i s . _ a c t i v e ) { c o n s t n = e i ; t r y { r e t u r n e i = t h i s , e ( ) } f i n a l l y { e i = n } } } o n ( ) { e i = t h i s } o f f ( ) { e i = t h i s . p a r e n t } s t o p ( e ) { i f ( t h i s . _ a c t i v e ) { l e t n , i ; f o r ( n = 0 , i = t h i s . e f f e c t s . l e n g t h ; n < i ; n + + ) t h i s . e f f e c t s [ n ] . s t o p ( ) ; f o r ( n = 0 , i = t h i s . c l e a n u p s . l e n g t h ; n < i ; n + + ) t h i s . c l e a n u p s [ n ] ( ) ; i f ( t h i s . s c o p e s ) f o r ( n = 0 , i = t h i s . s c o p e s . l e n g t h ; n < i ; n + + ) t h i s . s c o p e s [ n ] . 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 & & ! e ) { c o n s t s = t h i s . p a r e n t . s c o p e s . p o p ( ) ; s & & s ! = = 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 ] = s , s . 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 B x ( t ) { r e t u r n n e w F x ( t ) } f u n c t i o n a f ( ) { r e t u r n e i } f u n c t i o n o _ ( t , e = ! 1 ) { e i & & e i . c l e a n u p s . p u s h ( t ) } l e t R t ; c o n s t b g = n e w W e a k S e t ; c l a s s V x { c o n s t r u c t o r ( e ) { t h i s . f n = e , t h i s . d e p s = v o i d 0 , t h i s . d e p s T a i l = v o i d 0 , t h i s . f l a g s = 5 , t h i s . n e x t = v o i d 0 , t h i s . c l e a n u p = v o i d 0 , t h i s . s c h e d u l e r = v o i d 0 , e i & & e i . a c t i v e & & e i . e f f e c t s . p u s h ( t h i s ) } p a u s e ( ) { t h i s . f l a g s | = 6 4 } r e s u m e ( ) { t h i s . f l a g s & 6 4 & & ( t h i s . f l a g s & = - 6 5 , b g . h a s ( t h i s ) & & ( b g . d e l e t e ( t h i s ) , t h i s . t r i g g e r ( ) ) ) } n o t i f y ( ) { t h i s . f l a g s & 2 & & ! ( t h i s . f l a g s & 3 2 ) | | t h i s . f l a g s & 8 | | W x ( t h i s ) } r u n ( ) { i f ( ! ( t h i s . f l a g s & 1 ) ) r e t u r n t h i s . f n ( ) ; t h i s . f l a g s | = 2 , q y ( t h i s ) , Y x ( t h i s ) ; c o n s t e = R t , n = u s ; R t = t h i s , u s = ! 0 ; t r y { r e t u r n t h i s . f n ( ) } f i n a l l y { H x ( t h i s ) , R t = e , u s = n , t h i s . f l a g s & = - 3 } } s t o p ( ) { i f ( t h i s . f l a g s & 1 ) { f o r ( l e t e = t h i s . d e p s ; e ; e = e . n e x t D e p ) c _ ( e ) ; t h i s . d e p s = t h i s . d e p s T a i l = v o i d 0 , q y ( 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 . f l a g s & = - 2 } } t r i g g e r ( ) { t h i s . f l a g s & 6 4 ? b g . a d d ( t h i s ) : t h i s . s c h e d u l e r ? t h i s . s c h e d u l e r ( ) : t h i s . r u n I f D i r t y ( ) } r u n I f D i r t y ( ) { L p ( t h i s ) & & t h i s . r u n ( ) } g e t d i r t y ( ) { r e t u r n L p ( t h i s ) } } l e t z x = 0 , O c , N c ; f u n c t i o n W x ( t , e = ! 1 ) { i f ( t . f l a g s | = 8 , e ) { t . n e x t = N c , N c = t ; r e t u r n } t . n e x t = O c , O c = t } f u n c t i o n a _ ( ) { z x + + } f u n c t i o n l _ ( ) { i f ( - - z x > 0 ) r e t u r n ; i f ( N c ) { l e t e = N c ; f o r ( N c = v o i d 0 ; e ; ) { c o n s t n = e . n e x t ; e . n e x t = v o i d 0 , e . f l a g s & = - 9 , e = n } } l e t t ; f o r ( ; O c ; ) { l e t e = O c ; f o r ( O c = v o i d 0 ; e ; ) { c o n s t n = e . n e x t ; i f ( e . n e x t = v o i d 0 , e . f l a g s & = - 9 , e . f l a g s & 1 ) t r y { e . t r i g g e r ( ) } c a t c h ( i ) { t | | ( t = i ) } e = n } } i f ( t ) t h r o w t } f u n c t i o n Y x ( t ) { f o r ( l e t e = t . d e p s ; e ; e = e . n e x t D e p ) e . v e r s i o n = - 1 , e . p r e v A c t i v e L i n k = e . d e p . a c t i v e L i n k , e . d e p . a c t i v e L i n k = e } f u n c t i o n H x ( t ) { l e t e , n = t . d e p s T a i l , i = n ; f o r ( ; i ; ) { c o n s t s = i . p r e v D e p ; i . v e r s i o n = = = - 1 ? ( i = = = n & & ( n = s ) , c _ ( i ) , H I ( i ) ) : e = i , i . d e p . a c t i v e L i n k = i . p r e v A c t i v e L i n k , i . p r e v A c t i v e L i n k = v o i d 0 , i = s } t . d e p s = e , t . d e p s T a i l = n } f u n c t i o n L p ( t ) { f o r ( l e t e = t . d e p s ; e ; e = e . n e x t D e p ) i f ( e . d e p . v e r s i o n ! = = e . v e r s i o n | | e . d e p . c o m p u t e d & & ( j x ( e . d e p . c o m p u t e d ) | | e . d e p . v e r s i o n ! = = e . v e r s i o n ) ) r e t u r n ! 0 ; r e t u r n ! ! t . _ d i r t y } f u n c t i o n j x ( t ) { i f ( t . f l a g s & 4 & & ! ( t . f l a g s & 1 6 ) | | ( t . f l a g s & = - 1 7 , t . g l o b a l V e r s i o n = = = Q c ) ) r e t u r n ; t . g l o b a l V e r s i o n = Q c ; c o n s t e = t . d e p ; i f ( t . f l a g s | = 2 , e . v e r s i o n > 0 & & ! t . i s S S R & & t . d e p s & & ! L p ( t ) ) { t . f l a g s & = - 3 ; r e t u r n } c o n s t n = R t , i = u s ; R t = t , u s = ! 0 ; t r y { Y x ( t ) ; c o n s t s = t . f n ( t . _ v a l u e ) ; ( e . v e r s i o n = = = 0 | | s o ( s , t . _ v a l u e ) ) & & ( t . _ v a l u e = s , e . v e r s i o n + + ) } c a t c h ( s ) { t h r o w e . v e r s i o n + + , s } f i n a l l y { R t = n , u s = i , H x ( t ) , t . f l a g s & = - 3 } } f u n c t i o n c _ ( t , e = ! 1 ) { c o n s t { d e p : n , p r e v S u b : i , n e x t S u b : s } = t ; i f ( i & & ( i . n e x t S u b = s , t . p r e v S u b = v o i d 0 ) , s & & ( s . p r e v S u b = i , t . n e x t S u b = v o i d 0 ) , n . s u b s = = = t & & ( n . s u b s = i ) , ! n . s u b s & & n . c o m p u t e d ) { n . c o m p u t e d . f l a g s & = - 5 ; f o r ( l e t r = n . c o m p u t e d . d e p s ; r ; r = r . n e x t D e p ) c _ ( r , ! 0 ) } ! e & & ! - - n . s c & & n . m a p & & n . m a p . d e l e t e ( n . k e y ) } f u n c t i o n H I ( t ) { c o n s t { p r e v D e p : e , n e x t D e p : n } = t ; e & & ( e . n e x t D e p = n , t . p r e v D e p = v o i d 0 ) , n & & ( n . p r e v D e p = e , t . n e x t D e p = v o i d 0 ) } l e t u s = ! 0 ; c o n s t K x = [ ] ; f u n c t i o n p o ( ) { K x . p u s h ( u s ) , u s = ! 1 } f u n c t i o n m o ( ) { c o n s t t = K x . p o p ( ) ; u s = t = = = v o i d 0 ? ! 0 : t } f u n c t i o n q y ( t ) { c o n s t { c l e a n u p : e } = t ; i f ( t . c l e a n u p = v o i d 0 , e ) { c o n s t n = R t ; R t = v o i d 0 ; t r y { e ( ) } f i n a l l y { R t = n } } } l e t Q c = 0 ; c l a s s j I { c o n s t r u c t o r ( e , n ) { t h i s . s u b = e , t h i s . d e p = n , t h i s . v e r s i o n = n . v e r s i o n , t h i s . n e x t D e p = t h i s . p r e v D e p = t h i s . n e x t S u b = t h i s . p r e v S u b = t h i s . p r e v A c t i v e L i n k = v o i d 0 } } c l a s s u _ { c o n s t r u c t o r ( e ) { t h i s . c o m p u t e
2024-10-04 16:58:47 +08:00
* @ vue / runtime - core v3 . 5.11
2024-06-18 03:16:42 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-10-29 14:57:29 +08:00
* * /function Nu(t,e,n,i){try{return i?t(...i):t()}catch(s){Fu(s,e,n)}}function fs(t,e,n,i){if(Je(t)){const s=Nu(t,e,n,i);return s&&Px(s)&&s.catch(r=>{Fu(r,e,n)}),s}if(Ke(t)){const s=[];for(let r=0;r<t.length;r++)s.push(fs(t[r],e,n,i));return s}}function Fu(t,e,n,i=!0){const s=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||Mt;if(e){let a=e.parent;const l=e.proxy,c=`https:/ / vuejs . org / error - reference / # runtime - $ { n } ` ;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](t,l,c)===!1)return}a=a.parent}if(r){po(),Nu(r,null,10,[t,l,c]),mo();return}}wD(t,n,s,i,o)}function wD(t,e,n,i=!0,s=!1){if(s)throw t;console.error(t)}const ti=[];let ws=-1;const al=[];let Vr=null,Ga=0;const rE=Promise.resolve();let vh=null;function Rn(t){const e=vh||rE;return t?e.then(this?t.bind(this):t):e}function xD(t){let e=ws+1,n=ti.length;for(;e<n;){const i=e+n>>>1,s=ti[i],r=nu(s);r<t||r===t&&s.flags&2?e=i+1:n=i}return e}function p_(t){if(!(t.flags&1)){const e=nu(t),n=ti[ti.length-1];!n||!(t.flags&2)&&e>=nu(n)?ti.push(t):ti.splice(xD(e),0,t),t.flags|=1,oE()}}function oE(){vh||(vh=rE.then(lE))}function Np(t){Ke(t)?al.push(...t):Vr&&t.id===-1?Vr.splice(Ga+1,0,t):t.flags&1||(al.push(t),t.flags|=1),oE()}function nb(t,e,n=ws+1){for(;n<ti.length;n++){const i=ti[n];if(i&&i.flags&2){if(t&&i.id!==t.uid)continue;ti.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function aE(t){if(al.length){const e=[...new Set(al)].sort((n,i)=>nu(n)-nu(i));if(al.length=0,Vr){Vr.push(...e);return}for(Vr=e,Ga=0;Ga<Vr.length;Ga++){const n=Vr[Ga];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Vr=null,Ga=0}}const nu=t=>t.id==null?t.flags&2?-1:1/0:t.id;function lE(t){try{for(ws=0;ws<ti.length;ws++){const e=ti[ws];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Nu(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;ws<ti.length;ws++){const e=ti[ws];e&&(e.flags&=-2)}ws=-1,ti.length=0,aE(),vh=null,(ti.length||al.length)&&lE()}}let wn=null,cE=null;function yh(t){const e=wn;return wn=t,cE=t&&t.type.__scopeId||null,e}function Me(t,e=wn,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&pb(-1);const r=yh(e);let o;try{o=t(...s)}finally{yh(r),i._d&&pb(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function Re(t,e){if(wn===null)return t;const n=_f(wn),i=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[r,o,a,l=Mt]=e[s];r&&(Je(r)&&(r={mounted:r,updated:r}),r.deep&&rr(o),i.push({dir:r,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return t}function Ro(t,e,n,i){const s=t.dirs,r=e&&e.dirs;for(let o=0;o<s.length;o++){const a=s[o];r&&(a.oldValue=r[o].value);let l=a.dir[i];l&&(po(),fs(l,n,8,[t.el,a,t,e]),mo())}}const uE=Symbol("_vte"),dE=t=>t.__isTeleport,Fc=t=>t&&(t.disabled||t.disabled===""),ED=t=>t&&(t.defer||t.defer===""),ib=t=>typeof SVGElement<"u"&&t instanceof SVGElement,sb=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Fp=(t,e)=>{const n=t&&t.to;return jt(n)?e?e(n):null:n},CD={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:g,querySelector:p,createText:m,createComment:v}}=c,y=Fc(e.props);let{shapeFlag:x,children:E,dynamicChildren:w}=e;if(t==null){const b=e.el=m(""),C=e.anchor=m("");g(b,n,i),g(C,n,i);const k=(A,I)=>{x&16&&(s&&s.isCE&&(s.ce._teleportTarget=A),u(E,A,I,s,r,o,a,l))},T=()=>{const A=e.target=Fp(e.props,p),I=hE(A,e,m,g);A&&(o!=="svg"&&ib(A)?o="svg":o!=="mathml"&&sb(A)&&(o="mathml"),y||(k(A,I),ih(e)))};y&&(k(n,C),ih(e)),ED(e.props)?fi(T,r):T()}else{e.el=t.el,e.targetStart=t.targetStart;const b=e.anchor=t.anchor,C=e.target=t.target,k=e.targetAnchor=t.targetAnchor,T=Fc(t.props),A=T?n:C,I=T?b:k;if(o==="svg"||ib(C)?o="svg":(o==="mathml"||sb(C))&&(o="mathml"),w?(f(t.dynamicChildren,w,A,s,r,o,a),y_(t,e,!0)):l||d(t,e,A,I,s,r,o,a,!1),y)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):xd(e,n,b,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const V=e.target=Fp(e.props,p);V&&xd(e,V,null,c,0)}else T&&xd(e,C,k,c,1);ih(e)}},remove(t,e,n,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:
2024-10-04 16:58:47 +08:00
* @ vue / runtime - dom v3 . 5.11
2024-06-18 03:16:42 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-10-29 14:57:29 +08:00
* * /let Gp;const vb=typeof window<"u"&&window.trustedTypes;if(vb)try{Gp=vb.createPolicy("vue",{createHTML:t=>t})}catch{}const JE=Gp?t=>Gp.createHTML(t):t=>t,AR="http:/ / www . w3 . org / 2000 / svg ",PR=" http : //www.w3.org/1998/Math/MathML",tr=typeof document<"u"?document:null,yb=tr&&tr.createElement("template"),MR={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?tr.createElementNS(AR,t):e==="mathml"?tr.createElementNS(PR,t):n?tr.createElement(t,{is:n}):tr.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>tr.createTextNode(t),createComment:t=>tr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>tr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,r){const o=n?n.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===r||!(s=s.nextSibling)););else{yb.innerHTML=JE(i==="svg"?`<svg>${t}</svg>`:i==="mathml"?`<math>${t}</math>`:t);const a=yb.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Tr="transition",oc="animation",wl=Symbol("_vtc"),QE={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},eC=vn({},gE,QE),IR=t=>(t.displayName="Transition",t.props=eC,t),xt=IR((t,{slots:e})=>ha(AD,tC(t),e)),Lo=(t,e=[])=>{Ke(t)?t.forEach(n=>n(...e)):t&&t(...e)},bb=t=>t?Ke(t)?t.some(e=>e.length>1):t.length>1:!1;function tC(t){const e={};for(const Y in t)Y in QE||(e[Y]=t[Y]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=t,p=DR(s),m=p&&p[0],v=p&&p[1],{onBeforeEnter:y,onEnter:x,onEnterCancelled:E,onLeave:w,onLeaveCancelled:b,onBeforeAppear:C=y,onAppear:k=x,onAppearCancelled:T=E}=e,A=(Y,ne,N)=>{Or(Y,ne?u:a),Or(Y,ne?c:o),N&&N()},I=(Y,ne)=>{Y._isLeaving=!1,Or(Y,d),Or(Y,g),Or(Y,f),ne&&ne()},V=Y=>(ne,N)=>{const B=Y?k:x,R=()=>A(ne,Y,N);Lo(B,[ne,R]),wb(()=>{Or(ne,Y?l:r),qs(ne,Y?u:a),bb(B)||xb(ne,i,m,R)})};return vn(e,{onBeforeEnter(Y){Lo(y,[Y]),qs(Y,r),qs(Y,o)},onBeforeAppear(Y){Lo(C,[Y]),qs(Y,l),qs(Y,c)},onEnter:V(!1),onAppear:V(!0),onLeave(Y,ne){Y._isLeaving=!0;const N=()=>I(Y,ne);qs(Y,d),qs(Y,f),iC(),wb(()=>{Y._isLeaving&&(Or(Y,d),qs(Y,g),bb(w)||xb(Y,i,v,N))}),Lo(w,[Y,N])},onEnterCancelled(Y){A(Y,!1),Lo(E,[Y])},onAppearCancelled(Y){A(Y,!0),Lo(T,[Y])},onLeaveCancelled(Y){I(Y),Lo(b,[Y])}})}function DR(t){if(t==null)return null;if(It(t))return[Tg(t.enter),Tg(t.leave)];{const e=Tg(t);return[e,e]}}function Tg(t){return Rx(t)}function qs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[wl]||(t[wl]=new Set)).add(e)}function Or(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[wl];n&&(n.delete(e),n.size||(t[wl]=void 0))}function wb(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let RR=0;function xb(t,e,n,i){const s=t._endId=++RR,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=nC(t,e);if(!o)return i();const c=o+"end";let u=0;const d=()=>{t.removeEventListener(c,f),r()},f=g=>{g.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,f)}function nC(t,e){const n=window.getComputedStyle(t),i=p=>(n[p]||"").split(", "),s=i(`${Tr}Delay`),r=i(`${Tr}Duration`),o=Eb(s,r),a=i(`${oc}Delay`),l=i(`${oc}Duration`),c=Eb(a,l);let u=null,d=0,f=0;e===Tr?o>0&&(u=Tr,d=o,f=r.length
2024-10-04 16:58:47 +08:00
* pinia v2 . 2.4
* ( c ) 2024 Eduardo San Martin Morote
2024-03-21 02:03:08 -04:00
* @ license MIT
2024-10-29 14:57:29 +08:00
* /let fC;const vf=t=>fC=t,gC=Symbol();function qp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var zc;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(zc||(zc={}));function u$(){const t=Bx(!0),e=t.run(()=>me({}));let n=[],i=[];const s=uf({install(r){vf(s),s._a=r,r.provide(gC,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!c$?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const pC=()=>{};function Bb(t,e,n,i=pC){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&af()&&o_(s),s}function Ra(t,...e){t.slice().forEach(n=>{n(...e)})}const d$=t=>t(),Vb=Symbol(),Mg=Symbol();function Zp(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];qp(s)&&qp(i)&&t.hasOwnProperty(n)&&!Ht(i)&&!Qr(i)?t[n]=Zp(s,i):t[n]=i}return t}const h$=Symbol();function f$(t){return!qp(t)||!t.hasOwnProperty(h$)}const{assign:Nr}=Object;function g$(t){return!!(Ht(t)&&t.effect)}function p$(t,e,n,i){const{state:s,actions:r,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=gD(n.state.value[t]);return Nr(u,r,Object.keys(o||{}).reduce((d,f)=>(d[f]=uf(ve(()=>{vf(n);const g=n._s.get(t);return o[f].call(g,g)})),d),{}))}return l=mC(t,c,e,n,i,!0),l}function mC(t,e,n={},i,s,r){let o;const a=Nr({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],g;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),me({});let m;function v(T){let A;c=u=!1,typeof T=="function"?(T(i.state.value[t]),A={type:zc.patchFunction,storeId:t,events:g}):(Zp(i.state.value[t],T),A={type:zc.patchObject,payload:T,storeId:t,events:g});const I=m=Symbol();Rn().then(()=>{m===I&&(c=!0)}),u=!0,Ra(d,A,i.state.value[t])}const y=r?function(){const{state:A}=n,I=A?A():{};this.$patch(V=>{Nr(V,I)})}:pC;function x(){o.stop(),d=[],f=[],i._s.delete(t)}const E=(T,A="")=>{if(Vb in T)return T[Mg]=A,T;const I=function(){vf(i);const V=Array.from(arguments),Y=[],ne=[];function N(z){Y.push(z)}function B(z){ne.push(z)}Ra(f,{args:V,name:I[Mg],store:b,after:N,onError:B});let R;try{R=T.apply(this&&this.$id===t?this:b,V)}catch(z){throw Ra(ne,z),z}return R instanceof Promise?R.then(z=>(Ra(Y,z),z)).catch(z=>(Ra(ne,z),Promise.reject(z))):(Ra(Y,R),R)};return I[Vb]=!0,I[Mg]=A,I},w={_p:i,$id:t,$onAction:Bb.bind(null,f),$patch:v,$reset:y,$subscribe(T,A={}){const I=Bb(d,T,A.detached,()=>V()),V=o.run(()=>Zt(()=>i.state.value[t],Y=>{(A.flush==="sync"?u:c)&&T({storeId:t,type:zc.direct,events:g},Y)},Nr({},l,A)));return I},$dispose:x},b=Ei(w);i._s.set(t,b);const k=(i._a&&i._a.runWithContext||d$)(()=>i._e.run(()=>(o=Bx()).run(()=>e({action:E}))));for(const T in k){const A=k[T];if(Ht(A)&&!g$(A)||Qr(A))r||(p&&f$(A)&&(Ht(A)?A.value=p[T]:Zp(A,p[T])),i.state.value[t][T]=A);else if(typeof A=="function"){const I=E(A,T);k[T]=I,a.actions[T]=A}}return Nr(b,k),Nr(lt(b),k),Object.defineProperty(b,"$state",{get:()=>i.state.value[t],set:T=>{v(A=>{Nr(A,T)})}}),i._p.forEach(T=>{Nr(b,o.run(()=>T({store:b,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(b.$state,p),c=!0,u=!0,b}function _C(t,e,n){let i,s;const r=typeof e=="function";typeof t=="string"?(i=t,s=r?n:e):(s=t,i=t.id);function o(a,l){const c=jD();return a=a||(c?ji(gC,null):null),a&&vf(a),a=fC,a._s.has(i)||(r?mC(i,e,s,a):p$(i,s,a)),a._s.get(i)}return o.$id=i,o}/ * !
2024-10-04 16:58:47 +08:00
* vue - router v4 . 4.5
* ( c ) 2024 Eduardo San Martin Morote
2024-03-21 02:03:08 -04:00
* @ license MIT
2024-10-29 14:57:29 +08:00
* /const Xa=typeof document<"u";function vC(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function m$(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&vC(t.default)}const kt=Object.assign;function Ig(t,e){const n={};for(const i in e){const s=e[i];n[i]=gs(s)?s.map(t):t(s)}return n}const Wc=()=>{},gs=Array.isArray,yC=/ # / g , _$ = /&/g , v$ = /\//g , y$ = /=/g , b$ = /\?/g , bC = /\+/g , w$ = /%5B/g , x$ = /%5D/g , wC = /%5E/g , E$ = /%60/g , xC = /%7B/g , C$ = /%7C/g , EC = /%7D/g , S$ = /%20/g ; function C _ ( t ) { return encodeURI ( "" + t ) . replace ( C$ , "|" ) . replace ( w$ , "[" ) . replace ( x$ , "]" ) } function k$ ( t ) { return C _ ( t ) . replace ( xC , "{" ) . replace ( EC , "}" ) . replace ( wC , "^" ) } function Jp ( t ) { return C _ ( t ) . replace ( bC , "%2B" ) . replace ( S$ , "+" ) . replace ( yC , "%23" ) . replace ( _$ , "%26" ) . replace ( E$ , "`" ) . replace ( xC , "{" ) . replace ( EC , "}" ) . replace ( wC , "^" ) } function T$ ( t ) { return Jp ( t ) . replace ( y$ , "%3D" ) } function A$ ( t ) { return C _ ( t ) . replace ( yC , "%23" ) . replace ( b$ , "%3F" ) } function P$ ( t ) { return t == null ? "" : A$ ( t ) . replace ( v$ , "%2F" ) } function ou ( t ) { try { return decodeURIComponent ( "" + t ) } catch { } return "" + t } const M$ = /\/$/ , I$ = t => t . replace ( M$ , "" ) ; function Dg ( t , e , n = "/" ) { let i , s = { } , r = "" , o = "" ; const a = e . indexOf ( "#" ) ; let l = e . indexOf ( "?" ) ; return a < l && a >= 0 && ( l = - 1 ) , l > - 1 && ( i = e . slice ( 0 , l ) , r = e . slice ( l + 1 , a > - 1 ? a : e . length ) , s = t ( r ) ) , a > - 1 && ( i = i || e . slice ( 0 , a ) , o = e . slice ( a , e . length ) ) , i = L$ ( i ? ? e , n ) , { fullPath : i + ( r && "?" ) + r + o , path : i , query : s , hash : ou ( o ) } } function D$ ( t , e ) { const n = e . query ? t ( e . query ) : "" ; return e . path + ( n && "?" ) + n + ( e . hash || "" ) } function zb ( t , e ) { return ! e || ! t . toLowerCase ( ) . startsWith ( e . toLowerCase ( ) ) ? t : t . slice ( e . length ) || "/" } function R$ ( t , e , n ) { const i = e . matched . length - 1 , s = n . matched . length - 1 ; return i > - 1 && i === s && El ( e . matched [ i ] , n . matched [ s ] ) && CC ( e . params , n . params ) && t ( e . query ) === t ( n . query ) && e . hash === n . hash } function El ( t , e ) { return ( t . aliasOf || t ) === ( e . aliasOf || e ) } function CC ( t , e ) { if ( Object . keys ( t ) . length !== Object . keys ( e ) . length ) return ! 1 ; for ( const n in t ) if ( ! $$ ( t [ n ] , e [ n ] ) ) return ! 1 ; return ! 0 } function $$ ( t , e ) { return gs ( t ) ? Wb ( t , e ) : gs ( e ) ? Wb ( e , t ) : t === e } function Wb ( t , e ) { return gs ( e ) ? t . length === e . length && t . every ( ( n , i ) => n === e [ i ] ) : t . length === 1 && t [ 0 ] === e } function L$ ( t , e ) { if ( t . startsWith ( "/" ) ) return t ; if ( ! t ) return e ; const n = e . split ( "/" ) , i = t . split ( "/" ) , s = i [ i . length - 1 ] ; ( s === ".." || s === "." ) && i . push ( "" ) ; let r = n . length - 1 , o , a ; for ( o = 0 ; o < i . length ; o ++ ) if ( a = i [ o ] , a !== "." ) if ( a === ".." ) r > 1 && r -- ; else break ; return n . slice ( 0 , r ) . join ( "/" ) + "/" + i . slice ( o ) . join ( "/" ) } const Ar = { path : "/" , name : void 0 , params : { } , query : { } , hash : "" , fullPath : "/" , matched : [ ] , meta : { } , redirectedFrom : void 0 } ; var au ; ( function ( t ) { t . pop = "pop" , t . push = "push" } ) ( au || ( au = { } ) ) ; var Yc ; ( function ( t ) { t . back = "back" , t . forward = "forward" , t . unknown = "" } ) ( Yc || ( Yc = { } ) ) ; function O$ ( t ) { if ( ! t ) if ( Xa ) { const e = document . querySelector ( "base" ) ; t = e && e . getAttribute ( "href" ) || "/" , t = t . replace ( /^\w+:\/\/[^\/]+/ , "" ) } else t = "/" ; return t [ 0 ] !== "/" && t [ 0 ] !== "#" && ( t = "/" + t ) , I$ ( t ) } const N$ = /^[^#]+#/ ; function F$ ( t , e ) { return t . replace ( N$ , "#" ) + e } function B$ ( t , e ) { const n = document . documentElement . getBoundingClientRect ( ) , i = t . getBoundingClientRect ( ) ; return { behavior : e . behavior , left : i . left - n . left - ( e . left || 0 ) , top : i . top - n . top - ( e . top || 0 ) } } const yf = ( ) => ( { left : window . scrollX , top : window . scrollY } ) ; function V$ ( t ) { let e ; if ( "el" in t ) { const n = t . el , i = typeof n == "string" && n . startsWith ( "#" ) , s = typeof n == "string" ? i ? document . getElementById ( n . slice ( 1 ) ) : document . querySelector ( n ) : n ; if ( ! s ) return ; e = B$ ( s , t ) } else e = t ; "scrollBehavior" in document . documentElement . style ? window . scrollTo ( e ) : window . scrollTo ( e . left != null ? e . left : window . scrollX , e . top != null ? e . top : window . scrollY ) } function Yb ( t , e ) { return ( history . state ? history . state . position - e : - 1 ) + t } const Qp = new Map ; function z$ ( t , e ) { Qp . set ( t , e ) } function W$ ( t ) { const e = Qp . get ( t ) ; return Qp . delete ( t ) , e } let Y$ = ( ) => location . protocol + "//" + location . host ; function SC ( t , e ) { const { pathname : n , search : i , hash : s } = e , r = t . indexOf ( "#" ) ; if ( r > - 1 ) { let a = s . includes ( t . slice ( r ) ) ? t . slice ( r ) . length : 1 , l = s . slice ( a ) ; return l [ 0 ] !== "/" && ( l = "/" + l ) , zb ( l , "" ) } return zb ( n , t ) + i + s } function H$ ( t , e , n , i ) { let s = [ ] , r = [ ] , o = null ; const a = ( { state : f } ) => { const g = SC ( t , location ) , p = n . value , m = e . value ; let v = 0 ; if ( f ) { if ( n . value = g , e . value = f , o && o === p ) { o = null ; return } v = m ? f . position
2024-04-03 01:16:56 -04:00
( ? :
2024-10-26 13:54:08 +08:00
( ? : $ { _n } : ) { 7 } ( ? : $ { _n } | : ) | // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
( ? : $ { _n } : ) { 6 } ( ? : $ { ns } | : $ { _n } | : ) | // 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
( ? : $ { _n } : ) { 5 } ( ? : : $ { ns } | ( ? : : $ { _n } ) { 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
( ? : $ { _n } : ) { 4 } ( ? : ( ? : : $ { _n } ) { 0 , 1 } : $ { ns } | ( ? : : $ { _n } ) { 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
( ? : $ { _n } : ) { 3 } ( ? : ( ? : : $ { _n } ) { 0 , 2 } : $ { ns } | ( ? : : $ { _n } ) { 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
( ? : $ { _n } : ) { 2 } ( ? : ( ? : : $ { _n } ) { 0 , 3 } : $ { ns } | ( ? : : $ { _n } ) { 1 , 5 } | : ) | // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
( ? : $ { _n } : ) { 1 } ( ? : ( ? : : $ { _n } ) { 0 , 4 } : $ { ns } | ( ? : : $ { _n } ) { 1 , 6 } | : ) | // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
( ? : : ( ? : ( ? : : $ { _n } ) { 0 , 5 } : $ { ns } | ( ? : : $ { _n } ) { 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-10-29 14:57:29 +08:00
` .replace(/ \s * \/ \/ .* $ /gm,"").replace(/ \n /g,"").trim(),yL=new RegExp( ` ( ? : ^ $ { ns } $ ) | ( ? : ^ $ { wf } $ ) ` ),bL=new RegExp( ` ^ $ { ns } $ ` ),wL=new RegExp( ` ^ $ { wf } $ ` ),xf=t=>t&&t.exact?yL:new RegExp( ` ( ? : $ { jr ( t ) } $ { ns } $ { jr ( t ) } ) | ( ? : $ { jr ( t ) } $ { wf } $ { jr ( t ) } ) ` ,"g");xf.v4=t=>t&&t.exact?bL:new RegExp( ` $ { jr ( t ) } $ { ns } $ { jr ( t ) } ` ,"g");xf.v6=t=>t&&t.exact?wL:new RegExp( ` $ { jr ( t ) } $ { wf } $ { jr ( t ) } ` ,"g");const DC={exact:!1},RC= ` $ { xf . v4 ( ) . source } \ \ / ( 3 [ 0 - 2 ] | [ 12 ] ? [ 0 - 9 ] ) ` , $ C= ` $ { xf . v6 ( ) . source } \ \ / ( 12 [ 0 - 8 ] | 1 [ 01 ] [ 0 - 9 ] | [ 1 - 9 ] ? [ 0 - 9 ] ) ` ,xL=new RegExp( ` ^ $ { RC } $ ` ),EL=new RegExp( ` ^ $ { $C } $ ` ),CL=({exact:t}=DC)=>t?xL:new RegExp(RC,"g"),SL=({exact:t}=DC)=>t?EL:new RegExp( $ C,"g"),LC=CL({exact:!0}),OC=SL({exact:!0}),k_=t=>LC.test(t)?4:OC.test(t)?6:0;k_.v4=t=>LC.test(t);k_.v6=t=>OC.test(t);const At=t=>{const e=Xe();if(e.Locale===null)return t;const i=Object.keys(e.Locale).filter(s=>t.match(new RegExp("^"+s+" $ ","gi"))!==null);return i.length===0||i.length>1?t:t.replace(new RegExp(i[0],"gi"),e.Locale[i[0]])}, $ n=_C("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:At("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:At("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:At("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:At("Date"),value:"date",type:"date"}],Operator:[{display:At("larger than"),value:"lgt"}],Action:[{display:At("Restrict Peer"),value:"restrict"},{display:At("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Pt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){return/((^ \s *((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]) \. ){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])) \s * $ )|(^ \s *((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )( \. (25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )( \. (25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )( \. (25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )( \. (25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )( \. (25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )( \. (25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )( \. (25[0-5]|2[0-4] \d |1 \d \d |[1-9]? \d )){3}))|:)))(%.+)? \s * $ ))/.test(t)},checkCIDR(t){return k_(t)!==0},checkWGKeyLength(t){return console.log(t),/^[A-Za-z0-9+/]{43}=?=? $ /.test(t)}}}),He=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},kL={name:"localeText",props:{t:""},computed:{getLocaleText(){return At(this.t)}}};function TL(t,e,n,i,s,r){return pe(this.getLocaleText)}const Le=He(kL,[["render",TL]]),AL={name:"navbar",components:{LocaleText:Le},setup(){const t= $ n(),e=Xe();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Pt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=At("Failed to check available update"),console.log( ` Failed to get update : $ { t . message } ` ))})}},PL=["data-bs-theme"],ML={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},IL={class:"sidebar-sticky"},DL={class:"nav flex-column px-2"},RL={class:"nav-item"}, $ L={class:"nav-item"},LL={class:"nav-item"},OL={class:"nav-link rounded-3",target:"_blank",href:"https://donaldzou.github.io/WGDashboard-Documentation/user-guides.h
2024-03-21 02:03:08 -04:00
*
* Copyright ( C ) 2015 - 2020 Jason A . Donenfeld < Jason @ zx2c4 . com > . All Rights Reserved .
2024-10-29 14:57:29 +08:00
* / ( f u n c t i o n ( ) { f u n c t i o n t ( b ) { v a r C = n e w F l o a t 6 4 A r r a y ( 1 6 ) ; i f ( b ) f o r ( v a r k = 0 ; k < b . l e n g t h ; + + k ) C [ k ] = b [ k ] ; r e t u r n C } f u n c t i o n e ( b , C ) { f o r ( v a r k , T = t ( ) , A = t ( ) , I = 0 ; I < 1 6 ; + + I ) A [ I ] = C [ I ] ; n ( A ) , n ( A ) , n ( A ) ; f o r ( v a r V = 0 ; V < 2 ; + + V ) { T [ 0 ] = A [ 0 ] - 6 5 5 1 7 ; f o r ( v a r I = 1 ; I < 1 5 ; + + I ) T [ I ] = A [ I ] - 6 5 5 3 5 - ( T [ I - 1 ] > > 1 6 & 1 ) , T [ I - 1 ] & = 6 5 5 3 5 ; T [ 1 5 ] = A [ 1 5 ] - 3 2 7 6 7 - ( T [ 1 4 ] > > 1 6 & 1 ) , k = T [ 1 5 ] > > 1 6 & 1 , T [ 1 4 ] & = 6 5 5 3 5 , i ( A , T , 1 - k ) } f o r ( v a r I = 0 ; I < 1 6 ; + + I ) b [ 2 * I ] = A [ I ] & 2 5 5 , b [ 2 * I + 1 ] = A [ I ] > > 8 } f u n c t i o n n ( b ) { f o r ( v a r C = 0 ; C < 1 6 ; + + C ) b [ ( C + 1 ) % 1 6 ] + = ( C < 1 5 ? 1 : 3 8 ) * M a t h . f l o o r ( b [ C ] / 6 5 5 3 6 ) , b [ C ] & = 6 5 5 3 5 } f u n c t i o n i ( b , C , k ) { f o r ( v a r T , A = ~ ( k - 1 ) , I = 0 ; I < 1 6 ; + + I ) T = A & ( b [ I ] ^ C [ I ] ) , b [ I ] ^ = T , C [ I ] ^ = T } f u n c t i o n s ( b , C , k ) { f o r ( v a r T = 0 ; T < 1 6 ; + + T ) b [ T ] = C [ T ] + k [ T ] | 0 } f u n c t i o n r ( b , C , k ) { f o r ( v a r T = 0 ; T < 1 6 ; + + T ) b [ T ] = C [ T ] - k [ T ] | 0 } f u n c t i o n o ( b , C , k ) { f o r ( v a r T = n e w F l o a t 6 4 A r r a y ( 3 1 ) , A = 0 ; A < 1 6 ; + + A ) f o r ( v a r I = 0 ; I < 1 6 ; + + I ) T [ A + I ] + = C [ A ] * k [ I ] ; f o r ( v a r A = 0 ; A < 1 5 ; + + A ) T [ A ] + = 3 8 * T [ A + 1 6 ] ; f o r ( v a r A = 0 ; A < 1 6 ; + + A ) b [ A ] = T [ A ] ; n ( b ) , n ( b ) } f u n c t i o n a ( b , C ) { f o r ( v a r k = t ( ) , T = 0 ; T < 1 6 ; + + T ) k [ T ] = C [ T ] ; f o r ( v a r T = 2 5 3 ; T > = 0 ; - - T ) o ( k , k , k ) , T ! = = 2 & & T ! = = 4 & & o ( k , k , C ) ; f o r ( v a r T = 0 ; T < 1 6 ; + + T ) b [ T ] = k [ T ] } f u n c t i o n l ( b ) { b [ 3 1 ] = b [ 3 1 ] & 1 2 7 | 6 4 , b [ 0 ] & = 2 4 8 } f u n c t i o n c ( b ) { f o r ( v a r C , k = n e w U i n t 8 A r r a y ( 3 2 ) , T = t ( [ 1 ] ) , A = t ( [ 9 ] ) , I = t ( ) , V = t ( [ 1 ] ) , Y = t ( ) , n e = t ( ) , N = t ( [ 5 6 1 2 9 , 1 ] ) , B = t ( [ 9 ] ) , R = 0 ; R < 3 2 ; + + R ) k [ R ] = b [ R ] ; l ( k ) ; f o r ( v a r R = 2 5 4 ; R > = 0 ; - - R ) C = k [ R > > > 3 ] > > > ( R & 7 ) & 1 , i ( T , A , C ) , i ( I , V , C ) , s ( Y , T , I ) , r ( T , T , I ) , s ( I , A , V ) , r ( A , A , V ) , o ( V , Y , Y ) , o ( n e , T , T ) , o ( T , I , T ) , o ( I , A , Y ) , s ( Y , T , I ) , r ( T , T , I ) , o ( A , T , T ) , r ( I , V , n e ) , o ( T , I , N ) , s ( T , T , V ) , o ( I , I , T ) , o ( T , V , n e ) , o ( V , A , B ) , o ( A , Y , Y ) , i ( T , A , C ) , i ( I , V , C ) ; r e t u r n a ( I , I ) , o ( T , T , I ) , e ( k , T ) , k } f u n c t i o n u ( ) { v a r b = 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 ( b ) , b } f u n c t i o n d ( ) { v a r b = u ( ) ; r e t u r n l ( b ) , b } f u n c t i o n f ( b , C ) { f o r ( v a r k = U i n t 8 A r r a y . f r o m ( [ C [ 0 ] > > 2 & 6 3 , ( C [ 0 ] < < 4 | C [ 1 ] > > 4 ) & 6 3 , ( C [ 1 ] < < 2 | C [ 2 ] > > 6 ) & 6 3 , C [ 2 ] & 6 3 ] ) , T = 0 ; T < 4 ; + + T ) b [ T ] = k [ T ] + 6 5 + ( 2 5 - k [ T ] > > 8 & 6 ) - ( 5 1 - k [ T ] > > 8 & 7 5 ) - ( 6 1 - k [ T ] > > 8 & 1 5 ) + ( 6 2 - k [ T ] > > 8 & 3 ) } f u n c t i o n g ( b ) { v a r C , k = n e w U i n t 8 A r r a y ( 4 4 ) ; f o r ( C = 0 ; C < 3 2 / 3 ; + + C ) f ( k . s u b a r r a y ( C * 4 ) , b . s u b a r r a y ( C * 3 ) ) ; r e t u r n f ( k . s u b a r r a y ( C * 4 ) , U i n t 8 A r r a y . f r o m ( [ b [ C * 3 + 0 ] , b [ C * 3 + 1 ] , 0 ] ) ) , k [ 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 , k ) } f u n c t i o n p ( b ) { l e t C = w i n d o w . a t o b ( b ) , k = C . l e n g t h , T = n e w U i n t 8 A r r a y ( k ) ; f o r ( l e t I = 0 ; I < k ; I + + ) T [ I ] = C . c h a r C o d e A t ( I ) ; r e t u r n n e w U i n t 8 A r r a y ( T . b u f f e r ) } f u n c t i o n m ( b , C ) { b . p u s h ( C & 2 5 5 , C > > > 8 & 2 5 5 , C > > > 1 6 & 2 5 5 , C > > > 2 4 & 2 5 5 ) } f u n c t i o n v ( b , C ) { b . p u s h ( C & 2 5 5 , C > > > 8 & 2 5 5 ) } f u n c t i o n y ( b , C ) { f o r ( v a r k = 0 ; k < C . l e n g t h ; + + k ) b . p u s h ( C [ k ] & 2 5 5 ) } f u n c t i o n x ( b ) { f o r ( v a r C = 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 ( b ) ) , k = n e w U i n t 8 A r r a y ( C . l e n g t h ) , T = 0 ; T < C . l e n g t h ; + + T ) k [ T ] = C . c h a r C o d e A t ( T ) ; r e t u r n k } f u n c t i o n E ( b ) { i f ( ! E . t a b l e ) { E . t a b l e = [ ] ; f o r ( v a r C = 0 , k = 0 ; k < 2 5 6 ; C = + + k ) { f o r ( v a r T = 0 ; T < 8 ; + + T ) C = C & 1 ? 3 9 8 8 2 9 2 3 8 4 ^ C > > > 1 : C > > > 1 ; E . t a b l e [ k ] = C } } f o r ( v a r A = - 1 , I = 0 ; I < b . l e n g t h ; + + I ) A = A > > > 8 ^ E . t a b l e [ ( A ^ b [ I ] ) & 2 5 5 ] ; r e t u r n ( A ^ - 1 ) > > > 0 } f u n c t i o n w ( b ) { f o r ( v a r C = [ ] , k = [ ] , T = 0 , A = 0 ; A < b . l e n g t h ; + + A ) { v a r I = x ( b [ A ] . f i l e N a m e ) , V = x ( b [ A ] . f i l e ) , Y = E ( V ) ; m ( C , 6 7 3 2 4 7 5 2 ) , v ( C , 2 0 ) , v ( C , 0 ) , v ( C , 0 ) , v ( C , 0 ) , v ( C , 0 ) , m ( C , Y ) , m ( C , V . l e n g t h ) , m ( C , V . l e n g t h ) , v ( C , I . l e n g t h ) , v ( C , 0 ) , y ( C , I ) , y ( C , V ) , m ( k , 3 3 6 3 9 2 4 8 ) , v ( k , 0 ) , v ( k , 2 0 ) , v ( k , 0 ) , v ( k , 0 ) , v ( k , 0 ) , v ( k , 0 ) , m ( k , Y ) , m ( k , V . l e n g t h ) , m ( k , V . l e n g t h ) , v ( k , I . l e n g t h ) , v ( k , 0 ) , v ( k , 0 ) , v ( k , 0 ) , v ( k , 0 ) , m ( k , 3 2 ) , m ( k , T ) , y ( k , I ) , T + = 3 0 + V . l e n g t h + I . l e n g t h } r e t u r n y ( C , k ) , m ( C , 1 0 1 0 1 0 2 5 6 ) , v ( C , 0 ) , v ( C , 0 ) , v ( C , b . l e n g t h ) , v ( C , b . l e n g t h ) , m ( C , k . l e n g t h ) , m ( C , T ) , v ( C , 0 ) , U i n t 8 A r r a y . f r o m ( C ) } 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 b = d ( ) , C = c ( b ) , k = u ( ) ; r e t u r n { p u b l i c K e y : g ( C ) , p r i v a t e K e y : g ( b ) , p r e s h a r e d K e y : g ( k ) } } , 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 ( b ) { r e t u r n b = p ( b ) , g ( c ( b ) ) } , g e n e r a t e Z i p F i l e s : f u n c t i o n ( b , C ) { v a r k = b . d a t a , T = w ( k ) , A = n e w B l o b ( [ T ] , { t y p e : " a p p l i c a t i o n / z i p " } ) , I = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; I . d o w n l o a d = C , I . h r e f = U R L . c r e a t e O b j e c t U R L ( A ) , I . 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 ( I ) , I . 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 ( I ) } } } ) ( ) ; c o n s t a 8 = { n a m e : " n e w C o n f i g u r a t i o n " , c o m p o n e n t s : { L o c a l e T e x t : L e } , s e t u p ( ) { r e t u r n { s t o r e : $ n ( ) } } , 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 t = 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 = t . p r i v a t e K e y , t h i s
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-10-29 14:57:29 +08:00
* / f u n c t i o n K u ( t ) { r e t u r n t + . 5 | 0 } c o n s t U r = ( t , e , n ) = > M a t h . m a x ( M a t h . m i n ( t , n ) , e ) ; f u n c t i o n E c ( t ) { r e t u r n U r ( K u ( t * 2 . 5 5 ) , 0 , 2 5 5 ) } f u n c t i o n n o ( t ) { r e t u r n U r ( K u ( t * 2 5 5 ) , 0 , 2 5 5 ) } f u n c t i o n i r ( t ) { r e t u r n U r ( K u ( t / 2 . 5 5 ) / 1 0 0 , 0 , 1 ) } f u n c t i o n A 0 ( t ) { r e t u r n U r ( K u ( t * 1 0 0 ) , 0 , 1 0 0 ) } c o n s t B i = { 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 } , l m = [ . . . " 0 1 2 3 4 5 6 7 8 9 A B C D E F " ] , M W = t = > l m [ t & 1 5 ] , I W = t = > l m [ ( t & 2 4 0 ) > > 4 ] + l m [ t & 1 5 ] , A d = t = > ( t & 2 4 0 ) > > 4 = = = ( t & 1 5 ) , D W = t = > A d ( t . r ) & & A d ( t . g ) & & A d ( t . b ) & & A d ( t . a ) ; f u n c t i o n R W ( t ) { v a r e = t . l e n g t h , n ; r e t u r n t [ 0 ] = = = " # " & & ( e = = = 4 | | e = = = 5 ? n = { r : 2 5 5 & B i [ t [ 1 ] ] * 1 7 , g : 2 5 5 & B i [ t [ 2 ] ] * 1 7 , b : 2 5 5 & B i [ t [ 3 ] ] * 1 7 , a : e = = = 5 ? B i [ t [ 4 ] ] * 1 7 : 2 5 5 } : ( e = = = 7 | | e = = = 9 ) & & ( n = { r : B i [ t [ 1 ] ] < < 4 | B i [ t [ 2 ] ] , g : B i [ t [ 3 ] ] < < 4 | B i [ t [ 4 ] ] , b : B i [ t [ 5 ] ] < < 4 | B i [ t [ 6 ] ] , a : e = = = 9 ? B i [ t [ 7 ] ] < < 4 | B i [ t [ 8 ] ] : 2 5 5 } ) ) , n } c o n s t $ W = ( t , e ) = > t < 2 5 5 ? e ( t ) : " " ; f u n c t i o n L W ( t ) { v a r e = D W ( t ) ? M W : I W ; r e t u r n t ? " # " + e ( t . r ) + e ( t . g ) + e ( t . b ) + $ W ( t . a , e ) : v o i d 0 } c o n s t O W = / ^ ( 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 P S ( t , e , n ) { c o n s t i = e * M a t h . m i n ( n , 1 - n ) , s = ( r , o = ( r + t / 3 0 ) % 1 2 ) = > n - i * M a t h . m a x ( M a t h . m i n ( o - 3 , 9 - o , 1 ) , - 1 ) ; r e t u r n [ s ( 0 ) , s ( 8 ) , s ( 4 ) ] } f u n c t i o n N W ( t , e , n ) { c o n s t i = ( s , r = ( s + t / 6 0 ) % 6 ) = > n - n * e * M a t h . m a x ( M a t h . m i n ( r , 4 - r , 1 ) , 0 ) ; r e t u r n [ i ( 5 ) , i ( 3 ) , i ( 1 ) ] } f u n c t i o n F W ( t , e , n ) { c o n s t i = P S ( t , 1 , . 5 ) ; l e t s ; f o r ( e + n > 1 & & ( s = 1 / ( e + n ) , e * = s , n * = s ) , s = 0 ; s < 3 ; s + + ) i [ s ] * = 1 - e - n , i [ s ] + = e ; r e t u r n i } f u n c t i o n B W ( t , e , n , i , s ) { r e t u r n t = = = s ? ( e - n ) / i + ( e < n ? 6 : 0 ) : e = = = s ? ( n - t ) / i + 2 : ( t - e ) / i + 4 } f u n c t i o n U _ ( t ) { c o n s t n = t . r / 2 5 5 , i = t . g / 2 5 5 , s = t . b / 2 5 5 , r = M a t h . m a x ( n , i , s ) , o = M a t h . m i n ( n , i , s ) , a = ( r + o ) / 2 ; l e t l , c , u ; r e t u r n r ! = = o & & ( u = r - o , c = a > . 5 ? u / ( 2 - r - o ) : u / ( r + o ) , l = B W ( n , i , s , u , r ) , l = l * 6 0 + . 5 ) , [ l | 0 , c | | 0 , a ] } f u n c t i o n G _ ( t , e , n , i ) { r e t u r n ( A r r a y . i s A r r a y ( e ) ? t ( e [ 0 ] , e [ 1 ] , e [ 2 ] ) : t ( e , n , i ) ) . m a p ( n o ) } f u n c t i o n X _ ( t , e , n ) { r e t u r n G _ ( P S , t , e , n ) } f u n c t i o n V W ( t , e , n ) { r e t u r n G _ ( F W , t , e , n ) } f u n c t i o n z W ( t , e , n ) { r e t u r n G _ ( N W , t , e , n ) } f u n c t i o n M S ( t ) { r e t u r n ( t % 3 6 0 + 3 6 0 ) % 3 6 0 } f u n c t i o n W W ( t ) { c o n s t e = O W . e x e c ( t ) ; l e t n = 2 5 5 , i ; i f ( ! e ) r e t u r n ; e [ 5 ] ! = = i & & ( n = e [ 6 ] ? E c ( + e [ 5 ] ) : n o ( + e [ 5 ] ) ) ; c o n s t s = M S ( + e [ 2 ] ) , r = + e [ 3 ] / 1 0 0 , o = + e [ 4 ] / 1 0 0 ; r e t u r n e [ 1 ] = = = " h w b " ? i = V W ( s , r , o ) : e [ 1 ] = = = " h s v " ? i = z W ( s , r , o ) : i = X _ ( s , r , o ) , { r : i [ 0 ] , g : i [ 1 ] , b : i [ 2 ] , a : n } } f u n c t i o n Y W ( t , e ) { v a r n = U _ ( t ) ; n [ 0 ] = M S ( n [ 0 ] + e ) , n = X _ ( n ) , t . r = n [ 0 ] , t . g = n [ 1 ] , t . b = n [ 2 ] } f u n c t i o n H W ( t ) { i f ( ! t ) r e t u r n ; c o n s t e = U _ ( t ) , n = e [ 0 ] , i = A 0 ( e [ 1 ] ) , s = A 0 ( e [ 2 ] ) ; r e t u r n t . a < 2 5 5 ? ` h s l a ( $ { n } , $ { i } % , $ { s } % , $ { i r ( t . a ) } ) ` : ` h s l ( $ { n } , $ { i } % , $ { s } % ) ` } c o n s t P 0 = { 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 " } , M 0 = { 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-10-04 16:58:47 +08:00
* Chart . js v4 . 4.4
2024-03-21 02:03:08 -04:00
* https : //www.chartjs.org
2024-10-04 16:58:47 +08:00
* ( c ) 2024 Chart . js Contributors
2024-03-21 02:03:08 -04:00
* Released under the MIT License
2024-10-29 14:57:29 +08:00
* / f u n c t i o n U s ( ) { } c o n s t J W = ( ( ) = > { l e t t = 0 ; r e t u r n ( ) = > t + + } ) ( ) ; f u n c t i o n g t ( t ) { r e t u r n t = = = n u l l | | t y p e o f t > " u " } f u n c t i o n Y t ( t ) { 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 ( t ) ) r e t u r n ! 0 ; c o n s t e = 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 ( t ) ; r e t u r n e . s l i c e ( 0 , 7 ) = = = " [ o b j e c t " & & e . s l i c e ( - 6 ) = = = " A r r a y ] " } f u n c t i o n u t ( t ) { r e t u r n t ! = = 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 ( t ) = = = " [ o b j e c t O b j e c t ] " } f u n c t i o n n n ( t ) { r e t u r n ( t y p e o f t = = " n u m b e r " | | t i n s t a n c e o f N u m b e r ) & & i s F i n i t e ( + t ) } f u n c t i o n S i ( t , e ) { r e t u r n n n ( t ) ? t : e } f u n c t i o n i t ( t , e ) { r e t u r n t y p e o f t > " u " ? e : t } c o n s t Q W = ( t , e ) = > t y p e o f t = = " s t r i n g " & & t . e n d s W i t h ( " % " ) ? p a r s e F l o a t ( t ) / 1 0 0 : + t / e , D S = ( t , e ) = > t y p e o f t = = " s t r i n g " & & t . e n d s W i t h ( " % " ) ? p a r s e F l o a t ( t ) / 1 0 0 * e : + t ; f u n c t i o n $ t ( t , e , n ) { i f ( t & & t y p e o f t . c a l l = = " f u n c t i o n " ) r e t u r n t . a p p l y ( n , e ) } f u n c t i o n T t ( t , e , n , i ) { l e t s , r , o ; i f ( Y t ( t ) ) f o r ( r = t . l e n g t h , s = 0 ; s < r ; s + + ) e . c a l l ( n , t [ s ] , s ) ; e l s e i f ( u t ( t ) ) f o r ( o = O b j e c t . k e y s ( t ) , r = o . l e n g t h , s = 0 ; s < r ; s + + ) e . c a l l ( n , t [ o [ s ] ] , o [ s ] ) } f u n c t i o n A h ( t , e ) { l e t n , i , s , r ; i f ( ! t | | ! e | | t . l e n g t h ! = = e . l e n g t h ) r e t u r n ! 1 ; f o r ( n = 0 , i = t . l e n g t h ; n < i ; + + n ) i f ( s = t [ n ] , r = e [ n ] , s . d a t a s e t I n d e x ! = = r . d a t a s e t I n d e x | | s . i n d e x ! = = r . 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 P h ( t ) { i f ( Y t ( t ) ) r e t u r n t . m a p ( P h ) ; i f ( u t ( t ) ) { c o n s t e = O b j e c t . c r e a t e ( n u l l ) , n = O b j e c t . k e y s ( t ) , i = n . l e n g t h ; l e t s = 0 ; f o r ( ; s < i ; + + s ) e [ n [ s ] ] = P h ( t [ n [ s ] ] ) ; r e t u r n e } r e t u r n t } f u n c t i o n R S ( t ) { 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 ( t ) = = = - 1 } f u n c t i o n e Y ( t , e , n , i ) { i f ( ! R S ( t ) ) r e t u r n ; c o n s t s = e [ t ] , r = n [ t ] ; u t ( s ) & & u t ( r ) ? h u ( s , r , i ) : e [ t ] = P h ( r ) } f u n c t i o n h u ( t , e , n ) { c o n s t i = Y t ( e ) ? e : [ e ] , s = i . l e n g t h ; i f ( ! u t ( t ) ) r e t u r n t ; n = n | | { } ; c o n s t r = n . m e r g e r | | e Y ; l e t o ; f o r ( l e t a = 0 ; a < s ; + + a ) { i f ( o = i [ a ] , ! u t ( o ) ) c o n t i n u e ; c o n s t l = O b j e c t . k e y s ( o ) ; f o r ( l e t c = 0 , u = l . l e n g t h ; c < u ; + + c ) r ( l [ c ] , t , o , n ) } r e t u r n t } f u n c t i o n K c ( t , e ) { r e t u r n h u ( t , e , { m e r g e r : t Y } ) } f u n c t i o n t Y ( t , e , n ) { i f ( ! R S ( t ) ) r e t u r n ; c o n s t i = e [ t ] , s = n [ t ] ; u t ( i ) & & u t ( s ) ? K c ( i , s ) : 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 ( e , t ) | | ( e [ t ] = P h ( s ) ) } c o n s t D 0 = { " " : t = > t , x : t = > t . x , y : t = > t . y } ; f u n c t i o n n Y ( t ) { c o n s t e = t . s p l i t ( " . " ) , n = [ ] ; l e t i = " " ; f o r ( c o n s t s o f e ) i + = s , i . e n d s W i t h ( " \ \ " ) ? i = i . s l i c e ( 0 , - 1 ) + " . " : ( n . p u s h ( i ) , i = " " ) ; r e t u r n n } f u n c t i o n i Y ( t ) { c o n s t e = n Y ( t ) ; r e t u r n n = > { f o r ( c o n s t i o f e ) { i f ( i = = = " " ) b r e a k ; n = n & & n [ i ] } r e t u r n n } } f u n c t i o n l o ( t , e ) { r e t u r n ( D 0 [ e ] | | ( D 0 [ e ] = i Y ( e ) ) ) ( t ) } f u n c t i o n q _ ( t ) { r e t u r n t . c h a r A t ( 0 ) . t o U p p e r C a s e ( ) + t . s l i c e ( 1 ) } c o n s t f u = t = > t y p e o f t < " u " , c o = t = > t y p e o f t = = " f u n c t i o n " , R 0 = ( t , e ) = > { i f ( t . s i z e ! = = e . s i z e ) r e t u r n ! 1 ; f o r ( c o n s t n o f t ) i f ( ! e . h a s ( n ) ) r e t u r n ! 1 ; r e t u r n ! 0 } ; f u n c t i o n s Y ( t ) { r e t u r n t . t y p e = = = " m o u s e u p " | | t . t y p e = = = " c l i c k " | | t . t y p e = = = " c o n t e x t m e n u " } c o n s t B t = M a t h . P I , F t = 2 * B t , r Y = F t + B t , M h = N u m b e r . P O S I T I V E _ I N F I N I T Y , o Y = B t / 1 8 0 , d n = B t / 2 , O o = B t / 4 , $ 0 = B t * 2 / 3 , G r = M a t h . l o g 1 0 , O s = M a t h . s i g n ; f u n c t i o n U c ( t , e , n ) { r e t u r n M a t h . a b s ( t - e ) < n } f u n c t i o n L 0 ( t ) { c o n s t e = M a t h . r o u n d ( t ) ; t = U c ( t , e , t / 1 e 3 ) ? e : t ; c o n s t n = M a t h . p o w ( 1 0 , M a t h . f l o o r ( G r ( t ) ) ) , i = t / n ; r e t u r n ( i < = 1 ? 1 : i < = 2 ? 2 : i < = 5 ? 5 : 1 0 ) * n } f u n c t i o n a Y ( t ) { c o n s t e = [ ] , n = M a t h . s q r t ( t ) ; l e t i ; f o r ( i = 1 ; i < n ; i + + ) t % i = = = 0 & & ( e . p u s h ( i ) , e . p u s h ( t / i ) ) ; r e t u r n n = = = ( n | 0 ) & & e . p u s h ( n ) , e . s o r t ( ( s , r ) = > s - r ) . p o p ( ) , e } f u n c t i o n I l ( t ) { r e t u r n ! i s N a N ( p a r s e F l o a t ( t ) ) & & i s F i n i t e ( t ) } f u n c t i o n l Y ( t , e ) { c o n s t n = M a t h . r o u n d ( t ) ; r e t u r n n - e < = t & & n + e > = t } f u n c t i o n $ S ( t , e , n ) { l e t i , s , r ; f o r ( i = 0 , s = t . l e n g t h ; i < s ; i + + ) r = t [ i ] [ n ] , i s N a N ( r ) | | ( e . m i n = M a t h . m i n ( e . m i n , r ) , e . m a x = M a t h . m a x ( e . m a x , r ) ) } f u n c t i o n l s ( t ) { r e t u r n t * ( B t / 1 8 0 ) } f u n c t i o n Z _ ( t ) { r e t u r n t * ( 1 8 0 / B t ) } f u n c t i o n O 0 ( t ) { i f ( ! n n ( t ) ) r e t u r n ; l e t e = 1 , n = 0 ; f o r ( ; M a t h . r o u n d ( t * e ) / e ! = = t ; ) e * = 1 0 , n + + ; r e t u r n n } f u n c t i o n L S ( t , e ) { c o n s t n = e . x - t . x , i = e . y - t . y , s = M a t h . s q r t ( n * n + i * i ) ; l e t r = M a t h . a t a n 2 ( i , n ) ; r e t u r n r < - . 5 * B t & & ( r + = F t ) , { a n g l e : r , d i s t a n c e : s } } f u n c t i o n c m ( t , e ) { r e t u r n M a t h . s q r t ( M a t h . p o w ( e . x - t . x , 2 ) + M a t h . p o w ( e . y - t . y , 2 ) ) } f u n c t i o n c Y ( t , e ) { r e t u r n ( t - e + r Y ) % F t - B t } f u n c t i o n k i ( t ) { r e t u r n ( t % F t + F t ) % F t } f u n c t i o n g u ( t , e , n , i ) { c o n s t s = k i ( t ) , r = k i ( e ) , o = k i ( n ) , a = k i ( r - s ) , l = k i ( o - s ) , c = k i ( s - r ) , u = k i ( s - o ) ; r e t u r n s = = = r | | s = = = o | | i & & r = = = o | | a > l & & c < u } f u n c t i o n D n ( t , e , n ) { r e t u r n M a t h . m a x ( e , M a t h . m i n ( n , t ) ) } f u n c t i o n u Y ( t ) { r e t u r n D n ( t , - 3 2 7 6 8 , 3 2 7 6 7 ) } f u n c t i o n l r ( t , e , n , i = 1 e - 6 ) { r e t u r n t > = M a t h . m i n ( e , n ) - i & & t < = M a t h . m a x ( e , n ) + i } f u n c t i o n J _ ( t , e , n ) { n = n | | ( o = > t [ o ] < e ) ; l e t i = t . l e n g t h - 1 , s = 0 , r ; f o r ( ; i - s > 1 ; ) r = s + i > > 1 , n ( r ) ? s = r : i = r ; r e t u r n { l o : s , h i : i } } c o n s t c r = ( t , e , n , i ) = > J _ ( t , n , i ? s = > { c o n s t r = t [ s ] [ e ] ; r e t u r n r < n | | r = = = n & & t [ s + 1 ] [ e ] = = = n } : s = > t [ s ] [ e ] < n ) , d Y = ( t , e , n ) = > J _ ( t , n , i = > t [ i ] [ e ] > = n ) ; f u n c t i o n h Y ( t , e , n ) { l e t i = 0
2024-10-04 16:58:47 +08:00
* Chart . js v4 . 4.4
2024-03-21 02:03:08 -04:00
* https : //www.chartjs.org
2024-10-04 16:58:47 +08:00
* ( c ) 2024 Chart . js Contributors
2024-03-21 02:03:08 -04:00
* Released under the MIT License
2024-10-29 14:57:29 +08:00
* /class pH{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,s){const r=n.listeners[s],o=n.duration;r.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=FS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,e,"progress")),r.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Zs=new pH;const q0="transparent",mH={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=V0(t||q0),s=i.valid&&V0(e||q0);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class _H{constructor(e,n,i,s){const r=n[i];s=Cc([e.to,s,r,e.from]);const o=Cc([e.from,r,s]);this._active=!0,this._fn=e.fn||mH[e.type||typeof o],this._easing=Gc[e.easing]||Gc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=Cc([e.to,n,s,e.from]),this._from=Cc([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||n<i),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=r;return}l=n/i % 2 , l = o && l > 1 ? 2 - l : l , l = this . _easing ( Math . min ( 1 , Math . max ( 0 , l ) ) ) , this . _target [ s ] = this . _fn ( r , a , l ) } wait ( ) { const e = this . _promises || ( this . _promises = [ ] ) ; return new Promise ( ( n , i ) => { e . push ( { res : n , rej : i } ) } ) } _notify ( e ) { const n = e ? "res" : "rej" , i = this . _promises || [ ] ; for ( let s = 0 ; s < i . length ; s ++ ) i [ s ] [ n ] ( ) } } class nk { constructor ( e , n ) { this . _chart = e , this . _properties = new Map , this . configure ( n ) } configure ( e ) { if ( ! ut ( e ) ) return ; const n = Object . keys ( sn . animation ) , i = this . _properties ; Object . getOwnPropertyNames ( e ) . forEach ( s => { const r = e [ s ] ; if ( ! ut ( r ) ) return ; const o = { } ; for ( const a of n ) o [ a ] = r [ a ] ; ( Yt ( r . properties ) && r . properties || [ s ] ) . forEach ( a => { ( a === s || ! i . has ( a ) ) && i . set ( a , o ) } ) } ) } _animateOptions ( e , n ) { const i = n . options , s = yH ( e , i ) ; if ( ! s ) return [ ] ; const r = this . _createAnimations ( s , i ) ; return i . $shared && vH ( e . options . $animations , i ) . then ( ( ) => { e . options = i } , ( ) => { } ) , r } _createAnimations ( e , n ) { const i = this . _properties , s = [ ] , r = e . $animations || ( e . $animations = { } ) , o = Object . keys ( n ) , a = Date . now ( ) ; let l ; for ( l = o . length - 1 ; l >= 0 ; -- l ) { const c = o [ l ] ; if ( c . charAt ( 0 ) === "$" ) continue ; if ( c === "options" ) { s . push ( ... this . _animateOptions ( e , n ) ) ; continue } const u = n [ c ] ; let d = r [ c ] ; const f = i . get ( c ) ; if ( d ) if ( f && d . active ( ) ) { d . update ( f , u , a ) ; continue } else d . cancel ( ) ; if ( ! f || ! f . duration ) { e [ c ] = u ; continue } r [ c ] = d = new _H ( f , e , c , u ) , s . push ( d ) } return s } update ( e , n ) { if ( this . _properties . size
2024-09-09 23:43:55 +08:00
` )>-1?t.split( `
2024-10-29 14:57:29 +08:00
` ):t}function tU(t,e){const{element:n,datasetIndex:i,index:s}=e,r=t.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function $ 1(t,e){const n=t.chart.ctx,{body:i,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=En(e.bodyFont),c=En(e.titleFont),u=En(e.footerFont),d=r.length,f=s.length,g=i.length,p=Zn(e.padding);let m=p.height,v=0,y=i.reduce((w,b)=>w+b.before.length+b.lines.length+b.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y){const w=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=g*w+(y-g)*l.lineHeight+(y-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let x=0;const E=function(w){v=Math.max(v,n.measureText(w).width+x)};return n.save(),n.font=c.string,Tt(t.title,E),n.font=l.string,Tt(t.beforeBody.concat(t.afterBody),E),x=e.displayColors?o+2+e.boxPadding:0,Tt(i,w=>{Tt(w.before,E),Tt(w.lines,E),Tt(w.after,E)}),x=0,n.font=u.string,Tt(t.footer,E),n.restore(),v+=p.width,{width:v,height:m}}function nU(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function iU(t,e,n,i){const{x:s,width:r}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&s+r+o>e.width||t==="right"&&s-r-o<0)return!0}function sU(t,e,n,i){const{x:s,width:r}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),iU(c,t,e,n)&&(c="center"),c}function L1(t,e,n){const i=n.yAlign||e.yAlign||nU(t,n);return{xAlign:n.xAlign||e.xAlign||sU(t,e,n,i),yAlign:i}}function rU(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function oU(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function O1(t,e,n,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=s+r,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:g}=ra(o);let p=rU(e,a);const m=oU(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,f)+s:a==="right"&&(p+=Math.max(d,g)+s),{x:Dn(p,0,i.width-e.width),y:Dn(m,0,i.height-e.height)}}function Bd(t,e,n){const i=Zn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function N1(t){return bs([],Js(t))}function aU(t,e,n){return wo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function F1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Sk={beforeTitle:Us,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:Us,beforeBody:Us,beforeLabel:Us,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return gt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Us,afterBody:Us,beforeFooter:Us,footer:Us,afterFooter:Us};function hi(t,e,n,i){const s=t[e].call(n,i);return typeof s>"u"?Sk[e].call(n,i):s}class B1 extends xr{static positioners=kc;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this. $ animations=void 0,this. $ context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void
] ) ) + ` ;Vs.KANJI=new RegExp(vu,"g");Vs.BYTE_KANJI=new RegExp("[^A-Z0-9 $ %*+ \\ -./:]+","g");Vs.BYTE=new RegExp( $ 7,"g");Vs.NUMERIC=new RegExp(Gk,"g");Vs.ALPHANUMERIC=new RegExp(R7,"g");const L7=new RegExp("^"+vu+" $ "),O7=new RegExp("^"+Gk+" $ "),N7=new RegExp("^[A-Z0-9 $ %*+ \\ -./:]+ $ ");Vs.testKanji=function(e){return L7.test(e)};Vs.testNumeric=function(e){return O7.test(e)};Vs.testAlphanumeric=function(e){return N7.test(e)};(function(t){const e=hv,n=Vs;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(r,o){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?r.ccBits[0]:o<27?r.ccBits[1]:r.ccBits[2]},t.getBestModeForData=function(r){return n.testNumeric(r)?t.NUMERIC:n.testAlphanumeric(r)?t.ALPHANUMERIC:n.testKanji(r)?t.KANJI:t.BYTE},t.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},t.isValid=function(r){return r&&r.bit&&r.ccBits};function i(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(r,o){if(t.isValid(r))return r;try{return i(r)}catch{return o}}})(Co);(function(t){const e=Ri,n=Of,i=Lf,s=Co,r=hv,o=7973,a=e.getBCHDigit(o);function l(f,g,p){for(let m=1;m<=40;m++)if(g<=t.getCapacity(m,p,f))return m}function c(f,g){return s.getCharCountIndicator(f,g)+4}function u(f,g){let p=0;return f.forEach(function(m){const v=c(m.mode,g);p+=v+m.getBitsLength()}),p}function d(f,g){for(let p=1;p<=40;p++)if(u(f,p)<=t.getCapacity(p,g,s.MIXED))return p}t.from=function(g,p){return r.isValid(g)?parseInt(g,10):p},t.getCapacity=function(g,p,m){if(!r.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=s.BYTE);const v=e.getSymbolTotalCodewords(g),y=n.getTotalCodewordsCount(g,p),x=(v-y)*8;if(m===s.MIXED)return x;const E=x-c(m,g);switch(m){case s.NUMERIC:return Math.floor(E/10*3);case s.ALPHANUMERIC:return Math.floor(E/11*2);case s.KANJI:return Math.floor(E/13);case s.BYTE:default:return Math.floor(E/8)}},t.getBestVersionForData=function(g,p){let m;const v=i.from(p,i.M);if(Array.isArray(g)){if(g.length>1)return d(g,v);if(g.length===0)return 1;m=g[0]}else m=g;return l(m.mode,m.getLength(),v)},t.getEncodedBits=function(g){if(!r.isValid(g)||g<7)throw new Error("Invalid QR Code version");let p=g<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<<e.getBCHDigit(p)-a;return g<<12|p}})(Uk);var Xk={};const Cm=Ri,qk=1335,F7=21522,nw=Cm.getBCHDigit(qk);Xk.getEncodedBits=function(e,n){const i=e.bit<<3|n;let s=i<<10;for(;Cm.getBCHDigit(s)-nw>=0;)s^=qk<<Cm.getBCHDigit(s)-nw;return(i<<10|s)^F7};var Zk={};const B7=Co;function $ l(t){this.mode=B7.NUMERIC,this.data=t.toString()} $ l.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)}; $ l.prototype.getLength=function(){return this.data.length}; $ l.prototype.getBitsLength=function(){return $ l.getBitsLength(this.data.length)}; $ l.prototype.write=function(e){let n,i,s;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),s=parseInt(i,10),e.put(s,10);const r=this.data.length-n;r>0&&(i=this.data.substr(n),s=parseInt(i,10),e.put(s,r*3+1))};var V7= $ l;const z7=Co,ap=["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 Ll(t){this.mode=z7.ALPHANUMERIC,this.data=t}Ll.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Ll.prototype.getLength=function(){return this.data.length};Ll.prototype.getBitsLength=function(){return Ll.getBitsLength(this.data.length)};Ll.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=ap.indexOf(this.data[n])*45;i+=ap.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(ap.indexOf(this.data[n]),6)};var W7
Make sure your charset is UTF - 8 ` );n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var U7=Nl,Jk={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,i,s){var r={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var l,c,u,d,f,g,p,m,v;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(g=f[u],p=d+g,m=o[u],v=typeof o[u]>"u",(v||m>p)&&(o[u]=p,a.push(u,p),r[u]=c))}if(typeof s<"u"&&typeof o[s]>"u"){var y=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(y)}return r},extract_shortest_path_from_predecessor_list:function(n,i){for(var s=[],r=i;r;)s.push(r),n[r],r=n[r];return s.reverse(),s},find_path:function(n,i,s){var r=e.single_source_shortest_paths(n,i,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,s={},r;n=n||{};for(r in i)i.hasOwnProperty(r)&&(s[r]=i[r]);return s.queue=[],s.sorter=n.sorter||i.default_sorter,s},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var s={value:n,cost:i};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Jk);var G7=Jk.exports;(function(t){const e=Co,n=V7,i=W7,s=H7,r=U7,o=Vs,a=Ri,l=G7;function c(y){return unescape(encodeURIComponent(y)).length}function u(y,x,E){const w=[];let b;for(;(b=y.exec(E))!==null;)w.push({data:b[0],index:b.index,mode:x,length:b[0].length});return w}function d(y){const x=u(o.NUMERIC,e.NUMERIC,y),E=u(o.ALPHANUMERIC,e.ALPHANUMERIC,y);let w,b;return a.isKanjiModeEnabled()?(w=u(o.BYTE,e.BYTE,y),b=u(o.KANJI,e.KANJI,y)):(w=u(o.BYTE_KANJI,e.BYTE,y),b=[]),x.concat(E,w,b).sort(function(k,T){return k.index-T.index}).map(function(k){return{data:k.data,mode:k.mode,length:k.length}})}function f(y,x){switch(x){case e.NUMERIC:return n.getBitsLength(y);case e.ALPHANUMERIC:return i.getBitsLength(y);case e.KANJI:return r.getBitsLength(y);case e.BYTE:return s.getBitsLength(y)}}function g(y){return y.reduce(function(x,E){const w=x.length-1>=0?x[x.length-1]:null;return w&&w.mode===E.mode?(x[x.length-1].data+=E.data,x):(x.push(E),x)},[])}function p(y){const x=[];for(let E=0;E<y.length;E++){const w=y[E];switch(w.mode){case e.NUMERIC:x.push([w,{data:w.data,mode:e.ALPHANUMERIC,length:w.length},{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.ALPHANUMERIC:x.push([w,{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.KANJI:x.push([w,{data:w.data,mode:e.BYTE,length:c(w.data)}]);break;case e.BYTE:x.push([{data:w.data,mode:e.BYTE,length:c(w.data)}])}}return x}function m(y,x){const E={},w={start:{}};let b=["start"];for(let C=0;C<y.length;C++){const k=y[C],T=[];for(let A=0;A<k.length;A++){const I=k[A],V=""+C+A;T.push(V),E[V]={node:I,lastCount:0},w[V]={};for(let Y=0;Y<b.length;Y++){const ne=b[Y];E[ne]&&E[ne].node.mode===I.mode?(w[ne][V]=f(E[ne].lastCount+I.length,I.mode)-f(E[ne].lastCount,I.mode),E[ne].lastCount+=I.length):(E[ne]&&(E[ne].lastCount=I.length),w[ne][V]=f(I.length,I.mode)+4+e.getCharCountIndicator(I.mode,x))}}b=T}for(let C=0;C<b.length;C++)w[b[C]].end=0;return{map:w,table:E}}function v(y,x){let E;const w=e.getBestModeForData(y);if(E=e.from(x,w),E!==e.BYTE&&E.bit<w.bit)throw new Error('"'+y+'" cannot be encoded with mode '+e.toString(E)+ ` .
Suggested mode is : ` +e.toString(w));switch(E===e.KANJI&&!a.isKanjiModeEnabled()&&(E=e.BYTE),E){case e.NUMERIC:return new n(y);case e.ALPHANUMERIC:return new i(y);case e.KANJI:return new r(y);case e.BYTE:return new s(y)}}t.fromArray=function(x){return x.reduce(function(E,w){return typeof w=="string"?E.push(v(w,null)):w.data&&E.push(v(w.data,w.mode)),E},[])},t.fromString=function(x,E){const w=d(x,a.isKanjiModeEnabled()),b=p(w),C=m(b,E),k=l.find_path(C.map,"start","end"),T=[];for(let A=1;A<k.length-1;A++)T.push(C.table[k[A]].node);return t.fromArray(g(T))},t.rawSplit=function(x){return t.fromArray(d(x,a.isKanjiModeEnabled()))}})(Zk);const Ff=Ri,lp=Lf,X7=P7,q7=M7,Z7=Wk,J7=Yk,Sm=Hk,km=Of,Q7=D7,Fh=Uk,e9=Xk,t9=Co,cp=Zk;function n9(t,e){const n=t.size,i=J7.getPositions(e);for(let s=0;s<i.length;s++){const r=i[s][0],o=i[s][1];for(let a=-1;a<=7;a++)if(!(r+a<=-1||n<=r+a))for(let l=-1;l<=7;l++)o+l<=-1||n<=o+l||(a>=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(r+a,o+l,!0,!0):t.set(r+a,o+l,!1,!0))}}function i9(t){const e=t.size;for(let n=8;n<e-8;n++){const i=n%2===0;t.set(n,6,i,!0),t.set(6,n,i,!0)}}function s9(t,e){const n=Z7.getPositions(e);for(let i=0;i<n.length;i++){const s=n[i][0],r=n[i][1];for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?t.set(s+o,r+a,!0,!0):t.set(s+o,r+a,!1,!0)}}function r9(t,e){const n=t.size,i=Fh.getEncodedBits(e);let s,r,o;for(let a=0;a<18;a++)s=Math.floor(a/3),r=a%3+n-8-3,o=(i>>a&1)===1,t.set(s,r,o,!0),t.set(r,s,o,!0)}function up(t,e,n){const i=t.size,s=e9.getEncodedBits(e,n);let r,o;for(r=0;r<15;r++)o=(s>>r&1)===1,r<6?t.set(r,8,o,!0):r<8?t.set(r+1,8,o,!0):t.set(i-15+r,8,o,!0),r<8?t.set(8,i-r-1,o,!0):r<9?t.set(8,15-r-1+1,o,!0):t.set(8,15-r-1,o,!0);t.set(i-8,8,1,!0)}function o9(t,e){const n=t.size;let i=-1,s=n-1,r=7,o=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(s,a-l)){let c=!1;o<e.length&&(c=(e[o]>>>r&1)===1),t.set(s,a-l,c),r--,r===-1&&(o++,r=7)}if(s+=i,s<0||n<=s){s-=i,i=-i;break}}}function a9(t,e,n){const i=new X7;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),t9.getCharCountIndicator(l.mode,t)),l.write(i)});const s=Ff.getSymbolTotalCodewords(t),r=km.getTotalCodewordsCount(t,e),o=(s-r)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const a=(o-i.getLengthInBits())/8;for(let l=0;l<a;l++)i.put(l%2?17:236,8);return l9(i,t,e)}function l9(t,e,n){const i=Ff.getSymbolTotalCodewords(e),s=km.getTotalCodewordsCount(e,n),r=i-s,o=km.getBlocksCount(e,n),a=i%o,l=o-a,c=Math.floor(i/o),u=Math.floor(r/o),d=u+1,f=c-u,g=new Q7(f);let p=0;const m=new Array(o),v=new Array(o);let y=0;const x=new Uint8Array(t.buffer);for(let k=0;k<o;k++){const T=k<l?u:d;m[k]=x.slice(p,p+T),v[k]=g.encode(m[k]),p+=T,y=Math.max(y,T)}const E=new Uint8Array(i);let w=0,b,C;for(b=0;b<y;b++)for(C=0;C<o;C++)b<m[C].length&&(E[w++]=m[C][b]);for(b=0;b<f;b++)for(C=0;C<o;C++)E[w++]=v[C][b];return E}function c9(t,e,n,i){let s;if(Array.isArray(t))s=cp.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const u=cp.rawSplit(t);c=Fh.getBestVersionForData(u,n)}s=cp.fromString(t,c||40)}else throw new Error("Invalid data");const r=Fh.getBestVersionForData(s,n);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=r;else if(e<r)throw new Error( `
2024-08-05 15:39:11 -04:00
The chosen QR Code version cannot contain this amount of data .
2024-10-02 21:53:57 +08:00
Minimum version required to store current data is : ` +r+ ` .
2024-10-29 14:57:29 +08:00
` );const o=a9(e,n,s),a=Ff.getSymbolSize(e),l=new q7(a);return n9(l,e),i9(l),s9(l,e),up(l,n,0),e>=7&&r9(l,e),o9(l,o),isNaN(i)&&(i=Sm.getBestMask(l,up.bind(null,l,n))),Sm.applyMask(i,l),up(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:s}}Vk.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=lp.M,s,r;return typeof n<"u"&&(i=lp.from(n.errorCorrectionLevel,lp.M),s=Fh.from(n.version),r=Sm.from(n.maskPattern),n.toSJISFunc&&Ff.setToSJISFunction(n.toSJISFunc)),c9(e,s,i,r)};var Qk={},fv={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(r){return[r,r]}))),i.length===6&&i.push("F","F");const s=parseInt(i.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const s=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,r=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:r,scale:r?4:o,margin:s,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},t.getImageWidth=function(i,s){const r=t.getScale(i,s);return Math.floor((i+s.margin*2)*r)},t.qrToImageData=function(i,s,r){const o=s.modules.size,a=s.modules.data,l=t.getScale(o,r),c=Math.floor((o+r.margin*2)*l),u=r.margin*l,d=[r.color.light,r.color.dark];for(let f=0;f<c;f++)for(let g=0;g<c;g++){let p=(f*c+g)*4,m=r.color.light;if(f>=u&&g>=u&&f<c-u&&g<c-u){const v=Math.floor((f-u)/l),y=Math.floor((g-u)/l);m=d[a[v*o+y]?1:0]}i[p++]=m.r,i[p++]=m.g,i[p++]=m.b,i[p]=m.a}}})(fv);(function(t){const e=fv;function n(s,r,o){s.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=o,r.width=o,r.style.height=o+"px",r.style.width=o+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(r,o,a){let l=a,c=o;typeof l>"u"&&(!o||!o.getContext)&&(l=o,o=void 0),o||(c=i()),l=e.getOptions(l);const u=e.getImageWidth(r.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return e.qrToImageData(f.data,r,l),n(d,c,u),d.putImageData(f,0,0),c},t.renderToDataURL=function(r,o,a){let l=a;typeof l>"u"&&(!o||!o.getContext)&&(l=o,o=void 0),l||(l={});const c=t.render(r,o,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(Qk);var eT={};const u9=fv;function iw(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function dp(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function d9(t,e,n){let i="",s=0,r=!1,o=0;for(let a=0;a<t.length;a++){const l=Math.floor(a%e),c=Math.floor(a/e);!l&&!r&&(r=!0),t[a]?(o++,a>0&&l>0&&t[a-1]||(i+=r?dp("M",l+n,.5+c+n):dp("m",s,0),s=0,r=!1),l+1<e&&t[a+1]||(i+=dp("h",o),o=0)):s++}return i}eT.render=function(e,n,i){const s=u9.getOptions(n),r=e.modules.size,o=e.modules.data,a=r+s.margin*2,l=s.color.light.a?"<path "+iw(s.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+iw(s.color.dark,"stroke")+' d="'+d9(o,r,s.margin)+'"/>',u='viewBox="0 0 '+a+" "+a+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+u+' shape-rendering="crispEdges">'+l+c+ ` < / s v g >
` ;return typeof i=="function"&&i(null,f),f};const h9=T7,Tm=Vk,tT=Qk,f9=eT;function gv(t,e,n,i,s){const r=[].slice.call(arguments,1),o=r.length,a=typeof r[o-1]=="function";if(!a&&!h9())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(s=n,n=e,e=i=void 0):o===3&&(e.getContext&&typeof s>"u"?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(n=e,e=i=void 0):o===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,c){try{const u=Tm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=Tm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}wa.create=Tm.create;wa.toCanvas=gv.bind(null,tT.render);wa.toDataURL=gv.bind(null,tT.renderToDataURL);wa.toString=gv.bind(null,function(t,e,n){return f9.render(t,n)});const g9={name:"peerQRCode",components:{LocaleText:Le},props:{peerConfigData:String},mounted(){wa.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},p9={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},m9={class:"container d-flex h-100 w-100"},_9={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},v9={class:"card rounded-3 shadow"},y9={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},b9={class:"mb-0"},w9={class:"card-body"},x9={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function E9(t,e,n,i,s,r){const o=Ce("LocaleText");return P(),F("div",p9,[h("div",m9,[h("div",_9,[h("div",v9,[h("div",y9,[h("h4",b9,[ $ (o,{t:"QR Code"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this. $ emit("close"))})]),h("div",w9,[h("canvas",x9,null,512)])])])])])}const C9=He(g9,[["render",E9]]),S9={name:"nameInput",components:{LocaleText:Le},props:{bulk:Boolean,data:Object,saving:Boolean}},k9={for:"peer_name_textbox",class:"form-label"},T9={class:"text-muted"},A9=["disabled"];function P9(t,e,n,i,s,r){const o=Ce("LocaleText");return P(),F("div",{class:Se({inactiveField:this.bulk})},[h("label",k9,[h("small",T9,[ $ (o,{t:"Name"})])]),Re(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,A9),[[ze,this.data.name]])],2)}const M9=He(S9,[["render",P9]]),I9={name:"privatePublicKeyInput",components:{LocaleText:Le},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const t=Xe(),e= $ n();return{dashboardStore:t,wgStore:e}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},testKey(t){return/^[A-Za-z0-9+/]{43}=?=? $ /.test(t)},checkMatching(){try{this.keypair.privateKey&&this.wgStore.checkWGKeyLength(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey?(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private key does not match with the public key","danger")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},D9={for:"peer_private_key_textbox",class:"form-label"},R9={class:"text-muted"}, $ 9={class:"input-group"},L9=["disabled"],O9=["disabled"],N9={class:"d-flex"},F9={for:"public_key",class:"form-label"},B9={class:"text-muted"},V9={class:"form-check form-switch ms-auto"},z9=["disabled"],W9={class:"form-check-label",for:"enablePublicKeyEdit"},Y9=["disabled"];function H9(t,e,n,i,s,r){const o=Ce("LocaleText");return P(),F("div",{class:Se(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[h("label",D9,[h("small",R9,[ $ (o,{t:"Private Key"}),h("code
` );a(p,m,v)?(qu( $ m),Ja=null,Rm=void 0,er.set(g,100)):(er.set(g,er.get(g)+1,!0),c=!1)}}c&&(clearInterval(r),r=void 0)}return function(c){const u=NT(c);if(!u)return;const d=u.families;for(let f=0,g=d.length;f<g;++f){const p=d[f],m=u.style+ `
2024-10-02 21:53:57 +08:00
` +u.weight+ `
2024-10-29 14:57:29 +08:00
` +p;er.get(m)===void 0&&(er.set(m,100,!0),a(u.style,u.weight,p)||(er.set(m,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),bie=function(){let t;return function(e){let n= $ m[e];if(n==null){if( $ T){const i=NT(e),s=BT(e,"Žg");n=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),n=t.offsetHeight,document.body.removeChild(t); $ m[e]=n}return n}}();function BT(t,e){return Ja||(Ja=hn(1,1)),t!=Rm&&(Ja.font=t,Rm=Ja.font),Ja.measureText(e)}function Kh(t,e){return BT(t,e).width}function Iw(t,e,n){if(e in n)return n[e];const i=e.split( `
` ).reduce((s,r)=>Math.max(s,Kh(t,r)),0);return n[e]=i,i}function wie(t,e){const n=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let c=0,u=e.length;c<=u;c+=2){const d=e[c];if(d=== `
` ||c===u){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const f=e[c+1]||t.font,g=Kh(f,d);n.push(g),o+=g;const p=bie(f);i.push(p),l=Math.max(l,p)}return{width:r,height:a,widths:n,heights:i,lineWidths:s}}function xie(t,e,n,i,s,r,o,a,l,c,u){t.save(),n!==1&&(t.globalAlpha===void 0?t.globalAlpha=d=>d.globalAlpha*=n:t.globalAlpha*=n),e&&t.transform.apply(t,e),i.contextInstructions?(t.translate(l,c),t.scale(u[0],u[1]),Eie(i,t)):u[0]<0||u[1]<0?(t.translate(l,c),t.scale(u[0],u[1]),t.drawImage(i,s,r,o,a,0,0,o,a)):t.drawImage(i,s,r,o,a,l,c,o*u[0],a*u[1]),t.restore()}function Eie(t,e){const n=t.contextInstructions;for(let i=0,s=n.length;i<s;i+=2)Array.isArray(n[i+1])?e[n[i]].apply(e,n[i+1]):e[n[i]]=n[i+1]}class Qf extends Zf{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?ot.LOADING:ot.LOADED,this.imageState_===ot.LOADING&&this.ready().then(()=>this.imageState_=ot.LOADED),this.render()}clone(){const e=this.getScale(),n=new Qf({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n}getAnchor(){const e=this.size_,n=this.getDisplacement(),i=this.getScaleArray();return[e[0]/2-n[0]/i[0],e[1]/2+n[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){let n=this.canvases_[e];if(!n){const i=this.renderOptions_,s=hn(i.size*e,i.size*e);this.draw_(i,s,e),n=s.canvas,this.canvases_[e]=n}return n}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,n,i){if(n===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return n;let s=this.radius,r=this.radius2_===void 0?s:this.radius2_;if(s<r){const C=s;s=r,r=C}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=r*Math.sin(a),c=Math.sqrt(r*r-l*l),u=s-c,d=Math.sqrt(l*l+u*u),f=d/l;if(e==="miter"&&f<=i)return f*n;const g=n/2/f,p=n/2*(u/d),v=Math.sqrt((s+g)*(s+g)+p*p)-s;if(this.radius2_===void 0||e==="bevel")return v*2;const y=s*Math.sin(a),x=Math.sqrt(s*s-y*y),E=r-x,b=Math.sqrt(y*y+E*E)/y;if(b<=i){const C=b*n/2-r-s;return 2*Math.max(v,C)}return v*2}createRenderOptions(){let e=Yl,n=Hl,i=0,s=null,r=0,o,a=0;this.stroke_&&(o=Ds(this.stroke_.getColor()??Au),a=this.stroke_.getWidth()??Mu,s=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset()??0,n=this.stroke_.getLineJoin()??Hl,e=this.stroke_.getLineCap()??Yl,i=this.stroke_.getMiterLimit()??Tu);const l=this.calculateLineJoinSize_(n,a,i),c=Math.max(this.radius,this.radius2_||0),u=Math.ceil(2*c+l);return{strokeStyle:o,strokeWidth:a,size:u,lineCap:e,lineDash:s,lineDashOffset:r,lineJoin:n,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[e,e]}draw_(e,n,i){if
` );this.generateTileUrlFunction_?this.setTileUrlFunction(ure(e,this.tileGrid),n):this.setKey(n)}tileUrlFunction(e,n,i){}}class hre extends Jv{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:fre,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:nA,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!fp(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getTileGridForProjection(e){const n=this.getProjection();if(this.tileGrid&&(!n||fp(n,e)))return this.tileGrid;const i=Et(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=cA(e)),this.tileGridForProjection[i]}createTile_(e,n,i,s,r,o){const a=[e,n,i],l=this.getTileCoordForTileUrlFunction(a,r),c=l?this.tileUrlFunction(l,s,r):void 0,u=new this.tileClass(a,c!==void 0?Ve.IDLE:Ve.EMPTY,c!==void 0?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(tt.CHANGE,this.handleTileChange.bind(this)),u}getTile(e,n,i,s,r){const o=this.getProjection();if(!o||!r||fp(o,r))return this.getTileInternal(e,n,i,s,o||r);const a=[e,n,i],l=this.getKey(),c=this.getTileGridForProjection(o),u=this.getTileGridForProjection(r),d=this.getTileCoordForTileUrlFunction(a,r),f=new Bm(o,c,r,u,a,d,this.getTilePixelRatio(s),this.getGutter(),(g,p,m,v)=>this.getTileInternal(g,p,m,v,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return f.key=l,f}getTileInternal(e,n,i,s,r){const o=this.getKey();return this.createTile_(e,n,i,s,r,o)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,n){const i=Xi(e);if(i){const s=Et(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=n)}}}function fre(t,e){t.getImage().src=e}class gre extends hre{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:Qse({extent:Zv(n),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:n,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const pre='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class mre extends gre{constructor(e){e=e||{};let n;e.attributions!==void 0?n=e.attributions:n=[pre];const i=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",s=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:n,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:i,interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:s,wrapX:e.wrapX,zDirection:e.zDirection})}}const Qd={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class _re extends qf{constructor(e){e=e||{};const n=Object.assign({},e),i=e.cacheSize;delete e.cacheSize,delete n.preload,delete n.useInterimTilesOnError,supe
` ,""),t.push(e,""),t}class zre{constructor(e,n,i,s,r){this.overlaps=i,this.pixelRatio=n,this.resolution=e,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=hs(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new dA:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,n,i,s){const r=e+n+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[n],c=this.pixelRatio,u=[l.scale[0]*c,l.scale[1]*c],d=l.justify?Qh[l.justify]:Mp(Array.isArray(e)?e[0]:e,l.textAlign||Pu),f=s&&o.lineWidth?o.lineWidth:0,g=Array.isArray(e)?e:String(e).split( `
` ).reduce(Vre,[]),{width:p,height:m,widths:v,heights:y,lineWidths:x}=wie(l,g),E=p+f,w=[],b=(E+2)*u[0],C=(m+f)*u[1],k={width:b<0?Math.floor(b):Math.ceil(b),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:w};(u[0]!=1||u[1]!=1)&&w.push("scale",u),s&&(w.push("strokeStyle",o.strokeStyle),w.push("lineWidth",f),w.push("lineCap",o.lineCap),w.push("lineJoin",o.lineJoin),w.push("miterLimit",o.miterLimit),w.push("setLineDash",[o.lineDash]),w.push("lineDashOffset",o.lineDashOffset)),i&&w.push("fillStyle",a.fillStyle),w.push("textBaseline","middle"),w.push("textAlign","center");const T=.5-d;let A=d*E+T*f;const I=[],V=[];let Y=0,ne=0,N=0,B=0,R;for(let z=0,X=g.length;z<X;z+=2){const J=g[z];if(J=== `
` ){ne+=Y,Y=0,A=d*E+T*f,++B;continue}const H=g[z+1]||l.font;H!==R&&(s&&I.push("font",H),i&&V.push("font",H),R=H),Y=Math.max(Y,y[N]);const ce=[J,A+T*v[N]+d*(v[N]-x[B]),.5*(f+Y)+ne];A+=v[N],s&&I.push("strokeText",ce),i&&V.push("fillText",ce),++N}return Array.prototype.push.apply(w,I),Array.prototype.push.apply(w,V),this.labels_[r]=k,k}replayTextBackground_(e,n,i,s,r,o,a){e.beginPath(),e.moveTo.apply(e,n),e.lineTo.apply(e,i),e.lineTo.apply(e,s),e.lineTo.apply(e,r),e.lineTo.apply(e,n),o&&(this.alignAndScaleFill_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())}calculateImageOrLabelDimensions_(e,n,i,s,r,o,a,l,c,u,d,f,g,p,m,v){a*=f[0],l*=f[1];let y=i-a,x=s-l;const E=r+c>e?e-c:r,w=o+u>n?n-u:o,b=p[3]+E*f[0]+p[1],C=p[0]+w*f[1]+p[2],k=y-p[3],T=x-p[0];(m||d!==0)&&(Rr[0]=k, $ r[0]=k,Rr[1]=T,Gs[1]=T,Gs[0]=k+b,Xs[0]=Gs[0],Xs[1]=T+C, $ r[1]=Xs[1]);let A;return d!==0?(A=br(hs(),i,s,1,1,d,-i,-s),On(A,Rr),On(A,Gs),On(A,Xs),On(A, $ r),uo(Math.min(Rr[0],Gs[0],Xs[0], $ r[0]),Math.min(Rr[1],Gs[1],Xs[1], $ r[1]),Math.max(Rr[0],Gs[0],Xs[0], $ r[0]),Math.max(Rr[1],Gs[1],Xs[1], $ r[1]),Ka)):uo(Math.min(k,k+b),Math.min(T,T+C),Math.max(k,k+b),Math.max(T,T+C),Ka),g&&(y=Math.round(y),x=Math.round(x)),{drawImageX:y,drawImageY:x,drawImageW:E,drawImageH:w,originX:c,originY:u,declutterBox:{minX:Ka[0],minY:Ka[1],maxX:Ka[2],maxY:Ka[3],value:v},canvasTransform:A,scale:f}}replayImageOrLabel_(e,n,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,u=a?a[2]*s.scale[0]/2:0;return c.minX-u<=n[0]&&c.maxX+u>=0&&c.minY-u<=n[1]&&c.maxY+u>=0&&(l&&this.replayTextBackground_(e,Rr,Gs,Xs, $ r,o,a),xie(e,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(e){const n=this.alignAndScaleFill_;if(n){const i=On(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;e.save(),e.translate(i[0]%s,i[1]%s),n!==1&&e.scale(n,n),e.rotate(this.viewRotation_)}e.fill(),n&&e.restore()}setStrokeStyle_(e,n){e.strokeStyle=n[1],e.lineWidth=n[2],e.lineCap=n[3],e.lineJoin=n[4],e.miterLimit=n[5],e.lineDashOffset=n[7],e.setLineDash(n[6])}drawLabelWithPointPlacement_(e,n,i,s){const r=this.textStates[n],o=this.createLabel(e,n,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=Mp(Array.isArray(e)?e[0]:e,r.textAlign||Pu),u=Qh[r.textBaseline||jh],d=a&&a.lineWidth?a.lineWidth:0,f=o.width/l-2*r.scale[0],g=c*f+2*(.5-c)*d,p=u*o.height/l+2*(.5-u)*d;return{label:o,anchorX:g,anchorY:p}}execute_(e,n,i,s,r,o,a,l){const c=this.zIndexContext_;let u;this.pixelCoordinates_&&So(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=io(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Ene(this.renderedTransform_,i));let d=0;const f=s.length;let g=0,p,m,v,y,x,E,w,b,C,k,T,A,I,V=0,Y=0,ne=null,N=null;const B=this.coordinateCache_,R=this.viewRotation_,z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:R},J=this.instructions!=s||this.overlaps?0:200;let H,ce,ie,te;for(;d<f;){const D=s[d];switch(D[0]){case Ue.BEGIN_GEOMETRY:H=D[1],te=D[3],H.getGeometry()?a!==void 0&&!vi(a,te.getExtent())?d=D[2]+1:++d:d=D[2],c&&(c.zIndex=D[4]);break;case Ue.BEGIN_PATH:V>J&&(this.fill_(e),V=0),Y>J&&(e.stroke(),Y=0),!V&&!Y&&(e.beginPath(),x=NaN,E=NaN),++d;break;case Ue.CIRCLE:g=D[1];const ue=u[g],L=u[g+1],le=u[g+2],de=u[g+3],xe=le-ue,W=de-L,fe=Math.sqrt(xe*xe+W*W);e.moveTo(ue+fe,L),e.arc(ue,L,fe,0,2*Math.PI,!0),++d;break;case Ue.CLOSE_PATH:e.closePath(),++d;break;case Ue.CUSTOM:g=D[1],p=D[2];const S=D[3],O=D[4],K=D[5];X.geometry=S,X.feature=H,d in B||(B[d]=[]);const U=B[d];K?K(u,g,p,2,U):(U[0]=u[g],U[1]=u[g+1],U.length=2),c&&(c.zIndex=D[6]),O(U,X),++d;break;case Ue.DRAW_IMAGE:g=D[1],p=D[2],C=D[3],m=D[4],v=D[5];let oe=D[6];const j=D[7],se=D[8],Q=D[9],ge=D[10];let be=D[11];const we=D[12];let Pe=D[13];y=D[14]||"declutter";const De=D[15];if(!C&&D.length>=20){k=D[19],T=D[20],A=D[21],I=D[22];const mn=this.drawLabelWithPointPlacement_(k,T,A,I);C=mn.label,D[3]=C;const Cn=D[23];m=(mn.anchorX-Cn)*this.pixelRatio,D[4]=m;const Sn=D[24];v=(mn.anchorY-Sn)*this.pixelRatio
` );for(let E of i){if(E==="[Peer]")break;if(E.length>0){let w=E.replace(" = ","=").split("=");w[0]==="ListenPort"?n[w[0]]=parseInt(w[1]):n[w[0]]=w[1]}}const s=me(!1),r=me(!1),o=me(""),a= $ n(),l=ve(()=>/^[a-zA-Z0-9_=+.-]{1,15} $ /.test(n.ConfigurationName)&&n.ConfigurationName.length>0&&!a.Configurations.find(E=>E.Name===n.ConfigurationName)),c=ve(()=>{try{wireguard.generatePublicKey(n.PrivateKey)}catch{return!1}return!0}),u=ve(()=>n.ListenPort>0&&n.ListenPort<=65353&&Number.isInteger(n.ListenPort)&&!a.Configurations.find(E=>parseInt(E.ListenPort)===n.ListenPort)),d=ve(()=>{try{return am(n.Address),!0}catch{return!1}}),f=ve(()=>d.value&&u.value&&c.value&&l.value);Vt(()=>{document.querySelector("main").scrollTo({top:0,behavior:"smooth"}),Zt(()=>c,E=>{E&&(n.PublicKey=wireguard.generatePublicKey(n.PrivateKey))},{immediate:!0})});const g=ve(()=>{let E;try{E=am(n.Address)}catch{return 0}return E.end-E.start}),p=ve(()=>e.selectedConfigurationBackup.database?e.selectedConfigurationBackup.databaseContent.split( `
` ).filter(w=>w.search('INSERT INTO "(.*)"')>=0).length:0),m=ve(()=>e.selectedConfigurationBackup.database?e.selectedConfigurationBackup.databaseContent.split( `
` ).filter(w=>w.search('INSERT INTO "(.*)_restrict_access"')>=0).length:0),v=Xe(),y=IC(),x=async()=>{f.value&&await ht("/api/addWireguardConfiguration",n,async E=>{E.status&&(v.newMessage("Server","Configuration restored","success"),await a.getConfigurations(),await y.push( ` / configuration / $ { n . ConfigurationName } / peers ` ))})};return(E,w)=>(P(),F("div",ple,[h("form",mle,[h("div",_le,[h("h4",vle,[ $ (Le,{t:"Configuration File"})])]),h("div",null,[h("label",yle,[h("small",null,[ $ (Le,{t:"Configuration Name"})])]),Re(h("input",{type:"text",class:Se(["form-control rounded-3",[l.value?"is-valid":"is-invalid"]]),placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":w[0]||(w[0]=b=>n.ConfigurationName=b),disabled:"",required:""},null,2),[[ze,n.ConfigurationName]]),h("div",ble,[s.value?(P(),F("div",wle,pe(o.value),1)):(P(),F("div",xle,[ $ (Le,{t:"Configuration name is invalid. Possible reasons:"}),h("ul",Ele,[h("li",null,[ $ (Le,{t:"Configuration name already exist."})]),h("li",null,[ $ (Le,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])]),h("div",Cle,[h("div",Sle,[h("div",null,[h("label",kle,[h("small",null,[ $ (Le,{t:"Private Key"})])]),h("div",Tle,[Re(h("input",{type:"text",class:Se(["form-control rounded-start-3",[c.value?"is-valid":"is-invalid"]]),id:"PrivateKey",required:"","onUpdate:modelValue":w[1]||(w[1]=b=>n.PrivateKey=b),disabled:""},null,2),[[ze,n.PrivateKey]])])])]),h("div",Ale,[h("div",null,[h("label",Ple,[h("small",null,[ $ (Le,{t:"Public Key"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PublicKey","onUpdate:modelValue":w[2]||(w[2]=b=>n.PublicKey=b),disabled:""},null,512),[[ze,n.PublicKey]])])])]),h("div",null,[h("label",Mle,[h("small",null,[ $ (Le,{t:"Listen Port"})])]),Re(h("input",{type:"number",class:Se(["form-control rounded-3",[u.value?"is-valid":"is-invalid"]]),placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":w[3]||(w[3]=b=>n.ListenPort=b),disabled:"",required:""},null,2),[[ze,n.ListenPort]]),h("div",Ile,[s.value?(P(),F("div",Dle,pe(o.value),1)):(P(),F("div",Rle,[ $ (Le,{t:"Listen Port is invalid. Possible reasons:"}),h("ul", $ le,[h("li",null,[ $ (Le,{t:"Invalid port."})]),h("li",null,[ $ (Le,{t:"Port is assigned to existing WireGuard Configuration. "})])])]))])]),h("div",null,[h("label",Lle,[h("small",null,[ $ (Le,{t:"IP Address/CIDR"})]),h("small",{class:Se(["ms-auto",[g.value>0?"text-success":"text-danger"]])},pe(g.value)+" Available IP Address ",3)]),Re(h("input",{type:"text",class:Se(["form-control",[d.value?"is-valid":"is-invalid"]]),placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":w[4]||(w[4]=b=>n.Address=b),disabled:"",required:""},null,2),[[ze,n.Address]]),h("div",Ole,[s.value?(P(),F("div",Nle,pe(o.value),1)):(P(),F("div",Fle,[ $ (Le,{t:"IP Address/CIDR is invalid"})]))])]),h("div",Ble,[h("div",Vle,[h("h2",zle,[h("button",Wle,[ $ (Le,{t:"Optional Settings"})])]),h("div",Yle,[h("div",Hle,[h("div",null,[h("label",jle,[h("small",null,[ $ (Le,{t:"PreUp"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PreUp",disabled:"","onUpdate:modelValue":w[5]||(w[5]=b=>n.PreUp=b)},null,512),[[ze,n.PreUp]])]),h("div",null,[h("label",Kle,[h("small",null,[ $ (Le,{t:"PreDown"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PreDown",disabled:"","onUpdate:modelValue":w[6]||(w[6]=b=>n.PreDown=b)},null,512),[[ze,n.PreDown]])]),h("div",null,[h("label",Ule,[h("small",null,[ $ (Le,{t:"PostUp"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PostUp",disabled:"","onUpdate:modelValue":w[7]||(w[7]=b=>n.PostUp=b)},null,512),[[ze,n.PostUp]])]),h("div",null,[h("label",Gle,[h("small",null,[ $ (Le,{t:"PostDown"})])]),Re(h("input",{type:"text",class:"form-control rounded-3",id:"PostDown",disabled:"","onUpdate:modelValue":w[8]||(w[8]=b=>n.PostDown=b)},null,512),[[ze,n.PostDown]])])])])])])]),h("div",Xle,[h("div",qle,[h("h4",Zle,[ $ (Le,{t:"Database File"})]),h("h4",{class:Se(["mb-0 ms-auto",[t.selectedConfigurationBackup.database?"text-success":"t