2024-10-05 15:38:56 +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 Xw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kI(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function MI(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 PI={exports:{}},si="top",Mi="bottom",Pi="right",ri="left",qh="auto",jl=[si,Mi,Pi,ri],ra="start",fl="end",qw="clippingParents",Nm="viewport",Ka="popper",Zw="reference",Mp=jl.reduce(function(t,e){return t.concat([e+"-"+ra,e+"-"+fl])},[]),Fm=[].concat(jl,[qh]).reduce(function(t,e){return t.concat([e,e+"-"+ra,e+"-"+fl])},[]),Jw="beforeRead",Qw="read",ex="afterRead",tx="beforeMain",nx="main",ix="afterMain",sx="beforeWrite",rx="write",ox="afterWrite",ax=[Jw,Qw,ex,tx,nx,ix,sx,rx,ox];function Ns(t){return t?(t.nodeName||"").toLowerCase():null}function Ii(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function oa(t){var e=Ii(t).Element;return t instanceof e||t instanceof Element}function Wi(t){var e=Ii(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Bm(t){if(typeof ShadowRoot>"u")return!1;var e=Ii(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function II(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];!Wi(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 DI(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},{});!Wi(s)||!Ns(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Vm={name:"applyStyles",enabled:!0,phase:"write",fn:II,effect:DI,requires:["computeStyles"]};function Rs(t){return t.split("-")[0]}var Jo=Math.max,dh=Math.min,gl=Math.round;function Pp(){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 lx(){return!/^((?!chrome|android).)*safari/i.test(Pp())}function pl(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&Wi(t)&&(s=t.offsetWidth>0&&gl(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&gl(i.height)/t.offsetHeight||1);var o=oa(t)?Ii(t):window,a=o.visualViewport,l=!lx()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/s,u=(i.top+(l&&a?a.offsetTop:0))/r,d=i.width/s,h=i.height/r;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function zm(t){var e=pl(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-05 15:38:56 +08:00
|
|
|
*/(function(t,e){(function(n,i){t.exports=i(v2)})(Xw,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(),h=G=>{do G+=Math.floor(Math.random()*a);while(document.getElementById(G));return G},f=G=>{if(!G)return 0;let{transitionDuration:_,transitionDelay:M}=window.getComputedStyle(G);const q=Number.parseFloat(_),me=Number.parseFloat(M);return!q&&!me?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"),y=G=>m(G)?G.jquery?G[0]:G:typeof G=="string"&&G.length>0?document.querySelector(u(G)):null,v=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 _},b=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",x=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?x(G.parentNode):null},E=()=>{},w=G=>{G.offsetHeight},S=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,T=[],A=G=>{document.readyState==="loading"?(T.length||document.addEventListener("DOMContentLoaded",()=>{for(const _ of T)_()}),T.push(G)):G()},k=()=>document.documentElement.dir==="rtl",P=G=>{A(()=>{const _=S();if(_){const M=G.NAME,q=_.fn[M];_.fn[M]=G.jQueryInterface,_.fn[M].Constructor=G,_.fn[M].noConflict=()=>(_.fn[M]=q,G.jQueryInterface)}})},B=(G,_=[],M=G)=>typeof G=="function"?G(..._):M,Y=(G,_,M=!0)=>{if(!M){B(G);return}const me=f(_)+5;let Re=!1;const Ie=({target:rt})=>{rt===_&&(Re=!0,_.removeEventListener(c,Ie),B(G))};_.addEventListener(c,Ie),setTimeout(()=>{Re||p(_)},me)},ne=(G,_,M,q)=>{const me=G.length;let Re=G.indexOf(_);return Re===-1?!M&&q?G[me-1]:G[0]:(Re+=M?1:-1,q&&(Re=(Re+me)%me),G[Math.max(0,Math.min(Re,me-1))])},$=/[^.]*(?=\..*)\.|.*/,F=/\..*/,D=/::\d+$/,z={};let X=1;const Z={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 le(G,_){return _&&`${_}::${X++}`||G.uidEvent||X++}function ie(G){const _=le(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 I(G,_,M){return function q(me){const Re=G.querySelectorAll(_);for(let{target:Ie}=me;Ie&&Ie!==this;Ie=Ie.parentNode)for(const rt of Re)if(rt===Ie)return fe(me,{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-05 15:03:27 +08:00
|
|
|
**//*! #__NO_SIDE_EFFECTS__ */function Xm(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const kt={},sl=[],Ls=()=>{},b2=()=>!1,Qh=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),qm=t=>t.startsWith("onUpdate:"),_n=Object.assign,Zm=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},w2=Object.prototype.hasOwnProperty,bt=(t,e)=>w2.call(t,e),Ye=Array.isArray,rl=t=>Ou(t)==="[object Map]",Kl=t=>Ou(t)==="[object Set]",zv=t=>Ou(t)==="[object Date]",qe=t=>typeof t=="function",Ht=t=>typeof t=="string",Fs=t=>typeof t=="symbol",Mt=t=>t!==null&&typeof t=="object",bx=t=>(Mt(t)||qe(t))&&qe(t.then)&&qe(t.catch),wx=Object.prototype.toString,Ou=t=>wx.call(t),x2=t=>Ou(t).slice(8,-1),xx=t=>Ou(t)==="[object Object]",Jm=t=>Ht(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Oc=Xm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ef=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},E2=/-(\w)/g,ji=ef(t=>t.replace(E2,(e,n)=>n?n.toUpperCase():"")),C2=/\B([A-Z])/g,go=ef(t=>t.replace(C2,"-$1").toLowerCase()),tf=ef(t=>t.charAt(0).toUpperCase()+t.slice(1)),gg=ef(t=>t?`on${tf(t)}`:""),so=(t,e)=>!Object.is(t,e),eh=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},Ex=(t,e,n,i=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},hh=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cx=t=>{const e=Ht(t)?Number(t):NaN;return isNaN(e)?t:e};let Wv;const Sx=()=>Wv||(Wv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pn(t){if(Ye(t)){const e={};for(let n=0;n<t.length;n++){const i=t[n],s=Ht(i)?k2(i):Pn(i);if(s)for(const r in s)e[r]=s[r]}return e}else if(Ht(t)||Mt(t))return t}const S2=/;(?![^(]*\))/g,T2=/:([^]+)/,A2=/\/\*[^]*?\*\//g;function k2(t){const e={};return t.replace(A2,"").split(S2).forEach(n=>{if(n){const i=n.split(T2);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Pe(t){let e="";if(Ht(t))e=t;else if(Ye(t))for(let n=0;n<t.length;n++){const i=Pe(t[n]);i&&(e+=i+" ")}else if(Mt(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&&!Ht(e)&&(t.class=Pe(e)),n&&(t.style=Pn(n)),t}const M2="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",P2=Xm(M2);function Tx(t){return!!t||t===""}function I2(t,e){if(t.length!==e.length)return!1;let n=!0;for(let i=0;n&&i<t.length;i++)n=aa(t[i],e[i]);return n}function aa(t,e){if(t===e)return!0;let n=zv(t),i=zv(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=Ye(t),i=Ye(e),n||i)return n&&i?I2(t,e):!1;if(n=Mt(t),i=Mt(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||!aa(t[o],e[o]))return!1}}return String(t)===String(e)}function Qm(t,e){return t.findIndex(n=>aa(n,e))}const Ax=t=>!!(t&&t.__v_isRef===!0),xe=t=>Ht(t)?t:t==null?"":Ye(t)||Mt(t)&&(t.toString===wx||!qe(t.toString))?Ax(t)?xe(t.value):JSON.stringify(t,kx,2):String(t),kx=(t,e)=>Ax(e)?kx(t,e.value):rl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[pg(i,r)+" =>"]=s,n),{})}:Kl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>pg(n))}:Fs(e)?pg(e):Mt(e)&&!Ye(e)&&!xx(e)?String(e):e,pg=(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-05 15:03:27 +08:00
|
|
|
**/let Qn;class Mx{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Qn,!e&&Qn&&(this.index=(Qn.scopes||(Qn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=Qn;try{return Qn=this,e()}finally{Qn=n}}}on(){Qn=this}off(){Qn=this.parent}stop(e){if(this._active){let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.scopes)for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function Px(t){return new Mx(t)}function nf(){return Qn}function e_(t,e=!1){Qn&&Qn.cleanups.push(t)}let It;const mg=new WeakSet;class Ix{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Qn&&Qn.active&&Qn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,mg.has(this)&&(mg.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Rx(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Yv(this),Lx(this);const e=It,n=cs;It=this,cs=!0;try{return this.fn()}finally{Ox(this),It=e,cs=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)i_(e);this.deps=this.depsTail=void 0,Yv(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?mg.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Dp(this)&&this.run()}get dirty(){return Dp(this)}}let Dx=0,$c,Nc;function Rx(t,e=!1){if(t.flags|=8,e){t.next=Nc,Nc=t;return}t.next=$c,$c=t}function t_(){Dx++}function n_(){if(--Dx>0)return;if(Nc){let e=Nc;for(Nc=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;$c;){let e=$c;for($c=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Lx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ox(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),i_(i),D2(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function Dp(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&($x(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function $x(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Qc))return;t.globalVersion=Qc;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Dp(t)){t.flags&=-3;return}const n=It,i=cs;It=t,cs=!0;try{Lx(t);const s=t.fn(t._value);(e.version===0||so(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{It=n,cs=i,Ox(t),t.flags&=-3}}function i_(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i),!n.subs&&n.computed){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)i_(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function D2(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let cs=!0;const Nx=[];function po(){Nx.push(cs),cs=!1}function mo(){const t=Nx.pop();cs=t===void 0?!0:t}function Yv(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=It;It=void 0;try{e()}finally{It=n}}}let Qc=0;class R2{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class s_{constructor(e){this.compute
|
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-05 15:38:56 +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(qe(t)){const s=Nu(t,e,n,i);return s&&bx(s)&&s.catch(r=>{Fu(r,e,n)}),s}if(Ye(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||kt;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}}cD(t,n,s,i,o)}function cD(t,e,n,i=!0,s=!1){if(s)throw t;console.error(t)}const ei=[];let ws=-1;const ol=[];let Vr=null,Ua=0;const qx=Promise.resolve();let ph=null;function Rn(t){const e=ph||qx;return t?e.then(this?t.bind(this):t):e}function uD(t){let e=ws+1,n=ei.length;for(;e<n;){const i=e+n>>>1,s=ei[i],r=nu(s);r<t||r===t&&s.flags&2?e=i+1:n=i}return e}function c_(t){if(!(t.flags&1)){const e=nu(t),n=ei[ei.length-1];!n||!(t.flags&2)&&e>=nu(n)?ei.push(t):ei.splice(uD(e),0,t),t.flags|=1,Zx()}}function Zx(){ph||(ph=qx.then(Qx))}function Lp(t){Ye(t)?ol.push(...t):Vr&&t.id===-1?Vr.splice(Ua+1,0,t):t.flags&1||(ol.push(t),t.flags|=1),Zx()}function Xv(t,e,n=ws+1){for(;n<ei.length;n++){const i=ei[n];if(i&&i.flags&2){if(t&&i.id!==t.uid)continue;ei.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Jx(t){if(ol.length){const e=[...new Set(ol)].sort((n,i)=>nu(n)-nu(i));if(ol.length=0,Vr){Vr.push(...e);return}for(Vr=e,Ua=0;Ua<Vr.length;Ua++){const n=Vr[Ua];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Vr=null,Ua=0}}const nu=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Qx(t){try{for(ws=0;ws<ei.length;ws++){const e=ei[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<ei.length;ws++){const e=ei[ws];e&&(e.flags&=-2)}ws=-1,ei.length=0,Jx(),ph=null,(ei.length||ol.length)&&Qx()}}let bn=null,eE=null;function mh(t){const e=bn;return bn=t,eE=t&&t.type.__scopeId||null,e}function De(t,e=bn,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&l0(-1);const r=mh(e);let o;try{o=t(...s)}finally{mh(r),i._d&&l0(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function $e(t,e){if(bn===null)return t;const n=gf(bn),i=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[r,o,a,l=kt]=e[s];r&&(qe(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 Io(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 tE=Symbol("_vte"),nE=t=>t.__isTeleport,Fc=t=>t&&(t.disabled||t.disabled===""),dD=t=>t&&(t.defer||t.defer===""),qv=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Zv=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Op=(t,e)=>{const n=t&&t.to;return Ht(n)?e?e(n):null:n},hD={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:y}}=c,v=Fc(e.props);let{shapeFlag:b,children:x,dynamicChildren:E}=e;if(t==null){const w=e.el=m(""),S=e.anchor=m("");f(w,n,i),f(S,n,i);const T=(k,P)=>{b&16&&(s&&s.isCE&&(s.ce._teleportTarget=k),u(x,k,P,s,r,o,a,l))},A=()=>{const k=e.target=Op(e.props,p),P=iE(k,e,m,f);k&&(o!=="svg"&&qv(k)?o="svg":o!=="mathml"&&Zv(k)&&(o="mathml"),v||(T(k,P),th(e)))};v&&(T(n,S),th(e)),dD(e.props)?hi(A,r):A()}else{e.el=t.el,e.targetStart=t.targetStart;const w=e.anchor=t.anchor,S=e.target=t.target,T=e.targetAnchor=t.targetAnchor,A=Fc(t.props),k=A?n:S,P=A?w:T;if(o==="svg"||qv(S)?o="svg":(o==="mathml"||Zv(S))&&(o="mathml"),E?(h(t.dynamicChildren,E,k,s,r,o,a),f_(t,e,!0)):l||d(t,e,k,P,s,r,o,a,!1),v)A?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):bd(e,n,w,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const B=e.target=Op(e.props,p);B&&bd(e,B,null,c,0)}else A&&bd(e,S,T,c,1);th(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-05 15:38:56 +08:00
|
|
|
**/let Hp;const d0=typeof window<"u"&&window.trustedTypes;if(d0)try{Hp=d0.createPolicy("vue",{createHTML:t=>t})}catch{}const YE=Hp?t=>Hp.createHTML(t):t=>t,_R="http://www.w3.org/2000/svg",yR="http://www.w3.org/1998/Math/MathML",tr=typeof document<"u"?document:null,h0=tr&&tr.createElement("template"),vR={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(_R,t):e==="mathml"?tr.createElementNS(yR,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{h0.innerHTML=YE(i==="svg"?`<svg>${t}</svg>`:i==="mathml"?`<math>${t}</math>`:t);const a=h0.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]}},Ar="transition",oc="animation",bl=Symbol("_vtc"),HE={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},jE=_n({},rE,HE),bR=t=>(t.displayName="Transition",t.props=jE,t),$t=bR((t,{slots:e})=>ua(mD,KE(t),e)),Ro=(t,e=[])=>{Ye(t)?t.forEach(n=>n(...e)):t&&t(...e)},f0=t=>t?Ye(t)?t.some(e=>e.length>1):t.length>1:!1;function KE(t){const e={};for(const Y in t)Y in HE||(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:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=t,p=wR(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:x,onLeave:E,onLeaveCancelled:w,onBeforeAppear:S=v,onAppear:T=b,onAppearCancelled:A=x}=e,k=(Y,ne,$)=>{$r(Y,ne?u:a),$r(Y,ne?c:o),$&&$()},P=(Y,ne)=>{Y._isLeaving=!1,$r(Y,d),$r(Y,f),$r(Y,h),ne&&ne()},B=Y=>(ne,$)=>{const F=Y?T:b,D=()=>k(ne,Y,$);Ro(F,[ne,D]),g0(()=>{$r(ne,Y?l:r),qs(ne,Y?u:a),f0(F)||p0(ne,i,m,D)})};return _n(e,{onBeforeEnter(Y){Ro(v,[Y]),qs(Y,r),qs(Y,o)},onBeforeAppear(Y){Ro(S,[Y]),qs(Y,l),qs(Y,c)},onEnter:B(!1),onAppear:B(!0),onLeave(Y,ne){Y._isLeaving=!0;const $=()=>P(Y,ne);qs(Y,d),qs(Y,h),GE(),g0(()=>{Y._isLeaving&&($r(Y,d),qs(Y,f),f0(E)||p0(Y,i,y,$))}),Ro(E,[Y,$])},onEnterCancelled(Y){k(Y,!1),Ro(x,[Y])},onAppearCancelled(Y){k(Y,!0),Ro(A,[Y])},onLeaveCancelled(Y){P(Y),Ro(w,[Y])}})}function wR(t){if(t==null)return null;if(Mt(t))return[Cg(t.enter),Cg(t.leave)];{const e=Cg(t);return[e,e]}}function Cg(t){return Cx(t)}function qs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[bl]||(t[bl]=new Set)).add(e)}function $r(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[bl];n&&(n.delete(e),n.size||(t[bl]=void 0))}function g0(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let xR=0;function p0(t,e,n,i){const s=t._endId=++xR,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=UE(t,e);if(!o)return i();const c=o+"end";let u=0;const d=()=>{t.removeEventListener(c,h),r()},h=f=>{f.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,h)}function UE(t,e){const n=window.getComputedStyle(t),i=p=>(n[p]||"").split(", "),s=i(`${Ar}Delay`),r=i(`${Ar}Duration`),o=m0(s,r),a=i(`${oc}Delay`),l=i(`${oc}Duration`),c=m0(a,l);let u=null,d=0,h=0;e===Ar?o>0&&(u=Ar,d=o,h=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-05 15:38:56 +08:00
|
|
|
*/let nC;const pf=t=>nC=t,iC=Symbol();function jp(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 eL(){const t=Px(!0),e=t.run(()=>we({}));let n=[],i=[];const s=of({install(r){pf(s),s._a=r,r.provide(iC,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!QR?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const sC=()=>{};function D0(t,e,n,i=sC){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&nf()&&e_(s),s}function Da(t,...e){t.slice().forEach(n=>{n(...e)})}const tL=t=>t(),R0=Symbol(),Ag=Symbol();function Kp(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];jp(s)&&jp(i)&&t.hasOwnProperty(n)&&!Wt(i)&&!Qr(i)?t[n]=Kp(s,i):t[n]=i}return t}const nL=Symbol();function iL(t){return!jp(t)||!t.hasOwnProperty(nL)}const{assign:Nr}=Object;function sL(t){return!!(Wt(t)&&t.effect)}function rL(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=nD(n.state.value[t]);return Nr(u,r,Object.keys(o||{}).reduce((d,h)=>(d[h]=of(be(()=>{pf(n);const f=n._s.get(t);return o[h].call(f,f)})),d),{}))}return l=rC(t,c,e,n,i,!0),l}function rC(t,e,n={},i,s,r){let o;const a=Nr({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),we({});let m;function y(A){let k;c=u=!1,typeof A=="function"?(A(i.state.value[t]),k={type:zc.patchFunction,storeId:t,events:f}):(Kp(i.state.value[t],A),k={type:zc.patchObject,payload:A,storeId:t,events:f});const P=m=Symbol();Rn().then(()=>{m===P&&(c=!0)}),u=!0,Da(d,k,i.state.value[t])}const v=r?function(){const{state:k}=n,P=k?k():{};this.$patch(B=>{Nr(B,P)})}:sC;function b(){o.stop(),d=[],h=[],i._s.delete(t)}const x=(A,k="")=>{if(R0 in A)return A[Ag]=k,A;const P=function(){pf(i);const B=Array.from(arguments),Y=[],ne=[];function $(z){Y.push(z)}function F(z){ne.push(z)}Da(h,{args:B,name:P[Ag],store:w,after:$,onError:F});let D;try{D=A.apply(this&&this.$id===t?this:w,B)}catch(z){throw Da(ne,z),z}return D instanceof Promise?D.then(z=>(Da(Y,z),z)).catch(z=>(Da(ne,z),Promise.reject(z))):(Da(Y,D),D)};return P[R0]=!0,P[Ag]=k,P},E={_p:i,$id:t,$onAction:D0.bind(null,h),$patch:y,$reset:v,$subscribe(A,k={}){const P=D0(d,A,k.detached,()=>B()),B=o.run(()=>un(()=>i.state.value[t],Y=>{(k.flush==="sync"?u:c)&&A({storeId:t,type:zc.direct,events:f},Y)},Nr({},l,k)));return P},$dispose:b},w=Ki(E);i._s.set(t,w);const T=(i._a&&i._a.runWithContext||tL)(()=>i._e.run(()=>(o=Px()).run(()=>e({action:x}))));for(const A in T){const k=T[A];if(Wt(k)&&!sL(k)||Qr(k))r||(p&&iL(k)&&(Wt(k)?k.value=p[A]:Kp(k,p[A])),i.state.value[t][A]=k);else if(typeof k=="function"){const P=x(k,A);T[A]=P,a.actions[A]=k}}return Nr(w,T),Nr(lt(w),T),Object.defineProperty(w,"$state",{get:()=>i.state.value[t],set:A=>{y(k=>{Nr(k,A)})}}),i._p.forEach(A=>{Nr(w,o.run(()=>A({store:w,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(w.$state,p),c=!0,u=!0,w}function oC(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=OD();return a=a||(c?us(iC,null):null),a&&pf(a),a=nC,a._s.has(i)||(r?rC(i,e,s,a):rL(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-05 15:38:56 +08:00
|
|
|
*/const Ga=typeof document<"u";function aC(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function oL(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&aC(t.default)}const St=Object.assign;function kg(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,lC=/#/g,aL=/&/g,lL=/\//g,cL=/=/g,uL=/\?/g,cC=/\+/g,dL=/%5B/g,hL=/%5D/g,uC=/%5E/g,fL=/%60/g,dC=/%7B/g,gL=/%7C/g,hC=/%7D/g,pL=/%20/g;function __(t){return encodeURI(""+t).replace(gL,"|").replace(dL,"[").replace(hL,"]")}function mL(t){return __(t).replace(dC,"{").replace(hC,"}").replace(uC,"^")}function Up(t){return __(t).replace(cC,"%2B").replace(pL,"+").replace(lC,"%23").replace(aL,"%26").replace(fL,"`").replace(dC,"{").replace(hC,"}").replace(uC,"^")}function _L(t){return Up(t).replace(cL,"%3D")}function yL(t){return __(t).replace(lC,"%23").replace(uL,"%3F")}function vL(t){return t==null?"":yL(t).replace(lL,"%2F")}function ou(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const bL=/\/$/,wL=t=>t.replace(bL,"");function Mg(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=SL(i??e,n),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:ou(o)}}function xL(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function L0(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function EL(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&xl(e.matched[i],n.matched[s])&&fC(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function xl(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function fC(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!CL(t[n],e[n]))return!1;return!0}function CL(t,e){return gs(t)?O0(t,e):gs(e)?O0(e,t):t===e}function O0(t,e){return gs(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function SL(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 kr={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 TL(t){if(!t)if(Ga){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),wL(t)}const AL=/^[^#]+#/;function kL(t,e){return t.replace(AL,"#")+e}function ML(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 mf=()=>({left:window.scrollX,top:window.scrollY});function PL(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=ML(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 $0(t,e){return(history.state?history.state.position-e:-1)+t}const Gp=new Map;function IL(t,e){Gp.set(t,e)}function DL(t){const e=Gp.get(t);return Gp.delete(t),e}let RL=()=>location.protocol+"//"+location.host;function gC(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),L0(l,"")}return L0(n,t)+i+s}function LL(t,e,n,i){let s=[],r=[],o=null;const a=({state:h})=>{const f=gC(t,location),p=n.value,m=e.value;let y=0;if(h){if(n.value=f,e.value=h,o&&o===p){o=null;return}y=m?h.position
|
2024-04-03 01:16:56 -04:00
|
|
|
(?:
|
2024-10-04 16:58:47 +08:00
|
|
|
(?:${mn}:){7}(?:${mn}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
|
|
(?:${mn}:){6}(?:${ts}|:${mn}|:)| // 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
|
|
|
|
(?:${mn}:){5}(?::${ts}|(?::${mn}){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
|
|
|
|
(?:${mn}:){4}(?:(?::${mn}){0,1}:${ts}|(?::${mn}){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
|
|
|
|
(?:${mn}:){3}(?:(?::${mn}){0,2}:${ts}|(?::${mn}){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
|
|
|
|
(?:${mn}:){2}(?:(?::${mn}){0,3}:${ts}|(?::${mn}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
|
|
(?:${mn}:){1}(?:(?::${mn}){0,4}:${ts}|(?::${mn}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
|
|
(?::(?:(?::${mn}){0,5}:${ts}|(?::${mn}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
2024-04-03 01:16:56 -04:00
|
|
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
2024-10-05 15:38:56 +08:00
|
|
|
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),uO=new RegExp(`(?:^${ts}$)|(?:^${_f}$)`),dO=new RegExp(`^${ts}$`),hO=new RegExp(`^${_f}$`),yf=t=>t&&t.exact?uO:new RegExp(`(?:${jr(t)}${ts}${jr(t)})|(?:${jr(t)}${_f}${jr(t)})`,"g");yf.v4=t=>t&&t.exact?dO:new RegExp(`${jr(t)}${ts}${jr(t)}`,"g");yf.v6=t=>t&&t.exact?hO:new RegExp(`${jr(t)}${_f}${jr(t)}`,"g");const bC={exact:!1},wC=`${yf.v4().source}\\/(3[0-2]|[12]?[0-9])`,xC=`${yf.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,fO=new RegExp(`^${wC}$`),gO=new RegExp(`^${xC}$`),pO=({exact:t}=bC)=>t?fO:new RegExp(wC,"g"),mO=({exact:t}=bC)=>t?gO:new RegExp(xC,"g"),EC=pO({exact:!0}),CC=mO({exact:!0}),b_=t=>EC.test(t)?4:CC.test(t)?6:0;b_.v4=t=>EC.test(t);b_.v6=t=>CC.test(t);const At=t=>{const e=tt();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]])},qn=oC("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 Yt("/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 b_(t)!==0},checkWGKeyLength(t){return console.log(t),/^[A-Za-z0-9+/]{43}=?=?$/.test(t)}}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},_O={name:"localeText",props:{t:""},computed:{getLocaleText(){return At(this.t)}}};function yO(t,e,n,i,s,r){return xe(this.getLocaleText)}const He=je(_O,[["render",yO]]),vO={name:"navbar",components:{LocaleText:He},setup(){const t=qn(),e=tt();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Yt("/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}`))})}},bO=["data-bs-theme"],wO={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},xO={class:"sidebar-sticky"},EO={class:"nav flex-column px-2"},CO={class:"nav-item"},SO={class:"nav-item"},TO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},AO={class:"nav flex-column px-2"},kO={class:"nav-item"},MO={class:"sidebar-
|
2024-03-21 02:03:08 -04:00
|
|
|
*
|
|
|
|
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
2024-10-05 15:38:56 +08:00
|
|
|
*/(function(){function t(w){var S=new Float64Array(16);if(w)for(var T=0;T<w.length;++T)S[T]=w[T];return S}function e(w,S){for(var T,A=t(),k=t(),P=0;P<16;++P)k[P]=S[P];n(k),n(k),n(k);for(var B=0;B<2;++B){A[0]=k[0]-65517;for(var P=1;P<15;++P)A[P]=k[P]-65535-(A[P-1]>>16&1),A[P-1]&=65535;A[15]=k[15]-32767-(A[14]>>16&1),T=A[15]>>16&1,A[14]&=65535,i(k,A,1-T)}for(var P=0;P<16;++P)w[2*P]=k[P]&255,w[2*P+1]=k[P]>>8}function n(w){for(var S=0;S<16;++S)w[(S+1)%16]+=(S<15?1:38)*Math.floor(w[S]/65536),w[S]&=65535}function i(w,S,T){for(var A,k=~(T-1),P=0;P<16;++P)A=k&(w[P]^S[P]),w[P]^=A,S[P]^=A}function s(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]+T[A]|0}function r(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]-T[A]|0}function o(w,S,T){for(var A=new Float64Array(31),k=0;k<16;++k)for(var P=0;P<16;++P)A[k+P]+=S[k]*T[P];for(var k=0;k<15;++k)A[k]+=38*A[k+16];for(var k=0;k<16;++k)w[k]=A[k];n(w),n(w)}function a(w,S){for(var T=t(),A=0;A<16;++A)T[A]=S[A];for(var A=253;A>=0;--A)o(T,T,T),A!==2&&A!==4&&o(T,T,S);for(var A=0;A<16;++A)w[A]=T[A]}function l(w){w[31]=w[31]&127|64,w[0]&=248}function c(w){for(var S,T=new Uint8Array(32),A=t([1]),k=t([9]),P=t(),B=t([1]),Y=t(),ne=t(),$=t([56129,1]),F=t([9]),D=0;D<32;++D)T[D]=w[D];l(T);for(var D=254;D>=0;--D)S=T[D>>>3]>>>(D&7)&1,i(A,k,S),i(P,B,S),s(Y,A,P),r(A,A,P),s(P,k,B),r(k,k,B),o(B,Y,Y),o(ne,A,A),o(A,P,A),o(P,k,Y),s(Y,A,P),r(A,A,P),o(k,A,A),r(P,B,ne),o(A,P,$),s(A,A,B),o(P,P,A),o(A,B,ne),o(B,k,F),o(k,Y,Y),i(A,k,S),i(P,B,S);return a(P,P),o(A,A,P),e(T,A),T}function u(){var w=new Uint8Array(32);return window.crypto.getRandomValues(w),w}function d(){var w=u();return l(w),w}function h(w,S){for(var T=Uint8Array.from([S[0]>>2&63,(S[0]<<4|S[1]>>4)&63,(S[1]<<2|S[2]>>6)&63,S[2]&63]),A=0;A<4;++A)w[A]=T[A]+65+(25-T[A]>>8&6)-(51-T[A]>>8&75)-(61-T[A]>>8&15)+(62-T[A]>>8&3)}function f(w){var S,T=new Uint8Array(44);for(S=0;S<32/3;++S)h(T.subarray(S*4),w.subarray(S*3));return h(T.subarray(S*4),Uint8Array.from([w[S*3+0],w[S*3+1],0])),T[43]=61,String.fromCharCode.apply(null,T)}function p(w){let S=window.atob(w),T=S.length,A=new Uint8Array(T);for(let P=0;P<T;P++)A[P]=S.charCodeAt(P);return new Uint8Array(A.buffer)}function m(w,S){w.push(S&255,S>>>8&255,S>>>16&255,S>>>24&255)}function y(w,S){w.push(S&255,S>>>8&255)}function v(w,S){for(var T=0;T<S.length;++T)w.push(S[T]&255)}function b(w){for(var S=unescape(encodeURIComponent(w)),T=new Uint8Array(S.length),A=0;A<S.length;++A)T[A]=S.charCodeAt(A);return T}function x(w){if(!x.table){x.table=[];for(var S=0,T=0;T<256;S=++T){for(var A=0;A<8;++A)S=S&1?3988292384^S>>>1:S>>>1;x.table[T]=S}}for(var k=-1,P=0;P<w.length;++P)k=k>>>8^x.table[(k^w[P])&255];return(k^-1)>>>0}function E(w){for(var S=[],T=[],A=0,k=0;k<w.length;++k){var P=b(w[k].fileName),B=b(w[k].file),Y=x(B);m(S,67324752),y(S,20),y(S,0),y(S,0),y(S,0),y(S,0),m(S,Y),m(S,B.length),m(S,B.length),y(S,P.length),y(S,0),v(S,P),v(S,B),m(T,33639248),y(T,0),y(T,20),y(T,0),y(T,0),y(T,0),y(T,0),m(T,Y),m(T,B.length),m(T,B.length),y(T,P.length),y(T,0),y(T,0),y(T,0),y(T,0),m(T,32),m(T,A),v(T,P),A+=30+B.length+P.length}return v(S,T),m(S,101010256),y(S,0),y(S,0),y(S,w.length),y(S,w.length),m(S,T.length),m(S,A),y(S,0),Uint8Array.from(S)}window.wireguard={generateKeypair:function(){var w=d(),S=c(w),T=u();return{publicKey:f(S),privateKey:f(w),presharedKey:f(T)}},generatePublicKey:function(w){return w=p(w),f(c(w))},generateZipFiles:function(w,S){var T=w.data,A=E(T),k=new Blob([A],{type:"application/zip"}),P=document.createElement("a");P.download=S,P.href=URL.createObjectURL(k),P.style.display="none",document.body.appendChild(P),P.click(),document.body.removeChild(P)}}})();const G6={name:"newConfiguration",components:{LocaleText:He},setup(){return{store:qn()}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:""},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1}},created(){this.wireguardGenerateKeypair()},methods:{wireguardGenerateKeypair(){const t=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=t.privateKey,this
|
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-05 15:03:27 +08:00
|
|
|
*/function Hu(t){return t+.5|0}const Ur=(t,e,n)=>Math.max(Math.min(t,n),e);function Ec(t){return Ur(Hu(t*2.55),0,255)}function no(t){return Ur(Hu(t*255),0,255)}function ir(t){return Ur(Hu(t/2.55)/100,0,1)}function vb(t){return Ur(Hu(t*100),0,100)}const Fi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},nm=[..."0123456789ABCDEF"],uY=t=>nm[t&15],dY=t=>nm[(t&240)>>4]+nm[t&15],Td=t=>(t&240)>>4===(t&15),hY=t=>Td(t.r)&&Td(t.g)&&Td(t.b)&&Td(t.a);function fY(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Fi[t[1]]*17,g:255&Fi[t[2]]*17,b:255&Fi[t[3]]*17,a:e===5?Fi[t[4]]*17:255}:(e===7||e===9)&&(n={r:Fi[t[1]]<<4|Fi[t[2]],g:Fi[t[3]]<<4|Fi[t[4]],b:Fi[t[5]]<<4|Fi[t[6]],a:e===9?Fi[t[7]]<<4|Fi[t[8]]:255})),n}const gY=(t,e)=>t<255?e(t):"";function pY(t){var e=hY(t)?uY:dY;return t?"#"+e(t.r)+e(t.g)+e(t.b)+gY(t.a,e):void 0}const mY=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _S(t,e,n){const i=e*Math.min(n,1-n),s=(r,o=(r+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function _Y(t,e,n){const i=(s,r=(s+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function yY(t,e,n){const i=_S(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function vY(t,e,n,i,s){return t===s?(e-n)/i+(e<n?6:0):e===s?(n-t)/i+2:(t-e)/i+4}function V_(t){const n=t.r/255,i=t.g/255,s=t.b/255,r=Math.max(n,i,s),o=Math.min(n,i,s),a=(r+o)/2;let l,c,u;return r!==o&&(u=r-o,c=a>.5?u/(2-r-o):u/(r+o),l=vY(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function z_(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(no)}function W_(t,e,n){return z_(_S,t,e,n)}function bY(t,e,n){return z_(yY,t,e,n)}function wY(t,e,n){return z_(_Y,t,e,n)}function yS(t){return(t%360+360)%360}function xY(t){const e=mY.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?Ec(+e[5]):no(+e[5]));const s=yS(+e[2]),r=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=bY(s,r,o):e[1]==="hsv"?i=wY(s,r,o):i=W_(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function EY(t,e){var n=V_(t);n[0]=yS(n[0]+e),n=W_(n),t.r=n[0],t.g=n[1],t.b=n[2]}function CY(t){if(!t)return;const e=V_(t),n=e[0],i=vb(e[1]),s=vb(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${ir(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const bb={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},wb={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"
|
2024-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-05 15:38:56 +08:00
|
|
|
*/function Us(){}const DY=(()=>{let t=0;return()=>t++})();function ft(t){return t===null||typeof t>"u"}function zt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ut(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function en(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ci(t,e){return en(t)?t:e}function it(t,e){return typeof t>"u"?e:t}const RY=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,bS=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Dt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Tt(t,e,n,i){let s,r,o;if(zt(t))for(r=t.length,s=0;s<r;s++)e.call(n,t[s],s);else if(ut(t))for(o=Object.keys(t),r=o.length,s=0;s<r;s++)e.call(n,t[o[s]],o[s])}function Ch(t,e){let n,i,s,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(s=t[n],r=e[n],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function Sh(t){if(zt(t))return t.map(Sh);if(ut(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let s=0;for(;s<i;++s)e[n[s]]=Sh(t[n[s]]);return e}return t}function wS(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function LY(t,e,n,i){if(!wS(t))return;const s=e[t],r=n[t];ut(s)&&ut(r)?hu(s,r,i):e[t]=Sh(r)}function hu(t,e,n){const i=zt(e)?e:[e],s=i.length;if(!ut(t))return t;n=n||{};const r=n.merger||LY;let o;for(let a=0;a<s;++a){if(o=i[a],!ut(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)r(l[c],t,o,n)}return t}function Kc(t,e){return hu(t,e,{merger:OY})}function OY(t,e,n){if(!wS(t))return;const i=e[t],s=n[t];ut(i)&&ut(s)?Kc(i,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Sh(s))}const Eb={"":t=>t,x:t=>t.x,y:t=>t.y};function $Y(t){const e=t.split("."),n=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function NY(t){const e=$Y(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function lo(t,e){return(Eb[e]||(Eb[e]=NY(e)))(t)}function Y_(t){return t.charAt(0).toUpperCase()+t.slice(1)}const fu=t=>typeof t<"u",co=t=>typeof t=="function",Cb=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function FY(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ft=Math.PI,Nt=2*Ft,BY=Nt+Ft,Th=Number.POSITIVE_INFINITY,VY=Ft/180,cn=Ft/2,Lo=Ft/4,Sb=Ft*2/3,Gr=Math.log10,$s=Math.sign;function Uc(t,e,n){return Math.abs(t-e)<n}function Tb(t){const e=Math.round(t);t=Uc(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Gr(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function zY(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(n|0)&&e.push(n),e.sort((s,r)=>s-r).pop(),e}function Pl(t){return!isNaN(parseFloat(t))&&isFinite(t)}function WY(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function xS(t,e,n){let i,s,r;for(i=0,s=t.length;i<s;i++)r=t[i][n],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function as(t){return t*(Ft/180)}function H_(t){return t*(180/Ft)}function Ab(t){if(!en(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function ES(t,e){const n=e.x-t.x,i=e.y-t.y,s=Math.sqrt(n*n+i*i);let r=Math.atan2(i,n);return r<-.5*Ft&&(r+=Nt),{angle:r,distance:s}}function im(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function YY(t,e){return(t-e+BY)%Nt-Ft}function Si(t){return(t%Nt+Nt)%Nt}function gu(t,e,n,i){const s=Si(t),r=Si(e),o=Si(n),a=Si(r-s),l=Si(o-s),c=Si(s-r),u=Si(s-o);return s===r||s===o||i&&r===o||a>l&&c<u}function Dn(t,e,n){return Math.max(e,Math.min(n,t))}function HY(t){return Dn(t,-32768,32767)}function lr(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function j_(t,e,n){n=n||(o=>t[o]<e);let i=t.length-1,s=0,r;for(;i-s>1;)r=s+i>>1,n(r)?s=r:i=r;return{lo:s,hi:i}}const cr=(t,e,n,i)=>j_(t,n,i?s=>{const r=t[s][e];return r<n||r===n&&t[s+1][e]===n}:s=>t[s][e]<n),jY=(t,e,n)=>j_(t,n,i=>t[i][e]>=n);function KY(t,e,n){let 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-05 15:38:56 +08:00
|
|
|
*/class X8{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=TS.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 X8;const zb="transparent",q8={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Ib(t||zb),s=i.valid&&Ib(e||zb);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Z8{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||q8[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 HS{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!ut(e))return;const n=Object.keys(tn.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];(zt(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,s=Q8(e,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&J8(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 h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){e[c]=u;continue}r[c]=d=new Z8(h,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-05 15:38:56 +08:00
|
|
|
`):t}function OK(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 S1(t,e){const n=t.chart.ctx,{body:i,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=xn(e.bodyFont),c=xn(e.titleFont),u=xn(e.footerFont),d=r.length,h=s.length,f=i.length,p=Xn(e.padding);let m=p.height,y=0,v=i.reduce((E,w)=>E+w.before.length+w.lines.length+w.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*E+(v-f)*l.lineHeight+(v-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let b=0;const x=function(E){y=Math.max(y,n.measureText(E).width+b)};return n.save(),n.font=c.string,Tt(t.title,x),n.font=l.string,Tt(t.beforeBody.concat(t.afterBody),x),b=e.displayColors?o+2+e.boxPadding:0,Tt(i,E=>{Tt(E.before,x),Tt(E.lines,x),Tt(E.after,x)}),b=0,n.font=u.string,Tt(t.footer,x),n.restore(),y+=p.width,{width:y,height:m}}function $K(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function NK(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 FK(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"),NK(c,t,e,n)&&(c="center"),c}function T1(t,e,n){const i=n.yAlign||e.yAlign||$K(t,n);return{xAlign:n.xAlign||e.xAlign||FK(t,e,n,i),yAlign:i}}function BK(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function VK(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function A1(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:h,bottomRight:f}=ia(o);let p=BK(e,a);const m=VK(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,h)+s:a==="right"&&(p+=Math.max(d,f)+s),{x:Dn(p,0,i.width-e.width),y:Dn(m,0,i.height-e.height)}}function Nd(t,e,n){const i=Xn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function k1(t){return bs([],Js(t))}function zK(t,e,n){return vo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function M1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const fT={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 ft(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 di(t,e,n,i){const s=t[e].call(n,i);return typeof s>"u"?fT[e].call(n,i):s}class P1 extends xr{static positioners=Tc;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
|
2024-10-05 15:03:27 +08:00
|
|
|
]))+`;Vs.KANJI=new RegExp(yu,"g");Vs.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Vs.BYTE=new RegExp(g7,"g");Vs.NUMERIC=new RegExp($T,"g");Vs.ALPHANUMERIC=new RegExp(f7,"g");const p7=new RegExp("^"+yu+"$"),m7=new RegExp("^"+$T+"$"),_7=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vs.testKanji=function(e){return p7.test(e)};Vs.testNumeric=function(e){return m7.test(e)};Vs.testAlphanumeric=function(e){return _7.test(e)};(function(t){const e=ry,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}}})(xo);(function(t){const e=Di,n=Df,i=If,s=xo,r=ry,o=7973,a=e.getBCHDigit(o);function l(h,f,p){for(let m=1;m<=40;m++)if(f<=t.getCapacity(m,p,h))return m}function c(h,f){return s.getCharCountIndicator(h,f)+4}function u(h,f){let p=0;return h.forEach(function(m){const y=c(m.mode,f);p+=y+m.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(u(h,p)<=t.getCapacity(p,f,s.MIXED))return p}t.from=function(f,p){return r.isValid(f)?parseInt(f,10):p},t.getCapacity=function(f,p,m){if(!r.isValid(f))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=s.BYTE);const y=e.getSymbolTotalCodewords(f),v=n.getTotalCodewordsCount(f,p),b=(y-v)*8;if(m===s.MIXED)return b;const x=b-c(m,f);switch(m){case s.NUMERIC:return Math.floor(x/10*3);case s.ALPHANUMERIC:return Math.floor(x/11*2);case s.KANJI:return Math.floor(x/13);case s.BYTE:default:return Math.floor(x/8)}},t.getBestVersionForData=function(f,p){let m;const y=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,y);if(f.length===0)return 1;m=f[0]}else m=f;return l(m.mode,m.getLength(),y)},t.getEncodedBits=function(f){if(!r.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<<e.getBCHDigit(p)-a;return f<<12|p}})(OT);var NT={};const ym=Di,FT=1335,y7=21522,U1=ym.getBCHDigit(FT);NT.getEncodedBits=function(e,n){const i=e.bit<<3|n;let s=i<<10;for(;ym.getBCHDigit(s)-U1>=0;)s^=FT<<ym.getBCHDigit(s)-U1;return(i<<10|s)^y7};var BT={};const v7=xo;function Rl(t){this.mode=v7.NUMERIC,this.data=t.toString()}Rl.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Rl.prototype.getLength=function(){return this.data.length};Rl.prototype.getBitsLength=function(){return Rl.getBitsLength(this.data.length)};Rl.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 b7=Rl;const w7=xo,sp=["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=w7.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=sp.indexOf(this.data[n])*45;i+=sp.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(sp.indexOf(this.data[n]),6)};var x7
|
|
|
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var A7=$l,VT={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,h,f,p,m,y;!a.empty();){l=a.pop(),c=l.value,d=l.cost,h=n[c]||{};for(u in h)h.hasOwnProperty(u)&&(f=h[u],p=d+f,m=o[u],y=typeof o[u]>"u",(y||m>p)&&(o[u]=p,a.push(u,p),r[u]=c))}if(typeof s<"u"&&typeof o[s]>"u"){var v=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(v)}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})(VT);var k7=VT.exports;(function(t){const e=xo,n=b7,i=x7,s=C7,r=A7,o=Vs,a=Di,l=k7;function c(v){return unescape(encodeURIComponent(v)).length}function u(v,b,x){const E=[];let w;for(;(w=v.exec(x))!==null;)E.push({data:w[0],index:w.index,mode:b,length:w[0].length});return E}function d(v){const b=u(o.NUMERIC,e.NUMERIC,v),x=u(o.ALPHANUMERIC,e.ALPHANUMERIC,v);let E,w;return a.isKanjiModeEnabled()?(E=u(o.BYTE,e.BYTE,v),w=u(o.KANJI,e.KANJI,v)):(E=u(o.BYTE_KANJI,e.BYTE,v),w=[]),b.concat(x,E,w).sort(function(T,A){return T.index-A.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function h(v,b){switch(b){case e.NUMERIC:return n.getBitsLength(v);case e.ALPHANUMERIC:return i.getBitsLength(v);case e.KANJI:return r.getBitsLength(v);case e.BYTE:return s.getBitsLength(v)}}function f(v){return v.reduce(function(b,x){const E=b.length-1>=0?b[b.length-1]:null;return E&&E.mode===x.mode?(b[b.length-1].data+=x.data,b):(b.push(x),b)},[])}function p(v){const b=[];for(let x=0;x<v.length;x++){const E=v[x];switch(E.mode){case e.NUMERIC:b.push([E,{data:E.data,mode:e.ALPHANUMERIC,length:E.length},{data:E.data,mode:e.BYTE,length:E.length}]);break;case e.ALPHANUMERIC:b.push([E,{data:E.data,mode:e.BYTE,length:E.length}]);break;case e.KANJI:b.push([E,{data:E.data,mode:e.BYTE,length:c(E.data)}]);break;case e.BYTE:b.push([{data:E.data,mode:e.BYTE,length:c(E.data)}])}}return b}function m(v,b){const x={},E={start:{}};let w=["start"];for(let S=0;S<v.length;S++){const T=v[S],A=[];for(let k=0;k<T.length;k++){const P=T[k],B=""+S+k;A.push(B),x[B]={node:P,lastCount:0},E[B]={};for(let Y=0;Y<w.length;Y++){const ne=w[Y];x[ne]&&x[ne].node.mode===P.mode?(E[ne][B]=h(x[ne].lastCount+P.length,P.mode)-h(x[ne].lastCount,P.mode),x[ne].lastCount+=P.length):(x[ne]&&(x[ne].lastCount=P.length),E[ne][B]=h(P.length,P.mode)+4+e.getCharCountIndicator(P.mode,b))}}w=A}for(let S=0;S<w.length;S++)E[w[S]].end=0;return{map:E,table:x}}function y(v,b){let x;const E=e.getBestModeForData(v);if(x=e.from(b,E),x!==e.BYTE&&x.bit<E.bit)throw new Error('"'+v+'" cannot be encoded with mode '+e.toString(x)+`.
|
|
|
|
Suggested mode is: `+e.toString(E));switch(x===e.KANJI&&!a.isKanjiModeEnabled()&&(x=e.BYTE),x){case e.NUMERIC:return new n(v);case e.ALPHANUMERIC:return new i(v);case e.KANJI:return new r(v);case e.BYTE:return new s(v)}}t.fromArray=function(b){return b.reduce(function(x,E){return typeof E=="string"?x.push(y(E,null)):E.data&&x.push(y(E.data,E.mode)),x},[])},t.fromString=function(b,x){const E=d(b,a.isKanjiModeEnabled()),w=p(E),S=m(w,x),T=l.find_path(S.map,"start","end"),A=[];for(let k=1;k<T.length-1;k++)A.push(S.table[T[k]].node);return t.fromArray(f(A))},t.rawSplit=function(b){return t.fromArray(d(b,a.isKanjiModeEnabled()))}})(BT);const Lf=Di,rp=If,M7=c7,P7=u7,I7=PT,D7=IT,vm=DT,bm=Df,R7=h7,Lh=OT,L7=NT,O7=xo,op=BT;function $7(t,e){const n=t.size,i=D7.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 N7(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 F7(t,e){const n=I7.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 B7(t,e){const n=t.size,i=Lh.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 ap(t,e,n){const i=t.size,s=L7.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 V7(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 z7(t,e,n){const i=new M7;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),O7.getCharCountIndicator(l.mode,t)),l.write(i)});const s=Lf.getSymbolTotalCodewords(t),r=bm.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 W7(i,t,e)}function W7(t,e,n){const i=Lf.getSymbolTotalCodewords(e),s=bm.getTotalCodewordsCount(e,n),r=i-s,o=bm.getBlocksCount(e,n),a=i%o,l=o-a,c=Math.floor(i/o),u=Math.floor(r/o),d=u+1,h=c-u,f=new R7(h);let p=0;const m=new Array(o),y=new Array(o);let v=0;const b=new Uint8Array(t.buffer);for(let T=0;T<o;T++){const A=T<l?u:d;m[T]=b.slice(p,p+A),y[T]=f.encode(m[T]),p+=A,v=Math.max(v,A)}const x=new Uint8Array(i);let E=0,w,S;for(w=0;w<v;w++)for(S=0;S<o;S++)w<m[S].length&&(x[E++]=m[S][w]);for(w=0;w<h;w++)for(S=0;S<o;S++)x[E++]=y[S][w];return x}function Y7(t,e,n,i){let s;if(Array.isArray(t))s=op.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const u=op.rawSplit(t);c=Lh.getBestVersionForData(u,n)}s=op.fromString(t,c||40)}else throw new Error("Invalid data");const r=Lh.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-05 15:03:27 +08:00
|
|
|
`);const o=z7(e,n,s),a=Lf.getSymbolSize(e),l=new P7(a);return $7(l,e),N7(l),F7(l,e),ap(l,n,0),e>=7&&B7(l,e),V7(l,o),isNaN(i)&&(i=vm.getBestMask(l,ap.bind(null,l,n))),vm.applyMask(i,l),ap(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:s}}kT.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=rp.M,s,r;return typeof n<"u"&&(i=rp.from(n.errorCorrectionLevel,rp.M),s=Lh.from(n.version),r=vm.from(n.maskPattern),n.toSJISFunc&&Lf.setToSJISFunction(n.toSJISFunc)),Y7(e,s,i,r)};var zT={},oy={};(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 h=0;h<c;h++)for(let f=0;f<c;f++){let p=(h*c+f)*4,m=r.color.light;if(h>=u&&f>=u&&h<c-u&&f<c-u){const y=Math.floor((h-u)/l),v=Math.floor((f-u)/l);m=d[a[y*o+v]?1:0]}i[p++]=m.r,i[p++]=m.g,i[p++]=m.b,i[p]=m.a}}})(oy);(function(t){const e=oy;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"),h=d.createImageData(u,u);return e.qrToImageData(h.data,r,l),n(d,c,u),d.putImageData(h,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)}})(zT);var WT={};const H7=oy;function G1(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function lp(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function j7(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?lp("M",l+n,.5+c+n):lp("m",s,0),s=0,r=!1),l+1<e&&t[a+1]||(i+=lp("h",o),o=0)):s++}return i}WT.render=function(e,n,i){const s=H7.getOptions(n),r=e.modules.size,o=e.modules.data,a=r+s.margin*2,l=s.color.light.a?"<path "+G1(s.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+G1(s.color.dark,"stroke")+' d="'+j7(o,r,s.margin)+'"/>',u='viewBox="0 0 '+a+" "+a+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+u+' shape-rendering="crispEdges">'+l+c+`</svg>
|
2024-10-05 15:38:56 +08:00
|
|
|
`;return typeof i=="function"&&i(null,h),h};const K7=a7,wm=kT,YT=zT,U7=WT;function ay(t,e,n,i,s){const r=[].slice.call(arguments,1),o=r.length,a=typeof r[o-1]=="function";if(!a&&!K7())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=wm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=wm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}ba.create=wm.create;ba.toCanvas=ay.bind(null,YT.render);ba.toDataURL=ay.bind(null,YT.renderToDataURL);ba.toString=ay.bind(null,function(t,e,n){return U7.render(t,n)});const G7={name:"peerQRCode",components:{LocaleText:He},props:{peerConfigData:String},mounted(){ba.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},X7={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},q7={class:"container d-flex h-100 w-100"},Z7={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},J7={class:"card rounded-3 shadow"},Q7={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},eX={class:"mb-0"},tX={class:"card-body"},nX={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function iX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",X7,[g("div",q7,[g("div",Z7,[g("div",J7,[g("div",Q7,[g("h4",eX,[N(o,{t:"QR Code"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",tX,[g("canvas",nX,null,512)])])])])])}const sX=je(G7,[["render",iX]]),rX={name:"nameInput",components:{LocaleText:He},props:{bulk:Boolean,data:Object,saving:Boolean}},oX={for:"peer_name_textbox",class:"form-label"},aX={class:"text-muted"},lX=["disabled"];function cX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[g("label",oX,[g("small",aX,[N(o,{t:"Name"})])]),$e(g("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,lX),[[We,this.data.name]])],2)}const uX=je(rX,[["render",cX]]),dX={name:"privatePublicKeyInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const t=tt(),e=qn();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()}}}},hX={for:"peer_private_key_textbox",class:"form-label"},fX={class:"text-muted"},gX={class:"input-group"},pX=["disabled"],mX=["disabled"],_X={class:"d-flex"},yX={for:"public_key",class:"form-label"},vX={class:"text-muted"},bX={class:"form-check form-switch ms-auto"},wX=["disabled"],xX={class:"form-check-label",for:"enablePublicKeyEdit"},EX=["disabled"];function CX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[g("div",null,[g("label",hX,[g("small",fX,[N(o,{t:"Private Key"}),g("code
|
2024-10-05 15:03:27 +08:00
|
|
|
`);a(p,m,y)?(Gu(km),Za=null,Am=void 0,er.set(f,100)):(er.set(f,er.get(f)+1,!0),c=!1)}}c&&(clearInterval(r),r=void 0)}return function(c){const u=SA(c);if(!u)return;const d=u.families;for(let h=0,f=d.length;h<f;++h){const p=d[h],m=u.style+`
|
2024-10-02 21:53:57 +08:00
|
|
|
`+u.weight+`
|
2024-10-05 15:03:27 +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))))}}}(),Rte=function(){let t;return function(e){let n=km[e];if(n==null){if(xA){const i=SA(e),s=AA(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);km[e]=n}return n}}();function AA(t,e){return Za||(Za=dn(1,1)),t!=Am&&(Za.font=t,Am=Za.font),Za.measureText(e)}function Wh(t,e){return AA(t,e).width}function xw(t,e,n){if(e in n)return n[e];const i=e.split(`
|
2024-10-04 16:58:47 +08:00
|
|
|
`).reduce((s,r)=>Math.max(s,Wh(t,r)),0);return n[e]=i,i}function Lte(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===`
|
2024-10-05 15:38:56 +08:00
|
|
|
`||c===u){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const h=e[c+1]||t.font,f=Wh(h,d);n.push(f),o+=f;const p=Rte(h);i.push(p),l=Math.max(l,p)}return{width:r,height:a,widths:n,heights:i,lineWidths:s}}function Ote(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]),$te(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 $te(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 Xf extends Uf{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 Xf({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=dn(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 S=s;s=r,r=S}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),h=d/l;if(e==="miter"&&h<=i)return h*n;const f=n/2/h,p=n/2*(u/d),y=Math.sqrt((s+f)*(s+f)+p*p)-s;if(this.radius2_===void 0||e==="bevel")return y*2;const v=s*Math.sin(a),b=Math.sqrt(s*s-v*v),x=r-b,w=Math.sqrt(v*v+x*x)/v;if(w<=i){const S=w*n/2-r-s;return 2*Math.max(y,S)}return y*2}createRenderOptions(){let e=Wl,n=Yl,i=0,s=null,r=0,o,a=0;this.stroke_&&(o=Ds(this.stroke_.getColor()??ku),a=this.stroke_.getWidth()??Pu,s=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset()??0,n=this.stroke_.getLineJoin()??Yl,e=this.stroke_.getLineCap()??Wl,i=this.stroke_.getMiterLimit()??Au);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(Eie(e,this.tileGrid),n):this.setKey(n)}tileUrlFunction(e,n,i){}}class Sie extends jy{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Tie,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:HA,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!up(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||up(n,e)))return this.tileGrid;const i=wt(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=ZA(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?Fe.IDLE:Fe.EMPTY,c!==void 0?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(et.CHANGE,this.handleTileChange.bind(this)),u}getTile(e,n,i,s,r){const o=this.getProjection();if(!o||!r||up(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),h=new Rm(o,c,r,u,a,d,this.getTilePixelRatio(s),this.getGutter(),(f,p,m,y)=>this.getTileInternal(f,p,m,y,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return h.key=l,h}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=Gi(e);if(i){const s=wt(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=n)}}}function Tie(t,e){t.getImage().src=e}class Aie extends Sie{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:hie({extent:Hy(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 kie='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class Mie extends Aie{constructor(e){e=e||{};let n;e.attributions!==void 0?n=e.attributions:n=[kie];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 Zd={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Pie extends Kf{constructor(e){e=e||{};const n=Object.assign({},e),i=e.cacheSize;delete e.cacheSize,delete n.preload,delete n.useInterimTilesOnError,supe
|
2024-10-05 15:03:27 +08:00
|
|
|
`,""),t.push(e,""),t}class ese{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 QA: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?Xh[l.justify]:Ap(Array.isArray(e)?e[0]:e,l.textAlign||Mu),h=s&&o.lineWidth?o.lineWidth:0,f=Array.isArray(e)?e:String(e).split(`
|
2024-10-05 15:38:56 +08:00
|
|
|
`).reduce(Qie,[]),{width:p,height:m,widths:y,heights:v,lineWidths:b}=Lte(l,f),x=p+h,E=[],w=(x+2)*u[0],S=(m+h)*u[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:E};(u[0]!=1||u[1]!=1)&&E.push("scale",u),s&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",h),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),i&&E.push("fillStyle",a.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const A=.5-d;let k=d*x+A*h;const P=[],B=[];let Y=0,ne=0,$=0,F=0,D;for(let z=0,X=f.length;z<X;z+=2){const Z=f[z];if(Z===`
|
|
|
|
`){ne+=Y,Y=0,k=d*x+A*h,++F;continue}const H=f[z+1]||l.font;H!==D&&(s&&P.push("font",H),i&&B.push("font",H),D=H),Y=Math.max(Y,v[$]);const le=[Z,k+A*y[$]+d*(y[$]-b[F]),.5*(h+Y)+ne];k+=y[$],s&&P.push("strokeText",le),i&&B.push("fillText",le),++$}return Array.prototype.push.apply(E,P),Array.prototype.push.apply(E,B),this.labels_[r]=T,T}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,h,f,p,m,y){a*=h[0],l*=h[1];let v=i-a,b=s-l;const x=r+c>e?e-c:r,E=o+u>n?n-u:o,w=p[3]+x*h[0]+p[1],S=p[0]+E*h[1]+p[2],T=v-p[3],A=b-p[0];(m||d!==0)&&(Rr[0]=T,Lr[0]=T,Rr[1]=A,Gs[1]=A,Gs[0]=T+w,Xs[0]=Gs[0],Xs[1]=A+S,Lr[1]=Xs[1]);let k;return d!==0?(k=br(hs(),i,s,1,1,d,-i,-s),On(k,Rr),On(k,Gs),On(k,Xs),On(k,Lr),uo(Math.min(Rr[0],Gs[0],Xs[0],Lr[0]),Math.min(Rr[1],Gs[1],Xs[1],Lr[1]),Math.max(Rr[0],Gs[0],Xs[0],Lr[0]),Math.max(Rr[1],Gs[1],Xs[1],Lr[1]),ja)):uo(Math.min(T,T+w),Math.min(A,A+S),Math.max(T,T+w),Math.max(A,A+S),ja),f&&(v=Math.round(v),b=Math.round(b)),{drawImageX:v,drawImageY:b,drawImageW:x,drawImageH:E,originX:c,originY:u,declutterBox:{minX:ja[0],minY:ja[1],maxX:ja[2],maxY:ja[3],value:y},canvasTransform:k,scale:h}}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,Lr,o,a),Ote(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=Ap(Array.isArray(e)?e[0]:e,r.textAlign||Mu),u=Xh[r.textBaseline||zh],d=a&&a.lineWidth?a.lineWidth:0,h=o.width/l-2*r.scale[0],f=c*h+2*(.5-c)*d,p=u*o.height/l+2*(.5-u)*d;return{label:o,anchorX:f,anchorY:p}}execute_(e,n,i,s,r,o,a,l){const c=this.zIndexContext_;let u;this.pixelCoordinates_&&Eo(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=io(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),$ee(this.renderedTransform_,i));let d=0;const h=s.length;let f=0,p,m,y,v,b,x,E,w,S,T,A,k,P,B=0,Y=0,ne=null,$=null;const F=this.coordinateCache_,D=this.viewRotation_,z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},Z=this.instructions!=s||this.overlaps?0:200;let H,le,ie,te;for(;d<h;){const I=s[d];switch(I[0]){case Ke.BEGIN_GEOMETRY:H=I[1],te=I[3],H.getGeometry()?a!==void 0&&!_i(a,te.getExtent())?d=I[2]+1:++d:d=I[2],c&&(c.zIndex=I[4]);break;case Ke.BEGIN_PATH:B>Z&&(this.fill_(e),B=0),Y>Z&&(e.stroke(),Y=0),!B&&!Y&&(e.beginPath(),b=NaN,x=NaN),++d;break;case Ke.CIRCLE:f=I[1];const ue=u[f],L=u[f+1],ae=u[f+2],de=u[f+3],ve=ae-ue,W=de-L,fe=Math.sqrt(ve*ve+W*W);e.moveTo(ue+fe,L),e.arc(ue,L,fe,0,2*Math.PI,!0),++d;break;case Ke.CLOSE_PATH:e.closePath(),++d;break;case Ke.CUSTOM:f=I[1],p=I[2];const C=I[3],O=I[4],K=I[5];X.geometry=C,X.feature=H,d in F||(F[d]=[]);const U=F[d];K?K(u,f,p,2,U):(U[0]=u[f],U[1]=u[f+1],U.length=2),c&&(c.zIndex=I[6]),O(U,X),++d;break;case Ke.DRAW_IMAGE:f=I[1],p=I[2],S=I[3],m=I[4],y=I[5];let re=I[6];const j=I[7],se=I[8],Q=I[9],ge=I[10];let _e=I[11];const ye=I[12];let ke=I[13];v=I[14]||"declutter";const Me=I[15];if(!S&&I.length>=20){T=I[19],A=I[20],k=I[21],P=I[22];const pn=this.drawLabelWithPointPlacement_(T,A,k,P);S=pn.label,I[3]=S;const Cn=I[23];m=(pn.anchorX-Cn)*this.pixelRatio,I[4]=m;const Sn=I[24];y=(pn.anchorY-Sn)*this.pixelRatio
|