diff --git a/cmd/evening_detective/static/admin/assets/index-DMmxx5Hh.js b/cmd/evening_detective/static/admin/assets/index-ByEcXhLz.js similarity index 79% rename from cmd/evening_detective/static/admin/assets/index-DMmxx5Hh.js rename to cmd/evening_detective/static/admin/assets/index-ByEcXhLz.js index fb4e039..a4d55b6 100644 --- a/cmd/evening_detective/static/admin/assets/index-DMmxx5Hh.js +++ b/cmd/evening_detective/static/admin/assets/index-ByEcXhLz.js @@ -2,34 +2,34 @@ * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function J_(r){const e=Object.create(null);for(const t of r.split(","))e[t]=1;return t=>t in e}const je={},ts=[],Ar=()=>{},U5=()=>!1,fu=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&(r.charCodeAt(2)>122||r.charCodeAt(2)<97),Q_=r=>r.startsWith("onUpdate:"),Dt=Object.assign,Z_=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},V5=Object.prototype.hasOwnProperty,Ne=(r,e)=>V5.call(r,e),ve=Array.isArray,rs=r=>pu(r)==="[object Map]",bj=r=>pu(r)==="[object Set]",ye=r=>typeof r=="function",ut=r=>typeof r=="string",ii=r=>typeof r=="symbol",Ge=r=>r!==null&&typeof r=="object",_j=r=>(Ge(r)||ye(r))&&ye(r.then)&&ye(r.catch),wj=Object.prototype.toString,pu=r=>wj.call(r),K5=r=>pu(r).slice(8,-1),Ej=r=>pu(r)==="[object Object]",ew=r=>ut(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,ao=J_(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),vu=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},G5=/-(\w)/g,Ri=vu(r=>r.replace(G5,(e,t)=>t?t.toUpperCase():"")),Y5=/\B([A-Z])/g,bn=vu(r=>r.replace(Y5,"-$1").toLowerCase()),Sj=vu(r=>r.charAt(0).toUpperCase()+r.slice(1)),ul=vu(r=>r?`on${Sj(r)}`:""),Ei=(r,e)=>!Object.is(r,e),ka=(r,...e)=>{for(let t=0;t{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,writable:i,value:t})},y_=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let $0;const gu=()=>$0||($0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function tw(r){if(ve(r)){const e={};for(let t=0;t{if(t){const i=t.split(J5);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function rw(r){let e="";if(ut(r))e=r;else if(ve(r))for(let t=0;t!!(r&&r.__v_isRef===!0),Ji=r=>ut(r)?r:r==null?"":ve(r)||Ge(r)&&(r.toString===wj||!ye(r.toString))?Tj(r)?Ji(r.value):JSON.stringify(r,$j,2):String(r),$j=(r,e)=>Tj(e)?$j(r,e.value):rs(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],s)=>(t[ll(i,s)+" =>"]=n,t),{})}:bj(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>ll(t))}:ii(e)?ll(e):Ge(e)&&!ve(e)&&!Ej(e)?String(e):e,ll=(r,e="")=>{var t;return ii(r)?`Symbol(${(t=r.description)!=null?t:e})`:r};/** +**//*! #__NO_SIDE_EFFECTS__ */function Q_(r){const e=Object.create(null);for(const t of r.split(","))e[t]=1;return t=>t in e}const je={},ts=[],Ar=()=>{},U5=()=>!1,fu=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&(r.charCodeAt(2)>122||r.charCodeAt(2)<97),Z_=r=>r.startsWith("onUpdate:"),Dt=Object.assign,ew=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},V5=Object.prototype.hasOwnProperty,Ne=(r,e)=>V5.call(r,e),ve=Array.isArray,rs=r=>pu(r)==="[object Map]",_j=r=>pu(r)==="[object Set]",ye=r=>typeof r=="function",ut=r=>typeof r=="string",ii=r=>typeof r=="symbol",Ge=r=>r!==null&&typeof r=="object",wj=r=>(Ge(r)||ye(r))&&ye(r.then)&&ye(r.catch),Ej=Object.prototype.toString,pu=r=>Ej.call(r),K5=r=>pu(r).slice(8,-1),Sj=r=>pu(r)==="[object Object]",tw=r=>ut(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,ao=Q_(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),vu=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},G5=/-(\w)/g,Ri=vu(r=>r.replace(G5,(e,t)=>t?t.toUpperCase():"")),Y5=/\B([A-Z])/g,bn=vu(r=>r.replace(Y5,"-$1").toLowerCase()),Oj=vu(r=>r.charAt(0).toUpperCase()+r.slice(1)),ul=vu(r=>r?`on${Oj(r)}`:""),Ei=(r,e)=>!Object.is(r,e),ka=(r,...e)=>{for(let t=0;t{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,writable:i,value:t})},y_=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let P0;const gu=()=>P0||(P0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function rw(r){if(ve(r)){const e={};for(let t=0;t{if(t){const i=t.split(J5);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function iw(r){let e="";if(ut(r))e=r;else if(ve(r))for(let t=0;t!!(r&&r.__v_isRef===!0),Ji=r=>ut(r)?r:r==null?"":ve(r)||Ge(r)&&(r.toString===Ej||!ye(r.toString))?$j(r)?Ji(r.value):JSON.stringify(r,Pj,2):String(r),Pj=(r,e)=>$j(e)?Pj(r,e.value):rs(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,n],s)=>(t[ll(i,s)+" =>"]=n,t),{})}:_j(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>ll(t))}:ii(e)?ll(e):Ge(e)&&!ve(e)&&!Sj(e)?String(e):e,ll=(r,e="")=>{var t;return ii(r)?`Symbol(${(t=r.description)!=null?t:e})`:r};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Jt;class Pj{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Jt,!e&&Jt&&(this.index=(Jt.scopes||(Jt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0)return;if(lo){let e=lo;for(lo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let r;for(;uo;){let e=uo;for(uo=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){r||(r=i)}e=t}}if(r)throw r}function qj(r){for(let e=r.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Dj(r){let e,t=r.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),sw(i),nH(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}r.deps=e,r.depsTail=t}function b_(r){for(let e=r.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Aj(e.dep.computed)||e.dep.version!==e.version))return!0;return!!r._dirty}function Aj(r){if(r.flags&4&&!(r.flags&16)||(r.flags&=-17,r.globalVersion===Eo))return;r.globalVersion=Eo;const e=r.dep;if(r.flags|=2,e.version>0&&!r.isSSR&&r.deps&&!b_(r)){r.flags&=-3;return}const t=He,i=mr;He=r,mr=!0;try{qj(r);const n=r.fn(r._value);(e.version===0||Ei(n,r._value))&&(r._value=n,e.version++)}catch(n){throw e.version++,n}finally{He=t,mr=i,Dj(r),r.flags&=-3}}function sw(r,e=!1){const{dep:t,prevSub:i,nextSub:n}=r;if(i&&(i.nextSub=n,r.prevSub=void 0),n&&(n.prevSub=i,r.nextSub=void 0),t.subs===r&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)sw(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function nH(r){const{prevDep:e,nextDep:t}=r;e&&(e.nextDep=t,r.prevDep=void 0),t&&(t.prevDep=e,r.nextDep=void 0)}let mr=!0;const Mj=[];function Mi(){Mj.push(mr),mr=!1}function Ni(){const r=Mj.pop();mr=r===void 0?!0:r}function P0(r){const{cleanup:e}=r;if(r.cleanup=void 0,e){const t=He;He=void 0;try{e()}finally{He=t}}}let Eo=0;class sH{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ow{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!He||!mr||He===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==He)t=this.activeLink=new sH(He,this),He.deps?(t.prevDep=He.depsTail,He.depsTail.nextDep=t,He.depsTail=t):He.deps=He.depsTail=t,Nj(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=He.depsTail,t.nextDep=void 0,He.depsTail.nextDep=t,He.depsTail=t,He.deps===t&&(He.deps=i)}return t}trigger(e){this.version++,Eo++,this.notify(e)}notify(e){iw();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{nw()}}}function Nj(r){if(r.dep.sc++,r.sub.flags&4){const e=r.dep.computed;if(e&&!r.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Nj(i)}const t=r.dep.subs;t!==r&&(r.prevSub=t,t&&(t.nextSub=r)),r.dep.subs=r}}const __=new WeakMap,rn=Symbol(""),w_=Symbol(""),So=Symbol("");function $t(r,e,t){if(mr&&He){let i=__.get(r);i||__.set(r,i=new Map);let n=i.get(t);n||(i.set(t,n=new ow),n.map=i,n.key=t),n.track()}}function Wr(r,e,t,i,n,s){const o=__.get(r);if(!o){Eo++;return}const a=u=>{u&&u.trigger()};if(iw(),e==="clear")o.forEach(a);else{const u=ve(r),l=u&&ew(t);if(u&&t==="length"){const c=Number(i);o.forEach((d,h)=>{(h==="length"||h===So||!ii(h)&&h>=c)&&a(d)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),l&&a(o.get(So)),e){case"add":u?l&&a(o.get("length")):(a(o.get(rn)),rs(r)&&a(o.get(w_)));break;case"delete":u||(a(o.get(rn)),rs(r)&&a(o.get(w_)));break;case"set":rs(r)&&a(o.get(rn));break}}nw()}function Ln(r){const e=Me(r);return e===r?e:($t(e,"iterate",So),nr(r)?e:e.map(Pt))}function mu(r){return $t(r=Me(r),"iterate",So),r}const oH={__proto__:null,[Symbol.iterator](){return dl(this,Symbol.iterator,Pt)},concat(...r){return Ln(this).concat(...r.map(e=>ve(e)?Ln(e):e))},entries(){return dl(this,"entries",r=>(r[1]=Pt(r[1]),r))},every(r,e){return Lr(this,"every",r,e,void 0,arguments)},filter(r,e){return Lr(this,"filter",r,e,t=>t.map(Pt),arguments)},find(r,e){return Lr(this,"find",r,e,Pt,arguments)},findIndex(r,e){return Lr(this,"findIndex",r,e,void 0,arguments)},findLast(r,e){return Lr(this,"findLast",r,e,Pt,arguments)},findLastIndex(r,e){return Lr(this,"findLastIndex",r,e,void 0,arguments)},forEach(r,e){return Lr(this,"forEach",r,e,void 0,arguments)},includes(...r){return hl(this,"includes",r)},indexOf(...r){return hl(this,"indexOf",r)},join(r){return Ln(this).join(r)},lastIndexOf(...r){return hl(this,"lastIndexOf",r)},map(r,e){return Lr(this,"map",r,e,void 0,arguments)},pop(){return Xs(this,"pop")},push(...r){return Xs(this,"push",r)},reduce(r,...e){return R0(this,"reduce",r,e)},reduceRight(r,...e){return R0(this,"reduceRight",r,e)},shift(){return Xs(this,"shift")},some(r,e){return Lr(this,"some",r,e,void 0,arguments)},splice(...r){return Xs(this,"splice",r)},toReversed(){return Ln(this).toReversed()},toSorted(r){return Ln(this).toSorted(r)},toSpliced(...r){return Ln(this).toSpliced(...r)},unshift(...r){return Xs(this,"unshift",r)},values(){return dl(this,"values",Pt)}};function dl(r,e,t){const i=mu(r),n=i[e]();return i!==r&&!nr(r)&&(n._next=n.next,n.next=()=>{const s=n._next();return s.value&&(s.value=t(s.value)),s}),n}const aH=Array.prototype;function Lr(r,e,t,i,n,s){const o=mu(r),a=o!==r&&!nr(r),u=o[e];if(u!==aH[e]){const d=u.apply(r,s);return a?Pt(d):d}let l=t;o!==r&&(a?l=function(d,h){return t.call(this,Pt(d),h,r)}:t.length>2&&(l=function(d,h){return t.call(this,d,h,r)}));const c=u.call(o,l,i);return a&&n?n(c):c}function R0(r,e,t,i){const n=mu(r);let s=t;return n!==r&&(nr(r)?t.length>3&&(s=function(o,a,u){return t.call(this,o,a,u,r)}):s=function(o,a,u){return t.call(this,o,Pt(a),u,r)}),n[e](s,...i)}function hl(r,e,t){const i=Me(r);$t(i,"iterate",So);const n=i[e](...t);return(n===-1||n===!1)&&lw(t[0])?(t[0]=Me(t[0]),i[e](...t)):n}function Xs(r,e,t=[]){Mi(),iw();const i=Me(r)[e].apply(r,t);return nw(),Ni(),i}const uH=J_("__proto__,__v_isRef,__isVue"),Fj=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(ii));function lH(r){ii(r)||(r=String(r));const e=Me(this);return $t(e,"has",r),e.hasOwnProperty(r)}class kj{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(n?s?bH:zj:s?Lj:jj).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=ve(e);if(!n){let u;if(o&&(u=oH[t]))return u;if(t==="hasOwnProperty")return lH}const a=Reflect.get(e,t,qt(e)?e:i);return(ii(t)?Fj.has(t):uH(t))||(n||$t(e,"get",t),s)?a:qt(a)?o&&ew(t)?a:a.value:Ge(a)?n?Wj(a):yu(a):a}}class Bj extends kj{constructor(e=!1){super(!1,e)}set(e,t,i,n){let s=e[t];if(!this._isShallow){const u=cn(s);if(!nr(i)&&!cn(i)&&(s=Me(s),i=Me(i)),!ve(e)&&qt(s)&&!qt(i))return u?!1:(s.value=i,!0)}const o=ve(e)&&ew(t)?Number(t)r,Ta=r=>Reflect.getPrototypeOf(r);function pH(r,e,t){return function(...i){const n=this.__v_raw,s=Me(n),o=rs(s),a=r==="entries"||r===Symbol.iterator&&o,u=r==="keys"&&o,l=n[r](...i),c=t?E_:e?S_:Pt;return!e&&$t(s,"iterate",u?w_:rn),{next(){const{value:d,done:h}=l.next();return h?{value:d,done:h}:{value:a?[c(d[0]),c(d[1])]:c(d),done:h}},[Symbol.iterator](){return this}}}}function $a(r){return function(...e){return r==="delete"?!1:r==="clear"?void 0:this}}function vH(r,e){const t={get(n){const s=this.__v_raw,o=Me(s),a=Me(n);r||(Ei(n,a)&&$t(o,"get",n),$t(o,"get",a));const{has:u}=Ta(o),l=e?E_:r?S_:Pt;if(u.call(o,n))return l(s.get(n));if(u.call(o,a))return l(s.get(a));s!==o&&s.get(n)},get size(){const n=this.__v_raw;return!r&&$t(Me(n),"iterate",rn),Reflect.get(n,"size",n)},has(n){const s=this.__v_raw,o=Me(s),a=Me(n);return r||(Ei(n,a)&&$t(o,"has",n),$t(o,"has",a)),n===a?s.has(n):s.has(n)||s.has(a)},forEach(n,s){const o=this,a=o.__v_raw,u=Me(a),l=e?E_:r?S_:Pt;return!r&&$t(u,"iterate",rn),a.forEach((c,d)=>n.call(s,l(c),l(d),o))}};return Dt(t,r?{add:$a("add"),set:$a("set"),delete:$a("delete"),clear:$a("clear")}:{add(n){!e&&!nr(n)&&!cn(n)&&(n=Me(n));const s=Me(this);return Ta(s).has.call(s,n)||(s.add(n),Wr(s,"add",n,n)),this},set(n,s){!e&&!nr(s)&&!cn(s)&&(s=Me(s));const o=Me(this),{has:a,get:u}=Ta(o);let l=a.call(o,n);l||(n=Me(n),l=a.call(o,n));const c=u.call(o,n);return o.set(n,s),l?Ei(s,c)&&Wr(o,"set",n,s):Wr(o,"add",n,s),this},delete(n){const s=Me(this),{has:o,get:a}=Ta(s);let u=o.call(s,n);u||(n=Me(n),u=o.call(s,n)),a&&a.call(s,n);const l=s.delete(n);return u&&Wr(s,"delete",n,void 0),l},clear(){const n=Me(this),s=n.size!==0,o=n.clear();return s&&Wr(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=pH(n,r,e)}),t}function aw(r,e){const t=vH(r,e);return(i,n,s)=>n==="__v_isReactive"?!r:n==="__v_isReadonly"?r:n==="__v_raw"?i:Reflect.get(Ne(t,n)&&n in i?t:i,n,s)}const gH={get:aw(!1,!1)},mH={get:aw(!1,!0)},yH={get:aw(!0,!1)};const jj=new WeakMap,Lj=new WeakMap,zj=new WeakMap,bH=new WeakMap;function _H(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wH(r){return r.__v_skip||!Object.isExtensible(r)?0:_H(K5(r))}function yu(r){return cn(r)?r:uw(r,!1,dH,gH,jj)}function Hj(r){return uw(r,!1,fH,mH,Lj)}function Wj(r){return uw(r,!0,hH,yH,zj)}function uw(r,e,t,i,n){if(!Ge(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const s=n.get(r);if(s)return s;const o=wH(r);if(o===0)return r;const a=new Proxy(r,o===2?i:t);return n.set(r,a),a}function is(r){return cn(r)?is(r.__v_raw):!!(r&&r.__v_isReactive)}function cn(r){return!!(r&&r.__v_isReadonly)}function nr(r){return!!(r&&r.__v_isShallow)}function lw(r){return r?!!r.__v_raw:!1}function Me(r){const e=r&&r.__v_raw;return e?Me(e):r}function Uj(r){return!Ne(r,"__v_skip")&&Object.isExtensible(r)&&Oj(r,"__v_skip",!0),r}const Pt=r=>Ge(r)?yu(r):r,S_=r=>Ge(r)?Wj(r):r;function qt(r){return r?r.__v_isRef===!0:!1}function Pr(r){return Vj(r,!1)}function EH(r){return Vj(r,!0)}function Vj(r,e){return qt(r)?r:new SH(r,e)}class SH{constructor(e,t){this.dep=new ow,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Me(e),this._value=t?e:Pt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||nr(e)||cn(e);e=i?e:Me(e),Ei(e,t)&&(this._rawValue=e,this._value=i?e:Pt(e),this.dep.trigger())}}function sr(r){return qt(r)?r.value:r}const OH={get:(r,e,t)=>e==="__v_raw"?r:sr(Reflect.get(r,e,t)),set:(r,e,t,i)=>{const n=r[e];return qt(n)&&!qt(t)?(n.value=t,!0):Reflect.set(r,e,t,i)}};function Kj(r){return is(r)?r:new Proxy(r,OH)}class IH{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new ow(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Eo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&He!==this)return xj(this,!0),!0}get value(){const e=this.dep.track();return Aj(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function TH(r,e,t=!1){let i,n;return ye(r)?i=r:(i=r.get,n=r.set),new IH(i,n,t)}const Pa={},Ka=new WeakMap;let Xi;function $H(r,e=!1,t=Xi){if(t){let i=Ka.get(t);i||Ka.set(t,i=[]),i.push(r)}}function PH(r,e,t=je){const{immediate:i,deep:n,once:s,scheduler:o,augmentJob:a,call:u}=t,l=y=>n?y:nr(y)||n===!1||n===0?Ur(y,1):Ur(y);let c,d,h,f,p=!1,v=!1;if(qt(r)?(d=()=>r.value,p=nr(r)):is(r)?(d=()=>l(r),p=!0):ve(r)?(v=!0,p=r.some(y=>is(y)||nr(y)),d=()=>r.map(y=>{if(qt(y))return y.value;if(is(y))return l(y);if(ye(y))return u?u(y,2):y()})):ye(r)?e?d=u?()=>u(r,2):r:d=()=>{if(h){Mi();try{h()}finally{Ni()}}const y=Xi;Xi=c;try{return u?u(r,3,[f]):r(f)}finally{Xi=y}}:d=Ar,e&&n){const y=d,S=n===!0?1/0:n;d=()=>Ur(y(),S)}const b=iH(),m=()=>{c.stop(),b&&b.active&&Z_(b.effects,c)};if(s&&e){const y=e;e=(...S)=>{y(...S),m()}}let g=v?new Array(r.length).fill(Pa):Pa;const w=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(e){const S=c.run();if(n||p||(v?S.some((O,I)=>Ei(O,g[I])):Ei(S,g))){h&&h();const O=Xi;Xi=c;try{const I=[S,g===Pa?void 0:v&&g[0]===Pa?[]:g,f];u?u(e,3,I):e(...I),g=S}finally{Xi=O}}}else c.run()};return a&&a(w),c=new Rj(d),c.scheduler=o?()=>o(w,!1):w,f=y=>$H(y,!1,c),h=c.onStop=()=>{const y=Ka.get(c);if(y){if(u)u(y,4);else for(const S of y)S();Ka.delete(c)}},e?i?w(!0):g=c.run():o?o(w.bind(null,!0),!0):c.run(),m.pause=c.pause.bind(c),m.resume=c.resume.bind(c),m.stop=m,m}function Ur(r,e=1/0,t){if(e<=0||!Ge(r)||r.__v_skip||(t=t||new Set,t.has(r)))return r;if(t.add(r),e--,qt(r))Ur(r.value,e,t);else if(ve(r))for(let i=0;i{Ur(i,e,t)});else if(Ej(r)){for(const i in r)Ur(r[i],e,t);for(const i of Object.getOwnPropertySymbols(r))Object.prototype.propertyIsEnumerable.call(r,i)&&Ur(r[i],e,t)}return r}/** +**/let Jt;class Rj{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Jt,!e&&Jt&&(this.index=(Jt.scopes||(Jt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0)return;if(lo){let e=lo;for(lo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let r;for(;uo;){let e=uo;for(uo=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){r||(r=i)}e=t}}if(r)throw r}function Dj(r){for(let e=r.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Aj(r){let e,t=r.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),ow(i),nH(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}r.deps=e,r.depsTail=t}function b_(r){for(let e=r.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Mj(e.dep.computed)||e.dep.version!==e.version))return!0;return!!r._dirty}function Mj(r){if(r.flags&4&&!(r.flags&16)||(r.flags&=-17,r.globalVersion===Eo))return;r.globalVersion=Eo;const e=r.dep;if(r.flags|=2,e.version>0&&!r.isSSR&&r.deps&&!b_(r)){r.flags&=-3;return}const t=He,i=mr;He=r,mr=!0;try{Dj(r);const n=r.fn(r._value);(e.version===0||Ei(n,r._value))&&(r._value=n,e.version++)}catch(n){throw e.version++,n}finally{He=t,mr=i,Aj(r),r.flags&=-3}}function ow(r,e=!1){const{dep:t,prevSub:i,nextSub:n}=r;if(i&&(i.nextSub=n,r.prevSub=void 0),n&&(n.prevSub=i,r.nextSub=void 0),t.subs===r&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)ow(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function nH(r){const{prevDep:e,nextDep:t}=r;e&&(e.nextDep=t,r.prevDep=void 0),t&&(t.prevDep=e,r.nextDep=void 0)}let mr=!0;const Nj=[];function Mi(){Nj.push(mr),mr=!1}function Ni(){const r=Nj.pop();mr=r===void 0?!0:r}function R0(r){const{cleanup:e}=r;if(r.cleanup=void 0,e){const t=He;He=void 0;try{e()}finally{He=t}}}let Eo=0;class sH{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class aw{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!He||!mr||He===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==He)t=this.activeLink=new sH(He,this),He.deps?(t.prevDep=He.depsTail,He.depsTail.nextDep=t,He.depsTail=t):He.deps=He.depsTail=t,Fj(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=He.depsTail,t.nextDep=void 0,He.depsTail.nextDep=t,He.depsTail=t,He.deps===t&&(He.deps=i)}return t}trigger(e){this.version++,Eo++,this.notify(e)}notify(e){nw();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{sw()}}}function Fj(r){if(r.dep.sc++,r.sub.flags&4){const e=r.dep.computed;if(e&&!r.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Fj(i)}const t=r.dep.subs;t!==r&&(r.prevSub=t,t&&(t.nextSub=r)),r.dep.subs=r}}const __=new WeakMap,rn=Symbol(""),w_=Symbol(""),So=Symbol("");function $t(r,e,t){if(mr&&He){let i=__.get(r);i||__.set(r,i=new Map);let n=i.get(t);n||(i.set(t,n=new aw),n.map=i,n.key=t),n.track()}}function Wr(r,e,t,i,n,s){const o=__.get(r);if(!o){Eo++;return}const a=u=>{u&&u.trigger()};if(nw(),e==="clear")o.forEach(a);else{const u=ve(r),l=u&&tw(t);if(u&&t==="length"){const c=Number(i);o.forEach((d,h)=>{(h==="length"||h===So||!ii(h)&&h>=c)&&a(d)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),l&&a(o.get(So)),e){case"add":u?l&&a(o.get("length")):(a(o.get(rn)),rs(r)&&a(o.get(w_)));break;case"delete":u||(a(o.get(rn)),rs(r)&&a(o.get(w_)));break;case"set":rs(r)&&a(o.get(rn));break}}sw()}function Ln(r){const e=Me(r);return e===r?e:($t(e,"iterate",So),sr(r)?e:e.map(Pt))}function mu(r){return $t(r=Me(r),"iterate",So),r}const oH={__proto__:null,[Symbol.iterator](){return dl(this,Symbol.iterator,Pt)},concat(...r){return Ln(this).concat(...r.map(e=>ve(e)?Ln(e):e))},entries(){return dl(this,"entries",r=>(r[1]=Pt(r[1]),r))},every(r,e){return Lr(this,"every",r,e,void 0,arguments)},filter(r,e){return Lr(this,"filter",r,e,t=>t.map(Pt),arguments)},find(r,e){return Lr(this,"find",r,e,Pt,arguments)},findIndex(r,e){return Lr(this,"findIndex",r,e,void 0,arguments)},findLast(r,e){return Lr(this,"findLast",r,e,Pt,arguments)},findLastIndex(r,e){return Lr(this,"findLastIndex",r,e,void 0,arguments)},forEach(r,e){return Lr(this,"forEach",r,e,void 0,arguments)},includes(...r){return hl(this,"includes",r)},indexOf(...r){return hl(this,"indexOf",r)},join(r){return Ln(this).join(r)},lastIndexOf(...r){return hl(this,"lastIndexOf",r)},map(r,e){return Lr(this,"map",r,e,void 0,arguments)},pop(){return Xs(this,"pop")},push(...r){return Xs(this,"push",r)},reduce(r,...e){return C0(this,"reduce",r,e)},reduceRight(r,...e){return C0(this,"reduceRight",r,e)},shift(){return Xs(this,"shift")},some(r,e){return Lr(this,"some",r,e,void 0,arguments)},splice(...r){return Xs(this,"splice",r)},toReversed(){return Ln(this).toReversed()},toSorted(r){return Ln(this).toSorted(r)},toSpliced(...r){return Ln(this).toSpliced(...r)},unshift(...r){return Xs(this,"unshift",r)},values(){return dl(this,"values",Pt)}};function dl(r,e,t){const i=mu(r),n=i[e]();return i!==r&&!sr(r)&&(n._next=n.next,n.next=()=>{const s=n._next();return s.value&&(s.value=t(s.value)),s}),n}const aH=Array.prototype;function Lr(r,e,t,i,n,s){const o=mu(r),a=o!==r&&!sr(r),u=o[e];if(u!==aH[e]){const d=u.apply(r,s);return a?Pt(d):d}let l=t;o!==r&&(a?l=function(d,h){return t.call(this,Pt(d),h,r)}:t.length>2&&(l=function(d,h){return t.call(this,d,h,r)}));const c=u.call(o,l,i);return a&&n?n(c):c}function C0(r,e,t,i){const n=mu(r);let s=t;return n!==r&&(sr(r)?t.length>3&&(s=function(o,a,u){return t.call(this,o,a,u,r)}):s=function(o,a,u){return t.call(this,o,Pt(a),u,r)}),n[e](s,...i)}function hl(r,e,t){const i=Me(r);$t(i,"iterate",So);const n=i[e](...t);return(n===-1||n===!1)&&cw(t[0])?(t[0]=Me(t[0]),i[e](...t)):n}function Xs(r,e,t=[]){Mi(),nw();const i=Me(r)[e].apply(r,t);return sw(),Ni(),i}const uH=Q_("__proto__,__v_isRef,__isVue"),kj=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(ii));function lH(r){ii(r)||(r=String(r));const e=Me(this);return $t(e,"has",r),e.hasOwnProperty(r)}class Bj{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(n?s?bH:Hj:s?zj:Lj).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=ve(e);if(!n){let u;if(o&&(u=oH[t]))return u;if(t==="hasOwnProperty")return lH}const a=Reflect.get(e,t,qt(e)?e:i);return(ii(t)?kj.has(t):uH(t))||(n||$t(e,"get",t),s)?a:qt(a)?o&&tw(t)?a:a.value:Ge(a)?n?Uj(a):yu(a):a}}class jj extends Bj{constructor(e=!1){super(!1,e)}set(e,t,i,n){let s=e[t];if(!this._isShallow){const u=cn(s);if(!sr(i)&&!cn(i)&&(s=Me(s),i=Me(i)),!ve(e)&&qt(s)&&!qt(i))return u?!1:(s.value=i,!0)}const o=ve(e)&&tw(t)?Number(t)r,Ta=r=>Reflect.getPrototypeOf(r);function pH(r,e,t){return function(...i){const n=this.__v_raw,s=Me(n),o=rs(s),a=r==="entries"||r===Symbol.iterator&&o,u=r==="keys"&&o,l=n[r](...i),c=t?E_:e?S_:Pt;return!e&&$t(s,"iterate",u?w_:rn),{next(){const{value:d,done:h}=l.next();return h?{value:d,done:h}:{value:a?[c(d[0]),c(d[1])]:c(d),done:h}},[Symbol.iterator](){return this}}}}function $a(r){return function(...e){return r==="delete"?!1:r==="clear"?void 0:this}}function vH(r,e){const t={get(n){const s=this.__v_raw,o=Me(s),a=Me(n);r||(Ei(n,a)&&$t(o,"get",n),$t(o,"get",a));const{has:u}=Ta(o),l=e?E_:r?S_:Pt;if(u.call(o,n))return l(s.get(n));if(u.call(o,a))return l(s.get(a));s!==o&&s.get(n)},get size(){const n=this.__v_raw;return!r&&$t(Me(n),"iterate",rn),Reflect.get(n,"size",n)},has(n){const s=this.__v_raw,o=Me(s),a=Me(n);return r||(Ei(n,a)&&$t(o,"has",n),$t(o,"has",a)),n===a?s.has(n):s.has(n)||s.has(a)},forEach(n,s){const o=this,a=o.__v_raw,u=Me(a),l=e?E_:r?S_:Pt;return!r&&$t(u,"iterate",rn),a.forEach((c,d)=>n.call(s,l(c),l(d),o))}};return Dt(t,r?{add:$a("add"),set:$a("set"),delete:$a("delete"),clear:$a("clear")}:{add(n){!e&&!sr(n)&&!cn(n)&&(n=Me(n));const s=Me(this);return Ta(s).has.call(s,n)||(s.add(n),Wr(s,"add",n,n)),this},set(n,s){!e&&!sr(s)&&!cn(s)&&(s=Me(s));const o=Me(this),{has:a,get:u}=Ta(o);let l=a.call(o,n);l||(n=Me(n),l=a.call(o,n));const c=u.call(o,n);return o.set(n,s),l?Ei(s,c)&&Wr(o,"set",n,s):Wr(o,"add",n,s),this},delete(n){const s=Me(this),{has:o,get:a}=Ta(s);let u=o.call(s,n);u||(n=Me(n),u=o.call(s,n)),a&&a.call(s,n);const l=s.delete(n);return u&&Wr(s,"delete",n,void 0),l},clear(){const n=Me(this),s=n.size!==0,o=n.clear();return s&&Wr(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=pH(n,r,e)}),t}function uw(r,e){const t=vH(r,e);return(i,n,s)=>n==="__v_isReactive"?!r:n==="__v_isReadonly"?r:n==="__v_raw"?i:Reflect.get(Ne(t,n)&&n in i?t:i,n,s)}const gH={get:uw(!1,!1)},mH={get:uw(!1,!0)},yH={get:uw(!0,!1)};const Lj=new WeakMap,zj=new WeakMap,Hj=new WeakMap,bH=new WeakMap;function _H(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wH(r){return r.__v_skip||!Object.isExtensible(r)?0:_H(K5(r))}function yu(r){return cn(r)?r:lw(r,!1,dH,gH,Lj)}function Wj(r){return lw(r,!1,fH,mH,zj)}function Uj(r){return lw(r,!0,hH,yH,Hj)}function lw(r,e,t,i,n){if(!Ge(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const s=n.get(r);if(s)return s;const o=wH(r);if(o===0)return r;const a=new Proxy(r,o===2?i:t);return n.set(r,a),a}function is(r){return cn(r)?is(r.__v_raw):!!(r&&r.__v_isReactive)}function cn(r){return!!(r&&r.__v_isReadonly)}function sr(r){return!!(r&&r.__v_isShallow)}function cw(r){return r?!!r.__v_raw:!1}function Me(r){const e=r&&r.__v_raw;return e?Me(e):r}function Vj(r){return!Ne(r,"__v_skip")&&Object.isExtensible(r)&&Ij(r,"__v_skip",!0),r}const Pt=r=>Ge(r)?yu(r):r,S_=r=>Ge(r)?Uj(r):r;function qt(r){return r?r.__v_isRef===!0:!1}function Pr(r){return Kj(r,!1)}function EH(r){return Kj(r,!0)}function Kj(r,e){return qt(r)?r:new SH(r,e)}class SH{constructor(e,t){this.dep=new aw,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Me(e),this._value=t?e:Pt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||sr(e)||cn(e);e=i?e:Me(e),Ei(e,t)&&(this._rawValue=e,this._value=i?e:Pt(e),this.dep.trigger())}}function Qt(r){return qt(r)?r.value:r}const OH={get:(r,e,t)=>e==="__v_raw"?r:Qt(Reflect.get(r,e,t)),set:(r,e,t,i)=>{const n=r[e];return qt(n)&&!qt(t)?(n.value=t,!0):Reflect.set(r,e,t,i)}};function Gj(r){return is(r)?r:new Proxy(r,OH)}class IH{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new aw(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Eo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&He!==this)return qj(this,!0),!0}get value(){const e=this.dep.track();return Mj(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function TH(r,e,t=!1){let i,n;return ye(r)?i=r:(i=r.get,n=r.set),new IH(i,n,t)}const Pa={},Ka=new WeakMap;let Xi;function $H(r,e=!1,t=Xi){if(t){let i=Ka.get(t);i||Ka.set(t,i=[]),i.push(r)}}function PH(r,e,t=je){const{immediate:i,deep:n,once:s,scheduler:o,augmentJob:a,call:u}=t,l=y=>n?y:sr(y)||n===!1||n===0?Ur(y,1):Ur(y);let c,d,h,f,p=!1,v=!1;if(qt(r)?(d=()=>r.value,p=sr(r)):is(r)?(d=()=>l(r),p=!0):ve(r)?(v=!0,p=r.some(y=>is(y)||sr(y)),d=()=>r.map(y=>{if(qt(y))return y.value;if(is(y))return l(y);if(ye(y))return u?u(y,2):y()})):ye(r)?e?d=u?()=>u(r,2):r:d=()=>{if(h){Mi();try{h()}finally{Ni()}}const y=Xi;Xi=c;try{return u?u(r,3,[f]):r(f)}finally{Xi=y}}:d=Ar,e&&n){const y=d,S=n===!0?1/0:n;d=()=>Ur(y(),S)}const b=iH(),m=()=>{c.stop(),b&&b.active&&ew(b.effects,c)};if(s&&e){const y=e;e=(...S)=>{y(...S),m()}}let g=v?new Array(r.length).fill(Pa):Pa;const w=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(e){const S=c.run();if(n||p||(v?S.some((O,I)=>Ei(O,g[I])):Ei(S,g))){h&&h();const O=Xi;Xi=c;try{const I=[S,g===Pa?void 0:v&&g[0]===Pa?[]:g,f];u?u(e,3,I):e(...I),g=S}finally{Xi=O}}}else c.run()};return a&&a(w),c=new Cj(d),c.scheduler=o?()=>o(w,!1):w,f=y=>$H(y,!1,c),h=c.onStop=()=>{const y=Ka.get(c);if(y){if(u)u(y,4);else for(const S of y)S();Ka.delete(c)}},e?i?w(!0):g=c.run():o?o(w.bind(null,!0),!0):c.run(),m.pause=c.pause.bind(c),m.resume=c.resume.bind(c),m.stop=m,m}function Ur(r,e=1/0,t){if(e<=0||!Ge(r)||r.__v_skip||(t=t||new Set,t.has(r)))return r;if(t.add(r),e--,qt(r))Ur(r.value,e,t);else if(ve(r))for(let i=0;i{Ur(i,e,t)});else if(Sj(r)){for(const i in r)Ur(r[i],e,t);for(const i of Object.getOwnPropertySymbols(r))Object.prototype.propertyIsEnumerable.call(r,i)&&Ur(r[i],e,t)}return r}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function zo(r,e,t,i){try{return i?r(...i):r()}catch(n){bu(n,e,t)}}function Fr(r,e,t,i){if(ye(r)){const n=zo(r,e,t,i);return n&&_j(n)&&n.catch(s=>{bu(s,e,t)}),n}if(ve(r)){const n=[];for(let s=0;s>>1,n=Ft[i],s=Oo(n);s=Oo(t)?Ft.push(r):Ft.splice(CH(e),0,r),r.flags|=1,Xj()}}function Xj(){Ga||(Ga=Gj.then(Qj))}function xH(r){ve(r)?ns.push(...r):pi&&r.id===-1?pi.splice(Vn+1,0,r):r.flags&1||(ns.push(r),r.flags|=1),Xj()}function C0(r,e,t=Tr+1){for(;tOo(t)-Oo(i));if(ns.length=0,pi){pi.push(...e);return}for(pi=e,Vn=0;Vnr.id==null?r.flags&2?-1:1/0:r.id;function Qj(r){try{for(Tr=0;Tr{i._d&&j0(-1);const s=Ya(e);let o;try{o=r(...n)}finally{Ya(s),i._d&&j0(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function qH(r,e){if(xt===null)return r;const t=Ou(xt),i=r.dirs||(r.dirs=[]);for(let n=0;nr.__isTeleport;function dw(r,e){r.shapeFlag&6&&r.component?(r.transition=e,dw(r.component.subTree,e)):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}/*! #__NO_SIDE_EFFECTS__ */function wr(r,e){return ye(r)?Dt({name:r.name},e,{setup:r}):r}function eL(r){r.ids=[r.ids[0]+r.ids[2]+++"-",0,0]}function Xa(r,e,t,i,n=!1){if(ve(r)){r.forEach((p,v)=>Xa(p,e&&(ve(e)?e[v]:e),t,i,n));return}if(ss(i)&&!n){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Xa(r,e,t,i.component.subTree);return}const s=i.shapeFlag&4?Ou(i.component):i.el,o=n?null:s,{i:a,r:u}=r,l=e&&e.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,h=Me(d),f=d===je?()=>!1:p=>Ne(h,p);if(l!=null&&l!==u&&(ut(l)?(c[l]=null,f(l)&&(d[l]=null)):qt(l)&&(l.value=null)),ye(u))zo(u,a,12,[o,c]);else{const p=ut(u),v=qt(u);if(p||v){const b=()=>{if(r.f){const m=p?f(u)?d[u]:c[u]:u.value;n?ve(m)&&Z_(m,s):ve(m)?m.includes(s)||m.push(s):p?(c[u]=[s],f(u)&&(d[u]=c[u])):(u.value=[s],r.k&&(c[r.k]=u.value))}else p?(c[u]=o,f(u)&&(d[u]=o)):v&&(u.value=o,r.k&&(c[r.k]=o))};o?(b.id=-1,Xt(b,t)):b()}}}gu().requestIdleCallback;gu().cancelIdleCallback;const ss=r=>!!r.type.__asyncLoader,tL=r=>r.type.__isKeepAlive;function MH(r,e){rL(r,"a",e)}function NH(r,e){rL(r,"da",e)}function rL(r,e,t=Bt){const i=r.__wdc||(r.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return r()});if(wu(e,i,t),t){let n=t.parent;for(;n&&n.parent;)tL(n.parent.vnode)&&FH(i,e,t,n),n=n.parent}}function FH(r,e,t,i){const n=wu(e,r,i,!0);iL(()=>{Z_(i[e],n)},t)}function wu(r,e,t=Bt,i=!1){if(t){const n=t[r]||(t[r]=[]),s=e.__weh||(e.__weh=(...o)=>{Mi();const a=Ho(t),u=Fr(e,t,r,o);return a(),Ni(),u});return i?n.unshift(s):n.push(s),s}}const ni=r=>(e,t=Bt)=>{(!$o||r==="sp")&&wu(r,(...i)=>e(...i),t)},kH=ni("bm"),hw=ni("m"),BH=ni("bu"),jH=ni("u"),LH=ni("bum"),iL=ni("um"),zH=ni("sp"),HH=ni("rtg"),WH=ni("rtc");function UH(r,e=Bt){wu("ec",r,e)}const VH=Symbol.for("v-ndc");function x0(r,e,t,i){let n;const s=t,o=ve(r);if(o||ut(r)){const a=o&&is(r);let u=!1;a&&(u=!nr(r),r=mu(r)),n=new Array(r.length);for(let l=0,c=r.length;le(a,u,void 0,s));else{const a=Object.keys(r);n=new Array(a.length);for(let u=0,l=a.length;uTo(e)?!(e.type===Ci||e.type===Rt&&!nL(e.children)):!0)?r:null}const O_=r=>r?IL(r)?Ou(r):O_(r.parent):null,co=Dt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>O_(r.parent),$root:r=>O_(r.root),$host:r=>r.ce,$emit:r=>r.emit,$options:r=>oL(r),$forceUpdate:r=>r.f||(r.f=()=>{cw(r.update)}),$nextTick:r=>r.n||(r.n=Yj.bind(r.proxy)),$watch:r=>pW.bind(r)}),fl=(r,e)=>r!==je&&!r.__isScriptSetup&&Ne(r,e),GH={get({_:r},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:n,props:s,accessCache:o,type:a,appContext:u}=r;let l;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return n[e];case 4:return t[e];case 3:return s[e]}else{if(fl(i,e))return o[e]=1,i[e];if(n!==je&&Ne(n,e))return o[e]=2,n[e];if((l=r.propsOptions[0])&&Ne(l,e))return o[e]=3,s[e];if(t!==je&&Ne(t,e))return o[e]=4,t[e];I_&&(o[e]=0)}}const c=co[e];let d,h;if(c)return e==="$attrs"&&$t(r.attrs,"get",""),c(r);if((d=a.__cssModules)&&(d=d[e]))return d;if(t!==je&&Ne(t,e))return o[e]=4,t[e];if(h=u.config.globalProperties,Ne(h,e))return h[e]},set({_:r},e,t){const{data:i,setupState:n,ctx:s}=r;return fl(n,e)?(n[e]=t,!0):i!==je&&Ne(i,e)?(i[e]=t,!0):Ne(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(s[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:i,appContext:n,propsOptions:s}},o){let a;return!!t[o]||r!==je&&Ne(r,o)||fl(e,o)||(a=s[0])&&Ne(a,o)||Ne(i,o)||Ne(co,o)||Ne(n.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:Ne(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}};function q0(r){return ve(r)?r.reduce((e,t)=>(e[t]=null,e),{}):r}let I_=!0;function YH(r){const e=oL(r),t=r.proxy,i=r.ctx;I_=!1,e.beforeCreate&&D0(e.beforeCreate,r,"bc");const{data:n,computed:s,methods:o,watch:a,provide:u,inject:l,created:c,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:v,deactivated:b,beforeDestroy:m,beforeUnmount:g,destroyed:w,unmounted:y,render:S,renderTracked:O,renderTriggered:I,errorCaptured:_,serverPrefetch:E,expose:T,inheritAttrs:R,components:x,directives:C,filters:D}=e;if(l&&XH(l,i,null),o)for(const H in o){const Z=o[H];ye(Z)&&(i[H]=Z.bind(t))}if(n){const H=n.call(t,t);Ge(H)&&(r.data=yu(H))}if(I_=!0,s)for(const H in s){const Z=s[H],fe=ye(Z)?Z.bind(t,t):ye(Z.get)?Z.get.bind(t,t):Ar,_e=!ye(Z)&&ye(Z.set)?Z.set.bind(t):Ar,te=gr({get:fe,set:_e});Object.defineProperty(i,H,{enumerable:!0,configurable:!0,get:()=>te.value,set:ge=>te.value=ge})}if(a)for(const H in a)sL(a[H],i,t,H);if(u){const H=ye(u)?u.call(t):u;Reflect.ownKeys(H).forEach(Z=>{Ba(Z,H[Z])})}c&&D0(c,r,"c");function ee(H,Z){ve(Z)?Z.forEach(fe=>H(fe.bind(t))):Z&&H(Z.bind(t))}if(ee(kH,d),ee(hw,h),ee(BH,f),ee(jH,p),ee(MH,v),ee(NH,b),ee(UH,_),ee(WH,O),ee(HH,I),ee(LH,g),ee(iL,y),ee(zH,E),ve(T))if(T.length){const H=r.exposed||(r.exposed={});T.forEach(Z=>{Object.defineProperty(H,Z,{get:()=>t[Z],set:fe=>t[Z]=fe})})}else r.exposed||(r.exposed={});S&&r.render===Ar&&(r.render=S),R!=null&&(r.inheritAttrs=R),x&&(r.components=x),C&&(r.directives=C),E&&eL(r)}function XH(r,e,t=Ar){ve(r)&&(r=T_(r));for(const i in r){const n=r[i];let s;Ge(n)?"default"in n?s=Gr(n.from||i,n.default,!0):s=Gr(n.from||i):s=Gr(n),qt(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function D0(r,e,t){Fr(ve(r)?r.map(i=>i.bind(e.proxy)):r.bind(e.proxy),e,t)}function sL(r,e,t,i){let n=i.includes(".")?_L(t,i):()=>t[i];if(ut(r)){const s=e[r];ye(s)&&ja(n,s)}else if(ye(r))ja(n,r.bind(t));else if(Ge(r))if(ve(r))r.forEach(s=>sL(s,e,t,i));else{const s=ye(r.handler)?r.handler.bind(t):e[r.handler];ye(s)&&ja(n,s,r)}}function oL(r){const e=r.type,{mixins:t,extends:i}=e,{mixins:n,optionsCache:s,config:{optionMergeStrategies:o}}=r.appContext,a=s.get(e);let u;return a?u=a:!n.length&&!t&&!i?u=e:(u={},n.length&&n.forEach(l=>Ja(u,l,o,!0)),Ja(u,e,o)),Ge(e)&&s.set(e,u),u}function Ja(r,e,t,i=!1){const{mixins:n,extends:s}=e;s&&Ja(r,s,t,!0),n&&n.forEach(o=>Ja(r,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=JH[o]||t&&t[o];r[o]=a?a(r[o],e[o]):e[o]}return r}const JH={data:A0,props:M0,emits:M0,methods:no,computed:no,beforeCreate:At,created:At,beforeMount:At,mounted:At,beforeUpdate:At,updated:At,beforeDestroy:At,beforeUnmount:At,destroyed:At,unmounted:At,activated:At,deactivated:At,errorCaptured:At,serverPrefetch:At,components:no,directives:no,watch:ZH,provide:A0,inject:QH};function A0(r,e){return e?r?function(){return Dt(ye(r)?r.call(this,this):r,ye(e)?e.call(this,this):e)}:e:r}function QH(r,e){return no(T_(r),T_(e))}function T_(r){if(ve(r)){const e={};for(let t=0;t1)return t&&ye(e)?e.call(i&&i.proxy):e}}const uL={},lL=()=>Object.create(uL),cL=r=>Object.getPrototypeOf(r)===uL;function rW(r,e,t,i=!1){const n={},s=lL();r.propsDefaults=Object.create(null),dL(r,e,n,s);for(const o in r.propsOptions[0])o in n||(n[o]=void 0);t?r.props=i?n:Hj(n):r.type.props?r.props=n:r.props=s,r.attrs=s}function iW(r,e,t,i){const{props:n,attrs:s,vnode:{patchFlag:o}}=r,a=Me(n),[u]=r.propsOptions;let l=!1;if((i||o>0)&&!(o&16)){if(o&8){const c=r.vnode.dynamicProps;for(let d=0;d{u=!0;const[h,f]=hL(d,e,!0);Dt(o,h),f&&a.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(c),r.extends&&c(r.extends),r.mixins&&r.mixins.forEach(c)}if(!s&&!u)return Ge(r)&&i.set(r,ts),ts;if(ve(s))for(let c=0;cr[0]==="_"||r==="$stable",fw=r=>ve(r)?r.map(Rr):[Rr(r)],sW=(r,e,t)=>{if(e._n)return e;const i=_u((...n)=>fw(e(...n)),t);return i._c=!1,i},pL=(r,e,t)=>{const i=r._ctx;for(const n in r){if(fL(n))continue;const s=r[n];if(ye(s))e[n]=sW(n,s,i);else if(s!=null){const o=fw(s);e[n]=()=>o}}},vL=(r,e)=>{const t=fw(e);r.slots.default=()=>t},gL=(r,e,t)=>{for(const i in e)(t||i!=="_")&&(r[i]=e[i])},oW=(r,e,t)=>{const i=r.slots=lL();if(r.vnode.shapeFlag&32){const n=e._;n?(gL(i,e,t),t&&Oj(i,"_",n,!0)):pL(e,i)}else e&&vL(r,e)},aW=(r,e,t)=>{const{vnode:i,slots:n}=r;let s=!0,o=je;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:gL(n,e,t):(s=!e.$stable,pL(e,n)),o=e}else e&&(vL(r,e),o={default:1});if(s)for(const a in n)!fL(a)&&o[a]==null&&delete n[a]},Xt=wW;function uW(r){return lW(r)}function lW(r,e){const t=gu();t.__VUE__=!0;const{insert:i,remove:n,patchProp:s,createElement:o,createText:a,createComment:u,setText:l,setElementText:c,parentNode:d,nextSibling:h,setScopeId:f=Ar,insertStaticContent:p}=r,v=($,P,q,F=null,k=null,N=null,K=void 0,X=null,U=!!P.dynamicChildren)=>{if($===P)return;$&&!Js($,P)&&(F=A($),ge($,k,N,!0),$=null),P.patchFlag===-2&&(U=!1,P.dynamicChildren=null);const{type:B,ref:le,shapeFlag:J}=P;switch(B){case Su:b($,P,q,F);break;case Ci:m($,P,q,F);break;case vl:$==null&&g(P,q,F,K);break;case Rt:x($,P,q,F,k,N,K,X,U);break;default:J&1?S($,P,q,F,k,N,K,X,U):J&6?C($,P,q,F,k,N,K,X,U):(J&64||J&128)&&B.process($,P,q,F,k,N,K,X,U,ie)}le!=null&&k&&Xa(le,$&&$.ref,N,P||$,!P)},b=($,P,q,F)=>{if($==null)i(P.el=a(P.children),q,F);else{const k=P.el=$.el;P.children!==$.children&&l(k,P.children)}},m=($,P,q,F)=>{$==null?i(P.el=u(P.children||""),q,F):P.el=$.el},g=($,P,q,F)=>{[$.el,$.anchor]=p($.children,P,q,F,$.el,$.anchor)},w=({el:$,anchor:P},q,F)=>{let k;for(;$&&$!==P;)k=h($),i($,q,F),$=k;i(P,q,F)},y=({el:$,anchor:P})=>{let q;for(;$&&$!==P;)q=h($),n($),$=q;n(P)},S=($,P,q,F,k,N,K,X,U)=>{P.type==="svg"?K="svg":P.type==="math"&&(K="mathml"),$==null?O(P,q,F,k,N,K,X,U):E($,P,k,N,K,X,U)},O=($,P,q,F,k,N,K,X)=>{let U,B;const{props:le,shapeFlag:J,transition:se,dirs:de}=$;if(U=$.el=o($.type,N,le&&le.is,le),J&8?c(U,$.children):J&16&&_($.children,U,null,F,k,pl($,N),K,X),de&&Vi($,null,F,"created"),I(U,$,$.scopeId,K,F),le){for(const qe in le)qe!=="value"&&!ao(qe)&&s(U,qe,null,le[qe],N,F);"value"in le&&s(U,"value",null,le.value,N),(B=le.onVnodeBeforeMount)&&Or(B,F,$)}de&&Vi($,null,F,"beforeMount");const Se=cW(k,se);Se&&se.beforeEnter(U),i(U,P,q),((B=le&&le.onVnodeMounted)||Se||de)&&Xt(()=>{B&&Or(B,F,$),Se&&se.enter(U),de&&Vi($,null,F,"mounted")},k)},I=($,P,q,F,k)=>{if(q&&f($,q),F)for(let N=0;N{for(let B=U;B<$.length;B++){const le=$[B]=X?vi($[B]):Rr($[B]);v(null,le,P,q,F,k,N,K,X)}},E=($,P,q,F,k,N,K)=>{const X=P.el=$.el;let{patchFlag:U,dynamicChildren:B,dirs:le}=P;U|=$.patchFlag&16;const J=$.props||je,se=P.props||je;let de;if(q&&Ki(q,!1),(de=se.onVnodeBeforeUpdate)&&Or(de,q,P,$),le&&Vi(P,$,q,"beforeUpdate"),q&&Ki(q,!0),(J.innerHTML&&se.innerHTML==null||J.textContent&&se.textContent==null)&&c(X,""),B?T($.dynamicChildren,B,X,q,F,pl(P,k),N):K||Z($,P,X,null,q,F,pl(P,k),N,!1),U>0){if(U&16)R(X,J,se,q,k);else if(U&2&&J.class!==se.class&&s(X,"class",null,se.class,k),U&4&&s(X,"style",J.style,se.style,k),U&8){const Se=P.dynamicProps;for(let qe=0;qe{de&&Or(de,q,P,$),le&&Vi(P,$,q,"updated")},F)},T=($,P,q,F,k,N,K)=>{for(let X=0;X{if(P!==q){if(P!==je)for(const N in P)!ao(N)&&!(N in q)&&s($,N,P[N],null,k,F);for(const N in q){if(ao(N))continue;const K=q[N],X=P[N];K!==X&&N!=="value"&&s($,N,X,K,k,F)}"value"in q&&s($,"value",P.value,q.value,k)}},x=($,P,q,F,k,N,K,X,U)=>{const B=P.el=$?$.el:a(""),le=P.anchor=$?$.anchor:a("");let{patchFlag:J,dynamicChildren:se,slotScopeIds:de}=P;de&&(X=X?X.concat(de):de),$==null?(i(B,q,F),i(le,q,F),_(P.children||[],q,le,k,N,K,X,U)):J>0&&J&64&&se&&$.dynamicChildren?(T($.dynamicChildren,se,q,k,N,K,X),(P.key!=null||k&&P===k.subTree)&&mL($,P,!0)):Z($,P,q,le,k,N,K,X,U)},C=($,P,q,F,k,N,K,X,U)=>{P.slotScopeIds=X,$==null?P.shapeFlag&512?k.ctx.activate(P,q,F,K,U):D(P,q,F,k,N,K,U):j($,P,U)},D=($,P,q,F,k,N,K)=>{const X=$.component=RW($,F,k);if(tL($)&&(X.ctx.renderer=ie),CW(X,!1,K),X.asyncDep){if(k&&k.registerDep(X,ee,K),!$.el){const U=X.subTree=gt(Ci);m(null,U,P,q)}}else ee(X,$,P,q,k,N,K)},j=($,P,q)=>{const F=P.component=$.component;if(bW($,P,q))if(F.asyncDep&&!F.asyncResolved){H(F,P,q);return}else F.next=P,F.update();else P.el=$.el,F.vnode=P},ee=($,P,q,F,k,N,K)=>{const X=()=>{if($.isMounted){let{next:J,bu:se,u:de,parent:Se,vnode:qe}=$;{const V=yL($);if(V){J&&(J.el=qe.el,H($,J,K)),V.asyncDep.then(()=>{$.isUnmounted||X()});return}}let Pe=J,ft;Ki($,!1),J?(J.el=qe.el,H($,J,K)):J=qe,se&&ka(se),(ft=J.props&&J.props.onVnodeBeforeUpdate)&&Or(ft,Se,J,qe),Ki($,!0);const nt=k0($),oe=$.subTree;$.subTree=nt,v(oe,nt,d(oe.el),A(oe),$,k,N),J.el=nt.el,Pe===null&&_W($,nt.el),de&&Xt(de,k),(ft=J.props&&J.props.onVnodeUpdated)&&Xt(()=>Or(ft,Se,J,qe),k)}else{let J;const{el:se,props:de}=P,{bm:Se,m:qe,parent:Pe,root:ft,type:nt}=$,oe=ss(P);Ki($,!1),Se&&ka(Se),!oe&&(J=de&&de.onVnodeBeforeMount)&&Or(J,Pe,P),Ki($,!0);{ft.ce&&ft.ce._injectChildStyle(nt);const V=$.subTree=k0($);v(null,V,q,F,$,k,N),P.el=V.el}if(qe&&Xt(qe,k),!oe&&(J=de&&de.onVnodeMounted)){const V=P;Xt(()=>Or(J,Pe,V),k)}(P.shapeFlag&256||Pe&&ss(Pe.vnode)&&Pe.vnode.shapeFlag&256)&&$.a&&Xt($.a,k),$.isMounted=!0,P=q=F=null}};$.scope.on();const U=$.effect=new Rj(X);$.scope.off();const B=$.update=U.run.bind(U),le=$.job=U.runIfDirty.bind(U);le.i=$,le.id=$.uid,U.scheduler=()=>cw(le),Ki($,!0),B()},H=($,P,q)=>{P.component=$;const F=$.vnode.props;$.vnode=P,$.next=null,iW($,P.props,F,q),aW($,P.children,q),Mi(),C0($),Ni()},Z=($,P,q,F,k,N,K,X,U=!1)=>{const B=$&&$.children,le=$?$.shapeFlag:0,J=P.children,{patchFlag:se,shapeFlag:de}=P;if(se>0){if(se&128){_e(B,J,q,F,k,N,K,X,U);return}else if(se&256){fe(B,J,q,F,k,N,K,X,U);return}}de&8?(le&16&&be(B,k,N),J!==B&&c(q,J)):le&16?de&16?_e(B,J,q,F,k,N,K,X,U):be(B,k,N,!0):(le&8&&c(q,""),de&16&&_(J,q,F,k,N,K,X,U))},fe=($,P,q,F,k,N,K,X,U)=>{$=$||ts,P=P||ts;const B=$.length,le=P.length,J=Math.min(B,le);let se;for(se=0;sele?be($,k,N,!0,!1,J):_(P,q,F,k,N,K,X,U,J)},_e=($,P,q,F,k,N,K,X,U)=>{let B=0;const le=P.length;let J=$.length-1,se=le-1;for(;B<=J&&B<=se;){const de=$[B],Se=P[B]=U?vi(P[B]):Rr(P[B]);if(Js(de,Se))v(de,Se,q,null,k,N,K,X,U);else break;B++}for(;B<=J&&B<=se;){const de=$[J],Se=P[se]=U?vi(P[se]):Rr(P[se]);if(Js(de,Se))v(de,Se,q,null,k,N,K,X,U);else break;J--,se--}if(B>J){if(B<=se){const de=se+1,Se=dese)for(;B<=J;)ge($[B],k,N,!0),B++;else{const de=B,Se=B,qe=new Map;for(B=Se;B<=se;B++){const ne=P[B]=U?vi(P[B]):Rr(P[B]);ne.key!=null&&qe.set(ne.key,B)}let Pe,ft=0;const nt=se-Se+1;let oe=!1,V=0;const Q=new Array(nt);for(B=0;B=nt){ge(ne,k,N,!0);continue}let we;if(ne.key!=null)we=qe.get(ne.key);else for(Pe=Se;Pe<=se;Pe++)if(Q[Pe-Se]===0&&Js(ne,P[Pe])){we=Pe;break}we===void 0?ge(ne,k,N,!0):(Q[we-Se]=B+1,we>=V?V=we:oe=!0,v(ne,P[we],q,null,k,N,K,X,U),ft++)}const re=oe?dW(Q):ts;for(Pe=re.length-1,B=nt-1;B>=0;B--){const ne=Se+B,we=P[ne],di=ne+1{const{el:N,type:K,transition:X,children:U,shapeFlag:B}=$;if(B&6){te($.component.subTree,P,q,F);return}if(B&128){$.suspense.move(P,q,F);return}if(B&64){K.move($,P,q,ie);return}if(K===Rt){i(N,P,q);for(let J=0;JX.enter(N),k);else{const{leave:J,delayLeave:se,afterLeave:de}=X,Se=()=>i(N,P,q),qe=()=>{J(N,()=>{Se(),de&&de()})};se?se(N,Se,qe):qe()}else i(N,P,q)},ge=($,P,q,F=!1,k=!1)=>{const{type:N,props:K,ref:X,children:U,dynamicChildren:B,shapeFlag:le,patchFlag:J,dirs:se,cacheIndex:de}=$;if(J===-2&&(k=!1),X!=null&&Xa(X,null,q,$,!0),de!=null&&(P.renderCache[de]=void 0),le&256){P.ctx.deactivate($);return}const Se=le&1&&se,qe=!ss($);let Pe;if(qe&&(Pe=K&&K.onVnodeBeforeUnmount)&&Or(Pe,P,$),le&6)it($.component,q,F);else{if(le&128){$.suspense.unmount(q,F);return}Se&&Vi($,null,P,"beforeUnmount"),le&64?$.type.remove($,P,q,ie,F):B&&!B.hasOnce&&(N!==Rt||J>0&&J&64)?be(B,P,q,!1,!0):(N===Rt&&J&384||!k&&le&16)&&be(U,P,q),F&&xe($)}(qe&&(Pe=K&&K.onVnodeUnmounted)||Se)&&Xt(()=>{Pe&&Or(Pe,P,$),Se&&Vi($,null,P,"unmounted")},q)},xe=$=>{const{type:P,el:q,anchor:F,transition:k}=$;if(P===Rt){De(q,F);return}if(P===vl){y($);return}const N=()=>{n(q),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if($.shapeFlag&1&&k&&!k.persisted){const{leave:K,delayLeave:X}=k,U=()=>K(q,N);X?X($.el,N,U):U()}else N()},De=($,P)=>{let q;for(;$!==P;)q=h($),n($),$=q;n(P)},it=($,P,q)=>{const{bum:F,scope:k,job:N,subTree:K,um:X,m:U,a:B}=$;F0(U),F0(B),F&&ka(F),k.stop(),N&&(N.flags|=8,ge(K,$,P,q)),X&&Xt(X,P),Xt(()=>{$.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&$.asyncDep&&!$.asyncResolved&&$.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},be=($,P,q,F=!1,k=!1,N=0)=>{for(let K=N;K<$.length;K++)ge($[K],P,q,F,k)},A=$=>{if($.shapeFlag&6)return A($.component.subTree);if($.shapeFlag&128)return $.suspense.next();const P=h($.anchor||$.el),q=P&&P[DH];return q?h(q):P};let W=!1;const Y=($,P,q)=>{$==null?P._vnode&&ge(P._vnode,null,null,!0):v(P._vnode||null,$,P,null,null,null,q),P._vnode=$,W||(W=!0,C0(),Jj(),W=!1)},ie={p:v,um:ge,m:te,r:xe,mt:D,mc:_,pc:Z,pbc:T,n:A,o:r};return{render:Y,hydrate:void 0,createApp:tW(Y)}}function pl({type:r,props:e},t){return t==="svg"&&r==="foreignObject"||t==="mathml"&&r==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function Ki({effect:r,job:e},t){t?(r.flags|=32,e.flags|=4):(r.flags&=-33,e.flags&=-5)}function cW(r,e){return(!r||r&&!r.pendingBranch)&&e&&!e.persisted}function mL(r,e,t=!1){const i=r.children,n=e.children;if(ve(i)&&ve(n))for(let s=0;s>1,r[t[a]]0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function yL(r){const e=r.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:yL(e)}function F0(r){if(r)for(let e=0;eGr(hW);function ja(r,e,t){return bL(r,e,t)}function bL(r,e,t=je){const{immediate:i,deep:n,flush:s,once:o}=t,a=Dt({},t),u=e&&i||!e&&s!=="post";let l;if($o){if(s==="sync"){const f=fW();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!u){const f=()=>{};return f.stop=Ar,f.resume=Ar,f.pause=Ar,f}}const c=Bt;a.call=(f,p,v)=>Fr(f,c,p,v);let d=!1;s==="post"?a.scheduler=f=>{Xt(f,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():cw(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const h=PH(r,e,a);return $o&&(l?l.push(h):u&&h()),h}function pW(r,e,t){const i=this.proxy,n=ut(r)?r.includes(".")?_L(i,r):()=>i[r]:r.bind(i,i);let s;ye(e)?s=e:(s=e.handler,t=e);const o=Ho(this),a=bL(n,s.bind(i),t);return o(),a}function _L(r,e){const t=e.split(".");return()=>{let i=r;for(let n=0;ne==="modelValue"||e==="model-value"?r.modelModifiers:r[`${e}Modifiers`]||r[`${Ri(e)}Modifiers`]||r[`${bn(e)}Modifiers`];function gW(r,e,...t){if(r.isUnmounted)return;const i=r.vnode.props||je;let n=t;const s=e.startsWith("update:"),o=s&&vW(i,e.slice(7));o&&(o.trim&&(n=t.map(c=>ut(c)?c.trim():c)),o.number&&(n=t.map(y_)));let a,u=i[a=ul(e)]||i[a=ul(Ri(e))];!u&&s&&(u=i[a=ul(bn(e))]),u&&Fr(u,r,6,n);const l=i[a+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[a])return;r.emitted[a]=!0,Fr(l,r,6,n)}}function wL(r,e,t=!1){const i=e.emitsCache,n=i.get(r);if(n!==void 0)return n;const s=r.emits;let o={},a=!1;if(!ye(r)){const u=l=>{const c=wL(l,e,!0);c&&(a=!0,Dt(o,c))};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}return!s&&!a?(Ge(r)&&i.set(r,null),null):(ve(s)?s.forEach(u=>o[u]=null):Dt(o,s),Ge(r)&&i.set(r,o),o)}function Eu(r,e){return!r||!fu(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ne(r,e[0].toLowerCase()+e.slice(1))||Ne(r,bn(e))||Ne(r,e))}function k0(r){const{type:e,vnode:t,proxy:i,withProxy:n,propsOptions:[s],slots:o,attrs:a,emit:u,render:l,renderCache:c,props:d,data:h,setupState:f,ctx:p,inheritAttrs:v}=r,b=Ya(r);let m,g;try{if(t.shapeFlag&4){const y=n||i,S=y;m=Rr(l.call(S,y,c,d,f,h,p)),g=a}else{const y=e;m=Rr(y.length>1?y(d,{attrs:a,slots:o,emit:u}):y(d,null)),g=e.props?a:mW(a)}}catch(y){ho.length=0,bu(y,r,1),m=gt(Ci)}let w=m;if(g&&v!==!1){const y=Object.keys(g),{shapeFlag:S}=w;y.length&&S&7&&(s&&y.some(Q_)&&(g=yW(g,s)),w=ds(w,g,!1,!0))}return t.dirs&&(w=ds(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(t.dirs):t.dirs),t.transition&&dw(w,t.transition),m=w,Ya(b),m}const mW=r=>{let e;for(const t in r)(t==="class"||t==="style"||fu(t))&&((e||(e={}))[t]=r[t]);return e},yW=(r,e)=>{const t={};for(const i in r)(!Q_(i)||!(i.slice(9)in e))&&(t[i]=r[i]);return t};function bW(r,e,t){const{props:i,children:n,component:s}=r,{props:o,children:a,patchFlag:u}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&u>=0){if(u&1024)return!0;if(u&16)return i?B0(i,o,l):!!o;if(u&8){const c=e.dynamicProps;for(let d=0;dr.__isSuspense;function wW(r,e){e&&e.pendingBranch?ve(r)?e.effects.push(...r):e.effects.push(r):xH(r)}const Rt=Symbol.for("v-fgt"),Su=Symbol.for("v-txt"),Ci=Symbol.for("v-cmt"),vl=Symbol.for("v-stc"),ho=[];let Qt=null;function Ct(r=!1){ho.push(Qt=r?null:[])}function EW(){ho.pop(),Qt=ho[ho.length-1]||null}let Io=1;function j0(r,e=!1){Io+=r,r<0&&Qt&&e&&(Qt.hasOnce=!0)}function SL(r){return r.dynamicChildren=Io>0?Qt||ts:null,EW(),Io>0&&Qt&&Qt.push(r),r}function bi(r,e,t,i,n,s){return SL(Re(r,e,t,i,n,s,!0))}function xi(r,e,t,i,n){return SL(gt(r,e,t,i,n,!0))}function To(r){return r?r.__v_isVNode===!0:!1}function Js(r,e){return r.type===e.type&&r.key===e.key}const OL=({key:r})=>r??null,La=({ref:r,ref_key:e,ref_for:t})=>(typeof r=="number"&&(r=""+r),r!=null?ut(r)||qt(r)||ye(r)?{i:xt,r,k:e,f:!!t}:r:null);function Re(r,e=null,t=null,i=0,n=null,s=r===Rt?0:1,o=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&OL(e),ref:e&&La(e),scopeId:Zj,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:xt};return a?(pw(u,t),s&128&&r.normalize(u)):t&&(u.shapeFlag|=ut(t)?8:16),Io>0&&!o&&Qt&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&Qt.push(u),u}const gt=SW;function SW(r,e=null,t=null,i=0,n=null,s=!1){if((!r||r===VH)&&(r=Ci),To(r)){const a=ds(r,e,!0);return t&&pw(a,t),Io>0&&!s&&Qt&&(a.shapeFlag&6?Qt[Qt.indexOf(r)]=a:Qt.push(a)),a.patchFlag=-2,a}if(AW(r)&&(r=r.__vccOpts),e){e=OW(e);let{class:a,style:u}=e;a&&!ut(a)&&(e.class=rw(a)),Ge(u)&&(lw(u)&&!ve(u)&&(u=Dt({},u)),e.style=tw(u))}const o=ut(r)?1:EL(r)?128:AH(r)?64:Ge(r)?4:ye(r)?2:0;return Re(r,e,t,i,n,o,s,!0)}function OW(r){return r?lw(r)||cL(r)?Dt({},r):r:null}function ds(r,e,t=!1,i=!1){const{props:n,ref:s,patchFlag:o,children:a,transition:u}=r,l=e?TW(n||{},e):n,c={__v_isVNode:!0,__v_skip:!0,type:r.type,props:l,key:l&&OL(l),ref:e&&e.ref?t&&s?ve(s)?s.concat(La(e)):[s,La(e)]:La(e):s,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:a,target:r.target,targetStart:r.targetStart,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==Rt?o===-1?16:o|16:o,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:u,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&ds(r.ssContent),ssFallback:r.ssFallback&&ds(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce};return u&&i&&dw(c,u.clone(c)),c}function P_(r=" ",e=0){return gt(Su,null,r,e)}function IW(r="",e=!1){return e?(Ct(),xi(Ci,null,r)):gt(Ci,null,r)}function Rr(r){return r==null||typeof r=="boolean"?gt(Ci):ve(r)?gt(Rt,null,r.slice()):To(r)?vi(r):gt(Su,null,String(r))}function vi(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:ds(r)}function pw(r,e){let t=0;const{shapeFlag:i}=r;if(e==null)e=null;else if(ve(e))t=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),pw(r,n()),n._c&&(n._d=!0));return}else{t=32;const n=e._;!n&&!cL(e)?e._ctx=xt:n===3&&xt&&(xt.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else ye(e)?(e={default:e,_ctx:xt},t=32):(e=String(e),i&64?(t=16,e=[P_(e)]):t=8);r.children=e,r.shapeFlag|=t}function TW(...r){const e={};for(let t=0;t{let n;return(n=r[t])||(n=r[t]=[]),n.push(i),s=>{n.length>1?n.forEach(o=>o(s)):n[0](s)}};Qa=e("__VUE_INSTANCE_SETTERS__",t=>Bt=t),R_=e("__VUE_SSR_SETTERS__",t=>$o=t)}const Ho=r=>{const e=Bt;return Qa(r),r.scope.on(),()=>{r.scope.off(),Qa(e)}},L0=()=>{Bt&&Bt.scope.off(),Qa(null)};function IL(r){return r.vnode.shapeFlag&4}let $o=!1;function CW(r,e=!1,t=!1){e&&R_(e);const{props:i,children:n}=r.vnode,s=IL(r);rW(r,i,s,e),oW(r,n,t);const o=s?xW(r,e):void 0;return e&&R_(!1),o}function xW(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=new Proxy(r.ctx,GH);const{setup:i}=t;if(i){Mi();const n=r.setupContext=i.length>1?DW(r):null,s=Ho(r),o=zo(i,r,0,[r.props,n]),a=_j(o);if(Ni(),s(),(a||r.sp)&&!ss(r)&&eL(r),a){if(o.then(L0,L0),e)return o.then(u=>{z0(r,u)}).catch(u=>{bu(u,r,0)});r.asyncDep=o}else z0(r,o)}else TL(r)}function z0(r,e,t){ye(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Ge(e)&&(r.setupState=Kj(e)),TL(r)}function TL(r,e,t){const i=r.type;r.render||(r.render=i.render||Ar);{const n=Ho(r);Mi();try{YH(r)}finally{Ni(),n()}}}const qW={get(r,e){return $t(r,"get",""),r[e]}};function DW(r){const e=t=>{r.exposed=t||{}};return{attrs:new Proxy(r.attrs,qW),slots:r.slots,emit:r.emit,expose:e}}function Ou(r){return r.exposed?r.exposeProxy||(r.exposeProxy=new Proxy(Kj(Uj(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in co)return co[t](r)},has(e,t){return t in e||t in co}})):r.proxy}function AW(r){return ye(r)&&"__vccOpts"in r}const gr=(r,e)=>TH(r,e,$o);function vw(r,e,t){const i=arguments.length;return i===2?Ge(e)&&!ve(e)?To(e)?gt(r,null,[e]):gt(r,e):gt(r,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&To(t)&&(t=[t]),gt(r,e,t))}const MW="3.5.13";/** +**/function zo(r,e,t,i){try{return i?r(...i):r()}catch(n){bu(n,e,t)}}function Fr(r,e,t,i){if(ye(r)){const n=zo(r,e,t,i);return n&&wj(n)&&n.catch(s=>{bu(s,e,t)}),n}if(ve(r)){const n=[];for(let s=0;s>>1,n=Ft[i],s=Oo(n);s=Oo(t)?Ft.push(r):Ft.splice(CH(e),0,r),r.flags|=1,Jj()}}function Jj(){Ga||(Ga=Yj.then(Zj))}function xH(r){ve(r)?ns.push(...r):pi&&r.id===-1?pi.splice(Vn+1,0,r):r.flags&1||(ns.push(r),r.flags|=1),Jj()}function x0(r,e,t=Tr+1){for(;tOo(t)-Oo(i));if(ns.length=0,pi){pi.push(...e);return}for(pi=e,Vn=0;Vnr.id==null?r.flags&2?-1:1/0:r.id;function Zj(r){try{for(Tr=0;Tr{i._d&&L0(-1);const s=Ya(e);let o;try{o=r(...n)}finally{Ya(s),i._d&&L0(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function qH(r,e){if(xt===null)return r;const t=Ou(xt),i=r.dirs||(r.dirs=[]);for(let n=0;nr.__isTeleport;function hw(r,e){r.shapeFlag&6&&r.component?(r.transition=e,hw(r.component.subTree,e)):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}/*! #__NO_SIDE_EFFECTS__ */function wr(r,e){return ye(r)?Dt({name:r.name},e,{setup:r}):r}function tL(r){r.ids=[r.ids[0]+r.ids[2]+++"-",0,0]}function Xa(r,e,t,i,n=!1){if(ve(r)){r.forEach((p,v)=>Xa(p,e&&(ve(e)?e[v]:e),t,i,n));return}if(ss(i)&&!n){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Xa(r,e,t,i.component.subTree);return}const s=i.shapeFlag&4?Ou(i.component):i.el,o=n?null:s,{i:a,r:u}=r,l=e&&e.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,h=Me(d),f=d===je?()=>!1:p=>Ne(h,p);if(l!=null&&l!==u&&(ut(l)?(c[l]=null,f(l)&&(d[l]=null)):qt(l)&&(l.value=null)),ye(u))zo(u,a,12,[o,c]);else{const p=ut(u),v=qt(u);if(p||v){const b=()=>{if(r.f){const m=p?f(u)?d[u]:c[u]:u.value;n?ve(m)&&ew(m,s):ve(m)?m.includes(s)||m.push(s):p?(c[u]=[s],f(u)&&(d[u]=c[u])):(u.value=[s],r.k&&(c[r.k]=u.value))}else p?(c[u]=o,f(u)&&(d[u]=o)):v&&(u.value=o,r.k&&(c[r.k]=o))};o?(b.id=-1,Xt(b,t)):b()}}}gu().requestIdleCallback;gu().cancelIdleCallback;const ss=r=>!!r.type.__asyncLoader,rL=r=>r.type.__isKeepAlive;function MH(r,e){iL(r,"a",e)}function NH(r,e){iL(r,"da",e)}function iL(r,e,t=Bt){const i=r.__wdc||(r.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return r()});if(wu(e,i,t),t){let n=t.parent;for(;n&&n.parent;)rL(n.parent.vnode)&&FH(i,e,t,n),n=n.parent}}function FH(r,e,t,i){const n=wu(e,r,i,!0);nL(()=>{ew(i[e],n)},t)}function wu(r,e,t=Bt,i=!1){if(t){const n=t[r]||(t[r]=[]),s=e.__weh||(e.__weh=(...o)=>{Mi();const a=Ho(t),u=Fr(e,t,r,o);return a(),Ni(),u});return i?n.unshift(s):n.push(s),s}}const ni=r=>(e,t=Bt)=>{(!$o||r==="sp")&&wu(r,(...i)=>e(...i),t)},kH=ni("bm"),fw=ni("m"),BH=ni("bu"),jH=ni("u"),LH=ni("bum"),nL=ni("um"),zH=ni("sp"),HH=ni("rtg"),WH=ni("rtc");function UH(r,e=Bt){wu("ec",r,e)}const VH=Symbol.for("v-ndc");function q0(r,e,t,i){let n;const s=t,o=ve(r);if(o||ut(r)){const a=o&&is(r);let u=!1;a&&(u=!sr(r),r=mu(r)),n=new Array(r.length);for(let l=0,c=r.length;le(a,u,void 0,s));else{const a=Object.keys(r);n=new Array(a.length);for(let u=0,l=a.length;uTo(e)?!(e.type===Ci||e.type===Rt&&!sL(e.children)):!0)?r:null}const O_=r=>r?TL(r)?Ou(r):O_(r.parent):null,co=Dt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>O_(r.parent),$root:r=>O_(r.root),$host:r=>r.ce,$emit:r=>r.emit,$options:r=>aL(r),$forceUpdate:r=>r.f||(r.f=()=>{dw(r.update)}),$nextTick:r=>r.n||(r.n=Xj.bind(r.proxy)),$watch:r=>pW.bind(r)}),fl=(r,e)=>r!==je&&!r.__isScriptSetup&&Ne(r,e),GH={get({_:r},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:n,props:s,accessCache:o,type:a,appContext:u}=r;let l;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return n[e];case 4:return t[e];case 3:return s[e]}else{if(fl(i,e))return o[e]=1,i[e];if(n!==je&&Ne(n,e))return o[e]=2,n[e];if((l=r.propsOptions[0])&&Ne(l,e))return o[e]=3,s[e];if(t!==je&&Ne(t,e))return o[e]=4,t[e];I_&&(o[e]=0)}}const c=co[e];let d,h;if(c)return e==="$attrs"&&$t(r.attrs,"get",""),c(r);if((d=a.__cssModules)&&(d=d[e]))return d;if(t!==je&&Ne(t,e))return o[e]=4,t[e];if(h=u.config.globalProperties,Ne(h,e))return h[e]},set({_:r},e,t){const{data:i,setupState:n,ctx:s}=r;return fl(n,e)?(n[e]=t,!0):i!==je&&Ne(i,e)?(i[e]=t,!0):Ne(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(s[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:i,appContext:n,propsOptions:s}},o){let a;return!!t[o]||r!==je&&Ne(r,o)||fl(e,o)||(a=s[0])&&Ne(a,o)||Ne(i,o)||Ne(co,o)||Ne(n.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:Ne(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}};function D0(r){return ve(r)?r.reduce((e,t)=>(e[t]=null,e),{}):r}let I_=!0;function YH(r){const e=aL(r),t=r.proxy,i=r.ctx;I_=!1,e.beforeCreate&&A0(e.beforeCreate,r,"bc");const{data:n,computed:s,methods:o,watch:a,provide:u,inject:l,created:c,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:v,deactivated:b,beforeDestroy:m,beforeUnmount:g,destroyed:w,unmounted:y,render:S,renderTracked:O,renderTriggered:I,errorCaptured:_,serverPrefetch:E,expose:T,inheritAttrs:R,components:x,directives:C,filters:D}=e;if(l&&XH(l,i,null),o)for(const H in o){const Z=o[H];ye(Z)&&(i[H]=Z.bind(t))}if(n){const H=n.call(t,t);Ge(H)&&(r.data=yu(H))}if(I_=!0,s)for(const H in s){const Z=s[H],fe=ye(Z)?Z.bind(t,t):ye(Z.get)?Z.get.bind(t,t):Ar,_e=!ye(Z)&&ye(Z.set)?Z.set.bind(t):Ar,te=gr({get:fe,set:_e});Object.defineProperty(i,H,{enumerable:!0,configurable:!0,get:()=>te.value,set:ge=>te.value=ge})}if(a)for(const H in a)oL(a[H],i,t,H);if(u){const H=ye(u)?u.call(t):u;Reflect.ownKeys(H).forEach(Z=>{Ba(Z,H[Z])})}c&&A0(c,r,"c");function ee(H,Z){ve(Z)?Z.forEach(fe=>H(fe.bind(t))):Z&&H(Z.bind(t))}if(ee(kH,d),ee(fw,h),ee(BH,f),ee(jH,p),ee(MH,v),ee(NH,b),ee(UH,_),ee(WH,O),ee(HH,I),ee(LH,g),ee(nL,y),ee(zH,E),ve(T))if(T.length){const H=r.exposed||(r.exposed={});T.forEach(Z=>{Object.defineProperty(H,Z,{get:()=>t[Z],set:fe=>t[Z]=fe})})}else r.exposed||(r.exposed={});S&&r.render===Ar&&(r.render=S),R!=null&&(r.inheritAttrs=R),x&&(r.components=x),C&&(r.directives=C),E&&tL(r)}function XH(r,e,t=Ar){ve(r)&&(r=T_(r));for(const i in r){const n=r[i];let s;Ge(n)?"default"in n?s=Gr(n.from||i,n.default,!0):s=Gr(n.from||i):s=Gr(n),qt(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function A0(r,e,t){Fr(ve(r)?r.map(i=>i.bind(e.proxy)):r.bind(e.proxy),e,t)}function oL(r,e,t,i){let n=i.includes(".")?wL(t,i):()=>t[i];if(ut(r)){const s=e[r];ye(s)&&ja(n,s)}else if(ye(r))ja(n,r.bind(t));else if(Ge(r))if(ve(r))r.forEach(s=>oL(s,e,t,i));else{const s=ye(r.handler)?r.handler.bind(t):e[r.handler];ye(s)&&ja(n,s,r)}}function aL(r){const e=r.type,{mixins:t,extends:i}=e,{mixins:n,optionsCache:s,config:{optionMergeStrategies:o}}=r.appContext,a=s.get(e);let u;return a?u=a:!n.length&&!t&&!i?u=e:(u={},n.length&&n.forEach(l=>Ja(u,l,o,!0)),Ja(u,e,o)),Ge(e)&&s.set(e,u),u}function Ja(r,e,t,i=!1){const{mixins:n,extends:s}=e;s&&Ja(r,s,t,!0),n&&n.forEach(o=>Ja(r,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=JH[o]||t&&t[o];r[o]=a?a(r[o],e[o]):e[o]}return r}const JH={data:M0,props:N0,emits:N0,methods:no,computed:no,beforeCreate:At,created:At,beforeMount:At,mounted:At,beforeUpdate:At,updated:At,beforeDestroy:At,beforeUnmount:At,destroyed:At,unmounted:At,activated:At,deactivated:At,errorCaptured:At,serverPrefetch:At,components:no,directives:no,watch:ZH,provide:M0,inject:QH};function M0(r,e){return e?r?function(){return Dt(ye(r)?r.call(this,this):r,ye(e)?e.call(this,this):e)}:e:r}function QH(r,e){return no(T_(r),T_(e))}function T_(r){if(ve(r)){const e={};for(let t=0;t1)return t&&ye(e)?e.call(i&&i.proxy):e}}const lL={},cL=()=>Object.create(lL),dL=r=>Object.getPrototypeOf(r)===lL;function rW(r,e,t,i=!1){const n={},s=cL();r.propsDefaults=Object.create(null),hL(r,e,n,s);for(const o in r.propsOptions[0])o in n||(n[o]=void 0);t?r.props=i?n:Wj(n):r.type.props?r.props=n:r.props=s,r.attrs=s}function iW(r,e,t,i){const{props:n,attrs:s,vnode:{patchFlag:o}}=r,a=Me(n),[u]=r.propsOptions;let l=!1;if((i||o>0)&&!(o&16)){if(o&8){const c=r.vnode.dynamicProps;for(let d=0;d{u=!0;const[h,f]=fL(d,e,!0);Dt(o,h),f&&a.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(c),r.extends&&c(r.extends),r.mixins&&r.mixins.forEach(c)}if(!s&&!u)return Ge(r)&&i.set(r,ts),ts;if(ve(s))for(let c=0;cr[0]==="_"||r==="$stable",pw=r=>ve(r)?r.map(Rr):[Rr(r)],sW=(r,e,t)=>{if(e._n)return e;const i=_u((...n)=>pw(e(...n)),t);return i._c=!1,i},vL=(r,e,t)=>{const i=r._ctx;for(const n in r){if(pL(n))continue;const s=r[n];if(ye(s))e[n]=sW(n,s,i);else if(s!=null){const o=pw(s);e[n]=()=>o}}},gL=(r,e)=>{const t=pw(e);r.slots.default=()=>t},mL=(r,e,t)=>{for(const i in e)(t||i!=="_")&&(r[i]=e[i])},oW=(r,e,t)=>{const i=r.slots=cL();if(r.vnode.shapeFlag&32){const n=e._;n?(mL(i,e,t),t&&Ij(i,"_",n,!0)):vL(e,i)}else e&&gL(r,e)},aW=(r,e,t)=>{const{vnode:i,slots:n}=r;let s=!0,o=je;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:mL(n,e,t):(s=!e.$stable,vL(e,n)),o=e}else e&&(gL(r,e),o={default:1});if(s)for(const a in n)!pL(a)&&o[a]==null&&delete n[a]},Xt=wW;function uW(r){return lW(r)}function lW(r,e){const t=gu();t.__VUE__=!0;const{insert:i,remove:n,patchProp:s,createElement:o,createText:a,createComment:u,setText:l,setElementText:c,parentNode:d,nextSibling:h,setScopeId:f=Ar,insertStaticContent:p}=r,v=($,P,q,F=null,k=null,N=null,K=void 0,X=null,U=!!P.dynamicChildren)=>{if($===P)return;$&&!Js($,P)&&(F=A($),ge($,k,N,!0),$=null),P.patchFlag===-2&&(U=!1,P.dynamicChildren=null);const{type:B,ref:le,shapeFlag:J}=P;switch(B){case Su:b($,P,q,F);break;case Ci:m($,P,q,F);break;case vl:$==null&&g(P,q,F,K);break;case Rt:x($,P,q,F,k,N,K,X,U);break;default:J&1?S($,P,q,F,k,N,K,X,U):J&6?C($,P,q,F,k,N,K,X,U):(J&64||J&128)&&B.process($,P,q,F,k,N,K,X,U,ie)}le!=null&&k&&Xa(le,$&&$.ref,N,P||$,!P)},b=($,P,q,F)=>{if($==null)i(P.el=a(P.children),q,F);else{const k=P.el=$.el;P.children!==$.children&&l(k,P.children)}},m=($,P,q,F)=>{$==null?i(P.el=u(P.children||""),q,F):P.el=$.el},g=($,P,q,F)=>{[$.el,$.anchor]=p($.children,P,q,F,$.el,$.anchor)},w=({el:$,anchor:P},q,F)=>{let k;for(;$&&$!==P;)k=h($),i($,q,F),$=k;i(P,q,F)},y=({el:$,anchor:P})=>{let q;for(;$&&$!==P;)q=h($),n($),$=q;n(P)},S=($,P,q,F,k,N,K,X,U)=>{P.type==="svg"?K="svg":P.type==="math"&&(K="mathml"),$==null?O(P,q,F,k,N,K,X,U):E($,P,k,N,K,X,U)},O=($,P,q,F,k,N,K,X)=>{let U,B;const{props:le,shapeFlag:J,transition:se,dirs:de}=$;if(U=$.el=o($.type,N,le&&le.is,le),J&8?c(U,$.children):J&16&&_($.children,U,null,F,k,pl($,N),K,X),de&&Vi($,null,F,"created"),I(U,$,$.scopeId,K,F),le){for(const qe in le)qe!=="value"&&!ao(qe)&&s(U,qe,null,le[qe],N,F);"value"in le&&s(U,"value",null,le.value,N),(B=le.onVnodeBeforeMount)&&Or(B,F,$)}de&&Vi($,null,F,"beforeMount");const Se=cW(k,se);Se&&se.beforeEnter(U),i(U,P,q),((B=le&&le.onVnodeMounted)||Se||de)&&Xt(()=>{B&&Or(B,F,$),Se&&se.enter(U),de&&Vi($,null,F,"mounted")},k)},I=($,P,q,F,k)=>{if(q&&f($,q),F)for(let N=0;N{for(let B=U;B<$.length;B++){const le=$[B]=X?vi($[B]):Rr($[B]);v(null,le,P,q,F,k,N,K,X)}},E=($,P,q,F,k,N,K)=>{const X=P.el=$.el;let{patchFlag:U,dynamicChildren:B,dirs:le}=P;U|=$.patchFlag&16;const J=$.props||je,se=P.props||je;let de;if(q&&Ki(q,!1),(de=se.onVnodeBeforeUpdate)&&Or(de,q,P,$),le&&Vi(P,$,q,"beforeUpdate"),q&&Ki(q,!0),(J.innerHTML&&se.innerHTML==null||J.textContent&&se.textContent==null)&&c(X,""),B?T($.dynamicChildren,B,X,q,F,pl(P,k),N):K||Z($,P,X,null,q,F,pl(P,k),N,!1),U>0){if(U&16)R(X,J,se,q,k);else if(U&2&&J.class!==se.class&&s(X,"class",null,se.class,k),U&4&&s(X,"style",J.style,se.style,k),U&8){const Se=P.dynamicProps;for(let qe=0;qe{de&&Or(de,q,P,$),le&&Vi(P,$,q,"updated")},F)},T=($,P,q,F,k,N,K)=>{for(let X=0;X{if(P!==q){if(P!==je)for(const N in P)!ao(N)&&!(N in q)&&s($,N,P[N],null,k,F);for(const N in q){if(ao(N))continue;const K=q[N],X=P[N];K!==X&&N!=="value"&&s($,N,X,K,k,F)}"value"in q&&s($,"value",P.value,q.value,k)}},x=($,P,q,F,k,N,K,X,U)=>{const B=P.el=$?$.el:a(""),le=P.anchor=$?$.anchor:a("");let{patchFlag:J,dynamicChildren:se,slotScopeIds:de}=P;de&&(X=X?X.concat(de):de),$==null?(i(B,q,F),i(le,q,F),_(P.children||[],q,le,k,N,K,X,U)):J>0&&J&64&&se&&$.dynamicChildren?(T($.dynamicChildren,se,q,k,N,K,X),(P.key!=null||k&&P===k.subTree)&&yL($,P,!0)):Z($,P,q,le,k,N,K,X,U)},C=($,P,q,F,k,N,K,X,U)=>{P.slotScopeIds=X,$==null?P.shapeFlag&512?k.ctx.activate(P,q,F,K,U):D(P,q,F,k,N,K,U):j($,P,U)},D=($,P,q,F,k,N,K)=>{const X=$.component=RW($,F,k);if(rL($)&&(X.ctx.renderer=ie),CW(X,!1,K),X.asyncDep){if(k&&k.registerDep(X,ee,K),!$.el){const U=X.subTree=gt(Ci);m(null,U,P,q)}}else ee(X,$,P,q,k,N,K)},j=($,P,q)=>{const F=P.component=$.component;if(bW($,P,q))if(F.asyncDep&&!F.asyncResolved){H(F,P,q);return}else F.next=P,F.update();else P.el=$.el,F.vnode=P},ee=($,P,q,F,k,N,K)=>{const X=()=>{if($.isMounted){let{next:J,bu:se,u:de,parent:Se,vnode:qe}=$;{const V=bL($);if(V){J&&(J.el=qe.el,H($,J,K)),V.asyncDep.then(()=>{$.isUnmounted||X()});return}}let Re=J,ft;Ki($,!1),J?(J.el=qe.el,H($,J,K)):J=qe,se&&ka(se),(ft=J.props&&J.props.onVnodeBeforeUpdate)&&Or(ft,Se,J,qe),Ki($,!0);const nt=B0($),oe=$.subTree;$.subTree=nt,v(oe,nt,d(oe.el),A(oe),$,k,N),J.el=nt.el,Re===null&&_W($,nt.el),de&&Xt(de,k),(ft=J.props&&J.props.onVnodeUpdated)&&Xt(()=>Or(ft,Se,J,qe),k)}else{let J;const{el:se,props:de}=P,{bm:Se,m:qe,parent:Re,root:ft,type:nt}=$,oe=ss(P);Ki($,!1),Se&&ka(Se),!oe&&(J=de&&de.onVnodeBeforeMount)&&Or(J,Re,P),Ki($,!0);{ft.ce&&ft.ce._injectChildStyle(nt);const V=$.subTree=B0($);v(null,V,q,F,$,k,N),P.el=V.el}if(qe&&Xt(qe,k),!oe&&(J=de&&de.onVnodeMounted)){const V=P;Xt(()=>Or(J,Re,V),k)}(P.shapeFlag&256||Re&&ss(Re.vnode)&&Re.vnode.shapeFlag&256)&&$.a&&Xt($.a,k),$.isMounted=!0,P=q=F=null}};$.scope.on();const U=$.effect=new Cj(X);$.scope.off();const B=$.update=U.run.bind(U),le=$.job=U.runIfDirty.bind(U);le.i=$,le.id=$.uid,U.scheduler=()=>dw(le),Ki($,!0),B()},H=($,P,q)=>{P.component=$;const F=$.vnode.props;$.vnode=P,$.next=null,iW($,P.props,F,q),aW($,P.children,q),Mi(),x0($),Ni()},Z=($,P,q,F,k,N,K,X,U=!1)=>{const B=$&&$.children,le=$?$.shapeFlag:0,J=P.children,{patchFlag:se,shapeFlag:de}=P;if(se>0){if(se&128){_e(B,J,q,F,k,N,K,X,U);return}else if(se&256){fe(B,J,q,F,k,N,K,X,U);return}}de&8?(le&16&&be(B,k,N),J!==B&&c(q,J)):le&16?de&16?_e(B,J,q,F,k,N,K,X,U):be(B,k,N,!0):(le&8&&c(q,""),de&16&&_(J,q,F,k,N,K,X,U))},fe=($,P,q,F,k,N,K,X,U)=>{$=$||ts,P=P||ts;const B=$.length,le=P.length,J=Math.min(B,le);let se;for(se=0;sele?be($,k,N,!0,!1,J):_(P,q,F,k,N,K,X,U,J)},_e=($,P,q,F,k,N,K,X,U)=>{let B=0;const le=P.length;let J=$.length-1,se=le-1;for(;B<=J&&B<=se;){const de=$[B],Se=P[B]=U?vi(P[B]):Rr(P[B]);if(Js(de,Se))v(de,Se,q,null,k,N,K,X,U);else break;B++}for(;B<=J&&B<=se;){const de=$[J],Se=P[se]=U?vi(P[se]):Rr(P[se]);if(Js(de,Se))v(de,Se,q,null,k,N,K,X,U);else break;J--,se--}if(B>J){if(B<=se){const de=se+1,Se=dese)for(;B<=J;)ge($[B],k,N,!0),B++;else{const de=B,Se=B,qe=new Map;for(B=Se;B<=se;B++){const ne=P[B]=U?vi(P[B]):Rr(P[B]);ne.key!=null&&qe.set(ne.key,B)}let Re,ft=0;const nt=se-Se+1;let oe=!1,V=0;const Q=new Array(nt);for(B=0;B=nt){ge(ne,k,N,!0);continue}let we;if(ne.key!=null)we=qe.get(ne.key);else for(Re=Se;Re<=se;Re++)if(Q[Re-Se]===0&&Js(ne,P[Re])){we=Re;break}we===void 0?ge(ne,k,N,!0):(Q[we-Se]=B+1,we>=V?V=we:oe=!0,v(ne,P[we],q,null,k,N,K,X,U),ft++)}const re=oe?dW(Q):ts;for(Re=re.length-1,B=nt-1;B>=0;B--){const ne=Se+B,we=P[ne],di=ne+1{const{el:N,type:K,transition:X,children:U,shapeFlag:B}=$;if(B&6){te($.component.subTree,P,q,F);return}if(B&128){$.suspense.move(P,q,F);return}if(B&64){K.move($,P,q,ie);return}if(K===Rt){i(N,P,q);for(let J=0;JX.enter(N),k);else{const{leave:J,delayLeave:se,afterLeave:de}=X,Se=()=>i(N,P,q),qe=()=>{J(N,()=>{Se(),de&&de()})};se?se(N,Se,qe):qe()}else i(N,P,q)},ge=($,P,q,F=!1,k=!1)=>{const{type:N,props:K,ref:X,children:U,dynamicChildren:B,shapeFlag:le,patchFlag:J,dirs:se,cacheIndex:de}=$;if(J===-2&&(k=!1),X!=null&&Xa(X,null,q,$,!0),de!=null&&(P.renderCache[de]=void 0),le&256){P.ctx.deactivate($);return}const Se=le&1&&se,qe=!ss($);let Re;if(qe&&(Re=K&&K.onVnodeBeforeUnmount)&&Or(Re,P,$),le&6)it($.component,q,F);else{if(le&128){$.suspense.unmount(q,F);return}Se&&Vi($,null,P,"beforeUnmount"),le&64?$.type.remove($,P,q,ie,F):B&&!B.hasOnce&&(N!==Rt||J>0&&J&64)?be(B,P,q,!1,!0):(N===Rt&&J&384||!k&&le&16)&&be(U,P,q),F&&xe($)}(qe&&(Re=K&&K.onVnodeUnmounted)||Se)&&Xt(()=>{Re&&Or(Re,P,$),Se&&Vi($,null,P,"unmounted")},q)},xe=$=>{const{type:P,el:q,anchor:F,transition:k}=$;if(P===Rt){De(q,F);return}if(P===vl){y($);return}const N=()=>{n(q),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if($.shapeFlag&1&&k&&!k.persisted){const{leave:K,delayLeave:X}=k,U=()=>K(q,N);X?X($.el,N,U):U()}else N()},De=($,P)=>{let q;for(;$!==P;)q=h($),n($),$=q;n(P)},it=($,P,q)=>{const{bum:F,scope:k,job:N,subTree:K,um:X,m:U,a:B}=$;k0(U),k0(B),F&&ka(F),k.stop(),N&&(N.flags|=8,ge(K,$,P,q)),X&&Xt(X,P),Xt(()=>{$.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&$.asyncDep&&!$.asyncResolved&&$.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},be=($,P,q,F=!1,k=!1,N=0)=>{for(let K=N;K<$.length;K++)ge($[K],P,q,F,k)},A=$=>{if($.shapeFlag&6)return A($.component.subTree);if($.shapeFlag&128)return $.suspense.next();const P=h($.anchor||$.el),q=P&&P[DH];return q?h(q):P};let W=!1;const Y=($,P,q)=>{$==null?P._vnode&&ge(P._vnode,null,null,!0):v(P._vnode||null,$,P,null,null,null,q),P._vnode=$,W||(W=!0,x0(),Qj(),W=!1)},ie={p:v,um:ge,m:te,r:xe,mt:D,mc:_,pc:Z,pbc:T,n:A,o:r};return{render:Y,hydrate:void 0,createApp:tW(Y)}}function pl({type:r,props:e},t){return t==="svg"&&r==="foreignObject"||t==="mathml"&&r==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function Ki({effect:r,job:e},t){t?(r.flags|=32,e.flags|=4):(r.flags&=-33,e.flags&=-5)}function cW(r,e){return(!r||r&&!r.pendingBranch)&&e&&!e.persisted}function yL(r,e,t=!1){const i=r.children,n=e.children;if(ve(i)&&ve(n))for(let s=0;s>1,r[t[a]]0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function bL(r){const e=r.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:bL(e)}function k0(r){if(r)for(let e=0;eGr(hW);function ja(r,e,t){return _L(r,e,t)}function _L(r,e,t=je){const{immediate:i,deep:n,flush:s,once:o}=t,a=Dt({},t),u=e&&i||!e&&s!=="post";let l;if($o){if(s==="sync"){const f=fW();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!u){const f=()=>{};return f.stop=Ar,f.resume=Ar,f.pause=Ar,f}}const c=Bt;a.call=(f,p,v)=>Fr(f,c,p,v);let d=!1;s==="post"?a.scheduler=f=>{Xt(f,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():dw(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const h=PH(r,e,a);return $o&&(l?l.push(h):u&&h()),h}function pW(r,e,t){const i=this.proxy,n=ut(r)?r.includes(".")?wL(i,r):()=>i[r]:r.bind(i,i);let s;ye(e)?s=e:(s=e.handler,t=e);const o=Ho(this),a=_L(n,s.bind(i),t);return o(),a}function wL(r,e){const t=e.split(".");return()=>{let i=r;for(let n=0;ne==="modelValue"||e==="model-value"?r.modelModifiers:r[`${e}Modifiers`]||r[`${Ri(e)}Modifiers`]||r[`${bn(e)}Modifiers`];function gW(r,e,...t){if(r.isUnmounted)return;const i=r.vnode.props||je;let n=t;const s=e.startsWith("update:"),o=s&&vW(i,e.slice(7));o&&(o.trim&&(n=t.map(c=>ut(c)?c.trim():c)),o.number&&(n=t.map(y_)));let a,u=i[a=ul(e)]||i[a=ul(Ri(e))];!u&&s&&(u=i[a=ul(bn(e))]),u&&Fr(u,r,6,n);const l=i[a+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[a])return;r.emitted[a]=!0,Fr(l,r,6,n)}}function EL(r,e,t=!1){const i=e.emitsCache,n=i.get(r);if(n!==void 0)return n;const s=r.emits;let o={},a=!1;if(!ye(r)){const u=l=>{const c=EL(l,e,!0);c&&(a=!0,Dt(o,c))};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}return!s&&!a?(Ge(r)&&i.set(r,null),null):(ve(s)?s.forEach(u=>o[u]=null):Dt(o,s),Ge(r)&&i.set(r,o),o)}function Eu(r,e){return!r||!fu(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ne(r,e[0].toLowerCase()+e.slice(1))||Ne(r,bn(e))||Ne(r,e))}function B0(r){const{type:e,vnode:t,proxy:i,withProxy:n,propsOptions:[s],slots:o,attrs:a,emit:u,render:l,renderCache:c,props:d,data:h,setupState:f,ctx:p,inheritAttrs:v}=r,b=Ya(r);let m,g;try{if(t.shapeFlag&4){const y=n||i,S=y;m=Rr(l.call(S,y,c,d,f,h,p)),g=a}else{const y=e;m=Rr(y.length>1?y(d,{attrs:a,slots:o,emit:u}):y(d,null)),g=e.props?a:mW(a)}}catch(y){ho.length=0,bu(y,r,1),m=gt(Ci)}let w=m;if(g&&v!==!1){const y=Object.keys(g),{shapeFlag:S}=w;y.length&&S&7&&(s&&y.some(Z_)&&(g=yW(g,s)),w=ds(w,g,!1,!0))}return t.dirs&&(w=ds(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(t.dirs):t.dirs),t.transition&&hw(w,t.transition),m=w,Ya(b),m}const mW=r=>{let e;for(const t in r)(t==="class"||t==="style"||fu(t))&&((e||(e={}))[t]=r[t]);return e},yW=(r,e)=>{const t={};for(const i in r)(!Z_(i)||!(i.slice(9)in e))&&(t[i]=r[i]);return t};function bW(r,e,t){const{props:i,children:n,component:s}=r,{props:o,children:a,patchFlag:u}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&u>=0){if(u&1024)return!0;if(u&16)return i?j0(i,o,l):!!o;if(u&8){const c=e.dynamicProps;for(let d=0;dr.__isSuspense;function wW(r,e){e&&e.pendingBranch?ve(r)?e.effects.push(...r):e.effects.push(r):xH(r)}const Rt=Symbol.for("v-fgt"),Su=Symbol.for("v-txt"),Ci=Symbol.for("v-cmt"),vl=Symbol.for("v-stc"),ho=[];let Zt=null;function Ct(r=!1){ho.push(Zt=r?null:[])}function EW(){ho.pop(),Zt=ho[ho.length-1]||null}let Io=1;function L0(r,e=!1){Io+=r,r<0&&Zt&&e&&(Zt.hasOnce=!0)}function OL(r){return r.dynamicChildren=Io>0?Zt||ts:null,EW(),Io>0&&Zt&&Zt.push(r),r}function bi(r,e,t,i,n,s){return OL(Ie(r,e,t,i,n,s,!0))}function xi(r,e,t,i,n){return OL(gt(r,e,t,i,n,!0))}function To(r){return r?r.__v_isVNode===!0:!1}function Js(r,e){return r.type===e.type&&r.key===e.key}const IL=({key:r})=>r??null,La=({ref:r,ref_key:e,ref_for:t})=>(typeof r=="number"&&(r=""+r),r!=null?ut(r)||qt(r)||ye(r)?{i:xt,r,k:e,f:!!t}:r:null);function Ie(r,e=null,t=null,i=0,n=null,s=r===Rt?0:1,o=!1,a=!1){const u={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&IL(e),ref:e&&La(e),scopeId:eL,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:xt};return a?(vw(u,t),s&128&&r.normalize(u)):t&&(u.shapeFlag|=ut(t)?8:16),Io>0&&!o&&Zt&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&Zt.push(u),u}const gt=SW;function SW(r,e=null,t=null,i=0,n=null,s=!1){if((!r||r===VH)&&(r=Ci),To(r)){const a=ds(r,e,!0);return t&&vw(a,t),Io>0&&!s&&Zt&&(a.shapeFlag&6?Zt[Zt.indexOf(r)]=a:Zt.push(a)),a.patchFlag=-2,a}if(AW(r)&&(r=r.__vccOpts),e){e=OW(e);let{class:a,style:u}=e;a&&!ut(a)&&(e.class=iw(a)),Ge(u)&&(cw(u)&&!ve(u)&&(u=Dt({},u)),e.style=rw(u))}const o=ut(r)?1:SL(r)?128:AH(r)?64:Ge(r)?4:ye(r)?2:0;return Ie(r,e,t,i,n,o,s,!0)}function OW(r){return r?cw(r)||dL(r)?Dt({},r):r:null}function ds(r,e,t=!1,i=!1){const{props:n,ref:s,patchFlag:o,children:a,transition:u}=r,l=e?TW(n||{},e):n,c={__v_isVNode:!0,__v_skip:!0,type:r.type,props:l,key:l&&IL(l),ref:e&&e.ref?t&&s?ve(s)?s.concat(La(e)):[s,La(e)]:La(e):s,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:a,target:r.target,targetStart:r.targetStart,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==Rt?o===-1?16:o|16:o,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:u,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&ds(r.ssContent),ssFallback:r.ssFallback&&ds(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce};return u&&i&&hw(c,u.clone(c)),c}function P_(r=" ",e=0){return gt(Su,null,r,e)}function IW(r="",e=!1){return e?(Ct(),xi(Ci,null,r)):gt(Ci,null,r)}function Rr(r){return r==null||typeof r=="boolean"?gt(Ci):ve(r)?gt(Rt,null,r.slice()):To(r)?vi(r):gt(Su,null,String(r))}function vi(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:ds(r)}function vw(r,e){let t=0;const{shapeFlag:i}=r;if(e==null)e=null;else if(ve(e))t=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),vw(r,n()),n._c&&(n._d=!0));return}else{t=32;const n=e._;!n&&!dL(e)?e._ctx=xt:n===3&&xt&&(xt.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else ye(e)?(e={default:e,_ctx:xt},t=32):(e=String(e),i&64?(t=16,e=[P_(e)]):t=8);r.children=e,r.shapeFlag|=t}function TW(...r){const e={};for(let t=0;t{let n;return(n=r[t])||(n=r[t]=[]),n.push(i),s=>{n.length>1?n.forEach(o=>o(s)):n[0](s)}};Qa=e("__VUE_INSTANCE_SETTERS__",t=>Bt=t),R_=e("__VUE_SSR_SETTERS__",t=>$o=t)}const Ho=r=>{const e=Bt;return Qa(r),r.scope.on(),()=>{r.scope.off(),Qa(e)}},z0=()=>{Bt&&Bt.scope.off(),Qa(null)};function TL(r){return r.vnode.shapeFlag&4}let $o=!1;function CW(r,e=!1,t=!1){e&&R_(e);const{props:i,children:n}=r.vnode,s=TL(r);rW(r,i,s,e),oW(r,n,t);const o=s?xW(r,e):void 0;return e&&R_(!1),o}function xW(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=new Proxy(r.ctx,GH);const{setup:i}=t;if(i){Mi();const n=r.setupContext=i.length>1?DW(r):null,s=Ho(r),o=zo(i,r,0,[r.props,n]),a=wj(o);if(Ni(),s(),(a||r.sp)&&!ss(r)&&tL(r),a){if(o.then(z0,z0),e)return o.then(u=>{H0(r,u)}).catch(u=>{bu(u,r,0)});r.asyncDep=o}else H0(r,o)}else $L(r)}function H0(r,e,t){ye(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Ge(e)&&(r.setupState=Gj(e)),$L(r)}function $L(r,e,t){const i=r.type;r.render||(r.render=i.render||Ar);{const n=Ho(r);Mi();try{YH(r)}finally{Ni(),n()}}}const qW={get(r,e){return $t(r,"get",""),r[e]}};function DW(r){const e=t=>{r.exposed=t||{}};return{attrs:new Proxy(r.attrs,qW),slots:r.slots,emit:r.emit,expose:e}}function Ou(r){return r.exposed?r.exposeProxy||(r.exposeProxy=new Proxy(Gj(Vj(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in co)return co[t](r)},has(e,t){return t in e||t in co}})):r.proxy}function AW(r){return ye(r)&&"__vccOpts"in r}const gr=(r,e)=>TH(r,e,$o);function gw(r,e,t){const i=arguments.length;return i===2?Ge(e)&&!ve(e)?To(e)?gt(r,null,[e]):gt(r,e):gt(r,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&To(t)&&(t=[t]),gt(r,e,t))}const MW="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let C_;const H0=typeof window<"u"&&window.trustedTypes;if(H0)try{C_=H0.createPolicy("vue",{createHTML:r=>r})}catch{}const $L=C_?r=>C_.createHTML(r):r=>r,NW="http://www.w3.org/2000/svg",FW="http://www.w3.org/1998/Math/MathML",Hr=typeof document<"u"?document:null,W0=Hr&&Hr.createElement("template"),kW={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,i)=>{const n=e==="svg"?Hr.createElementNS(NW,r):e==="mathml"?Hr.createElementNS(FW,r):t?Hr.createElement(r,{is:t}):Hr.createElement(r);return r==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:r=>Hr.createTextNode(r),createComment:r=>Hr.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Hr.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,i,n,s){const o=t?t.previousSibling:e.lastChild;if(n&&(n===s||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===s||!(n=n.nextSibling)););else{W0.innerHTML=$L(i==="svg"?`${r}`:i==="mathml"?`${r}`:r);const a=W0.content;if(i==="svg"||i==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},BW=Symbol("_vtc");function jW(r,e,t){const i=r[BW];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}const U0=Symbol("_vod"),LW=Symbol("_vsh"),zW=Symbol(""),HW=/(^|;)\s*display\s*:/;function WW(r,e,t){const i=r.style,n=ut(t);let s=!1;if(t&&!n){if(e)if(ut(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&za(i,a,"")}else for(const o in e)t[o]==null&&za(i,o,"");for(const o in t)o==="display"&&(s=!0),za(i,o,t[o])}else if(n){if(e!==t){const o=i[zW];o&&(t+=";"+o),i.cssText=t,s=HW.test(t)}}else e&&r.removeAttribute("style");U0 in r&&(r[U0]=s?i.display:"",r[LW]&&(i.display="none"))}const V0=/\s*!important$/;function za(r,e,t){if(ve(t))t.forEach(i=>za(r,e,i));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const i=UW(r,e);V0.test(t)?r.setProperty(bn(i),t.replace(V0,""),"important"):r[i]=t}}const K0=["Webkit","Moz","ms"],gl={};function UW(r,e){const t=gl[e];if(t)return t;let i=Ri(e);if(i!=="filter"&&i in r)return gl[e]=i;i=Sj(i);for(let n=0;nml||(YW.then(()=>ml=0),ml=Date.now());function JW(r,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;Fr(QW(i,t.value),e,5,[i])};return t.value=r,t.attached=XW(),t}function QW(r,e){if(ve(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(i=>n=>!n._stopped&&i&&i(n))}else return e}const Z0=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,ZW=(r,e,t,i,n,s)=>{const o=n==="svg";e==="class"?jW(r,i,o):e==="style"?WW(r,t,i):fu(e)?Q_(e)||KW(r,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):e4(r,e,i,o))?(X0(r,e,i),!r.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Y0(r,e,i,o,s,e!=="value")):r._isVueCE&&(/[A-Z]/.test(e)||!ut(i))?X0(r,Ri(e),i,s,e):(e==="true-value"?r._trueValue=i:e==="false-value"&&(r._falseValue=i),Y0(r,e,i,o))};function e4(r,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in r&&Z0(e)&&ye(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=r.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Z0(e)&&ut(t)?!1:e in r}const eE=r=>{const e=r.props["onUpdate:modelValue"]||!1;return ve(e)?t=>ka(e,t):e};function t4(r){r.target.composing=!0}function tE(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const yl=Symbol("_assign"),r4={created(r,{modifiers:{lazy:e,trim:t,number:i}},n){r[yl]=eE(n);const s=i||n.props&&n.props.type==="number";Kn(r,e?"change":"input",o=>{if(o.target.composing)return;let a=r.value;t&&(a=a.trim()),s&&(a=y_(a)),r[yl](a)}),t&&Kn(r,"change",()=>{r.value=r.value.trim()}),e||(Kn(r,"compositionstart",t4),Kn(r,"compositionend",tE),Kn(r,"change",tE))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:s}},o){if(r[yl]=eE(o),r.composing)return;const a=(s||r.type==="number")&&!/^0\d/.test(r.value)?y_(r.value):r.value,u=e??"";a!==u&&(document.activeElement===r&&r.type!=="range"&&(i&&e===t||n&&r.value.trim()===u)||(r.value=u))}},i4=["ctrl","shift","alt","meta"],n4={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>i4.some(t=>r[`${t}Key`]&&!e.includes(t))},s4=(r,e)=>{const t=r._withMods||(r._withMods={}),i=e.join(".");return t[i]||(t[i]=(n,...s)=>{for(let o=0;o{const e=a4().createApp(...r),{mount:t}=e;return e.mount=i=>{const n=c4(i);if(!n)return;const s=e._component;!ye(s)&&!s.render&&!s.template&&(s.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,l4(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e};function l4(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function c4(r){return ut(r)?document.querySelector(r):r}/*! +**/let C_;const W0=typeof window<"u"&&window.trustedTypes;if(W0)try{C_=W0.createPolicy("vue",{createHTML:r=>r})}catch{}const PL=C_?r=>C_.createHTML(r):r=>r,NW="http://www.w3.org/2000/svg",FW="http://www.w3.org/1998/Math/MathML",Hr=typeof document<"u"?document:null,U0=Hr&&Hr.createElement("template"),kW={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,i)=>{const n=e==="svg"?Hr.createElementNS(NW,r):e==="mathml"?Hr.createElementNS(FW,r):t?Hr.createElement(r,{is:t}):Hr.createElement(r);return r==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:r=>Hr.createTextNode(r),createComment:r=>Hr.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Hr.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,i,n,s){const o=t?t.previousSibling:e.lastChild;if(n&&(n===s||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===s||!(n=n.nextSibling)););else{U0.innerHTML=PL(i==="svg"?`${r}`:i==="mathml"?`${r}`:r);const a=U0.content;if(i==="svg"||i==="mathml"){const u=a.firstChild;for(;u.firstChild;)a.appendChild(u.firstChild);a.removeChild(u)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},BW=Symbol("_vtc");function jW(r,e,t){const i=r[BW];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}const V0=Symbol("_vod"),LW=Symbol("_vsh"),zW=Symbol(""),HW=/(^|;)\s*display\s*:/;function WW(r,e,t){const i=r.style,n=ut(t);let s=!1;if(t&&!n){if(e)if(ut(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&za(i,a,"")}else for(const o in e)t[o]==null&&za(i,o,"");for(const o in t)o==="display"&&(s=!0),za(i,o,t[o])}else if(n){if(e!==t){const o=i[zW];o&&(t+=";"+o),i.cssText=t,s=HW.test(t)}}else e&&r.removeAttribute("style");V0 in r&&(r[V0]=s?i.display:"",r[LW]&&(i.display="none"))}const K0=/\s*!important$/;function za(r,e,t){if(ve(t))t.forEach(i=>za(r,e,i));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const i=UW(r,e);K0.test(t)?r.setProperty(bn(i),t.replace(K0,""),"important"):r[i]=t}}const G0=["Webkit","Moz","ms"],gl={};function UW(r,e){const t=gl[e];if(t)return t;let i=Ri(e);if(i!=="filter"&&i in r)return gl[e]=i;i=Oj(i);for(let n=0;nml||(YW.then(()=>ml=0),ml=Date.now());function JW(r,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;Fr(QW(i,t.value),e,5,[i])};return t.value=r,t.attached=XW(),t}function QW(r,e){if(ve(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(i=>n=>!n._stopped&&i&&i(n))}else return e}const eE=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,ZW=(r,e,t,i,n,s)=>{const o=n==="svg";e==="class"?jW(r,i,o):e==="style"?WW(r,t,i):fu(e)?Z_(e)||KW(r,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):e4(r,e,i,o))?(J0(r,e,i),!r.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&X0(r,e,i,o,s,e!=="value")):r._isVueCE&&(/[A-Z]/.test(e)||!ut(i))?J0(r,Ri(e),i,s,e):(e==="true-value"?r._trueValue=i:e==="false-value"&&(r._falseValue=i),X0(r,e,i,o))};function e4(r,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in r&&eE(e)&&ye(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=r.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return eE(e)&&ut(t)?!1:e in r}const tE=r=>{const e=r.props["onUpdate:modelValue"]||!1;return ve(e)?t=>ka(e,t):e};function t4(r){r.target.composing=!0}function rE(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const yl=Symbol("_assign"),r4={created(r,{modifiers:{lazy:e,trim:t,number:i}},n){r[yl]=tE(n);const s=i||n.props&&n.props.type==="number";Kn(r,e?"change":"input",o=>{if(o.target.composing)return;let a=r.value;t&&(a=a.trim()),s&&(a=y_(a)),r[yl](a)}),t&&Kn(r,"change",()=>{r.value=r.value.trim()}),e||(Kn(r,"compositionstart",t4),Kn(r,"compositionend",rE),Kn(r,"change",rE))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:s}},o){if(r[yl]=tE(o),r.composing)return;const a=(s||r.type==="number")&&!/^0\d/.test(r.value)?y_(r.value):r.value,u=e??"";a!==u&&(document.activeElement===r&&r.type!=="range"&&(i&&e===t||n&&r.value.trim()===u)||(r.value=u))}},i4=["ctrl","shift","alt","meta"],n4={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>i4.some(t=>r[`${t}Key`]&&!e.includes(t))},s4=(r,e)=>{const t=r._withMods||(r._withMods={}),i=e.join(".");return t[i]||(t[i]=(n,...s)=>{for(let o=0;o{const e=a4().createApp(...r),{mount:t}=e;return e.mount=i=>{const n=c4(i);if(!n)return;const s=e._component;!ye(s)&&!s.render&&!s.template&&(s.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,l4(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e};function l4(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function c4(r){return ut(r)?document.querySelector(r):r}/*! * pinia v3.0.2 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const d4=Symbol();var iE;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(iE||(iE={}));function h4(){const r=rH(!0),e=r.run(()=>Pr({}));let t=[],i=[];const n=Uj({install(s){n._a=s,s.provide(d4,n),s.config.globalProperties.$pinia=n,i.forEach(o=>t.push(o)),i=[]},use(s){return this._a?t.push(s):i.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return n}/*! + */const d4=Symbol();var nE;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(nE||(nE={}));function h4(){const r=rH(!0),e=r.run(()=>Pr({}));let t=[],i=[];const n=Vj({install(s){n._a=s,s.provide(d4,n),s.config.globalProperties.$pinia=n,i.forEach(o=>t.push(o)),i=[]},use(s){return this._a?t.push(s):i.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return n}/*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Gn=typeof document<"u";function PL(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function f4(r){return r.__esModule||r[Symbol.toStringTag]==="Module"||r.default&&PL(r.default)}const Ae=Object.assign;function bl(r,e){const t={};for(const i in e){const n=e[i];t[i]=yr(n)?n.map(r):r(n)}return t}const fo=()=>{},yr=Array.isArray,RL=/#/g,p4=/&/g,v4=/\//g,g4=/=/g,m4=/\?/g,CL=/\+/g,y4=/%5B/g,b4=/%5D/g,xL=/%5E/g,_4=/%60/g,qL=/%7B/g,w4=/%7C/g,DL=/%7D/g,E4=/%20/g;function gw(r){return encodeURI(""+r).replace(w4,"|").replace(y4,"[").replace(b4,"]")}function S4(r){return gw(r).replace(qL,"{").replace(DL,"}").replace(xL,"^")}function x_(r){return gw(r).replace(CL,"%2B").replace(E4,"+").replace(RL,"%23").replace(p4,"%26").replace(_4,"`").replace(qL,"{").replace(DL,"}").replace(xL,"^")}function O4(r){return x_(r).replace(g4,"%3D")}function I4(r){return gw(r).replace(RL,"%23").replace(m4,"%3F")}function T4(r){return r==null?"":I4(r).replace(v4,"%2F")}function Po(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const $4=/\/$/,P4=r=>r.replace($4,"");function _l(r,e,t="/"){let i,n={},s="",o="";const a=e.indexOf("#");let u=e.indexOf("?");return a=0&&(u=-1),u>-1&&(i=e.slice(0,u),s=e.slice(u+1,a>-1?a:e.length),n=r(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=q4(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:Po(o)}}function R4(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function nE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function C4(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&hs(e.matched[i],t.matched[n])&&AL(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function hs(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function AL(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!x4(r[t],e[t]))return!1;return!0}function x4(r,e){return yr(r)?sE(r,e):yr(e)?sE(e,r):r===e}function sE(r,e){return yr(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function q4(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),i=r.split("/"),n=i[i.length-1];(n===".."||n===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const hi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ro;(function(r){r.pop="pop",r.push="push"})(Ro||(Ro={}));var po;(function(r){r.back="back",r.forward="forward",r.unknown=""})(po||(po={}));function D4(r){if(!r)if(Gn){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),P4(r)}const A4=/^[^#]+#/;function M4(r,e){return r.replace(A4,"#")+e}function N4(r,e){const t=document.documentElement.getBoundingClientRect(),i=r.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Iu=()=>({left:window.scrollX,top:window.scrollY});function F4(r){let e;if("el"in r){const t=r.el,i=typeof t=="string"&&t.startsWith("#"),n=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!n)return;e=N4(n,r)}else e=r;"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 oE(r,e){return(history.state?history.state.position-e:-1)+r}const q_=new Map;function k4(r,e){q_.set(r,e)}function B4(r){const e=q_.get(r);return q_.delete(r),e}let j4=()=>location.protocol+"//"+location.host;function ML(r,e){const{pathname:t,search:i,hash:n}=e,s=r.indexOf("#");if(s>-1){let a=n.includes(r.slice(s))?r.slice(s).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),nE(u,"")}return nE(t,r)+i+n}function L4(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=ML(r,location),p=t.value,v=e.value;let b=0;if(h){if(t.value=f,e.value=h,o&&o===p){o=null;return}b=v?h.position-v.position:0}else i(f);n.forEach(m=>{m(t.value,p,{delta:b,type:Ro.pop,direction:b?b>0?po.forward:po.back:po.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const p=n.indexOf(h);p>-1&&n.splice(p,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Ae({},h.state,{scroll:Iu()}),"")}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function aE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Iu():null}}function z4(r){const{history:e,location:t}=window,i={value:ML(r,t)},n={value:e.state};n.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(u,l,c){const d=r.indexOf("#"),h=d>-1?(t.host&&document.querySelector("base")?r:r.slice(d))+u:j4()+r+u;try{e[c?"replaceState":"pushState"](l,"",h),n.value=l}catch(f){console.error(f),t[c?"replace":"assign"](h)}}function o(u,l){const c=Ae({},e.state,aE(n.value.back,u,n.value.forward,!0),l,{position:n.value.position});s(u,c,!0),i.value=u}function a(u,l){const c=Ae({},n.value,e.state,{forward:u,scroll:Iu()});s(c.current,c,!0);const d=Ae({},aE(i.value,u,null),{position:c.position+1},l);s(u,d,!1),i.value=u}return{location:i,state:n,push:a,replace:o}}function H4(r){r=D4(r);const e=z4(r),t=L4(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Ae({location:"",base:r,go:i,createHref:M4.bind(null,r)},e,t);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>e.state.value}),n}function W4(r){return typeof r=="string"||r&&typeof r=="object"}function NL(r){return typeof r=="string"||typeof r=="symbol"}const FL=Symbol("");var uE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(uE||(uE={}));function fs(r,e){return Ae(new Error,{type:r,[FL]:!0},e)}function zr(r,e){return r instanceof Error&&FL in r&&(e==null||!!(r.type&e))}const lE="[^/]+?",U4={sensitive:!1,strict:!1,start:!0,end:!0},V4=/[.+*?^${}()[\]/\\]/g;function K4(r,e){const t=Ae({},U4,e),i=[];let n=t.start?"^":"";const s=[];for(const l of r){const c=l.length?[]:[90];t.strict&&!l.length&&(n+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function kL(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const Y4={type:0,value:""},X4=/[a-zA-Z0-9_]/;function J4(r){if(!r)return[[]];if(r==="/")return[[Y4]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,i=t;const n=[];let s;function o(){s&&n.push(s),s=[]}let a=0,u,l="",c="";function d(){l&&(t===0?s.push({type:0,value:l}):t===1||t===2||t===3?(s.length>1&&(u==="*"||u==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=u}for(;a{o(w)}:fo}function o(d){if(NL(d)){const h=i.get(d);h&&(i.delete(d),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(d);h>-1&&(t.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return t}function u(d){const h=rU(d,t);t.splice(h,0,d),d.record.name&&!fE(d)&&i.set(d.record.name,d)}function l(d,h){let f,p={},v,b;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw fs(1,{location:d});b=f.record.name,p=Ae(dE(h.params,f.keys.filter(w=>!w.optional).concat(f.parent?f.parent.keys.filter(w=>w.optional):[]).map(w=>w.name)),d.params&&dE(d.params,f.keys.map(w=>w.name))),v=f.stringify(p)}else if(d.path!=null)v=d.path,f=t.find(w=>w.re.test(v)),f&&(p=f.parse(v),b=f.record.name);else{if(f=h.name?i.get(h.name):t.find(w=>w.re.test(h.path)),!f)throw fs(1,{location:d,currentLocation:h});b=f.record.name,p=Ae({},h.params,d.params),v=f.stringify(p)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:b,path:v,params:p,matched:m,meta:tU(m)}}r.forEach(d=>s(d));function c(){t.length=0,i.clear()}return{addRoute:s,resolve:l,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:n}}function dE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function hE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:eU(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function eU(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const i in r.components)e[i]=typeof t=="object"?t[i]:t;return e}function fE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function tU(r){return r.reduce((e,t)=>Ae(e,t.meta),{})}function pE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function rU(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;kL(r,e[s])<0?i=s:t=s+1}const n=iU(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function iU(r){let e=r;for(;e=e.parent;)if(BL(e)&&kL(r,e)===0)return e}function BL({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function nU(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&x_(s)):[i&&x_(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function sU(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=yr(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const oU=Symbol(""),gE=Symbol(""),mw=Symbol(""),jL=Symbol(""),D_=Symbol("");function Qs(){let r=[];function e(i){return r.push(i),()=>{const n=r.indexOf(i);n>-1&&r.splice(n,1)}}function t(){r=[]}return{add:e,list:()=>r.slice(),reset:t}}function gi(r,e,t,i,n,s=o=>o()){const o=i&&(i.enterCallbacks[n]=i.enterCallbacks[n]||[]);return()=>new Promise((a,u)=>{const l=h=>{h===!1?u(fs(4,{from:t,to:e})):h instanceof Error?u(h):W4(h)?u(fs(2,{from:e,to:h})):(o&&i.enterCallbacks[n]===o&&typeof h=="function"&&o.push(h),a())},c=s(()=>r.call(i&&i.instances[n],e,t,l));let d=Promise.resolve(c);r.length<3&&(d=d.then(l)),d.catch(h=>u(h))})}function wl(r,e,t,i,n=s=>s()){const s=[];for(const o of r)for(const a in o.components){let u=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(PL(u)){const c=(u.__vccOpts||u)[e];c&&s.push(gi(c,t,i,o,a,n))}else{let l=u();s.push(()=>l.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=f4(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&gi(f,t,i,o,a,n)()}))}}return s}function mE(r){const e=Gr(mw),t=Gr(jL),i=gr(()=>{const u=sr(r.to);return e.resolve(u)}),n=gr(()=>{const{matched:u}=i.value,{length:l}=u,c=u[l-1],d=t.matched;if(!c||!d.length)return-1;const h=d.findIndex(hs.bind(null,c));if(h>-1)return h;const f=yE(u[l-2]);return l>1&&yE(c)===f&&d[d.length-1].path!==f?d.findIndex(hs.bind(null,u[l-2])):h}),s=gr(()=>n.value>-1&&dU(t.params,i.value.params)),o=gr(()=>n.value>-1&&n.value===t.matched.length-1&&AL(t.params,i.value.params));function a(u={}){if(cU(u)){const l=e[sr(r.replace)?"replace":"push"](sr(r.to)).catch(fo);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:gr(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function aU(r){return r.length===1?r[0]:r}const uU=wr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:mE,setup(r,{slots:e}){const t=yu(mE(r)),{options:i}=Gr(mw),n=gr(()=>({[bE(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[bE(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&aU(e.default(t));return r.custom?s:vw("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),lU=uU;function cU(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function dU(r,e){for(const t in e){const i=e[t],n=r[t];if(typeof i=="string"){if(i!==n)return!1}else if(!yr(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function yE(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const bE=(r,e,t)=>r??e??t,hU=wr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=Gr(D_),n=gr(()=>r.route||i.value),s=Gr(gE,0),o=gr(()=>{let l=sr(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=gr(()=>n.value.matched[o.value]);Ba(gE,gr(()=>o.value+1)),Ba(oU,a),Ba(D_,n);const u=Pr();return ja(()=>[u.value,a.value,r.name],([l,c,d],[h,f,p])=>{c&&(c.instances[d]=l,f&&f!==c&&l&&l===h&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),l&&c&&(!f||!hs(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return _E(t.default,{Component:h,route:l});const f=d.props[c],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,b=vw(h,Ae({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return _E(t.default,{Component:b,route:l})||b}}});function _E(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const LL=hU;function fU(r){const e=Z4(r.routes,r),t=r.parseQuery||nU,i=r.stringifyQuery||vE,n=r.history,s=Qs(),o=Qs(),a=Qs(),u=EH(hi);let l=hi;Gn&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=bl.bind(null,A=>""+A),d=bl.bind(null,T4),h=bl.bind(null,Po);function f(A,W){let Y,ie;return NL(A)?(Y=e.getRecordMatcher(A),ie=W):ie=A,e.addRoute(ie,Y)}function p(A){const W=e.getRecordMatcher(A);W&&e.removeRoute(W)}function v(){return e.getRoutes().map(A=>A.record)}function b(A){return!!e.getRecordMatcher(A)}function m(A,W){if(W=Ae({},W||u.value),typeof A=="string"){const q=_l(t,A,W.path),F=e.resolve({path:q.path},W),k=n.createHref(q.fullPath);return Ae(q,F,{params:h(F.params),hash:Po(q.hash),redirectedFrom:void 0,href:k})}let Y;if(A.path!=null)Y=Ae({},A,{path:_l(t,A.path,W.path).path});else{const q=Ae({},A.params);for(const F in q)q[F]==null&&delete q[F];Y=Ae({},A,{params:d(q)}),W.params=d(W.params)}const ie=e.resolve(Y,W),$e=A.hash||"";ie.params=c(h(ie.params));const $=R4(i,Ae({},A,{hash:S4($e),path:ie.path})),P=n.createHref($);return Ae({fullPath:$,hash:$e,query:i===vE?sU(A.query):A.query||{}},ie,{redirectedFrom:void 0,href:P})}function g(A){return typeof A=="string"?_l(t,A,u.value.path):Ae({},A)}function w(A,W){if(l!==A)return fs(8,{from:W,to:A})}function y(A){return I(A)}function S(A){return y(Ae(g(A),{replace:!0}))}function O(A){const W=A.matched[A.matched.length-1];if(W&&W.redirect){const{redirect:Y}=W;let ie=typeof Y=="function"?Y(A):Y;return typeof ie=="string"&&(ie=ie.includes("?")||ie.includes("#")?ie=g(ie):{path:ie},ie.params={}),Ae({query:A.query,hash:A.hash,params:ie.path!=null?{}:A.params},ie)}}function I(A,W){const Y=l=m(A),ie=u.value,$e=A.state,$=A.force,P=A.replace===!0,q=O(Y);if(q)return I(Ae(g(q),{state:typeof q=="object"?Ae({},$e,q.state):$e,force:$,replace:P}),W||Y);const F=Y;F.redirectedFrom=W;let k;return!$&&C4(i,ie,Y)&&(k=fs(16,{to:F,from:ie}),te(ie,ie,!0,!1)),(k?Promise.resolve(k):T(F,ie)).catch(N=>zr(N)?zr(N,2)?N:_e(N):Z(N,F,ie)).then(N=>{if(N){if(zr(N,2))return I(Ae({replace:P},g(N.to),{state:typeof N.to=="object"?Ae({},$e,N.to.state):$e,force:$}),W||F)}else N=x(F,ie,!0,P,$e);return R(F,ie,N),N})}function _(A,W){const Y=w(A,W);return Y?Promise.reject(Y):Promise.resolve()}function E(A){const W=De.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(A):A()}function T(A,W){let Y;const[ie,$e,$]=pU(A,W);Y=wl(ie.reverse(),"beforeRouteLeave",A,W);for(const q of ie)q.leaveGuards.forEach(F=>{Y.push(gi(F,A,W))});const P=_.bind(null,A,W);return Y.push(P),be(Y).then(()=>{Y=[];for(const q of s.list())Y.push(gi(q,A,W));return Y.push(P),be(Y)}).then(()=>{Y=wl($e,"beforeRouteUpdate",A,W);for(const q of $e)q.updateGuards.forEach(F=>{Y.push(gi(F,A,W))});return Y.push(P),be(Y)}).then(()=>{Y=[];for(const q of $)if(q.beforeEnter)if(yr(q.beforeEnter))for(const F of q.beforeEnter)Y.push(gi(F,A,W));else Y.push(gi(q.beforeEnter,A,W));return Y.push(P),be(Y)}).then(()=>(A.matched.forEach(q=>q.enterCallbacks={}),Y=wl($,"beforeRouteEnter",A,W,E),Y.push(P),be(Y))).then(()=>{Y=[];for(const q of o.list())Y.push(gi(q,A,W));return Y.push(P),be(Y)}).catch(q=>zr(q,8)?q:Promise.reject(q))}function R(A,W,Y){a.list().forEach(ie=>E(()=>ie(A,W,Y)))}function x(A,W,Y,ie,$e){const $=w(A,W);if($)return $;const P=W===hi,q=Gn?history.state:{};Y&&(ie||P?n.replace(A.fullPath,Ae({scroll:P&&q&&q.scroll},$e)):n.push(A.fullPath,$e)),u.value=A,te(A,W,Y,P),_e()}let C;function D(){C||(C=n.listen((A,W,Y)=>{if(!it.listening)return;const ie=m(A),$e=O(ie);if($e){I(Ae($e,{replace:!0,force:!0}),ie).catch(fo);return}l=ie;const $=u.value;Gn&&k4(oE($.fullPath,Y.delta),Iu()),T(ie,$).catch(P=>zr(P,12)?P:zr(P,2)?(I(Ae(g(P.to),{force:!0}),ie).then(q=>{zr(q,20)&&!Y.delta&&Y.type===Ro.pop&&n.go(-1,!1)}).catch(fo),Promise.reject()):(Y.delta&&n.go(-Y.delta,!1),Z(P,ie,$))).then(P=>{P=P||x(ie,$,!1),P&&(Y.delta&&!zr(P,8)?n.go(-Y.delta,!1):Y.type===Ro.pop&&zr(P,20)&&n.go(-1,!1)),R(ie,$,P)}).catch(fo)}))}let j=Qs(),ee=Qs(),H;function Z(A,W,Y){_e(A);const ie=ee.list();return ie.length?ie.forEach($e=>$e(A,W,Y)):console.error(A),Promise.reject(A)}function fe(){return H&&u.value!==hi?Promise.resolve():new Promise((A,W)=>{j.add([A,W])})}function _e(A){return H||(H=!A,D(),j.list().forEach(([W,Y])=>A?Y(A):W()),j.reset()),A}function te(A,W,Y,ie){const{scrollBehavior:$e}=r;if(!Gn||!$e)return Promise.resolve();const $=!Y&&B4(oE(A.fullPath,0))||(ie||!Y)&&history.state&&history.state.scroll||null;return Yj().then(()=>$e(A,W,$)).then(P=>P&&F4(P)).catch(P=>Z(P,A,W))}const ge=A=>n.go(A);let xe;const De=new Set,it={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:v,resolve:m,options:r,push:y,replace:S,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:ee.add,isReady:fe,install(A){const W=this;A.component("RouterLink",lU),A.component("RouterView",LL),A.config.globalProperties.$router=W,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>sr(u)}),Gn&&!xe&&u.value===hi&&(xe=!0,y(n.location).catch($e=>{}));const Y={};for(const $e in hi)Object.defineProperty(Y,$e,{get:()=>u.value[$e],enumerable:!0});A.provide(mw,W),A.provide(jL,Hj(Y)),A.provide(D_,u);const ie=A.unmount;De.add(A),A.unmount=function(){De.delete(A),De.size<1&&(l=hi,C&&C(),C=null,u.value=hi,xe=!1,H=!1),ie()}}};function be(A){return A.reduce((W,Y)=>W.then(()=>E(Y)),Promise.resolve())}return it}function pU(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;ohs(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>hs(l,u))||n.push(u))}return[t,i,n]}const vU=wr({__name:"App",setup(r){return(e,t)=>(Ct(),xi(sr(LL)))}}),gU=Pr({width:100,margin:1,color:{dark:"#000000",light:"f0f0f0"}}),mU=r=>{const e=yU(r);bU(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},yU=r=>{const e=atob(r),t=new Uint8Array(e.length);for(let i=0;i{const i=new Blob([r],{type:t}),n=URL.createObjectURL(i),s=document.createElement("a");s.href=n,s.download=e,s.click(),URL.revokeObjectURL(n)},wE=async()=>{try{const r=await fetch(Fi("/teams"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetTeams] error:",r),r}},_U=async r=>{try{const e=await fetch(Fi("/teams"),{method:"POST",body:JSON.stringify({teams:[{name:r}]})});if(!e.ok)throw new Error(`http error status: ${e.status}`)}catch(e){throw console.error("[apiAddTeam] error:",e),e}},wU=async()=>{try{const r=await fetch(Fi("/game"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetGame] error:",r),r}},EU=async()=>{try{const r=await fetch(Fi("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},SU=async()=>{try{const r=await fetch(Fi("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},OU=async(r,e)=>{try{const t=await fetch(Fi("/teams/"+r+"/applications"),{method:"POST",body:JSON.stringify({applications:[{id:e}]})});if(!t.ok)throw new Error(`http error status: ${t.status}`)}catch(t){throw console.error("[apiGaveApplication] error:",t),t}},EE=async()=>{try{const r=await fetch(Fi("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();mU(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},IU=async()=>{try{const r=await fetch(Fi("/graph"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}};function Fi(r){return"http://"+window.location.host.split(":")[0]+":8090"+r}var zn={},El,SE;function TU(){return SE||(SE=1,El=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),El}var Sl={},fi={},OE;function _n(){if(OE)return fi;OE=1;let r;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return fi.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},fi.getSymbolTotalCodewords=function(i){return e[i]},fi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},fi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},fi.isKanjiModeEnabled=function(){return typeof r<"u"},fi.toSJIS=function(i){return r(i)},fi}var Ol={},IE;function yw(){return IE||(IE=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}}(Ol)),Ol}var Il,TE;function $U(){if(TE)return Il;TE=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},Il=r,Il}var Tl,$E;function PU(){if($E)return Tl;$E=1;function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return r.prototype.set=function(e,t,i,n){const s=e*this.size+t;this.data[s]=i,n&&(this.reservedBit[s]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},Tl=r,Tl}var $l={},PE;function RU(){return PE||(PE=1,function(r){const e=_n().getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7];for(let u=1;u=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){const s=n.size;let o=0,a=0,u=0,l=null,c=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),l=f,a=1),f=n.get(h,d),f===c?u++:(u>=5&&(o+=e.N1+(u-5)),c=f,u=1)}a>=5&&(o+=e.N1+(a-5)),u>=5&&(o+=e.N1+(u-5))}return o},r.getPenaltyN2=function(n){const s=n.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,u=u<<1&2047|n.get(c,l),c>=10&&(u===1488||u===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){let s=0;const o=n.data.length;for(let u=0;u=0;){const o=s[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},xl=e,xl}var ql={},Dl={},Al={},ME;function HL(){return ME||(ME=1,Al.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Al}var Ir={},NE;function WL(){if(NE)return Ir;NE=1;const r="[0-9]+",e="[A-Z $%*+\\-./:]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+`)(?:.|[\r -]))+`;Ir.KANJI=new RegExp(t,"g"),Ir.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ir.BYTE=new RegExp(i,"g"),Ir.NUMERIC=new RegExp(r,"g"),Ir.ALPHANUMERIC=new RegExp(e,"g");const n=new RegExp("^"+t+"$"),s=new RegExp("^"+r+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ir.testKanji=function(u){return n.test(u)},Ir.testNumeric=function(u){return s.test(u)},Ir.testAlphanumeric=function(u){return o.test(u)},Ir}var FE;function wn(){return FE||(FE=1,function(r){const e=HL(),t=WL();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+n)}}r.from=function(s,o){if(r.isValid(s))return s;try{return i(s)}catch{return o}}}(Dl)),Dl}var kE;function MU(){return kE||(kE=1,function(r){const e=_n(),t=zL(),i=yw(),n=wn(),s=HL(),o=7973,a=e.getBCHDigit(o);function u(h,f,p){for(let v=1;v<=40;v++)if(f<=r.getCapacity(v,p,h))return v}function l(h,f){return n.getCharCountIndicator(h,f)+4}function c(h,f){let p=0;return h.forEach(function(v){const b=l(v.mode,f);p+=b+v.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(c(h,p)<=r.getCapacity(p,f,n.MIXED))return p}r.from=function(f,p){return s.isValid(f)?parseInt(f,10):p},r.getCapacity=function(f,p,v){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=n.BYTE);const b=e.getSymbolTotalCodewords(f),m=t.getTotalCodewordsCount(f,p),g=(b-m)*8;if(v===n.MIXED)return g;const w=g-l(v,f);switch(v){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},r.getBestVersionForData=function(f,p){let v;const b=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,b);if(f.length===0)return 1;v=f[0]}else v=f;return u(v.mode,v.getLength(),b)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)u^=e<0&&(s=this.data.substr(n),o=parseInt(s,10),i.put(o,a*3+1))},Fl=e,Fl}var kl,LE;function kU(){if(LE)return kl;LE=1;const r=wn(),e=["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 t(i){this.mode=r.ALPHANUMERIC,this.data=i}return t.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),n.put(o,11)}this.data.length%2&&n.put(e.indexOf(this.data[s]),6)},kl=t,kl}var Bl,zE;function BU(){if(zE)return Bl;zE=1;const r=wn();function e(t){this.mode=r.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let i=0,n=this.data.length;i=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+` -Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),i.put(s,13)}},jl=t,jl}var Ll={exports:{}},WE;function LU(){return WE||(WE=1,function(r){var e={single_source_shortest_paths:function(t,i,n){var s={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var u,l,c,d,h,f,p,v,b;!a.empty();){u=a.pop(),l=u.value,d=u.cost,h=t[l]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],p=d+f,v=o[c],b=typeof o[c]>"u",(b||v>p)&&(o[c]=p,a.push(c,p),s[c]=l))}if(typeof n<"u"&&typeof o[n]>"u"){var m=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(m)}return s},extract_shortest_path_from_predecessor_list:function(t,i){for(var n=[],s=i;s;)n.push(s),t[s],s=t[s];return n.reverse(),n},find_path:function(t,i,n){var s=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(s,n)},PriorityQueue:{make:function(t){var i=e.PriorityQueue,n={},s;t=t||{};for(s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);return n.queue=[],n.sorter=t.sorter||i.default_sorter,n},default_sorter:function(t,i){return t.cost-i.cost},push:function(t,i){var n={value:t,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e}(Ll)),Ll.exports}var UE;function zU(){return UE||(UE=1,function(r){const e=wn(),t=FU(),i=kU(),n=BU(),s=jU(),o=WL(),a=_n(),u=LU();function l(m){return unescape(encodeURIComponent(m)).length}function c(m,g,w){const y=[];let S;for(;(S=m.exec(w))!==null;)y.push({data:S[0],index:S.index,mode:g,length:S[0].length});return y}function d(m){const g=c(o.NUMERIC,e.NUMERIC,m),w=c(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let y,S;return a.isKanjiModeEnabled()?(y=c(o.BYTE,e.BYTE,m),S=c(o.KANJI,e.KANJI,m)):(y=c(o.BYTE_KANJI,e.BYTE,m),S=[]),g.concat(w,y,S).sort(function(I,_){return I.index-_.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function h(m,g){switch(g){case e.NUMERIC:return t.getBitsLength(m);case e.ALPHANUMERIC:return i.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function f(m){return m.reduce(function(g,w){const y=g.length-1>=0?g[g.length-1]:null;return y&&y.mode===w.mode?(g[g.length-1].data+=w.data,g):(g.push(w),g)},[])}function p(m){const g=[];for(let w=0;w=0&&C<=6&&(D===0||D===6)||D>=0&&D<=6&&(C===0||C===6)||C>=2&&C<=4&&D>=2&&D<=4?O.set(R+C,x+D,!0,!0):O.set(R+C,x+D,!1,!0))}}function p(O){const I=O.size;for(let _=8;_>C&1)===1,O.set(T,R,x,!0),O.set(R,T,x,!0)}function m(O,I,_){const E=O.size,T=c.getEncodedBits(I,_);let R,x;for(R=0;R<15;R++)x=(T>>R&1)===1,R<6?O.set(R,8,x,!0):R<8?O.set(R+1,8,x,!0):O.set(E-15+R,8,x,!0),R<8?O.set(8,E-R-1,x,!0):R<9?O.set(8,15-R-1+1,x,!0):O.set(8,15-R-1,x,!0);O.set(E-8,8,1,!0)}function g(O,I){const _=O.size;let E=-1,T=_-1,R=7,x=0;for(let C=_-1;C>0;C-=2)for(C===6&&C--;;){for(let D=0;D<2;D++)if(!O.isReserved(T,C-D)){let j=!1;x>>R&1)===1),O.set(T,C-D,j),R--,R===-1&&(x++,R=7)}if(T+=E,T<0||_<=T){T-=E,E=-E;break}}}function w(O,I,_){const E=new t;_.forEach(function(D){E.put(D.mode.bit,4),E.put(D.getLength(),d.getCharCountIndicator(D.mode,O)),D.write(E)});const T=r.getSymbolTotalCodewords(O),R=a.getTotalCodewordsCount(O,I),x=(T-R)*8;for(E.getLengthInBits()+4<=x&&E.put(0,4);E.getLengthInBits()%8!==0;)E.putBit(0);const C=(x-E.getLengthInBits())/8;for(let D=0;D{},yr=Array.isArray,CL=/#/g,p4=/&/g,v4=/\//g,g4=/=/g,m4=/\?/g,xL=/\+/g,y4=/%5B/g,b4=/%5D/g,qL=/%5E/g,_4=/%60/g,DL=/%7B/g,w4=/%7C/g,AL=/%7D/g,E4=/%20/g;function mw(r){return encodeURI(""+r).replace(w4,"|").replace(y4,"[").replace(b4,"]")}function S4(r){return mw(r).replace(DL,"{").replace(AL,"}").replace(qL,"^")}function x_(r){return mw(r).replace(xL,"%2B").replace(E4,"+").replace(CL,"%23").replace(p4,"%26").replace(_4,"`").replace(DL,"{").replace(AL,"}").replace(qL,"^")}function O4(r){return x_(r).replace(g4,"%3D")}function I4(r){return mw(r).replace(CL,"%23").replace(m4,"%3F")}function T4(r){return r==null?"":I4(r).replace(v4,"%2F")}function Po(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const $4=/\/$/,P4=r=>r.replace($4,"");function _l(r,e,t="/"){let i,n={},s="",o="";const a=e.indexOf("#");let u=e.indexOf("?");return a=0&&(u=-1),u>-1&&(i=e.slice(0,u),s=e.slice(u+1,a>-1?a:e.length),n=r(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=q4(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:Po(o)}}function R4(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function sE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function C4(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&hs(e.matched[i],t.matched[n])&&ML(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function hs(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function ML(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!x4(r[t],e[t]))return!1;return!0}function x4(r,e){return yr(r)?oE(r,e):yr(e)?oE(e,r):r===e}function oE(r,e){return yr(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function q4(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),i=r.split("/"),n=i[i.length-1];(n===".."||n===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const hi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ro;(function(r){r.pop="pop",r.push="push"})(Ro||(Ro={}));var po;(function(r){r.back="back",r.forward="forward",r.unknown=""})(po||(po={}));function D4(r){if(!r)if(Gn){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),P4(r)}const A4=/^[^#]+#/;function M4(r,e){return r.replace(A4,"#")+e}function N4(r,e){const t=document.documentElement.getBoundingClientRect(),i=r.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Iu=()=>({left:window.scrollX,top:window.scrollY});function F4(r){let e;if("el"in r){const t=r.el,i=typeof t=="string"&&t.startsWith("#"),n=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!n)return;e=N4(n,r)}else e=r;"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 aE(r,e){return(history.state?history.state.position-e:-1)+r}const q_=new Map;function k4(r,e){q_.set(r,e)}function B4(r){const e=q_.get(r);return q_.delete(r),e}let j4=()=>location.protocol+"//"+location.host;function NL(r,e){const{pathname:t,search:i,hash:n}=e,s=r.indexOf("#");if(s>-1){let a=n.includes(r.slice(s))?r.slice(s).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),sE(u,"")}return sE(t,r)+i+n}function L4(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=NL(r,location),p=t.value,v=e.value;let b=0;if(h){if(t.value=f,e.value=h,o&&o===p){o=null;return}b=v?h.position-v.position:0}else i(f);n.forEach(m=>{m(t.value,p,{delta:b,type:Ro.pop,direction:b?b>0?po.forward:po.back:po.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const p=n.indexOf(h);p>-1&&n.splice(p,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Ae({},h.state,{scroll:Iu()}),"")}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function uE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Iu():null}}function z4(r){const{history:e,location:t}=window,i={value:NL(r,t)},n={value:e.state};n.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(u,l,c){const d=r.indexOf("#"),h=d>-1?(t.host&&document.querySelector("base")?r:r.slice(d))+u:j4()+r+u;try{e[c?"replaceState":"pushState"](l,"",h),n.value=l}catch(f){console.error(f),t[c?"replace":"assign"](h)}}function o(u,l){const c=Ae({},e.state,uE(n.value.back,u,n.value.forward,!0),l,{position:n.value.position});s(u,c,!0),i.value=u}function a(u,l){const c=Ae({},n.value,e.state,{forward:u,scroll:Iu()});s(c.current,c,!0);const d=Ae({},uE(i.value,u,null),{position:c.position+1},l);s(u,d,!1),i.value=u}return{location:i,state:n,push:a,replace:o}}function H4(r){r=D4(r);const e=z4(r),t=L4(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Ae({location:"",base:r,go:i,createHref:M4.bind(null,r)},e,t);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>e.state.value}),n}function W4(r){return typeof r=="string"||r&&typeof r=="object"}function FL(r){return typeof r=="string"||typeof r=="symbol"}const kL=Symbol("");var lE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(lE||(lE={}));function fs(r,e){return Ae(new Error,{type:r,[kL]:!0},e)}function zr(r,e){return r instanceof Error&&kL in r&&(e==null||!!(r.type&e))}const cE="[^/]+?",U4={sensitive:!1,strict:!1,start:!0,end:!0},V4=/[.+*?^${}()[\]/\\]/g;function K4(r,e){const t=Ae({},U4,e),i=[];let n=t.start?"^":"";const s=[];for(const l of r){const c=l.length?[]:[90];t.strict&&!l.length&&(n+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function BL(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const Y4={type:0,value:""},X4=/[a-zA-Z0-9_]/;function J4(r){if(!r)return[[]];if(r==="/")return[[Y4]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,i=t;const n=[];let s;function o(){s&&n.push(s),s=[]}let a=0,u,l="",c="";function d(){l&&(t===0?s.push({type:0,value:l}):t===1||t===2||t===3?(s.length>1&&(u==="*"||u==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=u}for(;a{o(w)}:fo}function o(d){if(FL(d)){const h=i.get(d);h&&(i.delete(d),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(d);h>-1&&(t.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return t}function u(d){const h=rU(d,t);t.splice(h,0,d),d.record.name&&!pE(d)&&i.set(d.record.name,d)}function l(d,h){let f,p={},v,b;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw fs(1,{location:d});b=f.record.name,p=Ae(hE(h.params,f.keys.filter(w=>!w.optional).concat(f.parent?f.parent.keys.filter(w=>w.optional):[]).map(w=>w.name)),d.params&&hE(d.params,f.keys.map(w=>w.name))),v=f.stringify(p)}else if(d.path!=null)v=d.path,f=t.find(w=>w.re.test(v)),f&&(p=f.parse(v),b=f.record.name);else{if(f=h.name?i.get(h.name):t.find(w=>w.re.test(h.path)),!f)throw fs(1,{location:d,currentLocation:h});b=f.record.name,p=Ae({},h.params,d.params),v=f.stringify(p)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:b,path:v,params:p,matched:m,meta:tU(m)}}r.forEach(d=>s(d));function c(){t.length=0,i.clear()}return{addRoute:s,resolve:l,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:n}}function hE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function fE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:eU(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function eU(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const i in r.components)e[i]=typeof t=="object"?t[i]:t;return e}function pE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function tU(r){return r.reduce((e,t)=>Ae(e,t.meta),{})}function vE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function rU(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;BL(r,e[s])<0?i=s:t=s+1}const n=iU(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function iU(r){let e=r;for(;e=e.parent;)if(jL(e)&&BL(r,e)===0)return e}function jL({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function nU(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&x_(s)):[i&&x_(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function sU(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=yr(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const oU=Symbol(""),mE=Symbol(""),yw=Symbol(""),LL=Symbol(""),D_=Symbol("");function Qs(){let r=[];function e(i){return r.push(i),()=>{const n=r.indexOf(i);n>-1&&r.splice(n,1)}}function t(){r=[]}return{add:e,list:()=>r.slice(),reset:t}}function gi(r,e,t,i,n,s=o=>o()){const o=i&&(i.enterCallbacks[n]=i.enterCallbacks[n]||[]);return()=>new Promise((a,u)=>{const l=h=>{h===!1?u(fs(4,{from:t,to:e})):h instanceof Error?u(h):W4(h)?u(fs(2,{from:e,to:h})):(o&&i.enterCallbacks[n]===o&&typeof h=="function"&&o.push(h),a())},c=s(()=>r.call(i&&i.instances[n],e,t,l));let d=Promise.resolve(c);r.length<3&&(d=d.then(l)),d.catch(h=>u(h))})}function wl(r,e,t,i,n=s=>s()){const s=[];for(const o of r)for(const a in o.components){let u=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(RL(u)){const c=(u.__vccOpts||u)[e];c&&s.push(gi(c,t,i,o,a,n))}else{let l=u();s.push(()=>l.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=f4(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&gi(f,t,i,o,a,n)()}))}}return s}function yE(r){const e=Gr(yw),t=Gr(LL),i=gr(()=>{const u=Qt(r.to);return e.resolve(u)}),n=gr(()=>{const{matched:u}=i.value,{length:l}=u,c=u[l-1],d=t.matched;if(!c||!d.length)return-1;const h=d.findIndex(hs.bind(null,c));if(h>-1)return h;const f=bE(u[l-2]);return l>1&&bE(c)===f&&d[d.length-1].path!==f?d.findIndex(hs.bind(null,u[l-2])):h}),s=gr(()=>n.value>-1&&dU(t.params,i.value.params)),o=gr(()=>n.value>-1&&n.value===t.matched.length-1&&ML(t.params,i.value.params));function a(u={}){if(cU(u)){const l=e[Qt(r.replace)?"replace":"push"](Qt(r.to)).catch(fo);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:gr(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function aU(r){return r.length===1?r[0]:r}const uU=wr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:yE,setup(r,{slots:e}){const t=yu(yE(r)),{options:i}=Gr(yw),n=gr(()=>({[_E(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[_E(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&aU(e.default(t));return r.custom?s:gw("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),lU=uU;function cU(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function dU(r,e){for(const t in e){const i=e[t],n=r[t];if(typeof i=="string"){if(i!==n)return!1}else if(!yr(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function bE(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const _E=(r,e,t)=>r??e??t,hU=wr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=Gr(D_),n=gr(()=>r.route||i.value),s=Gr(mE,0),o=gr(()=>{let l=Qt(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=gr(()=>n.value.matched[o.value]);Ba(mE,gr(()=>o.value+1)),Ba(oU,a),Ba(D_,n);const u=Pr();return ja(()=>[u.value,a.value,r.name],([l,c,d],[h,f,p])=>{c&&(c.instances[d]=l,f&&f!==c&&l&&l===h&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),l&&c&&(!f||!hs(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return wE(t.default,{Component:h,route:l});const f=d.props[c],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,b=gw(h,Ae({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return wE(t.default,{Component:b,route:l})||b}}});function wE(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const zL=hU;function fU(r){const e=Z4(r.routes,r),t=r.parseQuery||nU,i=r.stringifyQuery||gE,n=r.history,s=Qs(),o=Qs(),a=Qs(),u=EH(hi);let l=hi;Gn&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=bl.bind(null,A=>""+A),d=bl.bind(null,T4),h=bl.bind(null,Po);function f(A,W){let Y,ie;return FL(A)?(Y=e.getRecordMatcher(A),ie=W):ie=A,e.addRoute(ie,Y)}function p(A){const W=e.getRecordMatcher(A);W&&e.removeRoute(W)}function v(){return e.getRoutes().map(A=>A.record)}function b(A){return!!e.getRecordMatcher(A)}function m(A,W){if(W=Ae({},W||u.value),typeof A=="string"){const q=_l(t,A,W.path),F=e.resolve({path:q.path},W),k=n.createHref(q.fullPath);return Ae(q,F,{params:h(F.params),hash:Po(q.hash),redirectedFrom:void 0,href:k})}let Y;if(A.path!=null)Y=Ae({},A,{path:_l(t,A.path,W.path).path});else{const q=Ae({},A.params);for(const F in q)q[F]==null&&delete q[F];Y=Ae({},A,{params:d(q)}),W.params=d(W.params)}const ie=e.resolve(Y,W),Pe=A.hash||"";ie.params=c(h(ie.params));const $=R4(i,Ae({},A,{hash:S4(Pe),path:ie.path})),P=n.createHref($);return Ae({fullPath:$,hash:Pe,query:i===gE?sU(A.query):A.query||{}},ie,{redirectedFrom:void 0,href:P})}function g(A){return typeof A=="string"?_l(t,A,u.value.path):Ae({},A)}function w(A,W){if(l!==A)return fs(8,{from:W,to:A})}function y(A){return I(A)}function S(A){return y(Ae(g(A),{replace:!0}))}function O(A){const W=A.matched[A.matched.length-1];if(W&&W.redirect){const{redirect:Y}=W;let ie=typeof Y=="function"?Y(A):Y;return typeof ie=="string"&&(ie=ie.includes("?")||ie.includes("#")?ie=g(ie):{path:ie},ie.params={}),Ae({query:A.query,hash:A.hash,params:ie.path!=null?{}:A.params},ie)}}function I(A,W){const Y=l=m(A),ie=u.value,Pe=A.state,$=A.force,P=A.replace===!0,q=O(Y);if(q)return I(Ae(g(q),{state:typeof q=="object"?Ae({},Pe,q.state):Pe,force:$,replace:P}),W||Y);const F=Y;F.redirectedFrom=W;let k;return!$&&C4(i,ie,Y)&&(k=fs(16,{to:F,from:ie}),te(ie,ie,!0,!1)),(k?Promise.resolve(k):T(F,ie)).catch(N=>zr(N)?zr(N,2)?N:_e(N):Z(N,F,ie)).then(N=>{if(N){if(zr(N,2))return I(Ae({replace:P},g(N.to),{state:typeof N.to=="object"?Ae({},Pe,N.to.state):Pe,force:$}),W||F)}else N=x(F,ie,!0,P,Pe);return R(F,ie,N),N})}function _(A,W){const Y=w(A,W);return Y?Promise.reject(Y):Promise.resolve()}function E(A){const W=De.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(A):A()}function T(A,W){let Y;const[ie,Pe,$]=pU(A,W);Y=wl(ie.reverse(),"beforeRouteLeave",A,W);for(const q of ie)q.leaveGuards.forEach(F=>{Y.push(gi(F,A,W))});const P=_.bind(null,A,W);return Y.push(P),be(Y).then(()=>{Y=[];for(const q of s.list())Y.push(gi(q,A,W));return Y.push(P),be(Y)}).then(()=>{Y=wl(Pe,"beforeRouteUpdate",A,W);for(const q of Pe)q.updateGuards.forEach(F=>{Y.push(gi(F,A,W))});return Y.push(P),be(Y)}).then(()=>{Y=[];for(const q of $)if(q.beforeEnter)if(yr(q.beforeEnter))for(const F of q.beforeEnter)Y.push(gi(F,A,W));else Y.push(gi(q.beforeEnter,A,W));return Y.push(P),be(Y)}).then(()=>(A.matched.forEach(q=>q.enterCallbacks={}),Y=wl($,"beforeRouteEnter",A,W,E),Y.push(P),be(Y))).then(()=>{Y=[];for(const q of o.list())Y.push(gi(q,A,W));return Y.push(P),be(Y)}).catch(q=>zr(q,8)?q:Promise.reject(q))}function R(A,W,Y){a.list().forEach(ie=>E(()=>ie(A,W,Y)))}function x(A,W,Y,ie,Pe){const $=w(A,W);if($)return $;const P=W===hi,q=Gn?history.state:{};Y&&(ie||P?n.replace(A.fullPath,Ae({scroll:P&&q&&q.scroll},Pe)):n.push(A.fullPath,Pe)),u.value=A,te(A,W,Y,P),_e()}let C;function D(){C||(C=n.listen((A,W,Y)=>{if(!it.listening)return;const ie=m(A),Pe=O(ie);if(Pe){I(Ae(Pe,{replace:!0,force:!0}),ie).catch(fo);return}l=ie;const $=u.value;Gn&&k4(aE($.fullPath,Y.delta),Iu()),T(ie,$).catch(P=>zr(P,12)?P:zr(P,2)?(I(Ae(g(P.to),{force:!0}),ie).then(q=>{zr(q,20)&&!Y.delta&&Y.type===Ro.pop&&n.go(-1,!1)}).catch(fo),Promise.reject()):(Y.delta&&n.go(-Y.delta,!1),Z(P,ie,$))).then(P=>{P=P||x(ie,$,!1),P&&(Y.delta&&!zr(P,8)?n.go(-Y.delta,!1):Y.type===Ro.pop&&zr(P,20)&&n.go(-1,!1)),R(ie,$,P)}).catch(fo)}))}let j=Qs(),ee=Qs(),H;function Z(A,W,Y){_e(A);const ie=ee.list();return ie.length?ie.forEach(Pe=>Pe(A,W,Y)):console.error(A),Promise.reject(A)}function fe(){return H&&u.value!==hi?Promise.resolve():new Promise((A,W)=>{j.add([A,W])})}function _e(A){return H||(H=!A,D(),j.list().forEach(([W,Y])=>A?Y(A):W()),j.reset()),A}function te(A,W,Y,ie){const{scrollBehavior:Pe}=r;if(!Gn||!Pe)return Promise.resolve();const $=!Y&&B4(aE(A.fullPath,0))||(ie||!Y)&&history.state&&history.state.scroll||null;return Xj().then(()=>Pe(A,W,$)).then(P=>P&&F4(P)).catch(P=>Z(P,A,W))}const ge=A=>n.go(A);let xe;const De=new Set,it={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:v,resolve:m,options:r,push:y,replace:S,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:ee.add,isReady:fe,install(A){const W=this;A.component("RouterLink",lU),A.component("RouterView",zL),A.config.globalProperties.$router=W,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>Qt(u)}),Gn&&!xe&&u.value===hi&&(xe=!0,y(n.location).catch(Pe=>{}));const Y={};for(const Pe in hi)Object.defineProperty(Y,Pe,{get:()=>u.value[Pe],enumerable:!0});A.provide(yw,W),A.provide(LL,Wj(Y)),A.provide(D_,u);const ie=A.unmount;De.add(A),A.unmount=function(){De.delete(A),De.size<1&&(l=hi,C&&C(),C=null,u.value=hi,xe=!1,H=!1),ie()}}};function be(A){return A.reduce((W,Y)=>W.then(()=>E(Y)),Promise.resolve())}return it}function pU(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;ohs(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>hs(l,u))||n.push(u))}return[t,i,n]}const vU=wr({__name:"App",setup(r){return(e,t)=>(Ct(),xi(Qt(zL)))}}),gU=Pr({width:100,margin:1,color:{dark:"#000000",light:"f0f0f0"}}),mU=r=>{const e=yU(r);bU(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},yU=r=>{const e=atob(r),t=new Uint8Array(e.length);for(let i=0;i{const i=new Blob([r],{type:t}),n=URL.createObjectURL(i),s=document.createElement("a");s.href=n,s.download=e,s.click(),URL.revokeObjectURL(n)},EE=async()=>{try{const r=await fetch(Fi("/teams"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetTeams] error:",r),r}},_U=async r=>{try{const e=await fetch(Fi("/teams"),{method:"POST",body:JSON.stringify({teams:[{name:r}]})});if(!e.ok)throw new Error(`http error status: ${e.status}`)}catch(e){throw console.error("[apiAddTeam] error:",e),e}},wU=async()=>{try{const r=await fetch(Fi("/game"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetGame] error:",r),r}},EU=async()=>{try{const r=await fetch(Fi("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},SU=async()=>{try{const r=await fetch(Fi("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},OU=async(r,e)=>{try{const t=await fetch(Fi("/teams/"+r+"/applications"),{method:"POST",body:JSON.stringify({applications:[{id:e}]})});if(!t.ok)throw new Error(`http error status: ${t.status}`)}catch(t){throw console.error("[apiGaveApplication] error:",t),t}},SE=async()=>{try{const r=await fetch(Fi("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();mU(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},IU=async()=>{try{const r=await fetch(Fi("/graph"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}};function Fi(r){return"http://"+window.location.host.split(":")[0]+":8090"+r}var zn={},El,OE;function TU(){return OE||(OE=1,El=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),El}var Sl={},fi={},IE;function _n(){if(IE)return fi;IE=1;let r;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return fi.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},fi.getSymbolTotalCodewords=function(i){return e[i]},fi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},fi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},fi.isKanjiModeEnabled=function(){return typeof r<"u"},fi.toSJIS=function(i){return r(i)},fi}var Ol={},TE;function bw(){return TE||(TE=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}}(Ol)),Ol}var Il,$E;function $U(){if($E)return Il;$E=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},Il=r,Il}var Tl,PE;function PU(){if(PE)return Tl;PE=1;function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return r.prototype.set=function(e,t,i,n){const s=e*this.size+t;this.data[s]=i,n&&(this.reservedBit[s]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},Tl=r,Tl}var $l={},RE;function RU(){return RE||(RE=1,function(r){const e=_n().getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7];for(let u=1;u=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){const s=n.size;let o=0,a=0,u=0,l=null,c=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),l=f,a=1),f=n.get(h,d),f===c?u++:(u>=5&&(o+=e.N1+(u-5)),c=f,u=1)}a>=5&&(o+=e.N1+(a-5)),u>=5&&(o+=e.N1+(u-5))}return o},r.getPenaltyN2=function(n){const s=n.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,u=u<<1&2047|n.get(c,l),c>=10&&(u===1488||u===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){let s=0;const o=n.data.length;for(let u=0;u=0;){const o=s[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},xl=e,xl}var ql={},Dl={},Al={},NE;function WL(){return NE||(NE=1,Al.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Al}var Ir={},FE;function UL(){if(FE)return Ir;FE=1;const r="[0-9]+",e="[A-Z $%*+\\-./:]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+`)(?:.|[\r +]))+`;Ir.KANJI=new RegExp(t,"g"),Ir.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ir.BYTE=new RegExp(i,"g"),Ir.NUMERIC=new RegExp(r,"g"),Ir.ALPHANUMERIC=new RegExp(e,"g");const n=new RegExp("^"+t+"$"),s=new RegExp("^"+r+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ir.testKanji=function(u){return n.test(u)},Ir.testNumeric=function(u){return s.test(u)},Ir.testAlphanumeric=function(u){return o.test(u)},Ir}var kE;function wn(){return kE||(kE=1,function(r){const e=WL(),t=UL();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+n)}}r.from=function(s,o){if(r.isValid(s))return s;try{return i(s)}catch{return o}}}(Dl)),Dl}var BE;function MU(){return BE||(BE=1,function(r){const e=_n(),t=HL(),i=bw(),n=wn(),s=WL(),o=7973,a=e.getBCHDigit(o);function u(h,f,p){for(let v=1;v<=40;v++)if(f<=r.getCapacity(v,p,h))return v}function l(h,f){return n.getCharCountIndicator(h,f)+4}function c(h,f){let p=0;return h.forEach(function(v){const b=l(v.mode,f);p+=b+v.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(c(h,p)<=r.getCapacity(p,f,n.MIXED))return p}r.from=function(f,p){return s.isValid(f)?parseInt(f,10):p},r.getCapacity=function(f,p,v){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=n.BYTE);const b=e.getSymbolTotalCodewords(f),m=t.getTotalCodewordsCount(f,p),g=(b-m)*8;if(v===n.MIXED)return g;const w=g-l(v,f);switch(v){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},r.getBestVersionForData=function(f,p){let v;const b=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,b);if(f.length===0)return 1;v=f[0]}else v=f;return u(v.mode,v.getLength(),b)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)u^=e<0&&(s=this.data.substr(n),o=parseInt(s,10),i.put(o,a*3+1))},Fl=e,Fl}var kl,zE;function kU(){if(zE)return kl;zE=1;const r=wn(),e=["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 t(i){this.mode=r.ALPHANUMERIC,this.data=i}return t.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),n.put(o,11)}this.data.length%2&&n.put(e.indexOf(this.data[s]),6)},kl=t,kl}var Bl,HE;function BU(){if(HE)return Bl;HE=1;const r=wn();function e(t){this.mode=r.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let i=0,n=this.data.length;i=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+` +Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),i.put(s,13)}},jl=t,jl}var Ll={exports:{}},UE;function LU(){return UE||(UE=1,function(r){var e={single_source_shortest_paths:function(t,i,n){var s={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var u,l,c,d,h,f,p,v,b;!a.empty();){u=a.pop(),l=u.value,d=u.cost,h=t[l]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],p=d+f,v=o[c],b=typeof o[c]>"u",(b||v>p)&&(o[c]=p,a.push(c,p),s[c]=l))}if(typeof n<"u"&&typeof o[n]>"u"){var m=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(m)}return s},extract_shortest_path_from_predecessor_list:function(t,i){for(var n=[],s=i;s;)n.push(s),t[s],s=t[s];return n.reverse(),n},find_path:function(t,i,n){var s=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(s,n)},PriorityQueue:{make:function(t){var i=e.PriorityQueue,n={},s;t=t||{};for(s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);return n.queue=[],n.sorter=t.sorter||i.default_sorter,n},default_sorter:function(t,i){return t.cost-i.cost},push:function(t,i){var n={value:t,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e}(Ll)),Ll.exports}var VE;function zU(){return VE||(VE=1,function(r){const e=wn(),t=FU(),i=kU(),n=BU(),s=jU(),o=UL(),a=_n(),u=LU();function l(m){return unescape(encodeURIComponent(m)).length}function c(m,g,w){const y=[];let S;for(;(S=m.exec(w))!==null;)y.push({data:S[0],index:S.index,mode:g,length:S[0].length});return y}function d(m){const g=c(o.NUMERIC,e.NUMERIC,m),w=c(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let y,S;return a.isKanjiModeEnabled()?(y=c(o.BYTE,e.BYTE,m),S=c(o.KANJI,e.KANJI,m)):(y=c(o.BYTE_KANJI,e.BYTE,m),S=[]),g.concat(w,y,S).sort(function(I,_){return I.index-_.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function h(m,g){switch(g){case e.NUMERIC:return t.getBitsLength(m);case e.ALPHANUMERIC:return i.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function f(m){return m.reduce(function(g,w){const y=g.length-1>=0?g[g.length-1]:null;return y&&y.mode===w.mode?(g[g.length-1].data+=w.data,g):(g.push(w),g)},[])}function p(m){const g=[];for(let w=0;w=0&&C<=6&&(D===0||D===6)||D>=0&&D<=6&&(C===0||C===6)||C>=2&&C<=4&&D>=2&&D<=4?O.set(R+C,x+D,!0,!0):O.set(R+C,x+D,!1,!0))}}function p(O){const I=O.size;for(let _=8;_>C&1)===1,O.set(T,R,x,!0),O.set(R,T,x,!0)}function m(O,I,_){const E=O.size,T=c.getEncodedBits(I,_);let R,x;for(R=0;R<15;R++)x=(T>>R&1)===1,R<6?O.set(R,8,x,!0):R<8?O.set(R+1,8,x,!0):O.set(E-15+R,8,x,!0),R<8?O.set(8,E-R-1,x,!0):R<9?O.set(8,15-R-1+1,x,!0):O.set(8,15-R-1,x,!0);O.set(E-8,8,1,!0)}function g(O,I){const _=O.size;let E=-1,T=_-1,R=7,x=0;for(let C=_-1;C>0;C-=2)for(C===6&&C--;;){for(let D=0;D<2;D++)if(!O.isReserved(T,C-D)){let j=!1;x>>R&1)===1),O.set(T,C-D,j),R--,R===-1&&(x++,R=7)}if(T+=E,T<0||_<=T){T-=E,E=-E;break}}}function w(O,I,_){const E=new t;_.forEach(function(D){E.put(D.mode.bit,4),E.put(D.getLength(),d.getCharCountIndicator(D.mode,O)),D.write(E)});const T=r.getSymbolTotalCodewords(O),R=a.getTotalCodewordsCount(O,I),x=(T-R)*8;for(E.getLengthInBits()+4<=x&&E.put(0,4);E.getLengthInBits()%8!==0;)E.putBit(0);const C=(x-E.getLengthInBits())/8;for(let D=0;D=7&&b(D,I),g(D,x),isNaN(E)&&(E=o.getBestMask(D,m.bind(null,D,_))),o.applyMask(E,D),m(D,_,E),{modules:D,version:I,errorCorrectionLevel:_,maskPattern:E,segments:T}}return Sl.create=function(I,_){if(typeof I>"u"||I==="")throw new Error("No input text");let E=e.M,T,R;return typeof _<"u"&&(E=e.from(_.errorCorrectionLevel,e.M),T=l.from(_.version),R=o.from(_.maskPattern),_.toSJISFunc&&r.setToSJISFunction(_.toSJISFunc)),S(I,T,E,R)},Sl}var zl={},Hl={},KE;function UL(){return KE||(KE=1,function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let i=t.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+t);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(s){return[s,s]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}r.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,s=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:s,scale:s?4:o,margin:n,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},r.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},r.getImageWidth=function(i,n){const s=r.getScale(i,n);return Math.floor((i+n.margin*2)*s)},r.qrToImageData=function(i,n,s){const o=n.modules.size,a=n.modules.data,u=r.getScale(o,s),l=Math.floor((o+s.margin*2)*u),c=s.margin*u,d=[s.color.light,s.color.dark];for(let h=0;h=c&&f>=c&&h"u"&&(!o||!o.getContext)&&(u=o,o=void 0),o||(l=i()),u=e.getOptions(u);const c=e.getImageWidth(s.modules.size,u),d=l.getContext("2d"),h=d.createImageData(c,c);return e.qrToImageData(h.data,s,u),t(d,l,c),d.putImageData(h,0,0),l},r.renderToDataURL=function(s,o,a){let u=a;typeof u>"u"&&(!o||!o.getContext)&&(u=o,o=void 0),u||(u={});const l=r.render(s,o,u),c=u.type||"image/png",d=u.rendererOpts||{};return l.toDataURL(c,d.quality)}}(zl)),zl}var Wl={},YE;function UU(){if(YE)return Wl;YE=1;const r=UL();function e(n,s){const o=n.a/255,a=s+'="'+n.hex+'"';return o<1?a+" "+s+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function t(n,s,o){let a=n+s;return typeof o<"u"&&(a+=" "+o),a}function i(n,s,o){let a="",u=0,l=!1,c=0;for(let d=0;d0&&h>0&&n[d-1]||(a+=l?t("M",h+o,.5+f+o):t("m",u,0),u=0,l=!1),h+1':"",f="',p='viewBox="0 0 '+d+" "+d+'"',b=''+h+f+` -`;return typeof a=="function"&&a(null,b),b},Wl}var XE;function VU(){if(XE)return zn;XE=1;const r=TU(),e=HU(),t=WU(),i=UU();function n(s,o,a,u,l){const c=[].slice.call(arguments,1),d=c.length,h=typeof c[d-1]=="function";if(!h&&!r())throw new Error("Callback required as last argument");if(h){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=o,o=u=void 0):d===3&&(o.getContext&&typeof l>"u"?(l=u,u=void 0):(l=u,u=a,a=o,o=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=o,o=u=void 0):d===2&&!o.getContext&&(u=a,a=o,o=void 0),new Promise(function(f,p){try{const v=e.create(a,u);f(s(v,o,u))}catch(v){p(v)}})}try{const f=e.create(a,u);l(null,s(f,o,u))}catch(f){l(f)}}return zn.create=e.create,zn.toCanvas=n.bind(null,t.render),zn.toDataURL=n.bind(null,t.renderToDataURL),zn.toString=n.bind(null,function(s,o,a){return i.render(s,a)}),zn}var Ul=VU();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const JE="ready";var KU=wr({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[JE],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const r=this.options||{},e=String(this.value),t=()=>{this.$emit(JE,this.$el)};switch(this.tag){case"canvas":Ul.toCanvas(this.$el,e,r,i=>{if(i)throw i;t()});break;case"img":Ul.toDataURL(e,r,(i,n)=>{if(i)throw i;this.$el.src=n,this.$el.onload=t});break;case"svg":Ul.toString(e,r,(i,n)=>{if(i)throw i;const s=document.createElement("div");s.innerHTML=n;const o=s.querySelector("svg");if(o){const{attributes:a,childNodes:u}=o;Object.keys(a).forEach(l=>{const c=a[Number(l)];this.$el.setAttribute(c.name,c.value)}),Object.keys(u).forEach(l=>{const c=u[Number(l)];this.$el.appendChild(c.cloneNode(!0))}),t()}});break}}},render(){return vw(this.tag,this.$slots.default)}});const GU={key:0,class:"qr"},YU=wr({__name:"TeamQRCode",props:{data:String,title:String},setup(r){return(e,t)=>{var i;return(((i=r.data)==null?void 0:i.length)??0)>1?(Ct(),bi("div",GU,[gt(sr(KU),{value:r.data,options:sr(gU),tag:"svg"},null,8,["value","options"]),Re("div",null,Ji(r.title),1)])):IW("",!0)}}}),Tu=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},XU=Tu(YU,[["__scopeId","data-v-666b8d35"]]),JU={},QU={class:"header-block"};function ZU(r,e){return Ct(),bi("div",QU,[KH(r.$slots,"default",{},void 0)])}const bw=Tu(JU,[["render",ZU],["__scopeId","data-v-5b6894ef"]]),eV={class:"buttons-block"},tV={class:"team-name"},rV=["href"],iV={class:"cell-center"},nV=["onClick"],sV={class:"cell-center"},oV=["onClick"],aV={class:"form-custom form-block"},uV={class:"center-block-custom"},lV=wr({__name:"AdminWindow",setup(r){const e=Pr("-"),t=Pr("-"),i=Pr(""),n=Pr(),s=Pr({teams:[]}),o=Pr("");async function a(){await _U(o.value),o.value=""}async function u(){i.value="Загрузка...",await EU()}async function l(){i.value="Загрузка...",await SU()}async function c(){var f,p,v;n.value=await wU(),n.value.state==="NEW"&&(i.value="Игра ещё не началась"),n.value.state==="RUN"&&(i.value="Игра идет с "+((f=n.value)==null?void 0:f.startAt.substring(11))),n.value.state==="STOP"&&(i.value="Игра остановлена "+((p=n.value)==null?void 0:p.startAt.substring(11))+" - "+((v=n.value)==null?void 0:v.endAt.substring(11)))}function d(f,p){return p.applications.length-f.applications.length}let h=0;return hw(async()=>{s.value=await wE(),h=setInterval(async()=>{s.value=await wE(),s.value.teams.sort(d),await c()},2e3),W5.beforeEach((f,p,v)=>{clearInterval(h),v()})}),(f,p)=>(Ct(),bi(Rt,null,[gt(bw,null,{default:_u(()=>[Re("div",null," Вечерний детектив - "+Ji(i.value),1),Re("div",eV,[Re("button",{onClick:u,class:"button-menu button-custom-inline"},"Начать"),Re("button",{onClick:l,class:"button-menu button-custom-inline"},"Остановить"),Re("button",{onClick:p[0]||(p[0]=(...v)=>sr(EE)&&sr(EE)(...v)),class:"button-menu button-custom-inline"},"Скачать qr‑ы")])]),_:1}),gt(XU,{data:e.value,title:t.value},null,8,["data","title"]),Re("table",null,[p[2]||(p[2]=Re("thead",null,[Re("tr",null,[Re("th",null,"№"),Re("th",null,"Название команды"),Re("th",null,"Поездки"),Re("th",null,"Приложения"),Re("th",null,"Qr")])],-1)),Re("tbody",null,[(Ct(!0),bi(Rt,null,x0(s.value.teams,(v,b)=>(Ct(),bi("tr",{key:v.name},[Re("td",null,Ji(b+1),1),Re("td",tV,[P_(Ji(v.name)+" ",1),Re("a",{href:v.url,target:"_blank"},"[url]",8,rV)]),Re("td",iV,Ji(v.spendTime),1),Re("td",null,[(Ct(!0),bi(Rt,null,x0(v.applications,m=>(Ct(),bi("div",{key:m.id},[P_(Ji(m.name)+" ",1),Re("button",{class:"link-button",onClick:g=>sr(OU)(v.id,m.id)},"Выдано",8,nV)]))),128))]),Re("td",sV,[Re("a",{onClick:m=>(e.value=v.url,t.value=v.name)},"QR",8,oV)])]))),128))])]),Re("div",aV,[Re("div",uV,[Re("form",{onSubmit:s4(a,["prevent"])},[Re("div",null,[qH(Re("input",{class:"input-custom","onUpdate:modelValue":p[1]||(p[1]=v=>o.value=v),type:"text",placeholder:"Название команды"},null,512),[[r4,o.value]])]),p[3]||(p[3]=Re("div",{class:"button-container"},[Re("button",{class:"button-custom",type:"submit"},"Добавить")],-1))],32)])])],64))}}),cV=Tu(lV,[["__scopeId","data-v-4d8d73b6"]]),dV=wr({__name:"HomeView",setup(r){return(e,t)=>(Ct(),xi(cV))}});/** +`);const x=w(I,_,T),C=r.getSymbolSize(I),D=new i(C);return f(D,I),p(D),v(D,I),m(D,_,0),I>=7&&b(D,I),g(D,x),isNaN(E)&&(E=o.getBestMask(D,m.bind(null,D,_))),o.applyMask(E,D),m(D,_,E),{modules:D,version:I,errorCorrectionLevel:_,maskPattern:E,segments:T}}return Sl.create=function(I,_){if(typeof I>"u"||I==="")throw new Error("No input text");let E=e.M,T,R;return typeof _<"u"&&(E=e.from(_.errorCorrectionLevel,e.M),T=l.from(_.version),R=o.from(_.maskPattern),_.toSJISFunc&&r.setToSJISFunction(_.toSJISFunc)),S(I,T,E,R)},Sl}var zl={},Hl={},GE;function VL(){return GE||(GE=1,function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let i=t.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+t);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(s){return[s,s]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}r.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,s=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:s,scale:s?4:o,margin:n,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},r.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},r.getImageWidth=function(i,n){const s=r.getScale(i,n);return Math.floor((i+n.margin*2)*s)},r.qrToImageData=function(i,n,s){const o=n.modules.size,a=n.modules.data,u=r.getScale(o,s),l=Math.floor((o+s.margin*2)*u),c=s.margin*u,d=[s.color.light,s.color.dark];for(let h=0;h=c&&f>=c&&h"u"&&(!o||!o.getContext)&&(u=o,o=void 0),o||(l=i()),u=e.getOptions(u);const c=e.getImageWidth(s.modules.size,u),d=l.getContext("2d"),h=d.createImageData(c,c);return e.qrToImageData(h.data,s,u),t(d,l,c),d.putImageData(h,0,0),l},r.renderToDataURL=function(s,o,a){let u=a;typeof u>"u"&&(!o||!o.getContext)&&(u=o,o=void 0),u||(u={});const l=r.render(s,o,u),c=u.type||"image/png",d=u.rendererOpts||{};return l.toDataURL(c,d.quality)}}(zl)),zl}var Wl={},XE;function UU(){if(XE)return Wl;XE=1;const r=VL();function e(n,s){const o=n.a/255,a=s+'="'+n.hex+'"';return o<1?a+" "+s+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function t(n,s,o){let a=n+s;return typeof o<"u"&&(a+=" "+o),a}function i(n,s,o){let a="",u=0,l=!1,c=0;for(let d=0;d0&&h>0&&n[d-1]||(a+=l?t("M",h+o,.5+f+o):t("m",u,0),u=0,l=!1),h+1':"",f="',p='viewBox="0 0 '+d+" "+d+'"',b=''+h+f+` +`;return typeof a=="function"&&a(null,b),b},Wl}var JE;function VU(){if(JE)return zn;JE=1;const r=TU(),e=HU(),t=WU(),i=UU();function n(s,o,a,u,l){const c=[].slice.call(arguments,1),d=c.length,h=typeof c[d-1]=="function";if(!h&&!r())throw new Error("Callback required as last argument");if(h){if(d<2)throw new Error("Too few arguments provided");d===2?(l=a,a=o,o=u=void 0):d===3&&(o.getContext&&typeof l>"u"?(l=u,u=void 0):(l=u,u=a,a=o,o=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=o,o=u=void 0):d===2&&!o.getContext&&(u=a,a=o,o=void 0),new Promise(function(f,p){try{const v=e.create(a,u);f(s(v,o,u))}catch(v){p(v)}})}try{const f=e.create(a,u);l(null,s(f,o,u))}catch(f){l(f)}}return zn.create=e.create,zn.toCanvas=n.bind(null,t.render),zn.toDataURL=n.bind(null,t.renderToDataURL),zn.toString=n.bind(null,function(s,o,a){return i.render(s,a)}),zn}var Ul=VU();/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const QE="ready";var KU=wr({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[QE],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const r=this.options||{},e=String(this.value),t=()=>{this.$emit(QE,this.$el)};switch(this.tag){case"canvas":Ul.toCanvas(this.$el,e,r,i=>{if(i)throw i;t()});break;case"img":Ul.toDataURL(e,r,(i,n)=>{if(i)throw i;this.$el.src=n,this.$el.onload=t});break;case"svg":Ul.toString(e,r,(i,n)=>{if(i)throw i;const s=document.createElement("div");s.innerHTML=n;const o=s.querySelector("svg");if(o){const{attributes:a,childNodes:u}=o;Object.keys(a).forEach(l=>{const c=a[Number(l)];this.$el.setAttribute(c.name,c.value)}),Object.keys(u).forEach(l=>{const c=u[Number(l)];this.$el.appendChild(c.cloneNode(!0))}),t()}});break}}},render(){return gw(this.tag,this.$slots.default)}});const GU={key:0,class:"qr"},YU=wr({__name:"TeamQRCode",props:{data:String,title:String},setup(r){return(e,t)=>{var i;return(((i=r.data)==null?void 0:i.length)??0)>1?(Ct(),bi("div",GU,[gt(Qt(KU),{value:r.data,options:Qt(gU),tag:"svg"},null,8,["value","options"]),Ie("div",null,Ji(r.title),1)])):IW("",!0)}}}),Tu=(r,e)=>{const t=r.__vccOpts||r;for(const[i,n]of e)t[i]=n;return t},XU=Tu(YU,[["__scopeId","data-v-666b8d35"]]),JU={},QU={class:"header-block"};function ZU(r,e){return Ct(),bi("div",QU,[KH(r.$slots,"default",{},void 0)])}const _w=Tu(JU,[["render",ZU],["__scopeId","data-v-5b6894ef"]]),eV={class:"buttons-block"},tV={class:"team-name"},rV=["href"],iV={class:"cell-center"},nV=["onClick"],sV={class:"cell-center"},oV=["onClick"],aV={class:"form-custom form-block"},uV={class:"center-block-custom"},lV=wr({__name:"AdminWindow",setup(r){const e=Pr("-"),t=Pr("-"),i=Pr(""),n=Pr(),s=Pr({teams:[]}),o=Pr("");async function a(){await _U(o.value),o.value=""}async function u(){i.value="Загрузка...",await EU()}async function l(){i.value="Загрузка...",await SU()}async function c(){var f,p,v;n.value=await wU(),n.value.state==="NEW"&&(i.value="Игра ещё не началась"),n.value.state==="RUN"&&(i.value="Игра идет с "+((f=n.value)==null?void 0:f.startAt.substring(11))),n.value.state==="STOP"&&(i.value="Игра остановлена "+((p=n.value)==null?void 0:p.startAt.substring(11))+" - "+((v=n.value)==null?void 0:v.endAt.substring(11)))}function d(f,p){return p.applications.length-f.applications.length}let h=0;return fw(async()=>{s.value=await EE(),h=setInterval(async()=>{s.value=await EE(),s.value.teams.sort(d),await c()},2e3),J_.beforeEach((f,p,v)=>{clearInterval(h),v()})}),(f,p)=>(Ct(),bi(Rt,null,[gt(_w,null,{default:_u(()=>[Ie("div",null," Вечерний детектив - "+Ji(i.value),1),Ie("div",eV,[Ie("button",{onClick:p[0]||(p[0]=v=>Qt(J_).push("/editor")),class:"button-menu button-custom-inline"},"Граф"),Ie("button",{onClick:u,class:"button-menu button-custom-inline"},"Начать"),Ie("button",{onClick:l,class:"button-menu button-custom-inline"},"Остановить"),Ie("button",{onClick:p[1]||(p[1]=(...v)=>Qt(SE)&&Qt(SE)(...v)),class:"button-menu button-custom-inline"},"Скачать qr‑ы")])]),_:1}),gt(XU,{data:e.value,title:t.value},null,8,["data","title"]),Ie("table",null,[p[3]||(p[3]=Ie("thead",null,[Ie("tr",null,[Ie("th",null,"№"),Ie("th",null,"Название команды"),Ie("th",null,"Поездки"),Ie("th",null,"Приложения"),Ie("th",null,"Qr")])],-1)),Ie("tbody",null,[(Ct(!0),bi(Rt,null,q0(s.value.teams,(v,b)=>(Ct(),bi("tr",{key:v.name},[Ie("td",null,Ji(b+1),1),Ie("td",tV,[P_(Ji(v.name)+" ",1),Ie("a",{href:v.url,target:"_blank"},"[url]",8,rV)]),Ie("td",iV,Ji(v.spendTime),1),Ie("td",null,[(Ct(!0),bi(Rt,null,q0(v.applications,m=>(Ct(),bi("div",{key:m.id},[P_(Ji(m.name)+" ",1),Ie("button",{class:"link-button",onClick:g=>Qt(OU)(v.id,m.id)},"Выдано",8,nV)]))),128))]),Ie("td",sV,[Ie("a",{onClick:m=>(e.value=v.url,t.value=v.name)},"QR",8,oV)])]))),128))])]),Ie("div",aV,[Ie("div",uV,[Ie("form",{onSubmit:s4(a,["prevent"])},[Ie("div",null,[qH(Ie("input",{class:"input-custom","onUpdate:modelValue":p[2]||(p[2]=v=>o.value=v),type:"text",placeholder:"Название команды"},null,512),[[r4,o.value]])]),p[4]||(p[4]=Ie("div",{class:"button-container"},[Ie("button",{class:"button-custom",type:"submit"},"Добавить")],-1))],32)])])],64))}}),cV=Tu(lV,[["__scopeId","data-v-27835e5c"]]),dV=wr({__name:"HomeView",setup(r){return(e,t)=>(Ct(),xi(cV))}});/** * vis-data * http://visjs.org/ * @@ -53,14 +53,14 @@ Minimum version required to store current data is: `+R+`. * http://opensource.org/licenses/MIT * * vis.js may be distributed under either license. - */var QE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Vl={exports:{}},ZE={},eo,eS;function lt(){if(eS)return eo;eS=1;var r=function(e){return e&&e.Math===Math&&e};return eo=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof QE=="object"&&QE)||r(typeof eo=="object"&&eo)||function(){return this}()||Function("return this")(),eo}var Kl,tS;function ke(){return tS||(tS=1,Kl=function(r){try{return!!r()}catch{return!0}}),Kl}var Gl,rS;function Wo(){if(rS)return Gl;rS=1;var r=ke();return Gl=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Gl}var Yl,iS;function $u(){if(iS)return Yl;iS=1;var r=Wo(),e=Function.prototype,t=e.apply,i=e.call;return Yl=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),Yl}var Xl,nS;function ze(){if(nS)return Xl;nS=1;var r=Wo(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return Xl=r?i:function(n){return function(){return t.apply(n,arguments)}},Xl}var Jl,sS;function si(){if(sS)return Jl;sS=1;var r=ze(),e=r({}.toString),t=r("".slice);return Jl=function(i){return t(e(i),8,-1)},Jl}var Ql,oS;function VL(){if(oS)return Ql;oS=1;var r=si(),e=ze();return Ql=function(t){if(r(t)==="Function")return e(t)},Ql}var Zl,aS;function mt(){if(aS)return Zl;aS=1;var r=typeof document=="object"&&document.all;return Zl=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Zl}var ec={},tc,uS;function ct(){if(uS)return tc;uS=1;var r=ke();return tc=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tc}var rc,lS;function Kt(){if(lS)return rc;lS=1;var r=Wo(),e=Function.prototype.call;return rc=r?e.bind(e):function(){return e.apply(e,arguments)},rc}var ic={},cS;function _w(){if(cS)return ic;cS=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return ic.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,ic}var nc,dS;function Uo(){return dS||(dS=1,nc=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),nc}var sc,hS;function Pu(){if(hS)return sc;hS=1;var r=ze(),e=ke(),t=si(),i=Object,n=r("".split);return sc=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,sc}var oc,fS;function Vo(){return fS||(fS=1,oc=function(r){return r==null}),oc}var ac,pS;function En(){if(pS)return ac;pS=1;var r=Vo(),e=TypeError;return ac=function(t){if(r(t))throw new e("Can't call method on "+t);return t},ac}var uc,vS;function kr(){if(vS)return uc;vS=1;var r=Pu(),e=En();return uc=function(t){return r(e(t))},uc}var lc,gS;function zt(){if(gS)return lc;gS=1;var r=mt();return lc=function(e){return typeof e=="object"?e!==null:r(e)},lc}var cc,mS;function pt(){return mS||(mS=1,cc={}),cc}var dc,yS;function Zt(){if(yS)return dc;yS=1;var r=pt(),e=lt(),t=mt(),i=function(n){return t(n)?n:void 0};return dc=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},dc}var hc,bS;function yt(){if(bS)return hc;bS=1;var r=ze();return hc=r({}.isPrototypeOf),hc}var fc,_S;function Es(){if(_S)return fc;_S=1;var r=lt(),e=r.navigator,t=e&&e.userAgent;return fc=t?String(t):"",fc}var pc,wS;function Ko(){if(wS)return pc;wS=1;var r=lt(),e=Es(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),pc=a,pc}var vc,ES;function Ss(){if(ES)return vc;ES=1;var r=Ko(),e=ke(),t=lt(),i=t.String;return vc=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),vc}var gc,SS;function KL(){if(SS)return gc;SS=1;var r=Ss();return gc=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",gc}var mc,OS;function Go(){if(OS)return mc;OS=1;var r=Zt(),e=mt(),t=yt(),i=KL(),n=Object;return mc=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},mc}var yc,IS;function Os(){if(IS)return yc;IS=1;var r=String;return yc=function(e){try{return r(e)}catch{return"Object"}},yc}var bc,TS;function oi(){if(TS)return bc;TS=1;var r=mt(),e=Os(),t=TypeError;return bc=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},bc}var _c,$S;function ww(){if($S)return _c;$S=1;var r=oi(),e=Vo();return _c=function(t,i){var n=t[i];return e(n)?void 0:r(n)},_c}var wc,PS;function hV(){if(PS)return wc;PS=1;var r=Kt(),e=mt(),t=zt(),i=TypeError;return wc=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},wc}var Ec={exports:{}},Sc,RS;function Is(){return RS||(RS=1,Sc=!0),Sc}var Oc,CS;function fV(){if(CS)return Oc;CS=1;var r=lt(),e=Object.defineProperty;return Oc=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Oc}var xS;function Ew(){if(xS)return Ec.exports;xS=1;var r=Is(),e=lt(),t=fV(),i="__core-js_shared__",n=Ec.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ec.exports}var Ic,qS;function Ts(){if(qS)return Ic;qS=1;var r=Ew();return Ic=function(e,t){return r[e]||(r[e]=t||{})},Ic}var Tc,DS;function Er(){if(DS)return Tc;DS=1;var r=En(),e=Object;return Tc=function(t){return e(r(t))},Tc}var $c,AS;function bt(){if(AS)return $c;AS=1;var r=ze(),e=Er(),t=r({}.hasOwnProperty);return $c=Object.hasOwn||function(n,s){return t(e(n),s)},$c}var Pc,MS;function Ru(){if(MS)return Pc;MS=1;var r=ze(),e=0,t=Math.random(),i=r(1.1.toString);return Pc=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Pc}var Rc,NS;function _t(){if(NS)return Rc;NS=1;var r=lt(),e=Ts(),t=bt(),i=Ru(),n=Ss(),s=KL(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Rc=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Rc}var Cc,FS;function GL(){if(FS)return Cc;FS=1;var r=Kt(),e=zt(),t=Go(),i=ww(),n=hV(),s=_t(),o=TypeError,a=s("toPrimitive");return Cc=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Cc}var xc,kS;function Sw(){if(kS)return xc;kS=1;var r=GL(),e=Go();return xc=function(t){var i=r(t,"string");return e(i)?i:i+""},xc}var qc,BS;function YL(){if(BS)return qc;BS=1;var r=lt(),e=zt(),t=r.document,i=e(t)&&e(t.createElement);return qc=function(n){return i?t.createElement(n):{}},qc}var Dc,jS;function XL(){if(jS)return Dc;jS=1;var r=ct(),e=ke(),t=YL();return Dc=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Dc}var LS;function Cu(){if(LS)return ec;LS=1;var r=ct(),e=Kt(),t=_w(),i=Uo(),n=kr(),s=Sw(),o=bt(),a=XL(),u=Object.getOwnPropertyDescriptor;return ec.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},ec}var Ac,zS;function pV(){if(zS)return Ac;zS=1;var r=ke(),e=mt(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return Ac=i,Ac}var Mc,HS;function xu(){if(HS)return Mc;HS=1;var r=VL(),e=oi(),t=Wo(),i=r(r.bind);return Mc=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},Mc}var Nc={},Fc,WS;function JL(){if(WS)return Fc;WS=1;var r=ct(),e=ke();return Fc=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Fc}var kc,US;function ai(){if(US)return kc;US=1;var r=zt(),e=String,t=TypeError;return kc=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},kc}var VS;function ur(){if(VS)return Nc;VS=1;var r=ct(),e=XL(),t=JL(),i=ai(),n=Sw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Nc.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},Nc}var Bc,KS;function $s(){if(KS)return Bc;KS=1;var r=ct(),e=ur(),t=Uo();return Bc=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},Bc}var jc,GS;function me(){if(GS)return jc;GS=1;var r=lt(),e=$u(),t=VL(),i=mt(),n=Cu().f,s=pV(),o=pt(),a=xu(),u=$s(),l=bt(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return jc=function(d,h){var f=d.target,p=d.global,v=d.stat,b=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],w=g.prototype,y,S,O,I,_,E,T,R,x;for(I in h)y=s(p?I:f+(v?".":"#")+I,d.forced),S=!y&&m&&l(m,I),E=g[I],S&&(d.dontCallGetSet?(x=n(m,I),T=x&&x.value):T=m[I]),_=S&&T?T:h[I],!(!y&&!b&&typeof E==typeof _)&&(d.bind&&S?R=a(_,r):d.wrap&&S?R=c(_):b&&i(_)?R=t(_):R=_,(d.sham||_&&_.sham||E&&E.sham)&&u(R,"sham",!0),u(g,I,R),b&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,_),d.real&&w&&(y||!w[I])&&u(w,I,_)))},jc}var YS;function vV(){if(YS)return ZE;YS=1;var r=me(),e=ct(),t=ur().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),ZE}var XS;function gV(){if(XS)return Vl.exports;XS=1,vV();var r=pt(),e=r.Object,t=Vl.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Vl.exports}var Lc,JS;function QL(){if(JS)return Lc;JS=1;var r=gV();return Lc=r,Lc}var zc,QS;function mV(){if(QS)return zc;QS=1;var r=QL();return zc=r,zc}var Hc,ZS;function yV(){if(ZS)return Hc;ZS=1;var r=mV();return Hc=r,Hc}var Wc,eO;function bV(){return eO||(eO=1,Wc=yV()),Wc}var _V=bV(),wV=Ie(_V),tO={},Uc,rO;function Sn(){if(rO)return Uc;rO=1;var r=si();return Uc=Array.isArray||function(t){return r(t)==="Array"},Uc}var Vc,iO;function EV(){if(iO)return Vc;iO=1;var r=Math.ceil,e=Math.floor;return Vc=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},Vc}var Kc,nO;function Ps(){if(nO)return Kc;nO=1;var r=EV();return Kc=function(e){var t=+e;return t!==t||t===0?0:r(t)},Kc}var Gc,sO;function ZL(){if(sO)return Gc;sO=1;var r=Ps(),e=Math.min;return Gc=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},Gc}var Yc,oO;function ki(){if(oO)return Yc;oO=1;var r=ZL();return Yc=function(e){return r(e.length)},Yc}var Xc,aO;function ez(){if(aO)return Xc;aO=1;var r=TypeError,e=9007199254740991;return Xc=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},Xc}var Jc,uO;function qu(){if(uO)return Jc;uO=1;var r=ct(),e=ur(),t=Uo();return Jc=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Jc}var Qc,lO;function Ow(){if(lO)return Qc;lO=1;var r=_t(),e=r("toStringTag"),t={};return t[e]="z",Qc=String(t)==="[object z]",Qc}var Zc,cO;function Bi(){if(cO)return Zc;cO=1;var r=Ow(),e=mt(),t=si(),i=_t(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Zc=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},Zc}var ed,dO;function SV(){if(dO)return ed;dO=1;var r=ze(),e=mt(),t=Ew(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),ed=t.inspectSource,ed}var td,hO;function tz(){if(hO)return td;hO=1;var r=ze(),e=ke(),t=mt(),i=Bi(),n=Zt(),s=SV(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,td=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,td}var rd,fO;function OV(){if(fO)return rd;fO=1;var r=Sn(),e=tz(),t=zt(),i=_t(),n=i("species"),s=Array;return rd=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},rd}var id,pO;function Iw(){if(pO)return id;pO=1;var r=OV();return id=function(e,t){return new(r(e))(t===0?0:t)},id}var nd,vO;function Yo(){if(vO)return nd;vO=1;var r=ke(),e=_t(),t=Ko(),i=e("species");return nd=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},nd}var gO;function rz(){if(gO)return tO;gO=1;var r=me(),e=ke(),t=Sn(),i=zt(),n=Er(),s=ki(),o=ez(),a=qu(),u=Iw(),l=Yo(),c=_t(),d=Ko(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var b=[];return b[h]=!1,b.concat()[0]!==b}),p=function(b){if(!i(b))return!1;var m=b[h];return m!==void 0?!!m:t(b)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),w=u(g,0),y=0,S,O,I,_,E;for(S=-1,I=arguments.length;Sc;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return ud={includes:i(!0),indexOf:i(!1)},ud}var ld,EO;function Xo(){return EO||(EO=1,ld={}),ld}var cd,SO;function iz(){if(SO)return cd;SO=1;var r=ze(),e=bt(),t=kr(),i=IV().indexOf,n=Xo(),s=r([].push);return cd=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},cd}var dd,OO;function $w(){return OO||(OO=1,dd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),dd}var hd,IO;function Du(){if(IO)return hd;IO=1;var r=iz(),e=$w();return hd=Object.keys||function(i){return r(i,e)},hd}var TO;function Pw(){if(TO)return od;TO=1;var r=ct(),e=JL(),t=ur(),i=ai(),n=kr(),s=Du();return od.f=r&&!e?Object.defineProperties:function(a,u){i(a);for(var l=n(u),c=s(u),d=c.length,h=0,f;d>h;)t.f(a,f=c[h++],l[f]);return a},od}var fd,$O;function TV(){if($O)return fd;$O=1;var r=Zt();return fd=r("document","documentElement"),fd}var pd,PO;function Au(){if(PO)return pd;PO=1;var r=Ts(),e=Ru(),t=r("keys");return pd=function(i){return t[i]||(t[i]=e(i))},pd}var vd,RO;function Jo(){if(RO)return vd;RO=1;var r=ai(),e=Pw(),t=$w(),i=Xo(),n=TV(),s=YL(),o=Au(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var w=g.parentWindow.Object;return g=null,w},v=function(){var g=s("iframe"),w="java"+c+":",y;return g.style.display="none",n.appendChild(g),g.src=String(w),y=g.contentWindow.document,y.open(),y.write(f("document.F=Object")),y.close(),y.F},b,m=function(){try{b=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&b?p(b):v():p(b);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,vd=Object.create||function(w,y){var S;return w!==null?(h[l]=r(w),S=new h,h[l]=null,S[d]=w):S=m(),y===void 0?S:e.f(S,y)},vd}var gd={},CO;function Mu(){if(CO)return gd;CO=1;var r=iz(),e=$w(),t=e.concat("length","prototype");return gd.f=Object.getOwnPropertyNames||function(n){return r(n,t)},gd}var md={},yd,xO;function Rs(){if(xO)return yd;xO=1;var r=ze();return yd=r([].slice),yd}var qO;function nz(){if(qO)return md;qO=1;var r=si(),e=kr(),t=Mu().f,i=Rs(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return md.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},md}var bd={},DO;function Nu(){return DO||(DO=1,bd.f=Object.getOwnPropertySymbols),bd}var _d,AO;function Qo(){if(AO)return _d;AO=1;var r=$s();return _d=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},_d}var wd,MO;function Rw(){if(MO)return wd;MO=1;var r=ur();return wd=function(e,t,i){return r.f(e,t,i)},wd}var Ed={},NO;function Fu(){if(NO)return Ed;NO=1;var r=_t();return Ed.f=r,Ed}var Sd,FO;function Xe(){if(FO)return Sd;FO=1;var r=pt(),e=bt(),t=Fu(),i=ur().f;return Sd=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Sd}var Od,kO;function sz(){if(kO)return Od;kO=1;var r=Kt(),e=Zt(),t=_t(),i=Qo();return Od=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},Od}var Id,BO;function $V(){if(BO)return Id;BO=1;var r=Ow(),e=Bi();return Id=r?{}.toString:function(){return"[object "+e(this)+"]"},Id}var Td,jO;function On(){if(jO)return Td;jO=1;var r=Ow(),e=ur().f,t=$s(),i=bt(),n=$V(),s=_t(),o=s("toStringTag");return Td=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},Td}var $d,LO;function PV(){if(LO)return $d;LO=1;var r=lt(),e=mt(),t=r.WeakMap;return $d=e(t)&&/native code/.test(String(t)),$d}var Pd,zO;function Zo(){if(zO)return Pd;zO=1;var r=PV(),e=lt(),t=zt(),i=$s(),n=bt(),s=Ew(),o=Au(),a=Xo(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=function(g){return function(w){var y;if(!t(w)||(y=h(w)).type!==g)throw new l("Incompatible receiver, "+g+" required");return y}};if(r||s.state){var b=s.state||(s.state=new c);b.get=b.get,b.has=b.has,b.set=b.set,d=function(g,w){if(b.has(g))throw new l(u);return w.facade=g,b.set(g,w),w},h=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var m=o("state");a[m]=!0,d=function(g,w){if(n(g,m))throw new l(u);return w.facade=g,i(g,m,w),w},h=function(g){return n(g,m)?g[m]:{}},f=function(g){return n(g,m)}}return Pd={set:d,get:h,has:f,enforce:p,getterFor:v},Pd}var Rd,HO;function Cs(){if(HO)return Rd;HO=1;var r=xu(),e=ze(),t=Pu(),i=Er(),n=ki(),s=Iw(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(b,m,g,w){for(var y=i(b),S=t(y),O=n(S),I=r(m,g),_=0,E=w||s,T=l?E(b,O):c||p?E(b,0):void 0,R,x;O>_;_++)if((v||_ in S)&&(R=S[_],x=I(R,_,y),u))if(l)T[_]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return _;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return Rd={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Rd}var WO;function RV(){if(WO)return yO;WO=1;var r=me(),e=lt(),t=Kt(),i=ze(),n=Is(),s=ct(),o=Ss(),a=ke(),u=bt(),l=yt(),c=ai(),d=kr(),h=Sw(),f=ji(),p=Uo(),v=Jo(),b=Du(),m=Mu(),g=nz(),w=Nu(),y=Cu(),S=ur(),O=Pw(),I=_w(),_=Qo(),E=Rw(),T=Ts(),R=Au(),x=Xo(),C=Ru(),D=_t(),j=Fu(),ee=Xe(),H=sz(),Z=On(),fe=Zo(),_e=Cs().forEach,te=R("hidden"),ge="Symbol",xe="prototype",De=fe.set,it=fe.getterFor(ge),be=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ie=e.TypeError,$e=e.QObject,$=y.f,P=S.f,q=g.f,F=I.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!$e||!$e[xe]||!$e[xe].findChild,B=function(oe,V,Q){var re=$(be,V);re&&delete be[V],P(oe,V,Q),re&&oe!==be&&P(be,V,re)},le=s&&a(function(){return v(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(oe,V){var Q=N[oe]=v(W);return De(Q,{type:ge,tag:oe,description:V}),s||(Q.description=V),Q},se=function(V,Q,re){V===be&&se(K,Q,re),c(V);var ne=h(Q);return c(re),u(N,ne)?(re.enumerable?(u(V,te)&&V[te][ne]&&(V[te][ne]=!1),re=v(re,{enumerable:p(0,!1)})):(u(V,te)||P(V,te,p(1,v(null))),V[te][ne]=!0),le(V,ne,re)):P(V,ne,re)},de=function(V,Q){c(V);var re=d(Q),ne=b(re).concat(nt(re));return _e(ne,function(we){(!s||t(qe,re,we))&&se(V,we,re[we])}),V},Se=function(V,Q){return Q===void 0?v(V):de(v(V),Q)},qe=function(V){var Q=h(V),re=t(F,this,Q);return this===be&&u(N,Q)&&!u(K,Q)?!1:re||!u(this,Q)||!u(N,Q)||u(this,te)&&this[te][Q]?re:!0},Pe=function(V,Q){var re=d(V),ne=h(Q);if(!(re===be&&u(N,ne)&&!u(K,ne))){var we=$(re,ne);return we&&u(N,ne)&&!(u(re,te)&&re[te][ne])&&(we.enumerable=!0),we}},ft=function(V){var Q=q(d(V)),re=[];return _e(Q,function(ne){!u(N,ne)&&!u(x,ne)&&k(re,ne)}),re},nt=function(oe){var V=oe===be,Q=q(V?K:d(oe)),re=[];return _e(Q,function(ne){u(N,ne)&&(!V||u(be,ne))&&k(re,N[ne])}),re};return o||(A=function(){if(l(W,this))throw new ie("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Q=C(V),re=function(ne){var we=this===void 0?e:this;we===be&&t(re,K,ne),u(we,te)&&u(we[te],Q)&&(we[te][Q]=!1);var di=p(1,ne);try{le(we,Q,di)}catch(Ys){if(!(Ys instanceof Y))throw Ys;B(we,Q,di)}};return s&&U&&le(be,Q,{configurable:!0,set:re}),J(Q,V)},W=A[xe],_(W,"toString",function(){return it(this).tag}),_(A,"withoutSetter",function(oe){return J(C(oe),oe)}),I.f=qe,S.f=se,O.f=de,y.f=Pe,m.f=g.f=ft,w.f=nt,j.f=function(oe){return J(D(oe),oe)},s&&(E(W,"description",{configurable:!0,get:function(){return it(this).description}}),n||_(be,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),_e(b(X),function(oe){ee(oe)}),r({target:ge,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Se,defineProperty:se,defineProperties:de,getOwnPropertyDescriptor:Pe}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:ft}),H(),Z(A,ge),x[te]=!0,yO}var UO={},Cd,VO;function oz(){if(VO)return Cd;VO=1;var r=Ss();return Cd=r&&!!Symbol.for&&!!Symbol.keyFor,Cd}var KO;function CV(){if(KO)return UO;KO=1;var r=me(),e=Zt(),t=bt(),i=ji(),n=Ts(),s=oz(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),UO}var GO={},YO;function xV(){if(YO)return GO;YO=1;var r=me(),e=bt(),t=Go(),i=Os(),n=Ts(),s=oz(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),GO}var XO={},xd,JO;function qV(){if(JO)return xd;JO=1;var r=ze(),e=Sn(),t=mt(),i=si(),n=ji(),s=r([].push);return xd=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return Vd}var Kd,XI;function tK(){return XI||(XI=1,Kd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Kd}var JI;function zi(){if(JI)return MI;JI=1,Li();var r=tK(),e=lt(),t=On(),i=xs();for(var n in r)t(e[n],n),i[n]=i.Array;return MI}var Gd,QI;function vz(){if(QI)return Gd;QI=1;var r=VV();return zi(),Gd=r,Gd}var ZI={},eT;function rK(){if(eT)return ZI;eT=1;var r=_t(),e=ur().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),ZI}var tT={},rT;function iK(){return rT||(rT=1,lz()),tT}var iT={},nT;function nK(){return nT||(nT=1,cz()),iT}var sT={},oT;function sK(){if(oT)return sT;oT=1;var r=Xe();return r("metadata"),sT}var Yd,aT;function oK(){if(aT)return Yd;aT=1;var r=vz();return rK(),iK(),nK(),sK(),Yd=r,Yd}var uT={},Xd,lT;function gz(){if(lT)return Xd;lT=1;var r=Zt(),e=ze(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return Xd=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},Xd}var cT;function aK(){if(cT)return uT;cT=1;var r=me(),e=gz();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),uT}var dT={},Jd,hT;function mz(){if(hT)return Jd;hT=1;for(var r=Ts(),e=Zt(),t=ze(),i=Go(),n=_t(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;c=f?u?"":void 0:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return eh={codeAt:a(!1),charAt:a(!0)},eh}var AT;function ku(){if(AT)return qT;AT=1;var r=_K().charAt,e=ji(),t=Zo(),i=Cw(),n=xw(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),qT}var th,MT;function wK(){if(MT)return th;MT=1,Li(),ku(),dz();var r=Fu();return th=r.f("iterator"),th}var rh,NT;function yz(){if(NT)return rh;NT=1;var r=wK();return zi(),rh=r,rh}var ih,FT;function EK(){if(FT)return ih;FT=1;var r=yz();return ih=r,ih}var nh,kT;function SK(){if(kT)return nh;kT=1;var r=EK();return nh=r,nh}var sh,BT;function OK(){return BT||(BT=1,sh=SK()),sh}var IK=OK(),TK=Ie(IK);function Co(r){"@babel/helpers - typeof";return Co=typeof Ca=="function"&&typeof TK=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Ca=="function"&&e.constructor===Ca&&e!==Ca.prototype?"symbol":typeof e},Co(r)}var oh,jT;function $K(){if(jT)return oh;jT=1,hz();var r=Fu();return oh=r.f("toPrimitive"),oh}var ah,LT;function PK(){if(LT)return ah;LT=1;var r=$K();return ah=r,ah}var uh,zT;function RK(){if(zT)return uh;zT=1;var r=PK();return uh=r,uh}var lh,HT;function CK(){if(HT)return lh;HT=1;var r=RK();return lh=r,lh}var ch,WT;function xK(){return WT||(WT=1,ch=CK()),ch}var qK=xK(),DK=Ie(qK);function AK(r,e){if(Co(r)!="object"||!r)return r;var t=r[DK];if(t!==void 0){var i=t.call(r,e);if(Co(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function MK(r){var e=AK(r,"string");return Co(e)=="symbol"?e:e+""}function Si(r,e,t){return(e=MK(e))in r?wV(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var UT={},dh,VT;function NK(){if(VT)return dh;VT=1;var r=ze(),e=oi(),t=zt(),i=bt(),n=Rs(),s=Wo(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=0:p>v;v+=b)v in f&&(d=l(d,f[v],v,h));return d}};return mh={left:o(!1),right:o(!0)},mh}var yh,t$;function Bu(){if(t$)return yh;t$=1;var r=ke();return yh=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},yh}var bh,r$;function _z(){if(r$)return bh;r$=1;var r=lt(),e=Es(),t=si(),i=function(n){return e.slice(0,n.length)===n};return bh=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),bh}var _h,i$;function WK(){if(i$)return _h;i$=1;var r=_z();return _h=r==="NODE",_h}var n$;function UK(){if(n$)return ZT;n$=1;var r=me(),e=HK().left,t=Bu(),i=Ko(),n=WK(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),ZT}var wh,s$;function VK(){if(s$)return wh;s$=1,UK();var r=Gt();return wh=r("Array","reduce"),wh}var Eh,o$;function KK(){if(o$)return Eh;o$=1;var r=yt(),e=VK(),t=Array.prototype;return Eh=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},Eh}var Sh,a$;function GK(){if(a$)return Sh;a$=1;var r=KK();return Sh=r,Sh}var Oh,u$;function YK(){return u$||(u$=1,Oh=GK()),Oh}var XK=YK(),JK=Ie(XK),l$={},c$;function QK(){if(c$)return l$;c$=1;var r=me(),e=Cs().filter,t=Yo(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),l$}var Ih,d$;function ZK(){if(d$)return Ih;d$=1,QK();var r=Gt();return Ih=r("Array","filter"),Ih}var Th,h$;function eG(){if(h$)return Th;h$=1;var r=yt(),e=ZK(),t=Array.prototype;return Th=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},Th}var $h,f$;function tG(){if(f$)return $h;f$=1;var r=eG();return $h=r,$h}var Ph,p$;function rG(){return p$||(p$=1,Ph=tG()),Ph}var iG=rG(),Yn=Ie(iG),v$={},g$;function nG(){if(g$)return v$;g$=1;var r=me(),e=Cs().map,t=Yo(),i=t("map");return r({target:"Array",proto:!0,forced:!i},{map:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),v$}var Rh,m$;function sG(){if(m$)return Rh;m$=1,nG();var r=Gt();return Rh=r("Array","map"),Rh}var Ch,y$;function oG(){if(y$)return Ch;y$=1;var r=yt(),e=sG(),t=Array.prototype;return Ch=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Ch}var xh,b$;function aG(){if(b$)return xh;b$=1;var r=oG();return xh=r,xh}var qh,_$;function uG(){return _$||(_$=1,qh=aG()),qh}var lG=uG(),pr=Ie(lG),Dh,w$;function cG(){return w$||(w$=1,Dh=vz()),Dh}var dG=cG(),hG=Ie(dG),E$={},S$;function fG(){if(S$)return E$;S$=1;var r=me(),e=Sn(),t=tz(),i=zt(),n=Tw(),s=ki(),o=kr(),a=qu(),u=_t(),l=Yo(),c=Rs(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(b,m){var g=o(this),w=s(g),y=n(b,w),S=n(m===void 0?w:m,w),O,I,_;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:i(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return c(g,y,S);for(I=new(O===void 0?f:O)(p(S-y,0)),_=0;y1?arguments[1]:void 0)},Gh}var V$;function FG(){if(V$)return W$;V$=1;var r=me(),e=NG();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),W$}var Yh,K$;function kG(){if(K$)return Yh;K$=1,FG();var r=Gt();return Yh=r("Array","forEach"),Yh}var Xh,G$;function BG(){if(G$)return Xh;G$=1;var r=kG();return Xh=r,Xh}var Jh,Y$;function jG(){if(Y$)return Jh;Y$=1;var r=Bi(),e=bt(),t=yt(),i=BG(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Jh=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},Jh}var Qh,X$;function LG(){return X$||(X$=1,Qh=jG()),Qh}var zG=LG(),dn=Ie(zG),J$={},Q$;function HG(){if(Q$)return J$;Q$=1;var r=me(),e=ze(),t=Sn(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),J$}var Zh,Z$;function WG(){if(Z$)return Zh;Z$=1,HG();var r=Gt();return Zh=r("Array","reverse"),Zh}var ef,eP;function UG(){if(eP)return ef;eP=1;var r=yt(),e=WG(),t=Array.prototype;return ef=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},ef}var tf,tP;function VG(){if(tP)return tf;tP=1;var r=UG();return tf=r,tf}var rf,rP;function KG(){return rP||(rP=1,rf=VG()),rf}var GG=KG(),YG=Ie(GG),iP={},nf,nP;function XG(){if(nP)return nf;nP=1;var r=ct(),e=Sn(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return nf=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},nf}var sf,sP;function Ez(){if(sP)return sf;sP=1;var r=Os(),e=TypeError;return sf=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},sf}var oP;function JG(){if(oP)return iP;oP=1;var r=me(),e=Er(),t=Tw(),i=Ps(),n=ki(),s=XG(),o=ez(),a=Iw(),u=qu(),l=Ez(),c=Yo(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,b){var m=e(this),g=n(m),w=t(v,g),y=arguments.length,S,O,I,_,E,T;for(y===0?S=O=0:y===1?(S=0,O=g-w):(S=y-2,O=f(h(i(b),0),g-w)),o(g+S-O),I=a(m,O),_=0;_g-O+S;_--)l(m,_-1)}else if(S>O)for(_=g-O;_>w;_--)E=_+O-1,T=_+S-1,E in m?m[T]=m[E]:l(m,T);for(_=0;_m;)for(var y=u(arguments[m++]),S=g?d(n(y),g(y)):n(y),O=S.length,I=0,_;O>I;)_=S[I++],(!r||t(w,y,_))&&(v[_]=y[_]);return v}:l,cf}var fP;function n6(){if(fP)return dP;fP=1;var r=me(),e=i6();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),dP}var df,pP;function s6(){if(pP)return df;pP=1,n6();var r=pt();return df=r.Object.assign,df}var hf,vP;function o6(){if(vP)return hf;vP=1;var r=s6();return hf=r,hf}var ff,gP;function a6(){return gP||(gP=1,ff=o6()),ff}var u6=a6(),l6=Ie(u6),pf,mP;function c6(){if(mP)return pf;mP=1,rz();var r=Gt();return pf=r("Array","concat"),pf}var vf,yP;function d6(){if(yP)return vf;yP=1;var r=yt(),e=c6(),t=Array.prototype;return vf=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},vf}var gf,bP;function h6(){if(bP)return gf;bP=1;var r=d6();return gf=r,gf}var mf,_P;function f6(){return _P||(_P=1,mf=h6()),mf}var p6=f6(),v6=Ie(p6),wP={},EP;function g6(){if(EP)return wP;EP=1;var r=me(),e=ct(),t=Jo();return r({target:"Object",stat:!0,sham:!e},{create:t}),wP}var yf,SP;function m6(){if(SP)return yf;SP=1,g6();var r=pt(),e=r.Object;return yf=function(i,n){return e.create(i,n)},yf}var bf,OP;function y6(){if(OP)return bf;OP=1;var r=m6();return bf=r,bf}var _f,IP;function b6(){return IP||(IP=1,_f=y6()),_f}var _6=b6(),w6=Ie(_6),TP={},wf,$P;function E6(){if($P)return wf;$P=1;var r=Ps(),e=ji(),t=En(),i=RangeError;return wf=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},wf}var Ef,PP;function S6(){if(PP)return Ef;PP=1;var r=ze(),e=ZL(),t=ji(),i=E6(),n=En(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,b=h===void 0?" ":t(h),m,g;return p<=v||b===""?f:(m=p-v,g=s(b,a(m/b.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Ef={start:u(!1),end:u(!0)},Ef}var Sf,RP;function O6(){if(RP)return Sf;RP=1;var r=ze(),e=ke(),t=S6().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return Sf=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var m=this,g=c(m),w=h(m),y=g<0?"-":g>9999?"+":"";return y+t(s(g),y?6:4,0)+"-"+t(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(w,3,0)+"Z"}:a,Sf}var CP;function I6(){if(CP)return TP;CP=1;var r=me(),e=Kt(),t=Er(),i=GL(),n=O6(),s=si(),o=ke(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),TP}var Of,xP;function T6(){if(xP)return Of;xP=1,I6(),az();var r=pt(),e=$u();return r.JSON||(r.JSON={stringify:JSON.stringify}),Of=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Of}var If,qP;function $6(){if(qP)return If;qP=1;var r=T6();return If=r,If}var Tf,DP;function P6(){return DP||(DP=1,Tf=$6()),Tf}var R6=P6(),C6=Ie(R6),AP={},MP={},$f,NP;function x6(){if(NP)return $f;NP=1;var r=TypeError;return $f=function(e,t){if(ed,v=t(h)?h:a(h),b=p?s(arguments,d):[],m=p?function(){e(v,this,b)}:v;return c?l(m,f):l(m)}:l},Pf}var kP;function q6(){if(kP)return MP;kP=1;var r=me(),e=lt(),t=Oz(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),MP}var BP={},jP;function D6(){if(jP)return BP;jP=1;var r=me(),e=lt(),t=Oz(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),BP}var LP;function A6(){return LP||(LP=1,q6(),D6()),AP}var Rf,zP;function M6(){if(zP)return Rf;zP=1,A6();var r=pt();return Rf=r.setTimeout,Rf}var Cf,HP;function N6(){return HP||(HP=1,Cf=M6()),Cf}var F6=N6(),k6=Ie(F6),xf={exports:{}},WP;function B6(){return WP||(WP=1,function(r){function e(i){if(i)return t(i);this._callbacks=new Map}function t(i){return Object.assign(i,e.prototype),i._callbacks=new Map,i}e.prototype.on=function(i,n){const s=this._callbacks.get(i)??[];return s.push(n),this._callbacks.set(i,s),this},e.prototype.once=function(i,n){const s=(...o)=>{this.off(i,s),n.apply(this,o)};return s.fn=n,this.on(i,s),this},e.prototype.off=function(i,n){if(i===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(i),this;const s=this._callbacks.get(i);if(s){for(const[o,a]of s.entries())if(a===n||a.fn===n){s.splice(o,1);break}s.length===0?this._callbacks.delete(i):this._callbacks.set(i,s)}return this},e.prototype.emit=function(i,...n){const s=this._callbacks.get(i);if(s){const o=[...s];for(const a of o)a.apply(this,n)}return this},e.prototype.listeners=function(i){return this._callbacks.get(i)??[]},e.prototype.listenerCount=function(i){if(i)return this.listeners(i).length;let n=0;for(const s of this._callbacks.values())n+=s.length;return n},e.prototype.hasListeners=function(i){return this.listenerCount(i)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,r.exports=e}(xf)),xf.exports}var j6=B6(),L6=Ie(j6);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + */var ZE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Vl={exports:{}},eS={},eo,tS;function lt(){if(tS)return eo;tS=1;var r=function(e){return e&&e.Math===Math&&e};return eo=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof ZE=="object"&&ZE)||r(typeof eo=="object"&&eo)||function(){return this}()||Function("return this")(),eo}var Kl,rS;function ke(){return rS||(rS=1,Kl=function(r){try{return!!r()}catch{return!0}}),Kl}var Gl,iS;function Wo(){if(iS)return Gl;iS=1;var r=ke();return Gl=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Gl}var Yl,nS;function $u(){if(nS)return Yl;nS=1;var r=Wo(),e=Function.prototype,t=e.apply,i=e.call;return Yl=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),Yl}var Xl,sS;function ze(){if(sS)return Xl;sS=1;var r=Wo(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return Xl=r?i:function(n){return function(){return t.apply(n,arguments)}},Xl}var Jl,oS;function si(){if(oS)return Jl;oS=1;var r=ze(),e=r({}.toString),t=r("".slice);return Jl=function(i){return t(e(i),8,-1)},Jl}var Ql,aS;function KL(){if(aS)return Ql;aS=1;var r=si(),e=ze();return Ql=function(t){if(r(t)==="Function")return e(t)},Ql}var Zl,uS;function mt(){if(uS)return Zl;uS=1;var r=typeof document=="object"&&document.all;return Zl=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Zl}var ec={},tc,lS;function ct(){if(lS)return tc;lS=1;var r=ke();return tc=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tc}var rc,cS;function Kt(){if(cS)return rc;cS=1;var r=Wo(),e=Function.prototype.call;return rc=r?e.bind(e):function(){return e.apply(e,arguments)},rc}var ic={},dS;function ww(){if(dS)return ic;dS=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return ic.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,ic}var nc,hS;function Uo(){return hS||(hS=1,nc=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),nc}var sc,fS;function Pu(){if(fS)return sc;fS=1;var r=ze(),e=ke(),t=si(),i=Object,n=r("".split);return sc=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,sc}var oc,pS;function Vo(){return pS||(pS=1,oc=function(r){return r==null}),oc}var ac,vS;function En(){if(vS)return ac;vS=1;var r=Vo(),e=TypeError;return ac=function(t){if(r(t))throw new e("Can't call method on "+t);return t},ac}var uc,gS;function kr(){if(gS)return uc;gS=1;var r=Pu(),e=En();return uc=function(t){return r(e(t))},uc}var lc,mS;function zt(){if(mS)return lc;mS=1;var r=mt();return lc=function(e){return typeof e=="object"?e!==null:r(e)},lc}var cc,yS;function pt(){return yS||(yS=1,cc={}),cc}var dc,bS;function er(){if(bS)return dc;bS=1;var r=pt(),e=lt(),t=mt(),i=function(n){return t(n)?n:void 0};return dc=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},dc}var hc,_S;function yt(){if(_S)return hc;_S=1;var r=ze();return hc=r({}.isPrototypeOf),hc}var fc,wS;function Es(){if(wS)return fc;wS=1;var r=lt(),e=r.navigator,t=e&&e.userAgent;return fc=t?String(t):"",fc}var pc,ES;function Ko(){if(ES)return pc;ES=1;var r=lt(),e=Es(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),pc=a,pc}var vc,SS;function Ss(){if(SS)return vc;SS=1;var r=Ko(),e=ke(),t=lt(),i=t.String;return vc=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),vc}var gc,OS;function GL(){if(OS)return gc;OS=1;var r=Ss();return gc=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",gc}var mc,IS;function Go(){if(IS)return mc;IS=1;var r=er(),e=mt(),t=yt(),i=GL(),n=Object;return mc=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},mc}var yc,TS;function Os(){if(TS)return yc;TS=1;var r=String;return yc=function(e){try{return r(e)}catch{return"Object"}},yc}var bc,$S;function oi(){if($S)return bc;$S=1;var r=mt(),e=Os(),t=TypeError;return bc=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},bc}var _c,PS;function Ew(){if(PS)return _c;PS=1;var r=oi(),e=Vo();return _c=function(t,i){var n=t[i];return e(n)?void 0:r(n)},_c}var wc,RS;function hV(){if(RS)return wc;RS=1;var r=Kt(),e=mt(),t=zt(),i=TypeError;return wc=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},wc}var Ec={exports:{}},Sc,CS;function Is(){return CS||(CS=1,Sc=!0),Sc}var Oc,xS;function fV(){if(xS)return Oc;xS=1;var r=lt(),e=Object.defineProperty;return Oc=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Oc}var qS;function Sw(){if(qS)return Ec.exports;qS=1;var r=Is(),e=lt(),t=fV(),i="__core-js_shared__",n=Ec.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ec.exports}var Ic,DS;function Ts(){if(DS)return Ic;DS=1;var r=Sw();return Ic=function(e,t){return r[e]||(r[e]=t||{})},Ic}var Tc,AS;function Er(){if(AS)return Tc;AS=1;var r=En(),e=Object;return Tc=function(t){return e(r(t))},Tc}var $c,MS;function bt(){if(MS)return $c;MS=1;var r=ze(),e=Er(),t=r({}.hasOwnProperty);return $c=Object.hasOwn||function(n,s){return t(e(n),s)},$c}var Pc,NS;function Ru(){if(NS)return Pc;NS=1;var r=ze(),e=0,t=Math.random(),i=r(1.1.toString);return Pc=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Pc}var Rc,FS;function _t(){if(FS)return Rc;FS=1;var r=lt(),e=Ts(),t=bt(),i=Ru(),n=Ss(),s=GL(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Rc=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Rc}var Cc,kS;function YL(){if(kS)return Cc;kS=1;var r=Kt(),e=zt(),t=Go(),i=Ew(),n=hV(),s=_t(),o=TypeError,a=s("toPrimitive");return Cc=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Cc}var xc,BS;function Ow(){if(BS)return xc;BS=1;var r=YL(),e=Go();return xc=function(t){var i=r(t,"string");return e(i)?i:i+""},xc}var qc,jS;function XL(){if(jS)return qc;jS=1;var r=lt(),e=zt(),t=r.document,i=e(t)&&e(t.createElement);return qc=function(n){return i?t.createElement(n):{}},qc}var Dc,LS;function JL(){if(LS)return Dc;LS=1;var r=ct(),e=ke(),t=XL();return Dc=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Dc}var zS;function Cu(){if(zS)return ec;zS=1;var r=ct(),e=Kt(),t=ww(),i=Uo(),n=kr(),s=Ow(),o=bt(),a=JL(),u=Object.getOwnPropertyDescriptor;return ec.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},ec}var Ac,HS;function pV(){if(HS)return Ac;HS=1;var r=ke(),e=mt(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return Ac=i,Ac}var Mc,WS;function xu(){if(WS)return Mc;WS=1;var r=KL(),e=oi(),t=Wo(),i=r(r.bind);return Mc=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},Mc}var Nc={},Fc,US;function QL(){if(US)return Fc;US=1;var r=ct(),e=ke();return Fc=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Fc}var kc,VS;function ai(){if(VS)return kc;VS=1;var r=zt(),e=String,t=TypeError;return kc=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},kc}var KS;function ur(){if(KS)return Nc;KS=1;var r=ct(),e=JL(),t=QL(),i=ai(),n=Ow(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Nc.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},Nc}var Bc,GS;function $s(){if(GS)return Bc;GS=1;var r=ct(),e=ur(),t=Uo();return Bc=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},Bc}var jc,YS;function me(){if(YS)return jc;YS=1;var r=lt(),e=$u(),t=KL(),i=mt(),n=Cu().f,s=pV(),o=pt(),a=xu(),u=$s(),l=bt(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return jc=function(d,h){var f=d.target,p=d.global,v=d.stat,b=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],w=g.prototype,y,S,O,I,_,E,T,R,x;for(I in h)y=s(p?I:f+(v?".":"#")+I,d.forced),S=!y&&m&&l(m,I),E=g[I],S&&(d.dontCallGetSet?(x=n(m,I),T=x&&x.value):T=m[I]),_=S&&T?T:h[I],!(!y&&!b&&typeof E==typeof _)&&(d.bind&&S?R=a(_,r):d.wrap&&S?R=c(_):b&&i(_)?R=t(_):R=_,(d.sham||_&&_.sham||E&&E.sham)&&u(R,"sham",!0),u(g,I,R),b&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,_),d.real&&w&&(y||!w[I])&&u(w,I,_)))},jc}var XS;function vV(){if(XS)return eS;XS=1;var r=me(),e=ct(),t=ur().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),eS}var JS;function gV(){if(JS)return Vl.exports;JS=1,vV();var r=pt(),e=r.Object,t=Vl.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Vl.exports}var Lc,QS;function ZL(){if(QS)return Lc;QS=1;var r=gV();return Lc=r,Lc}var zc,ZS;function mV(){if(ZS)return zc;ZS=1;var r=ZL();return zc=r,zc}var Hc,eO;function yV(){if(eO)return Hc;eO=1;var r=mV();return Hc=r,Hc}var Wc,tO;function bV(){return tO||(tO=1,Wc=yV()),Wc}var _V=bV(),wV=Te(_V),rO={},Uc,iO;function Sn(){if(iO)return Uc;iO=1;var r=si();return Uc=Array.isArray||function(t){return r(t)==="Array"},Uc}var Vc,nO;function EV(){if(nO)return Vc;nO=1;var r=Math.ceil,e=Math.floor;return Vc=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},Vc}var Kc,sO;function Ps(){if(sO)return Kc;sO=1;var r=EV();return Kc=function(e){var t=+e;return t!==t||t===0?0:r(t)},Kc}var Gc,oO;function ez(){if(oO)return Gc;oO=1;var r=Ps(),e=Math.min;return Gc=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},Gc}var Yc,aO;function ki(){if(aO)return Yc;aO=1;var r=ez();return Yc=function(e){return r(e.length)},Yc}var Xc,uO;function tz(){if(uO)return Xc;uO=1;var r=TypeError,e=9007199254740991;return Xc=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},Xc}var Jc,lO;function qu(){if(lO)return Jc;lO=1;var r=ct(),e=ur(),t=Uo();return Jc=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Jc}var Qc,cO;function Iw(){if(cO)return Qc;cO=1;var r=_t(),e=r("toStringTag"),t={};return t[e]="z",Qc=String(t)==="[object z]",Qc}var Zc,dO;function Bi(){if(dO)return Zc;dO=1;var r=Iw(),e=mt(),t=si(),i=_t(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Zc=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},Zc}var ed,hO;function SV(){if(hO)return ed;hO=1;var r=ze(),e=mt(),t=Sw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),ed=t.inspectSource,ed}var td,fO;function rz(){if(fO)return td;fO=1;var r=ze(),e=ke(),t=mt(),i=Bi(),n=er(),s=SV(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,td=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,td}var rd,pO;function OV(){if(pO)return rd;pO=1;var r=Sn(),e=rz(),t=zt(),i=_t(),n=i("species"),s=Array;return rd=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},rd}var id,vO;function Tw(){if(vO)return id;vO=1;var r=OV();return id=function(e,t){return new(r(e))(t===0?0:t)},id}var nd,gO;function Yo(){if(gO)return nd;gO=1;var r=ke(),e=_t(),t=Ko(),i=e("species");return nd=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},nd}var mO;function iz(){if(mO)return rO;mO=1;var r=me(),e=ke(),t=Sn(),i=zt(),n=Er(),s=ki(),o=tz(),a=qu(),u=Tw(),l=Yo(),c=_t(),d=Ko(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var b=[];return b[h]=!1,b.concat()[0]!==b}),p=function(b){if(!i(b))return!1;var m=b[h];return m!==void 0?!!m:t(b)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),w=u(g,0),y=0,S,O,I,_,E;for(S=-1,I=arguments.length;Sc;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return ud={includes:i(!0),indexOf:i(!1)},ud}var ld,SO;function Xo(){return SO||(SO=1,ld={}),ld}var cd,OO;function nz(){if(OO)return cd;OO=1;var r=ze(),e=bt(),t=kr(),i=IV().indexOf,n=Xo(),s=r([].push);return cd=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},cd}var dd,IO;function Pw(){return IO||(IO=1,dd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),dd}var hd,TO;function Du(){if(TO)return hd;TO=1;var r=nz(),e=Pw();return hd=Object.keys||function(i){return r(i,e)},hd}var $O;function Rw(){if($O)return od;$O=1;var r=ct(),e=QL(),t=ur(),i=ai(),n=kr(),s=Du();return od.f=r&&!e?Object.defineProperties:function(a,u){i(a);for(var l=n(u),c=s(u),d=c.length,h=0,f;d>h;)t.f(a,f=c[h++],l[f]);return a},od}var fd,PO;function TV(){if(PO)return fd;PO=1;var r=er();return fd=r("document","documentElement"),fd}var pd,RO;function Au(){if(RO)return pd;RO=1;var r=Ts(),e=Ru(),t=r("keys");return pd=function(i){return t[i]||(t[i]=e(i))},pd}var vd,CO;function Jo(){if(CO)return vd;CO=1;var r=ai(),e=Rw(),t=Pw(),i=Xo(),n=TV(),s=XL(),o=Au(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var w=g.parentWindow.Object;return g=null,w},v=function(){var g=s("iframe"),w="java"+c+":",y;return g.style.display="none",n.appendChild(g),g.src=String(w),y=g.contentWindow.document,y.open(),y.write(f("document.F=Object")),y.close(),y.F},b,m=function(){try{b=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&b?p(b):v():p(b);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,vd=Object.create||function(w,y){var S;return w!==null?(h[l]=r(w),S=new h,h[l]=null,S[d]=w):S=m(),y===void 0?S:e.f(S,y)},vd}var gd={},xO;function Mu(){if(xO)return gd;xO=1;var r=nz(),e=Pw(),t=e.concat("length","prototype");return gd.f=Object.getOwnPropertyNames||function(n){return r(n,t)},gd}var md={},yd,qO;function Rs(){if(qO)return yd;qO=1;var r=ze();return yd=r([].slice),yd}var DO;function sz(){if(DO)return md;DO=1;var r=si(),e=kr(),t=Mu().f,i=Rs(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return md.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},md}var bd={},AO;function Nu(){return AO||(AO=1,bd.f=Object.getOwnPropertySymbols),bd}var _d,MO;function Qo(){if(MO)return _d;MO=1;var r=$s();return _d=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},_d}var wd,NO;function Cw(){if(NO)return wd;NO=1;var r=ur();return wd=function(e,t,i){return r.f(e,t,i)},wd}var Ed={},FO;function Fu(){if(FO)return Ed;FO=1;var r=_t();return Ed.f=r,Ed}var Sd,kO;function Xe(){if(kO)return Sd;kO=1;var r=pt(),e=bt(),t=Fu(),i=ur().f;return Sd=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Sd}var Od,BO;function oz(){if(BO)return Od;BO=1;var r=Kt(),e=er(),t=_t(),i=Qo();return Od=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},Od}var Id,jO;function $V(){if(jO)return Id;jO=1;var r=Iw(),e=Bi();return Id=r?{}.toString:function(){return"[object "+e(this)+"]"},Id}var Td,LO;function On(){if(LO)return Td;LO=1;var r=Iw(),e=ur().f,t=$s(),i=bt(),n=$V(),s=_t(),o=s("toStringTag");return Td=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},Td}var $d,zO;function PV(){if(zO)return $d;zO=1;var r=lt(),e=mt(),t=r.WeakMap;return $d=e(t)&&/native code/.test(String(t)),$d}var Pd,HO;function Zo(){if(HO)return Pd;HO=1;var r=PV(),e=lt(),t=zt(),i=$s(),n=bt(),s=Sw(),o=Au(),a=Xo(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=function(g){return function(w){var y;if(!t(w)||(y=h(w)).type!==g)throw new l("Incompatible receiver, "+g+" required");return y}};if(r||s.state){var b=s.state||(s.state=new c);b.get=b.get,b.has=b.has,b.set=b.set,d=function(g,w){if(b.has(g))throw new l(u);return w.facade=g,b.set(g,w),w},h=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var m=o("state");a[m]=!0,d=function(g,w){if(n(g,m))throw new l(u);return w.facade=g,i(g,m,w),w},h=function(g){return n(g,m)?g[m]:{}},f=function(g){return n(g,m)}}return Pd={set:d,get:h,has:f,enforce:p,getterFor:v},Pd}var Rd,WO;function Cs(){if(WO)return Rd;WO=1;var r=xu(),e=ze(),t=Pu(),i=Er(),n=ki(),s=Tw(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(b,m,g,w){for(var y=i(b),S=t(y),O=n(S),I=r(m,g),_=0,E=w||s,T=l?E(b,O):c||p?E(b,0):void 0,R,x;O>_;_++)if((v||_ in S)&&(R=S[_],x=I(R,_,y),u))if(l)T[_]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return _;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return Rd={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Rd}var UO;function RV(){if(UO)return bO;UO=1;var r=me(),e=lt(),t=Kt(),i=ze(),n=Is(),s=ct(),o=Ss(),a=ke(),u=bt(),l=yt(),c=ai(),d=kr(),h=Ow(),f=ji(),p=Uo(),v=Jo(),b=Du(),m=Mu(),g=sz(),w=Nu(),y=Cu(),S=ur(),O=Rw(),I=ww(),_=Qo(),E=Cw(),T=Ts(),R=Au(),x=Xo(),C=Ru(),D=_t(),j=Fu(),ee=Xe(),H=oz(),Z=On(),fe=Zo(),_e=Cs().forEach,te=R("hidden"),ge="Symbol",xe="prototype",De=fe.set,it=fe.getterFor(ge),be=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ie=e.TypeError,Pe=e.QObject,$=y.f,P=S.f,q=g.f,F=I.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!Pe||!Pe[xe]||!Pe[xe].findChild,B=function(oe,V,Q){var re=$(be,V);re&&delete be[V],P(oe,V,Q),re&&oe!==be&&P(be,V,re)},le=s&&a(function(){return v(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(oe,V){var Q=N[oe]=v(W);return De(Q,{type:ge,tag:oe,description:V}),s||(Q.description=V),Q},se=function(V,Q,re){V===be&&se(K,Q,re),c(V);var ne=h(Q);return c(re),u(N,ne)?(re.enumerable?(u(V,te)&&V[te][ne]&&(V[te][ne]=!1),re=v(re,{enumerable:p(0,!1)})):(u(V,te)||P(V,te,p(1,v(null))),V[te][ne]=!0),le(V,ne,re)):P(V,ne,re)},de=function(V,Q){c(V);var re=d(Q),ne=b(re).concat(nt(re));return _e(ne,function(we){(!s||t(qe,re,we))&&se(V,we,re[we])}),V},Se=function(V,Q){return Q===void 0?v(V):de(v(V),Q)},qe=function(V){var Q=h(V),re=t(F,this,Q);return this===be&&u(N,Q)&&!u(K,Q)?!1:re||!u(this,Q)||!u(N,Q)||u(this,te)&&this[te][Q]?re:!0},Re=function(V,Q){var re=d(V),ne=h(Q);if(!(re===be&&u(N,ne)&&!u(K,ne))){var we=$(re,ne);return we&&u(N,ne)&&!(u(re,te)&&re[te][ne])&&(we.enumerable=!0),we}},ft=function(V){var Q=q(d(V)),re=[];return _e(Q,function(ne){!u(N,ne)&&!u(x,ne)&&k(re,ne)}),re},nt=function(oe){var V=oe===be,Q=q(V?K:d(oe)),re=[];return _e(Q,function(ne){u(N,ne)&&(!V||u(be,ne))&&k(re,N[ne])}),re};return o||(A=function(){if(l(W,this))throw new ie("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Q=C(V),re=function(ne){var we=this===void 0?e:this;we===be&&t(re,K,ne),u(we,te)&&u(we[te],Q)&&(we[te][Q]=!1);var di=p(1,ne);try{le(we,Q,di)}catch(Ys){if(!(Ys instanceof Y))throw Ys;B(we,Q,di)}};return s&&U&&le(be,Q,{configurable:!0,set:re}),J(Q,V)},W=A[xe],_(W,"toString",function(){return it(this).tag}),_(A,"withoutSetter",function(oe){return J(C(oe),oe)}),I.f=qe,S.f=se,O.f=de,y.f=Re,m.f=g.f=ft,w.f=nt,j.f=function(oe){return J(D(oe),oe)},s&&(E(W,"description",{configurable:!0,get:function(){return it(this).description}}),n||_(be,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),_e(b(X),function(oe){ee(oe)}),r({target:ge,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Se,defineProperty:se,defineProperties:de,getOwnPropertyDescriptor:Re}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:ft}),H(),Z(A,ge),x[te]=!0,bO}var VO={},Cd,KO;function az(){if(KO)return Cd;KO=1;var r=Ss();return Cd=r&&!!Symbol.for&&!!Symbol.keyFor,Cd}var GO;function CV(){if(GO)return VO;GO=1;var r=me(),e=er(),t=bt(),i=ji(),n=Ts(),s=az(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),VO}var YO={},XO;function xV(){if(XO)return YO;XO=1;var r=me(),e=bt(),t=Go(),i=Os(),n=Ts(),s=az(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),YO}var JO={},xd,QO;function qV(){if(QO)return xd;QO=1;var r=ze(),e=Sn(),t=mt(),i=si(),n=ji(),s=r([].push);return xd=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return Vd}var Kd,JI;function tK(){return JI||(JI=1,Kd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Kd}var QI;function zi(){if(QI)return NI;QI=1,Li();var r=tK(),e=lt(),t=On(),i=xs();for(var n in r)t(e[n],n),i[n]=i.Array;return NI}var Gd,ZI;function gz(){if(ZI)return Gd;ZI=1;var r=VV();return zi(),Gd=r,Gd}var eT={},tT;function rK(){if(tT)return eT;tT=1;var r=_t(),e=ur().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),eT}var rT={},iT;function iK(){return iT||(iT=1,cz()),rT}var nT={},sT;function nK(){return sT||(sT=1,dz()),nT}var oT={},aT;function sK(){if(aT)return oT;aT=1;var r=Xe();return r("metadata"),oT}var Yd,uT;function oK(){if(uT)return Yd;uT=1;var r=gz();return rK(),iK(),nK(),sK(),Yd=r,Yd}var lT={},Xd,cT;function mz(){if(cT)return Xd;cT=1;var r=er(),e=ze(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return Xd=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},Xd}var dT;function aK(){if(dT)return lT;dT=1;var r=me(),e=mz();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),lT}var hT={},Jd,fT;function yz(){if(fT)return Jd;fT=1;for(var r=Ts(),e=er(),t=ze(),i=Go(),n=_t(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;c=f?u?"":void 0:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return eh={codeAt:a(!1),charAt:a(!0)},eh}var MT;function ku(){if(MT)return DT;MT=1;var r=_K().charAt,e=ji(),t=Zo(),i=xw(),n=qw(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),DT}var th,NT;function wK(){if(NT)return th;NT=1,Li(),ku(),hz();var r=Fu();return th=r.f("iterator"),th}var rh,FT;function bz(){if(FT)return rh;FT=1;var r=wK();return zi(),rh=r,rh}var ih,kT;function EK(){if(kT)return ih;kT=1;var r=bz();return ih=r,ih}var nh,BT;function SK(){if(BT)return nh;BT=1;var r=EK();return nh=r,nh}var sh,jT;function OK(){return jT||(jT=1,sh=SK()),sh}var IK=OK(),TK=Te(IK);function Co(r){"@babel/helpers - typeof";return Co=typeof Ca=="function"&&typeof TK=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Ca=="function"&&e.constructor===Ca&&e!==Ca.prototype?"symbol":typeof e},Co(r)}var oh,LT;function $K(){if(LT)return oh;LT=1,fz();var r=Fu();return oh=r.f("toPrimitive"),oh}var ah,zT;function PK(){if(zT)return ah;zT=1;var r=$K();return ah=r,ah}var uh,HT;function RK(){if(HT)return uh;HT=1;var r=PK();return uh=r,uh}var lh,WT;function CK(){if(WT)return lh;WT=1;var r=RK();return lh=r,lh}var ch,UT;function xK(){return UT||(UT=1,ch=CK()),ch}var qK=xK(),DK=Te(qK);function AK(r,e){if(Co(r)!="object"||!r)return r;var t=r[DK];if(t!==void 0){var i=t.call(r,e);if(Co(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function MK(r){var e=AK(r,"string");return Co(e)=="symbol"?e:e+""}function Si(r,e,t){return(e=MK(e))in r?wV(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var VT={},dh,KT;function NK(){if(KT)return dh;KT=1;var r=ze(),e=oi(),t=zt(),i=bt(),n=Rs(),s=Wo(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=0:p>v;v+=b)v in f&&(d=l(d,f[v],v,h));return d}};return mh={left:o(!1),right:o(!0)},mh}var yh,r$;function Bu(){if(r$)return yh;r$=1;var r=ke();return yh=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},yh}var bh,i$;function wz(){if(i$)return bh;i$=1;var r=lt(),e=Es(),t=si(),i=function(n){return e.slice(0,n.length)===n};return bh=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),bh}var _h,n$;function WK(){if(n$)return _h;n$=1;var r=wz();return _h=r==="NODE",_h}var s$;function UK(){if(s$)return e$;s$=1;var r=me(),e=HK().left,t=Bu(),i=Ko(),n=WK(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),e$}var wh,o$;function VK(){if(o$)return wh;o$=1,UK();var r=Gt();return wh=r("Array","reduce"),wh}var Eh,a$;function KK(){if(a$)return Eh;a$=1;var r=yt(),e=VK(),t=Array.prototype;return Eh=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},Eh}var Sh,u$;function GK(){if(u$)return Sh;u$=1;var r=KK();return Sh=r,Sh}var Oh,l$;function YK(){return l$||(l$=1,Oh=GK()),Oh}var XK=YK(),JK=Te(XK),c$={},d$;function QK(){if(d$)return c$;d$=1;var r=me(),e=Cs().filter,t=Yo(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),c$}var Ih,h$;function ZK(){if(h$)return Ih;h$=1,QK();var r=Gt();return Ih=r("Array","filter"),Ih}var Th,f$;function eG(){if(f$)return Th;f$=1;var r=yt(),e=ZK(),t=Array.prototype;return Th=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},Th}var $h,p$;function tG(){if(p$)return $h;p$=1;var r=eG();return $h=r,$h}var Ph,v$;function rG(){return v$||(v$=1,Ph=tG()),Ph}var iG=rG(),Yn=Te(iG),g$={},m$;function nG(){if(m$)return g$;m$=1;var r=me(),e=Cs().map,t=Yo(),i=t("map");return r({target:"Array",proto:!0,forced:!i},{map:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),g$}var Rh,y$;function sG(){if(y$)return Rh;y$=1,nG();var r=Gt();return Rh=r("Array","map"),Rh}var Ch,b$;function oG(){if(b$)return Ch;b$=1;var r=yt(),e=sG(),t=Array.prototype;return Ch=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Ch}var xh,_$;function aG(){if(_$)return xh;_$=1;var r=oG();return xh=r,xh}var qh,w$;function uG(){return w$||(w$=1,qh=aG()),qh}var lG=uG(),pr=Te(lG),Dh,E$;function cG(){return E$||(E$=1,Dh=gz()),Dh}var dG=cG(),hG=Te(dG),S$={},O$;function fG(){if(O$)return S$;O$=1;var r=me(),e=Sn(),t=rz(),i=zt(),n=$w(),s=ki(),o=kr(),a=qu(),u=_t(),l=Yo(),c=Rs(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(b,m){var g=o(this),w=s(g),y=n(b,w),S=n(m===void 0?w:m,w),O,I,_;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:i(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return c(g,y,S);for(I=new(O===void 0?f:O)(p(S-y,0)),_=0;y1?arguments[1]:void 0)},Gh}var K$;function FG(){if(K$)return U$;K$=1;var r=me(),e=NG();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),U$}var Yh,G$;function kG(){if(G$)return Yh;G$=1,FG();var r=Gt();return Yh=r("Array","forEach"),Yh}var Xh,Y$;function BG(){if(Y$)return Xh;Y$=1;var r=kG();return Xh=r,Xh}var Jh,X$;function jG(){if(X$)return Jh;X$=1;var r=Bi(),e=bt(),t=yt(),i=BG(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Jh=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},Jh}var Qh,J$;function LG(){return J$||(J$=1,Qh=jG()),Qh}var zG=LG(),dn=Te(zG),Q$={},Z$;function HG(){if(Z$)return Q$;Z$=1;var r=me(),e=ze(),t=Sn(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),Q$}var Zh,eP;function WG(){if(eP)return Zh;eP=1,HG();var r=Gt();return Zh=r("Array","reverse"),Zh}var ef,tP;function UG(){if(tP)return ef;tP=1;var r=yt(),e=WG(),t=Array.prototype;return ef=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},ef}var tf,rP;function VG(){if(rP)return tf;rP=1;var r=UG();return tf=r,tf}var rf,iP;function KG(){return iP||(iP=1,rf=VG()),rf}var GG=KG(),YG=Te(GG),nP={},nf,sP;function XG(){if(sP)return nf;sP=1;var r=ct(),e=Sn(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return nf=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},nf}var sf,oP;function Sz(){if(oP)return sf;oP=1;var r=Os(),e=TypeError;return sf=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},sf}var aP;function JG(){if(aP)return nP;aP=1;var r=me(),e=Er(),t=$w(),i=Ps(),n=ki(),s=XG(),o=tz(),a=Tw(),u=qu(),l=Sz(),c=Yo(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,b){var m=e(this),g=n(m),w=t(v,g),y=arguments.length,S,O,I,_,E,T;for(y===0?S=O=0:y===1?(S=0,O=g-w):(S=y-2,O=f(h(i(b),0),g-w)),o(g+S-O),I=a(m,O),_=0;_g-O+S;_--)l(m,_-1)}else if(S>O)for(_=g-O;_>w;_--)E=_+O-1,T=_+S-1,E in m?m[T]=m[E]:l(m,T);for(_=0;_m;)for(var y=u(arguments[m++]),S=g?d(n(y),g(y)):n(y),O=S.length,I=0,_;O>I;)_=S[I++],(!r||t(w,y,_))&&(v[_]=y[_]);return v}:l,cf}var pP;function n6(){if(pP)return hP;pP=1;var r=me(),e=i6();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),hP}var df,vP;function s6(){if(vP)return df;vP=1,n6();var r=pt();return df=r.Object.assign,df}var hf,gP;function o6(){if(gP)return hf;gP=1;var r=s6();return hf=r,hf}var ff,mP;function a6(){return mP||(mP=1,ff=o6()),ff}var u6=a6(),l6=Te(u6),pf,yP;function c6(){if(yP)return pf;yP=1,iz();var r=Gt();return pf=r("Array","concat"),pf}var vf,bP;function d6(){if(bP)return vf;bP=1;var r=yt(),e=c6(),t=Array.prototype;return vf=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},vf}var gf,_P;function h6(){if(_P)return gf;_P=1;var r=d6();return gf=r,gf}var mf,wP;function f6(){return wP||(wP=1,mf=h6()),mf}var p6=f6(),v6=Te(p6),EP={},SP;function g6(){if(SP)return EP;SP=1;var r=me(),e=ct(),t=Jo();return r({target:"Object",stat:!0,sham:!e},{create:t}),EP}var yf,OP;function m6(){if(OP)return yf;OP=1,g6();var r=pt(),e=r.Object;return yf=function(i,n){return e.create(i,n)},yf}var bf,IP;function y6(){if(IP)return bf;IP=1;var r=m6();return bf=r,bf}var _f,TP;function b6(){return TP||(TP=1,_f=y6()),_f}var _6=b6(),w6=Te(_6),$P={},wf,PP;function E6(){if(PP)return wf;PP=1;var r=Ps(),e=ji(),t=En(),i=RangeError;return wf=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},wf}var Ef,RP;function S6(){if(RP)return Ef;RP=1;var r=ze(),e=ez(),t=ji(),i=E6(),n=En(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,b=h===void 0?" ":t(h),m,g;return p<=v||b===""?f:(m=p-v,g=s(b,a(m/b.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Ef={start:u(!1),end:u(!0)},Ef}var Sf,CP;function O6(){if(CP)return Sf;CP=1;var r=ze(),e=ke(),t=S6().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return Sf=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var m=this,g=c(m),w=h(m),y=g<0?"-":g>9999?"+":"";return y+t(s(g),y?6:4,0)+"-"+t(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(w,3,0)+"Z"}:a,Sf}var xP;function I6(){if(xP)return $P;xP=1;var r=me(),e=Kt(),t=Er(),i=YL(),n=O6(),s=si(),o=ke(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),$P}var Of,qP;function T6(){if(qP)return Of;qP=1,I6(),uz();var r=pt(),e=$u();return r.JSON||(r.JSON={stringify:JSON.stringify}),Of=function(i,n,s){return e(r.JSON.stringify,null,arguments)},Of}var If,DP;function $6(){if(DP)return If;DP=1;var r=T6();return If=r,If}var Tf,AP;function P6(){return AP||(AP=1,Tf=$6()),Tf}var R6=P6(),C6=Te(R6),MP={},NP={},$f,FP;function x6(){if(FP)return $f;FP=1;var r=TypeError;return $f=function(e,t){if(ed,v=t(h)?h:a(h),b=p?s(arguments,d):[],m=p?function(){e(v,this,b)}:v;return c?l(m,f):l(m)}:l},Pf}var BP;function q6(){if(BP)return NP;BP=1;var r=me(),e=lt(),t=Iz(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),NP}var jP={},LP;function D6(){if(LP)return jP;LP=1;var r=me(),e=lt(),t=Iz(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),jP}var zP;function A6(){return zP||(zP=1,q6(),D6()),MP}var Rf,HP;function M6(){if(HP)return Rf;HP=1,A6();var r=pt();return Rf=r.setTimeout,Rf}var Cf,WP;function N6(){return WP||(WP=1,Cf=M6()),Cf}var F6=N6(),k6=Te(F6),xf={exports:{}},UP;function B6(){return UP||(UP=1,function(r){function e(i){if(i)return t(i);this._callbacks=new Map}function t(i){return Object.assign(i,e.prototype),i._callbacks=new Map,i}e.prototype.on=function(i,n){const s=this._callbacks.get(i)??[];return s.push(n),this._callbacks.set(i,s),this},e.prototype.once=function(i,n){const s=(...o)=>{this.off(i,s),n.apply(this,o)};return s.fn=n,this.on(i,s),this},e.prototype.off=function(i,n){if(i===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(i),this;const s=this._callbacks.get(i);if(s){for(const[o,a]of s.entries())if(a===n||a.fn===n){s.splice(o,1);break}s.length===0?this._callbacks.delete(i):this._callbacks.set(i,s)}return this},e.prototype.emit=function(i,...n){const s=this._callbacks.get(i);if(s){const o=[...s];for(const a of o)a.apply(this,n)}return this},e.prototype.listeners=function(i){return this._callbacks.get(i)??[]},e.prototype.listenerCount=function(i){if(i)return this.listeners(i).length;let n=0;for(const s of this._callbacks.values())n+=s.length;return n},e.prototype.hasListeners=function(i){return this.listenerCount(i)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,r.exports=e}(xf)),xf.exports}var j6=B6(),L6=Te(j6);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 * http://naver.github.io/egjs * * Forked By Naver egjs * Copyright (c) hammerjs - * Licensed under the MIT license */function br(){return br=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),H6="function",Xn=Math.round,fn=Math.abs,Dw=Date.now;function ju(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?Yr={}:Yr=window;var Iz=ju(z6.style,"touchAction"),Tz=Iz!==void 0;function W6(){if(!Tz)return!1;var r={},e=Yr.CSS&&Yr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?Yr.CSS.supports("touch-action",t):!0}),r}var $z="compute",Pz="auto",M_="manipulation",nn="none",xo="pan-x",qo="pan-y",qa=W6(),U6=/mobile|tablet|ip(ad|hone|od)|android/i,Rz="ontouchstart"in Yr,V6=ju(Yr,"PointerEvent")!==void 0,K6=Rz&&U6.test(navigator.userAgent),ea="touch",G6="pen",Aw="mouse",Y6="kinect",X6=25,jt=1,In=2,st=4,Ut=8,Za=1,ta=2,ra=4,ia=8,ps=16,Mr=ta|ra,sn=ia|ps,Cz=Mr|sn,xz=["x","y"],eu=["clientX","clientY"];function Xr(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function J6(r){if(Qi(r,nn))return nn;var e=Qi(r,xo),t=Qi(r,qo);return e&&t?nn:e||t?e?xo:qo:Qi(r,M_)?M_:Pz}var qz=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===$z&&(i=this.compute()),Tz&&this.manager.element.style&&qa[i]&&(this.manager.element.style[Iz]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return Xr(this.manager.recognizers,function(n){Lu(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),J6(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=Qi(o,nn)&&!qa[nn],u=Qi(o,qo)&&!qa[qo],l=Qi(o,xo)&&!qa[xo];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&Mr||l&&s&sn))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function Mw(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function Dz(r){var e=r.length;if(e===1)return{x:Xn(r[0].clientX),y:Xn(r[0].clientY)};for(var t=0,i=0,n=0;n=fn(e)?r<0?ta:ra:e<0?ia:ps}function Q6(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===jt||s.eventType===st)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function Mz(r,e,t){return{x:e/r||0,y:t/r||0}}function Z6(r,e){return tu(e[0],e[1],eu)/tu(r[0],r[1],eu)}function e8(r,e){return N_(e[1],e[0],eu)+N_(r[1],r[0],eu)}function t8(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Ut&&(i>X6||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=Mz(i,u,l);s=c.x,o=c.y,n=fn(c.x)>fn(c.y)?c.x:c.y,a=Az(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function r8(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=VP(e)),n>1&&!t.firstMultiple?t.firstMultiple=VP(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=Dz(i);e.timeStamp=Dw(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=N_(a,u),e.distance=tu(a,u),Q6(t,e),e.offsetDirection=Az(e.deltaX,e.deltaY);var l=Mz(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=fn(l.x)>fn(l.y)?l.x:l.y,e.scale=o?Z6(o.pointers,i):1,e.rotation=o?e8(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,t8(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,Mw(h,c)&&(c=h),e.target=c}function i8(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&jt&&i-n===0,o=e&(st|Ut)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,r8(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function Do(r){return r.trim().split(/\s+/g)}function vo(r,e,t){Xr(Do(e),function(i){r.addEventListener(i,t,!1)})}function go(r,e,t){Xr(Do(e),function(i){r.removeEventListener(i,t,!1)})}function KP(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var qs=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){Lu(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&vo(this.element,this.evEl,this.domHandler),this.evTarget&&vo(this.target,this.evTarget,this.domHandler),this.evWin&&vo(KP(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&go(this.element,this.evEl,this.domHandler),this.evTarget&&go(this.target,this.evTarget,this.domHandler),this.evWin&&go(KP(this.element),this.evWin,this.domHandler)},r}();function pn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var o8={touchstart:jt,touchmove:In,touchend:st,touchcancel:Ut},a8="touchstart touchmove touchend touchcancel",Fw=function(r){lr(e,r);function e(){var i;return e.prototype.evTarget=a8,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=o8[n.type],o=u8.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ea,srcEvent:n})},e}(qs);function u8(r,e){var t=Ao(r.touches),i=this.targetIds;if(e&(jt|In)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Ao(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return Mw(l.target,u)}),e===jt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,h8)}}function f8(r,e){r&jt?(this.primaryTouch=e.changedPointers[0].identifier,YP.call(this,e)):r&(st|Ut)&&YP.call(this,e)}function p8(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Oi&&o(n.options.event+XP(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=xr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return gs.prototype.attrTest.call(this,n)&&(this.state&or||!(this.state&or)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=jz(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(gs),Lz=function(r){lr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,br({event:"swipe",threshold:10,velocity:.3,direction:Mr|sn,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return Bw.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Mr|sn)?o=n.overallVelocity:s&Mr?o=n.overallVelocityX:s&sn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&fn(o)>this.options.velocity&&n.eventType&st},t.emit=function(n){var s=jz(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(gs),zz=function(r){lr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,br({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[nn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&or)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(gs),Hz=function(r){lr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,br({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[nn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&or)},e}(gs),Wz=function(r){lr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,br({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[Pz]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(st|Ut)&&!l)this.reset();else if(n.eventType&jt)this.reset(),this._timer=setTimeout(function(){s.state=Jr,s.tryEmit()},o.time);else if(n.eventType&st)return Jr;return xr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===Jr&&(n&&n.eventType&st?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Dw(),this.manager.emit(this.options.event,this._input)))},e}(na),Uz={domEvents:!1,touchAction:$z,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},JP=[[Hz,{enable:!1}],[zz,{enable:!1},["rotate"]],[Lz,{direction:Mr}],[Bw,{direction:Mr},["swipe"]],[F_],[F_,{event:"doubletap",taps:2},["tap"]],[Wz]],y8=1,QP=2;function ZP(r,e){var t=r.element;if(t.style){var i;Xr(r.options.cssProps,function(n,s){i=ju(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function b8(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var eR=function(){function r(t,i){var n=this;this.options=hn({},Uz,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=v8(this),this.touchAction=new qz(this,this.options.touchAction),ZP(this,!0),Xr(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return hn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?QP:y8},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&Jr)&&(n.curRecognizer=null,a=null);for(var u=0;u"u"?{style:{}}:document.createElement("div"),H6="function",Xn=Math.round,fn=Math.abs,Aw=Date.now;function ju(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?Yr={}:Yr=window;var Tz=ju(z6.style,"touchAction"),$z=Tz!==void 0;function W6(){if(!$z)return!1;var r={},e=Yr.CSS&&Yr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?Yr.CSS.supports("touch-action",t):!0}),r}var Pz="compute",Rz="auto",M_="manipulation",nn="none",xo="pan-x",qo="pan-y",qa=W6(),U6=/mobile|tablet|ip(ad|hone|od)|android/i,Cz="ontouchstart"in Yr,V6=ju(Yr,"PointerEvent")!==void 0,K6=Cz&&U6.test(navigator.userAgent),ea="touch",G6="pen",Mw="mouse",Y6="kinect",X6=25,jt=1,In=2,st=4,Ut=8,Za=1,ta=2,ra=4,ia=8,ps=16,Mr=ta|ra,sn=ia|ps,xz=Mr|sn,qz=["x","y"],eu=["clientX","clientY"];function Xr(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function J6(r){if(Qi(r,nn))return nn;var e=Qi(r,xo),t=Qi(r,qo);return e&&t?nn:e||t?e?xo:qo:Qi(r,M_)?M_:Rz}var Dz=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===Pz&&(i=this.compute()),$z&&this.manager.element.style&&qa[i]&&(this.manager.element.style[Tz]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return Xr(this.manager.recognizers,function(n){Lu(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),J6(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=Qi(o,nn)&&!qa[nn],u=Qi(o,qo)&&!qa[qo],l=Qi(o,xo)&&!qa[xo];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&Mr||l&&s&sn))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function Nw(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function Az(r){var e=r.length;if(e===1)return{x:Xn(r[0].clientX),y:Xn(r[0].clientY)};for(var t=0,i=0,n=0;n=fn(e)?r<0?ta:ra:e<0?ia:ps}function Q6(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===jt||s.eventType===st)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function Nz(r,e,t){return{x:e/r||0,y:t/r||0}}function Z6(r,e){return tu(e[0],e[1],eu)/tu(r[0],r[1],eu)}function e8(r,e){return N_(e[1],e[0],eu)+N_(r[1],r[0],eu)}function t8(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Ut&&(i>X6||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=Nz(i,u,l);s=c.x,o=c.y,n=fn(c.x)>fn(c.y)?c.x:c.y,a=Mz(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function r8(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=KP(e)),n>1&&!t.firstMultiple?t.firstMultiple=KP(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=Az(i);e.timeStamp=Aw(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=N_(a,u),e.distance=tu(a,u),Q6(t,e),e.offsetDirection=Mz(e.deltaX,e.deltaY);var l=Nz(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=fn(l.x)>fn(l.y)?l.x:l.y,e.scale=o?Z6(o.pointers,i):1,e.rotation=o?e8(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,t8(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,Nw(h,c)&&(c=h),e.target=c}function i8(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&jt&&i-n===0,o=e&(st|Ut)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,r8(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function Do(r){return r.trim().split(/\s+/g)}function vo(r,e,t){Xr(Do(e),function(i){r.addEventListener(i,t,!1)})}function go(r,e,t){Xr(Do(e),function(i){r.removeEventListener(i,t,!1)})}function GP(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var qs=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){Lu(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&vo(this.element,this.evEl,this.domHandler),this.evTarget&&vo(this.target,this.evTarget,this.domHandler),this.evWin&&vo(GP(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&go(this.element,this.evEl,this.domHandler),this.evTarget&&go(this.target,this.evTarget,this.domHandler),this.evWin&&go(GP(this.element),this.evWin,this.domHandler)},r}();function pn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var o8={touchstart:jt,touchmove:In,touchend:st,touchcancel:Ut},a8="touchstart touchmove touchend touchcancel",kw=function(r){lr(e,r);function e(){var i;return e.prototype.evTarget=a8,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=o8[n.type],o=u8.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ea,srcEvent:n})},e}(qs);function u8(r,e){var t=Ao(r.touches),i=this.targetIds;if(e&(jt|In)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Ao(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return Nw(l.target,u)}),e===jt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,h8)}}function f8(r,e){r&jt?(this.primaryTouch=e.changedPointers[0].identifier,XP.call(this,e)):r&(st|Ut)&&XP.call(this,e)}function p8(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Oi&&o(n.options.event+JP(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=xr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return gs.prototype.attrTest.call(this,n)&&(this.state&or||!(this.state&or)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=Lz(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(gs),zz=function(r){lr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,br({event:"swipe",threshold:10,velocity:.3,direction:Mr|sn,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return jw.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Mr|sn)?o=n.overallVelocity:s&Mr?o=n.overallVelocityX:s&sn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&fn(o)>this.options.velocity&&n.eventType&st},t.emit=function(n){var s=Lz(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(gs),Hz=function(r){lr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,br({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[nn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&or)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(gs),Wz=function(r){lr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,br({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[nn]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&or)},e}(gs),Uz=function(r){lr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,br({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[Rz]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(st|Ut)&&!l)this.reset();else if(n.eventType&jt)this.reset(),this._timer=setTimeout(function(){s.state=Jr,s.tryEmit()},o.time);else if(n.eventType&st)return Jr;return xr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===Jr&&(n&&n.eventType&st?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Aw(),this.manager.emit(this.options.event,this._input)))},e}(na),Vz={domEvents:!1,touchAction:Pz,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},QP=[[Wz,{enable:!1}],[Hz,{enable:!1},["rotate"]],[zz,{direction:Mr}],[jw,{direction:Mr},["swipe"]],[F_],[F_,{event:"doubletap",taps:2},["tap"]],[Uz]],y8=1,ZP=2;function eR(r,e){var t=r.element;if(t.style){var i;Xr(r.options.cssProps,function(n,s){i=ju(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function b8(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var tR=function(){function r(t,i){var n=this;this.options=hn({},Vz,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=v8(this),this.touchAction=new Dz(this,this.options.touchAction),eR(this,!0),Xr(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return hn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?ZP:y8},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&Jr)&&(n.curRecognizer=null,a=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var Kz=Vz(function(r,e,t){for(var i=Object.keys(e),n=0;n1?e-1:0),i=1;i2)return ru(Yz(e[0],e[1]),...bG(e).call(e,2));const i=e[0],n=e[1];if(i instanceof Date&&n instanceof Date)return i.setTime(n.getTime()),i;for(const s of IG(n))Object.prototype.propertyIsEnumerable.call(n,s)&&(n[s]===Gz?delete i[s]:i[s]!==null&&n[s]!==null&&typeof i[s]=="object"&&typeof n[s]=="object"&&!$r(i[s])&&!$r(n[s])?i[s]=ru(i[s],n[s]):i[s]=Xz(n[s]));return i}function Xz(r){return $r(r)?pr(r).call(r,e=>Xz(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):ru({},r):r}function Jz(r){for(const e of qw(r))r[e]===Gz?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&Jz(r[e])}function R8(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const C8=typeof window<"u"?window.Hammer||$8:function(){return R8()};function Vr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=C8(this._dom.overlay);t.on("tap",bz(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];dn(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{x8(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}L6(Vr.prototype);Vr.current=null;Vr.prototype.destroy=function(){this.deactivate();for(const t of YG(r=Sz(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Vr.prototype.activate=function(){Vr.current&&Vr.current.deactivate(),Vr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Vr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Vr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function x8(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var qf,rR;function q8(){if(rR)return qf;rR=1,uz();var r=pt();return qf=r.Object.getOwnPropertySymbols,qf}var Df,iR;function D8(){if(iR)return Df;iR=1;var r=q8();return Df=r,Df}var Af,nR;function A8(){return nR||(nR=1,Af=D8()),Af}var M8=A8(),sR=Ie(M8),Mf={exports:{}},oR={},aR;function N8(){if(aR)return oR;aR=1;var r=me(),e=ke(),t=kr(),i=Cu().f,n=ct(),s=!n||e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getOwnPropertyDescriptor:function(a,u){return i(t(a),u)}}),oR}var uR;function F8(){if(uR)return Mf.exports;uR=1,N8();var r=pt(),e=r.Object,t=Mf.exports=function(n,s){return e.getOwnPropertyDescriptor(n,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Mf.exports}var Nf,lR;function k8(){if(lR)return Nf;lR=1;var r=F8();return Nf=r,Nf}var Ff,cR;function B8(){return cR||(cR=1,Ff=k8()),Ff}var j8=B8(),Qz=Ie(j8),dR={},hR;function L8(){if(hR)return dR;hR=1;var r=me(),e=ct(),t=wz(),i=kr(),n=Cu(),s=qu();return r({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=i(a),l=n.f,c=t(u),d={},h=0,f,p;c.length>h;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),dR}var kf,fR;function z8(){if(fR)return kf;fR=1,L8();var r=pt();return kf=r.Object.getOwnPropertyDescriptors,kf}var Bf,pR;function H8(){if(pR)return Bf;pR=1;var r=z8();return Bf=r,Bf}var jf,vR;function W8(){return vR||(vR=1,jf=H8()),jf}var U8=W8(),gR=Ie(U8),Lf={exports:{}},mR={},yR;function V8(){if(yR)return mR;yR=1;var r=me(),e=ct(),t=Pw().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),mR}var bR;function K8(){if(bR)return Lf.exports;bR=1,V8();var r=pt(),e=r.Object,t=Lf.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),Lf.exports}var zf,_R;function G8(){if(_R)return zf;_R=1;var r=K8();return zf=r,zf}var Hf,wR;function Y8(){return wR||(wR=1,Hf=G8()),Hf}var X8=Y8(),J8=Ie(X8),Wf,ER;function Q8(){return ER||(ER=1,Wf=QL()),Wf}var Z8=Q8(),e9=Ie(Z8),SR={},OR={},Uf={exports:{}},Vf,IR;function t9(){if(IR)return Vf;IR=1;var r=ke();return Vf=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Vf}var Kf,TR;function r9(){if(TR)return Kf;TR=1;var r=ke(),e=zt(),t=si(),i=t9(),n=Object.isExtensible,s=r(function(){});return Kf=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Kf}var Gf,$R;function i9(){if($R)return Gf;$R=1;var r=ke();return Gf=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),Gf}var PR;function Zz(){if(PR)return Uf.exports;PR=1;var r=me(),e=ze(),t=Xo(),i=zt(),n=bt(),s=ur().f,o=Mu(),a=nz(),u=r9(),l=Ru(),c=i9(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,S){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!S)return"E";p(y)}return y[h].objectID},b=function(y,S){if(!n(y,h)){if(!u(y))return!0;if(!S)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){w.enable=function(){},d=!0;var y=o.f,S=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(I){for(var _=y(I),E=0,T=_.length;E_;_++)if(T=D(f[_]),T&&o(h,T))return T;return new d(!1)}O=a(f,I)}for(R=g?f.next:O.next;!(x=e(R,O)).done;){try{T=D(x.value)}catch(j){l(O,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},Zf}var ep,AR;function r3(){if(AR)return ep;AR=1;var r=yt(),e=TypeError;return ep=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},ep}var tp,MR;function i3(){if(MR)return tp;MR=1;var r=me(),e=lt(),t=Zz(),i=ke(),n=$s(),s=Lw(),o=r3(),a=mt(),u=zt(),l=Vo(),c=On(),d=ur().f,h=Cs().forEach,f=ct(),p=Zo(),v=p.set,b=p.getterFor;return tp=function(m,g,w){var y=m.indexOf("Map")!==-1,S=m.indexOf("Weak")!==-1,O=y?"set":"add",I=e[m],_=I&&I.prototype,E={},T;if(!f||!a(I)||!(S||_.forEach&&!i(function(){new I().entries().next()})))T=w.getConstructor(g,m,y,O),t.enable();else{T=g(function(C,D){v(o(C,R),{type:m,collection:new I}),l(D)||s(D,C[O],{that:C,AS_ENTRIES:y})});var R=T.prototype,x=b(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in _&&!(S&&C==="clear")&&n(R,C,function(j,ee){var H=x(this).collection;if(!D&&S&&!u(j))return C==="get"?void 0:!1;var Z=H[C](j===0?0:j,ee);return D?this:Z})}),S||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,m,!1,!0),E[m]=T,r({global:!0,forced:!0},E),S||w.setStrong(T,m,y),T},tp}var rp,NR;function s9(){if(NR)return rp;NR=1;var r=Qo();return rp=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},rp}var ip,FR;function o9(){if(FR)return ip;FR=1;var r=Zt(),e=Rw(),t=_t(),i=ct(),n=t("species");return ip=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},ip}var np,kR;function n3(){if(kR)return np;kR=1;var r=Jo(),e=Rw(),t=s9(),i=xu(),n=r3(),s=Vo(),o=Lw(),a=Cw(),u=xw(),l=o9(),c=ct(),d=Zz().fastKey,h=Zo(),f=h.set,p=h.getterFor;return np={getConstructor:function(v,b,m,g){var w=v(function(_,E){n(_,y),f(_,{type:b,index:r(null),first:null,last:null,size:0}),c||(_.size=0),s(E)||o(E,_[g],{that:_,AS_ENTRIES:m})}),y=w.prototype,S=p(b),O=function(_,E,T){var R=S(_),x=I(_,E),C,D;return x?x.value=T:(R.last=x={index:D=d(E,!0),key:E,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:_.size++,D!=="F"&&(R.index[D]=x)),_},I=function(_,E){var T=S(_),R=d(E),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===E)return x};return t(y,{clear:function(){for(var E=this,T=S(E),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:E.size=0},delete:function(_){var E=this,T=S(E),R=I(E,_);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:E.size--}return!!R},forEach:function(E){for(var T=S(this),R=i(E,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(E){return!!I(this,E)}}),t(y,m?{get:function(E){var T=I(this,E);return T&&T.value},set:function(E,T){return O(this,E===0?0:E,T)}}:{add:function(E){return O(this,E=E===0?0:E,E)}}),c&&e(y,"size",{configurable:!0,get:function(){return S(this).size}}),w},setStrong:function(v,b,m){var g=b+" Iterator",w=p(b),y=p(g);a(v,b,function(S,O){f(this,{type:g,target:S,state:w(S),kind:O,last:null})},function(){for(var S=y(this),O=S.kind,I=S.last;I&&I.removed;)I=I.previous;return!S.target||!(S.last=I=I?I.next:S.state.first)?(S.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},m?"entries":"values",!m,!0),l(b)}},np}var BR;function a9(){if(BR)return OR;BR=1;var r=i3(),e=n3();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),OR}var jR;function u9(){return jR||(jR=1,a9()),SR}var LR={},sp,zR;function s3(){return zR||(zR=1,sp=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),sp}var op,HR;function l9(){if(HR)return op;HR=1;var r=Zt(),e=s3(),t=r("Map");return op={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},op}var WR;function c9(){if(WR)return LR;WR=1;var r=me(),e=ze(),t=oi(),i=En(),n=Lw(),s=l9(),o=Is(),a=ke(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,b){i(v),t(b);var m=new u,g=0;return n(v,function(w){var y=b(w,g++);l(m,y)?h(c(m,y),w):d(m,y,[w])}),m}}),LR}var ap,UR;function d9(){if(UR)return ap;UR=1,Li(),u9(),c9(),ku();var r=pt();return ap=r.Map,ap}var up,VR;function h9(){if(VR)return up;VR=1;var r=d9();return zi(),up=r,up}var lp,KR;function f9(){return KR||(KR=1,lp=h9()),lp}var p9=f9(),o3=Ie(p9),GR={},YR;function v9(){if(YR)return GR;YR=1;var r=me(),e=Cs().some,t=Bu(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),GR}var cp,XR;function g9(){if(XR)return cp;XR=1,v9();var r=Gt();return cp=r("Array","some"),cp}var dp,JR;function m9(){if(JR)return dp;JR=1;var r=yt(),e=g9(),t=Array.prototype;return dp=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},dp}var hp,QR;function y9(){if(QR)return hp;QR=1;var r=m9();return hp=r,hp}var fp,ZR;function b9(){return ZR||(ZR=1,fp=y9()),fp}var _9=b9(),w9=Ie(_9),pp,eC;function E9(){if(eC)return pp;eC=1,Li();var r=Gt();return pp=r("Array","keys"),pp}var vp,tC;function S9(){if(tC)return vp;tC=1;var r=E9();return vp=r,vp}var gp,rC;function O9(){if(rC)return gp;rC=1,zi();var r=Bi(),e=bt(),t=yt(),i=S9(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return gp=function(o){var a=o.keys;return o===n||t(n,o)&&a===n.keys||e(s,r(o))?i:a},gp}var mp,iC;function I9(){return iC||(iC=1,mp=O9()),mp}var T9=I9(),Hn=Ie(T9),nC={},yp,sC;function $9(){if(sC)return yp;sC=1;var r=Rs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var I="",_,E,T,R;for(_=65;_<76;_++){switch(E=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)p.push({k:E+R,v:T})}for(p.sort(function(x,C){return C.v-x.v}),R=0;Ro(E)?1:-1}};return r({target:"Array",proto:!0,forced:S},{sort:function(_){_!==void 0&&t(_);var E=i(this);if(y)return _===void 0?v(E):v(E,_);var T=[],R=n(E),x,C;for(C=0;C"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Mp=crypto.getRandomValues.bind(crypto)}return Mp(J9)}const Z9=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var OC={randomUUID:Z9};function eY(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Q9();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,X9(i)}function tY(r,e,t){return OC.randomUUID?OC.randomUUID():eY(r)}function IC(r){return typeof r=="string"||typeof r=="number"}class zw{constructor(e){Si(this,"_queue",[]),Si(this,"_timeout",null),Si(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){const i=new zw(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(t&&t.replace)for(let s=0;sthis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=k6(()=>{this.flush()},this.delay))}flush(){var e,t;dn(e=Sz(t=this._queue).call(t,0)).call(e,i=>{i.fn.apply(i.context||i.fn,i.args||[])})}}class iu{constructor(){Si(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Si(this,"subscribe",iu.prototype.on),Si(this,"unsubscribe",iu.prototype.off)}_trigger(e,t,i){var n;if(e==="*")throw new Error("Cannot trigger event *");dn(n=[...this._subscribers[e],...this._subscribers["*"]]).call(n,s=>{s(e,t,i??null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){var i;this._subscribers[e]=Yn(i=this._subscribers[e]).call(i,n=>n!==t)}}var TC={},$C={},PC;function rY(){if(PC)return $C;PC=1;var r=i3(),e=n3();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),$C}var RC;function iY(){return RC||(RC=1,rY()),TC}var CC={},Np,xC;function Tn(){if(xC)return Np;xC=1;var r=Os(),e=TypeError;return Np=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},Np}var Fp,qC;function $n(){if(qC)return Fp;qC=1;var r=Zt(),e=s3(),t=r("Set"),i=t.prototype;return Fp={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},Fp}var kp,DC;function Pn(){if(DC)return kp;DC=1;var r=Kt();return kp=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},kp}var Bp,AC;function sa(){if(AC)return Bp;AC=1;var r=Pn();return Bp=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},Bp}var jp,MC;function Hw(){if(MC)return jp;MC=1;var r=$n(),e=sa(),t=r.Set,i=r.add;return jp=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},jp}var Lp,NC;function oa(){return NC||(NC=1,Lp=function(r){return r.size}),Lp}var zp,FC;function nY(){return FC||(FC=1,zp=function(r){return{iterator:r,next:r.next,done:!1}}),zp}var Hp,kC;function Rn(){if(kC)return Hp;kC=1;var r=oi(),e=ai(),t=Kt(),i=Ps(),n=nY(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},Hp=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},Hp}var Wp,BC;function sY(){if(BC)return Wp;BC=1;var r=Tn(),e=$n(),t=Hw(),i=oa(),n=Rn(),s=sa(),o=Pn(),a=e.has,u=e.remove;return Wp=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},Wp}var Up,jC;function Cn(){return jC||(jC=1,Up=function(){return!1}),Up}var LC;function oY(){if(LC)return CC;LC=1;var r=me(),e=sY(),t=ke(),i=Cn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),CC}var zC={},Vp,HC;function aY(){if(HC)return Vp;HC=1;var r=Tn(),e=$n(),t=oa(),i=Rn(),n=sa(),s=Pn(),o=e.Set,a=e.add,u=e.has;return Vp=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},Vp}var WC;function uY(){if(WC)return zC;WC=1;var r=me(),e=ke(),t=aY(),i=Cn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),zC}var UC={},Kp,VC;function lY(){if(VC)return Kp;VC=1;var r=Tn(),e=$n().has,t=oa(),i=Rn(),n=sa(),s=Pn(),o=jw();return Kp=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},Kp}var KC;function cY(){if(KC)return UC;KC=1;var r=me(),e=lY(),t=Cn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),UC}var GC={},Gp,YC;function dY(){if(YC)return Gp;YC=1;var r=Tn(),e=oa(),t=sa(),i=Rn();return Gp=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},Gp}var XC;function hY(){if(XC)return GC;XC=1;var r=me(),e=dY(),t=Cn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),GC}var JC={},Yp,QC;function fY(){if(QC)return Yp;QC=1;var r=Tn(),e=$n().has,t=oa(),i=Rn(),n=Pn(),s=jw();return Yp=function(a){var u=r(this),l=i(a);if(t(u)t[0])}toItemArray(){var e;return pr(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=w6(null);for(const[t,i]of this._pairs)e[t]=i;return e}toMap(){return new o3(this._pairs)}toIdSet(){return new rv(this.toIdArray())}toItemSet(){return new rv(this.toItemArray())}cache(){return new Zi([...this._pairs])}distinct(e){const t=new rv;for(const[i,n]of this._pairs)t.add(e(n,i));return t}filter(e){const t=this._pairs;return new Zi({*[Qn](){for(const[i,n]of t)e(n,i)&&(yield[i,n])}})}forEach(e){for(const[t,i]of this._pairs)e(i,t)}map(e){const t=this._pairs;return new Zi({*[Qn](){for(const[i,n]of t)yield[i,e(n,i)]}})}max(e){const t=lv(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u>s&&(s=u,n=a)}return n}min(e){const t=lv(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u{var t;return lv(k_(t=[...this._pairs]).call(t,(i,n)=>{let[s,o]=i,[a,u]=n;return e(o,u,s,a)}))}})}}function gx(r,e){var t=qw(r);if(sR){var i=sR(r);e&&(i=Yn(i).call(i,function(n){return Qz(r,n).enumerable})),t.push.apply(t,i)}return t}function mx(r){for(var e=1;eo[this._idProp]);if(w9(s).call(s,o=>this._data.has(o)))throw new Error("A duplicate id was found in the parameter array.");for(let o=0,a=e.length;o{const c=l[a];if(c!=null&&this._data.has(c)){const d=l,h=l6({},this._data.get(c)),f=this._updateItem(d);n.push(f),o.push(d),s.push(h)}else{const d=this._addItem(l);i.push(d)}};if($r(e))for(let l=0,c=e.length;l{const o=this._data.get(s[this._idProp]);if(o==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:o,update:s}})).call(i,s=>{let{oldData:o,update:a}=s;const u=o[this._idProp],l=P8(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(n.length){const s={items:pr(n).call(n,o=>o.id),oldData:pr(n).call(n,o=>o.oldData),data:pr(n).call(n,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let i,n,s;IC(e)?(i=e,s=t):$r(e)?(n=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&Yn(s),u=[];let l,c,d;if(i!=null)l=this._data.get(i),l&&a&&!a(l)&&(l=void 0);else if(n!=null)for(let f=0,p=n.length;f(n[s]=e[s],n),{})}_sort(e,t){if(typeof t=="string"){const i=t;k_(e).call(e,(n,s)=>{const o=n[i],a=s[i];return o>a?1:oi)&&(t=s,i=o)}return t||null}min(e){let t=null,i=null;for(const s of yC(n=this._data).call(n)){var n;const o=s[e];typeof o=="number"&&(i==null||o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var Gz=Kz(function(r,e,t){for(var i=Object.keys(e),n=0;n1?e-1:0),i=1;i2)return ru(Xz(e[0],e[1]),...bG(e).call(e,2));const i=e[0],n=e[1];if(i instanceof Date&&n instanceof Date)return i.setTime(n.getTime()),i;for(const s of IG(n))Object.prototype.propertyIsEnumerable.call(n,s)&&(n[s]===Yz?delete i[s]:i[s]!==null&&n[s]!==null&&typeof i[s]=="object"&&typeof n[s]=="object"&&!$r(i[s])&&!$r(n[s])?i[s]=ru(i[s],n[s]):i[s]=Jz(n[s]));return i}function Jz(r){return $r(r)?pr(r).call(r,e=>Jz(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):ru({},r):r}function Qz(r){for(const e of Dw(r))r[e]===Yz?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&Qz(r[e])}function R8(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const C8=typeof window<"u"?window.Hammer||$8:function(){return R8()};function Vr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=C8(this._dom.overlay);t.on("tap",_z(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];dn(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{x8(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}L6(Vr.prototype);Vr.current=null;Vr.prototype.destroy=function(){this.deactivate();for(const t of YG(r=Oz(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Vr.prototype.activate=function(){Vr.current&&Vr.current.deactivate(),Vr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Vr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Vr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function x8(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var qf,iR;function q8(){if(iR)return qf;iR=1,lz();var r=pt();return qf=r.Object.getOwnPropertySymbols,qf}var Df,nR;function D8(){if(nR)return Df;nR=1;var r=q8();return Df=r,Df}var Af,sR;function A8(){return sR||(sR=1,Af=D8()),Af}var M8=A8(),oR=Te(M8),Mf={exports:{}},aR={},uR;function N8(){if(uR)return aR;uR=1;var r=me(),e=ke(),t=kr(),i=Cu().f,n=ct(),s=!n||e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getOwnPropertyDescriptor:function(a,u){return i(t(a),u)}}),aR}var lR;function F8(){if(lR)return Mf.exports;lR=1,N8();var r=pt(),e=r.Object,t=Mf.exports=function(n,s){return e.getOwnPropertyDescriptor(n,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Mf.exports}var Nf,cR;function k8(){if(cR)return Nf;cR=1;var r=F8();return Nf=r,Nf}var Ff,dR;function B8(){return dR||(dR=1,Ff=k8()),Ff}var j8=B8(),Zz=Te(j8),hR={},fR;function L8(){if(fR)return hR;fR=1;var r=me(),e=ct(),t=Ez(),i=kr(),n=Cu(),s=qu();return r({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=i(a),l=n.f,c=t(u),d={},h=0,f,p;c.length>h;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),hR}var kf,pR;function z8(){if(pR)return kf;pR=1,L8();var r=pt();return kf=r.Object.getOwnPropertyDescriptors,kf}var Bf,vR;function H8(){if(vR)return Bf;vR=1;var r=z8();return Bf=r,Bf}var jf,gR;function W8(){return gR||(gR=1,jf=H8()),jf}var U8=W8(),mR=Te(U8),Lf={exports:{}},yR={},bR;function V8(){if(bR)return yR;bR=1;var r=me(),e=ct(),t=Rw().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),yR}var _R;function K8(){if(_R)return Lf.exports;_R=1,V8();var r=pt(),e=r.Object,t=Lf.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),Lf.exports}var zf,wR;function G8(){if(wR)return zf;wR=1;var r=K8();return zf=r,zf}var Hf,ER;function Y8(){return ER||(ER=1,Hf=G8()),Hf}var X8=Y8(),J8=Te(X8),Wf,SR;function Q8(){return SR||(SR=1,Wf=ZL()),Wf}var Z8=Q8(),e9=Te(Z8),OR={},IR={},Uf={exports:{}},Vf,TR;function t9(){if(TR)return Vf;TR=1;var r=ke();return Vf=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Vf}var Kf,$R;function r9(){if($R)return Kf;$R=1;var r=ke(),e=zt(),t=si(),i=t9(),n=Object.isExtensible,s=r(function(){});return Kf=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,Kf}var Gf,PR;function i9(){if(PR)return Gf;PR=1;var r=ke();return Gf=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),Gf}var RR;function e3(){if(RR)return Uf.exports;RR=1;var r=me(),e=ze(),t=Xo(),i=zt(),n=bt(),s=ur().f,o=Mu(),a=sz(),u=r9(),l=Ru(),c=i9(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,S){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!S)return"E";p(y)}return y[h].objectID},b=function(y,S){if(!n(y,h)){if(!u(y))return!0;if(!S)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){w.enable=function(){},d=!0;var y=o.f,S=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(I){for(var _=y(I),E=0,T=_.length;E_;_++)if(T=D(f[_]),T&&o(h,T))return T;return new d(!1)}O=a(f,I)}for(R=g?f.next:O.next;!(x=e(R,O)).done;){try{T=D(x.value)}catch(j){l(O,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},Zf}var ep,MR;function i3(){if(MR)return ep;MR=1;var r=yt(),e=TypeError;return ep=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},ep}var tp,NR;function n3(){if(NR)return tp;NR=1;var r=me(),e=lt(),t=e3(),i=ke(),n=$s(),s=zw(),o=i3(),a=mt(),u=zt(),l=Vo(),c=On(),d=ur().f,h=Cs().forEach,f=ct(),p=Zo(),v=p.set,b=p.getterFor;return tp=function(m,g,w){var y=m.indexOf("Map")!==-1,S=m.indexOf("Weak")!==-1,O=y?"set":"add",I=e[m],_=I&&I.prototype,E={},T;if(!f||!a(I)||!(S||_.forEach&&!i(function(){new I().entries().next()})))T=w.getConstructor(g,m,y,O),t.enable();else{T=g(function(C,D){v(o(C,R),{type:m,collection:new I}),l(D)||s(D,C[O],{that:C,AS_ENTRIES:y})});var R=T.prototype,x=b(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in _&&!(S&&C==="clear")&&n(R,C,function(j,ee){var H=x(this).collection;if(!D&&S&&!u(j))return C==="get"?void 0:!1;var Z=H[C](j===0?0:j,ee);return D?this:Z})}),S||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,m,!1,!0),E[m]=T,r({global:!0,forced:!0},E),S||w.setStrong(T,m,y),T},tp}var rp,FR;function s9(){if(FR)return rp;FR=1;var r=Qo();return rp=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},rp}var ip,kR;function o9(){if(kR)return ip;kR=1;var r=er(),e=Cw(),t=_t(),i=ct(),n=t("species");return ip=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},ip}var np,BR;function s3(){if(BR)return np;BR=1;var r=Jo(),e=Cw(),t=s9(),i=xu(),n=i3(),s=Vo(),o=zw(),a=xw(),u=qw(),l=o9(),c=ct(),d=e3().fastKey,h=Zo(),f=h.set,p=h.getterFor;return np={getConstructor:function(v,b,m,g){var w=v(function(_,E){n(_,y),f(_,{type:b,index:r(null),first:null,last:null,size:0}),c||(_.size=0),s(E)||o(E,_[g],{that:_,AS_ENTRIES:m})}),y=w.prototype,S=p(b),O=function(_,E,T){var R=S(_),x=I(_,E),C,D;return x?x.value=T:(R.last=x={index:D=d(E,!0),key:E,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:_.size++,D!=="F"&&(R.index[D]=x)),_},I=function(_,E){var T=S(_),R=d(E),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===E)return x};return t(y,{clear:function(){for(var E=this,T=S(E),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:E.size=0},delete:function(_){var E=this,T=S(E),R=I(E,_);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:E.size--}return!!R},forEach:function(E){for(var T=S(this),R=i(E,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(E){return!!I(this,E)}}),t(y,m?{get:function(E){var T=I(this,E);return T&&T.value},set:function(E,T){return O(this,E===0?0:E,T)}}:{add:function(E){return O(this,E=E===0?0:E,E)}}),c&&e(y,"size",{configurable:!0,get:function(){return S(this).size}}),w},setStrong:function(v,b,m){var g=b+" Iterator",w=p(b),y=p(g);a(v,b,function(S,O){f(this,{type:g,target:S,state:w(S),kind:O,last:null})},function(){for(var S=y(this),O=S.kind,I=S.last;I&&I.removed;)I=I.previous;return!S.target||!(S.last=I=I?I.next:S.state.first)?(S.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},m?"entries":"values",!m,!0),l(b)}},np}var jR;function a9(){if(jR)return IR;jR=1;var r=n3(),e=s3();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),IR}var LR;function u9(){return LR||(LR=1,a9()),OR}var zR={},sp,HR;function o3(){return HR||(HR=1,sp=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),sp}var op,WR;function l9(){if(WR)return op;WR=1;var r=er(),e=o3(),t=r("Map");return op={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},op}var UR;function c9(){if(UR)return zR;UR=1;var r=me(),e=ze(),t=oi(),i=En(),n=zw(),s=l9(),o=Is(),a=ke(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,b){i(v),t(b);var m=new u,g=0;return n(v,function(w){var y=b(w,g++);l(m,y)?h(c(m,y),w):d(m,y,[w])}),m}}),zR}var ap,VR;function d9(){if(VR)return ap;VR=1,Li(),u9(),c9(),ku();var r=pt();return ap=r.Map,ap}var up,KR;function h9(){if(KR)return up;KR=1;var r=d9();return zi(),up=r,up}var lp,GR;function f9(){return GR||(GR=1,lp=h9()),lp}var p9=f9(),a3=Te(p9),YR={},XR;function v9(){if(XR)return YR;XR=1;var r=me(),e=Cs().some,t=Bu(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),YR}var cp,JR;function g9(){if(JR)return cp;JR=1,v9();var r=Gt();return cp=r("Array","some"),cp}var dp,QR;function m9(){if(QR)return dp;QR=1;var r=yt(),e=g9(),t=Array.prototype;return dp=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},dp}var hp,ZR;function y9(){if(ZR)return hp;ZR=1;var r=m9();return hp=r,hp}var fp,eC;function b9(){return eC||(eC=1,fp=y9()),fp}var _9=b9(),w9=Te(_9),pp,tC;function E9(){if(tC)return pp;tC=1,Li();var r=Gt();return pp=r("Array","keys"),pp}var vp,rC;function S9(){if(rC)return vp;rC=1;var r=E9();return vp=r,vp}var gp,iC;function O9(){if(iC)return gp;iC=1,zi();var r=Bi(),e=bt(),t=yt(),i=S9(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return gp=function(o){var a=o.keys;return o===n||t(n,o)&&a===n.keys||e(s,r(o))?i:a},gp}var mp,nC;function I9(){return nC||(nC=1,mp=O9()),mp}var T9=I9(),Hn=Te(T9),sC={},yp,oC;function $9(){if(oC)return yp;oC=1;var r=Rs(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var I="",_,E,T,R;for(_=65;_<76;_++){switch(E=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)p.push({k:E+R,v:T})}for(p.sort(function(x,C){return C.v-x.v}),R=0;Ro(E)?1:-1}};return r({target:"Array",proto:!0,forced:S},{sort:function(_){_!==void 0&&t(_);var E=i(this);if(y)return _===void 0?v(E):v(E,_);var T=[],R=n(E),x,C;for(C=0;C"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Mp=crypto.getRandomValues.bind(crypto)}return Mp(J9)}const Z9=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var IC={randomUUID:Z9};function eY(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Q9();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,X9(i)}function tY(r,e,t){return IC.randomUUID?IC.randomUUID():eY(r)}function TC(r){return typeof r=="string"||typeof r=="number"}class Hw{constructor(e){Si(this,"_queue",[]),Si(this,"_timeout",null),Si(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){const i=new Hw(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(t&&t.replace)for(let s=0;sthis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=k6(()=>{this.flush()},this.delay))}flush(){var e,t;dn(e=Oz(t=this._queue).call(t,0)).call(e,i=>{i.fn.apply(i.context||i.fn,i.args||[])})}}class iu{constructor(){Si(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Si(this,"subscribe",iu.prototype.on),Si(this,"unsubscribe",iu.prototype.off)}_trigger(e,t,i){var n;if(e==="*")throw new Error("Cannot trigger event *");dn(n=[...this._subscribers[e],...this._subscribers["*"]]).call(n,s=>{s(e,t,i??null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){var i;this._subscribers[e]=Yn(i=this._subscribers[e]).call(i,n=>n!==t)}}var $C={},PC={},RC;function rY(){if(RC)return PC;RC=1;var r=n3(),e=s3();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),PC}var CC;function iY(){return CC||(CC=1,rY()),$C}var xC={},Np,qC;function Tn(){if(qC)return Np;qC=1;var r=Os(),e=TypeError;return Np=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},Np}var Fp,DC;function $n(){if(DC)return Fp;DC=1;var r=er(),e=o3(),t=r("Set"),i=t.prototype;return Fp={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},Fp}var kp,AC;function Pn(){if(AC)return kp;AC=1;var r=Kt();return kp=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},kp}var Bp,MC;function sa(){if(MC)return Bp;MC=1;var r=Pn();return Bp=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},Bp}var jp,NC;function Ww(){if(NC)return jp;NC=1;var r=$n(),e=sa(),t=r.Set,i=r.add;return jp=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},jp}var Lp,FC;function oa(){return FC||(FC=1,Lp=function(r){return r.size}),Lp}var zp,kC;function nY(){return kC||(kC=1,zp=function(r){return{iterator:r,next:r.next,done:!1}}),zp}var Hp,BC;function Rn(){if(BC)return Hp;BC=1;var r=oi(),e=ai(),t=Kt(),i=Ps(),n=nY(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},Hp=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},Hp}var Wp,jC;function sY(){if(jC)return Wp;jC=1;var r=Tn(),e=$n(),t=Ww(),i=oa(),n=Rn(),s=sa(),o=Pn(),a=e.has,u=e.remove;return Wp=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},Wp}var Up,LC;function Cn(){return LC||(LC=1,Up=function(){return!1}),Up}var zC;function oY(){if(zC)return xC;zC=1;var r=me(),e=sY(),t=ke(),i=Cn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),xC}var HC={},Vp,WC;function aY(){if(WC)return Vp;WC=1;var r=Tn(),e=$n(),t=oa(),i=Rn(),n=sa(),s=Pn(),o=e.Set,a=e.add,u=e.has;return Vp=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},Vp}var UC;function uY(){if(UC)return HC;UC=1;var r=me(),e=ke(),t=aY(),i=Cn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),HC}var VC={},Kp,KC;function lY(){if(KC)return Kp;KC=1;var r=Tn(),e=$n().has,t=oa(),i=Rn(),n=sa(),s=Pn(),o=Lw();return Kp=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},Kp}var GC;function cY(){if(GC)return VC;GC=1;var r=me(),e=lY(),t=Cn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),VC}var YC={},Gp,XC;function dY(){if(XC)return Gp;XC=1;var r=Tn(),e=oa(),t=sa(),i=Rn();return Gp=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},Gp}var JC;function hY(){if(JC)return YC;JC=1;var r=me(),e=dY(),t=Cn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),YC}var QC={},Yp,ZC;function fY(){if(ZC)return Yp;ZC=1;var r=Tn(),e=$n().has,t=oa(),i=Rn(),n=Pn(),s=Lw();return Yp=function(a){var u=r(this),l=i(a);if(t(u)t[0])}toItemArray(){var e;return pr(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=w6(null);for(const[t,i]of this._pairs)e[t]=i;return e}toMap(){return new a3(this._pairs)}toIdSet(){return new rv(this.toIdArray())}toItemSet(){return new rv(this.toItemArray())}cache(){return new Zi([...this._pairs])}distinct(e){const t=new rv;for(const[i,n]of this._pairs)t.add(e(n,i));return t}filter(e){const t=this._pairs;return new Zi({*[Qn](){for(const[i,n]of t)e(n,i)&&(yield[i,n])}})}forEach(e){for(const[t,i]of this._pairs)e(i,t)}map(e){const t=this._pairs;return new Zi({*[Qn](){for(const[i,n]of t)yield[i,e(n,i)]}})}max(e){const t=lv(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u>s&&(s=u,n=a)}return n}min(e){const t=lv(this._pairs);let i=t.next();if(i.done)return null;let n=i.value[1],s=e(i.value[1],i.value[0]);for(;!(i=t.next()).done;){const[o,a]=i.value,u=e(a,o);u{var t;return lv(k_(t=[...this._pairs]).call(t,(i,n)=>{let[s,o]=i,[a,u]=n;return e(o,u,s,a)}))}})}}function mx(r,e){var t=Dw(r);if(oR){var i=oR(r);e&&(i=Yn(i).call(i,function(n){return Zz(r,n).enumerable})),t.push.apply(t,i)}return t}function yx(r){for(var e=1;eo[this._idProp]);if(w9(s).call(s,o=>this._data.has(o)))throw new Error("A duplicate id was found in the parameter array.");for(let o=0,a=e.length;o{const c=l[a];if(c!=null&&this._data.has(c)){const d=l,h=l6({},this._data.get(c)),f=this._updateItem(d);n.push(f),o.push(d),s.push(h)}else{const d=this._addItem(l);i.push(d)}};if($r(e))for(let l=0,c=e.length;l{const o=this._data.get(s[this._idProp]);if(o==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:o,update:s}})).call(i,s=>{let{oldData:o,update:a}=s;const u=o[this._idProp],l=P8(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(n.length){const s={items:pr(n).call(n,o=>o.id),oldData:pr(n).call(n,o=>o.oldData),data:pr(n).call(n,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let i,n,s;TC(e)?(i=e,s=t):$r(e)?(n=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&Yn(s),u=[];let l,c,d;if(i!=null)l=this._data.get(i),l&&a&&!a(l)&&(l=void 0);else if(n!=null)for(let f=0,p=n.length;f(n[s]=e[s],n),{})}_sort(e,t){if(typeof t=="string"){const i=t;k_(e).call(e,(n,s)=>{const o=n[i],a=s[i];return o>a?1:oi)&&(t=s,i=o)}return t||null}min(e){let t=null,i=null;for(const s of bC(n=this._data).call(n)){var n;const o=s[e];typeof o=="number"&&(i==null||o"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},gv}var mv={},yv,Px;function rt(){if(Px)return yv;Px=1;var r=Te();return yv=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),yv}var bv,Rx;function Yt(){if(Rx)return bv;Rx=1;var r=aa(),e=Function.prototype.call;return bv=r?e.bind(e):function(){return e.apply(e,arguments)},bv}var _v={},Cx;function Hu(){if(Cx)return _v;Cx=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return _v.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,_v}var wv,xx;function ua(){return xx||(xx=1,wv=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),wv}var Ev,qx;function Wu(){if(qx)return Ev;qx=1;var r=Ce(),e=Te(),t=Br(),i=Object,n=r("".split);return Ev=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,Ev}var Sv,Dx;function Ds(){return Dx||(Dx=1,Sv=function(r){return r==null}),Sv}var Ov,Ax;function ui(){if(Ax)return Ov;Ax=1;var r=Ds(),e=TypeError;return Ov=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Ov}var Iv,Mx;function Sr(){if(Mx)return Iv;Mx=1;var r=Wu(),e=ui();return Iv=function(t){return r(e(t))},Iv}var Tv,Nx;function Et(){if(Nx)return Tv;Nx=1;var r=wt();return Tv=function(e){return typeof e=="object"?e!==null:r(e)},Tv}var $v,Fx;function Be(){return Fx||(Fx=1,$v={}),$v}var Pv,kx;function er(){if(kx)return Pv;kx=1;var r=Be(),e=Ye(),t=wt(),i=function(n){return t(n)?n:void 0};return Pv=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},Pv}var Rv,Bx;function dt(){if(Bx)return Rv;Bx=1;var r=Ce();return Rv=r({}.isPrototypeOf),Rv}var Cv,jx;function As(){if(jx)return Cv;jx=1;var r=Ye(),e=r.navigator,t=e&&e.userAgent;return Cv=t?String(t):"",Cv}var xv,Lx;function la(){if(Lx)return xv;Lx=1;var r=Ye(),e=As(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),xv=a,xv}var qv,zx;function Ms(){if(zx)return qv;zx=1;var r=la(),e=Te(),t=Ye(),i=t.String;return qv=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),qv}var Dv,Hx;function l3(){if(Hx)return Dv;Hx=1;var r=Ms();return Dv=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Dv}var Av,Wx;function ca(){if(Wx)return Av;Wx=1;var r=er(),e=wt(),t=dt(),i=l3(),n=Object;return Av=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},Av}var Mv,Ux;function Ns(){if(Ux)return Mv;Ux=1;var r=String;return Mv=function(e){try{return r(e)}catch{return"Object"}},Mv}var Nv,Vx;function li(){if(Vx)return Nv;Vx=1;var r=wt(),e=Ns(),t=TypeError;return Nv=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},Nv}var Fv,Kx;function Uw(){if(Kx)return Fv;Kx=1;var r=li(),e=Ds();return Fv=function(t,i){var n=t[i];return e(n)?void 0:r(n)},Fv}var kv,Gx;function qY(){if(Gx)return kv;Gx=1;var r=Yt(),e=wt(),t=Et(),i=TypeError;return kv=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},kv}var Bv={exports:{}},jv,Yx;function Fs(){return Yx||(Yx=1,jv=!0),jv}var Lv,Xx;function DY(){if(Xx)return Lv;Xx=1;var r=Ye(),e=Object.defineProperty;return Lv=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Lv}var Jx;function Vw(){if(Jx)return Bv.exports;Jx=1;var r=Fs(),e=Ye(),t=DY(),i="__core-js_shared__",n=Bv.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Bv.exports}var zv,Qx;function ks(){if(Qx)return zv;Qx=1;var r=Vw();return zv=function(e,t){return r[e]||(r[e]=t||{})},zv}var Hv,Zx;function tr(){if(Zx)return Hv;Zx=1;var r=ui(),e=Object;return Hv=function(t){return e(r(t))},Hv}var Wv,eq;function It(){if(eq)return Wv;eq=1;var r=Ce(),e=tr(),t=r({}.hasOwnProperty);return Wv=Object.hasOwn||function(n,s){return t(e(n),s)},Wv}var Uv,tq;function Uu(){if(tq)return Uv;tq=1;var r=Ce(),e=0,t=Math.random(),i=r(1.1.toString);return Uv=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Uv}var Vv,rq;function ht(){if(rq)return Vv;rq=1;var r=Ye(),e=ks(),t=It(),i=Uu(),n=Ms(),s=l3(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Vv=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Vv}var Kv,iq;function c3(){if(iq)return Kv;iq=1;var r=Yt(),e=Et(),t=ca(),i=Uw(),n=qY(),s=ht(),o=TypeError,a=s("toPrimitive");return Kv=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Kv}var Gv,nq;function Kw(){if(nq)return Gv;nq=1;var r=c3(),e=ca();return Gv=function(t){var i=r(t,"string");return e(i)?i:i+""},Gv}var Yv,sq;function d3(){if(sq)return Yv;sq=1;var r=Ye(),e=Et(),t=r.document,i=e(t)&&e(t.createElement);return Yv=function(n){return i?t.createElement(n):{}},Yv}var Xv,oq;function h3(){if(oq)return Xv;oq=1;var r=rt(),e=Te(),t=d3();return Xv=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Xv}var aq;function Vu(){if(aq)return mv;aq=1;var r=rt(),e=Yt(),t=Hu(),i=ua(),n=Sr(),s=Kw(),o=It(),a=h3(),u=Object.getOwnPropertyDescriptor;return mv.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},mv}var Jv,uq;function AY(){if(uq)return Jv;uq=1;var r=Te(),e=wt(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return Jv=i,Jv}var Qv,lq;function Ku(){if(lq)return Qv;lq=1;var r=Ww(),e=li(),t=aa(),i=r(r.bind);return Qv=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},Qv}var Zv={},eg,cq;function f3(){if(cq)return eg;cq=1;var r=rt(),e=Te();return eg=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),eg}var tg,dq;function jr(){if(dq)return tg;dq=1;var r=Et(),e=String,t=TypeError;return tg=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},tg}var hq;function cr(){if(hq)return Zv;hq=1;var r=rt(),e=h3(),t=f3(),i=jr(),n=Kw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Zv.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},Zv}var rg,fq;function Bs(){if(fq)return rg;fq=1;var r=rt(),e=cr(),t=ua();return rg=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},rg}var ig,pq;function ce(){if(pq)return ig;pq=1;var r=Ye(),e=zu(),t=Ww(),i=wt(),n=Vu().f,s=AY(),o=Be(),a=Ku(),u=Bs(),l=It(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return ig=function(d,h){var f=d.target,p=d.global,v=d.stat,b=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],w=g.prototype,y,S,O,I,_,E,T,R,x;for(I in h)y=s(p?I:f+(v?".":"#")+I,d.forced),S=!y&&m&&l(m,I),E=g[I],S&&(d.dontCallGetSet?(x=n(m,I),T=x&&x.value):T=m[I]),_=S&&T?T:h[I],!(!y&&!b&&typeof E==typeof _)&&(d.bind&&S?R=a(_,r):d.wrap&&S?R=c(_):b&&i(_)?R=t(_):R=_,(d.sham||_&&_.sham||E&&E.sham)&&u(R,"sham",!0),u(g,I,R),b&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,_),d.real&&w&&(y||!w[I])&&u(w,I,_)))},ig}var ng,vq;function MY(){if(vq)return ng;vq=1;var r=Math.ceil,e=Math.floor;return ng=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},ng}var sg,gq;function js(){if(gq)return sg;gq=1;var r=MY();return sg=function(e){var t=+e;return t!==t||t===0?0:r(t)},sg}var og,mq;function Gu(){if(mq)return og;mq=1;var r=js(),e=Math.max,t=Math.min;return og=function(i,n){var s=r(i);return s<0?e(s+n,0):t(s,n)},og}var ag,yq;function p3(){if(yq)return ag;yq=1;var r=js(),e=Math.min;return ag=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},ag}var ug,bq;function ci(){if(bq)return ug;bq=1;var r=p3();return ug=function(e){return r(e.length)},ug}var lg,_q;function Gw(){if(_q)return lg;_q=1;var r=Sr(),e=Gu(),t=ci(),i=function(n){return function(s,o,a){var u=r(s),l=t(u);if(l===0)return!n&&-1;var c=e(a,l),d;if(n&&o!==o){for(;l>c;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return lg={includes:i(!0),indexOf:i(!1)},lg}var cg,wq;function da(){return wq||(wq=1,cg={}),cg}var dg,Eq;function v3(){if(Eq)return dg;Eq=1;var r=Ce(),e=It(),t=Sr(),i=Gw().indexOf,n=da(),s=r([].push);return dg=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},dg}var hg,Sq;function Yw(){return Sq||(Sq=1,hg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),hg}var fg,Oq;function ha(){if(Oq)return fg;Oq=1;var r=v3(),e=Yw();return fg=Object.keys||function(i){return r(i,e)},fg}var pg={},Iq;function Yu(){return Iq||(Iq=1,pg.f=Object.getOwnPropertySymbols),pg}var vg,Tq;function NY(){if(Tq)return vg;Tq=1;var r=rt(),e=Ce(),t=Yt(),i=Te(),n=ha(),s=Yu(),o=Hu(),a=tr(),u=Wu(),l=Object.assign,c=Object.defineProperty,d=e([].concat);return vg=!l||i(function(){if(r&&l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},f={},p=Symbol("assign detection"),v="abcdefghijklmnopqrst";return h[p]=7,v.split("").forEach(function(b){f[b]=b}),l({},h)[p]!==7||n(l({},f)).join("")!==v})?function(f,p){for(var v=a(f),b=arguments.length,m=1,g=s.f,w=o.f;b>m;)for(var y=u(arguments[m++]),S=g?d(n(y),g(y)):n(y),O=S.length,I=0,_;O>I;)_=S[I++],(!r||t(w,y,_))&&(v[_]=y[_]);return v}:l,vg}var $q;function FY(){if($q)return bx;$q=1;var r=ce(),e=NY();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),bx}var gg,Pq;function kY(){if(Pq)return gg;Pq=1,FY();var r=Be();return gg=r.Object.assign,gg}var mg,Rq;function BY(){if(Rq)return mg;Rq=1;var r=kY();return mg=r,mg}var yg,Cq;function jY(){return Cq||(Cq=1,yg=BY()),yg}var LY=jY(),ot=pe(LY),xq={},bg,qq;function Ls(){if(qq)return bg;qq=1;var r=Ce();return bg=r([].slice),bg}var _g,Dq;function zY(){if(Dq)return _g;Dq=1;var r=Ce(),e=li(),t=Et(),i=It(),n=Ls(),s=aa(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=.1;)p=+s[d++%o],p>c&&(p=c),f=Math.sqrt(p*p/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,h===!0?r.lineTo(e,t):r.moveTo(e,t),c-=p,h=!h}function e7(r,e,t,i){r.beginPath();const n=6,s=Math.PI*2/n;r.moveTo(e+i,t);for(let o=1;o1?t-1:0),n=1;ne)throw r("Maximum allowed index exceeded");return t},Pg}var Rg,Uq;function Xu(){if(Uq)return Rg;Uq=1;var r=rt(),e=cr(),t=ua();return Rg=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Rg}var Cg,Vq;function Jw(){if(Vq)return Cg;Vq=1;var r=ht(),e=r("toStringTag"),t={};return t[e]="z",Cg=String(t)==="[object z]",Cg}var xg,Kq;function zs(){if(Kq)return xg;Kq=1;var r=Jw(),e=wt(),t=Br(),i=ht(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return xg=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},xg}var qg,Gq;function n7(){if(Gq)return qg;Gq=1;var r=Ce(),e=wt(),t=Vw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),qg=t.inspectSource,qg}var Dg,Yq;function w3(){if(Yq)return Dg;Yq=1;var r=Ce(),e=Te(),t=wt(),i=zs(),n=er(),s=n7(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,Dg=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,Dg}var Ag,Xq;function s7(){if(Xq)return Ag;Xq=1;var r=xn(),e=w3(),t=Et(),i=ht(),n=i("species"),s=Array;return Ag=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},Ag}var Mg,Jq;function Qw(){if(Jq)return Mg;Jq=1;var r=s7();return Mg=function(e,t){return new(r(e))(t===0?0:t)},Mg}var Ng,Qq;function fa(){if(Qq)return Ng;Qq=1;var r=Te(),e=ht(),t=la(),i=e("species");return Ng=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},Ng}var Zq;function E3(){if(Zq)return zq;Zq=1;var r=ce(),e=Te(),t=xn(),i=Et(),n=tr(),s=ci(),o=_3(),a=Xu(),u=Qw(),l=fa(),c=ht(),d=la(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var b=[];return b[h]=!1,b.concat()[0]!==b}),p=function(b){if(!i(b))return!1;var m=b[h];return m!==void 0?!!m:t(b)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),w=u(g,0),y=0,S,O,I,_,E;for(S=-1,I=arguments.length;Sh;)t.f(a,f=c[h++],l[f]);return a},kg}var Bg,nD;function o7(){if(nD)return Bg;nD=1;var r=er();return Bg=r("document","documentElement"),Bg}var jg,sD;function Ju(){if(sD)return jg;sD=1;var r=ks(),e=Uu(),t=r("keys");return jg=function(i){return t[i]||(t[i]=e(i))},jg}var Lg,oD;function pa(){if(oD)return Lg;oD=1;var r=jr(),e=Zw(),t=Yw(),i=da(),n=o7(),s=d3(),o=Ju(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var w=g.parentWindow.Object;return g=null,w},v=function(){var g=s("iframe"),w="java"+c+":",y;return g.style.display="none",n.appendChild(g),g.src=String(w),y=g.contentWindow.document,y.open(),y.write(f("document.F=Object")),y.close(),y.F},b,m=function(){try{b=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&b?p(b):v():p(b);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,Lg=Object.create||function(w,y){var S;return w!==null?(h[l]=r(w),S=new h,h[l]=null,S[d]=w):S=m(),y===void 0?S:e.f(S,y)},Lg}var zg={},aD;function Qu(){if(aD)return zg;aD=1;var r=v3(),e=Yw(),t=e.concat("length","prototype");return zg.f=Object.getOwnPropertyNames||function(n){return r(n,t)},zg}var Hg={},uD;function e0(){if(uD)return Hg;uD=1;var r=Br(),e=Sr(),t=Qu().f,i=Ls(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Hg.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Hg}var Wg,lD;function va(){if(lD)return Wg;lD=1;var r=Bs();return Wg=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Wg}var Ug,cD;function t0(){if(cD)return Ug;cD=1;var r=cr();return Ug=function(e,t,i){return r.f(e,t,i)},Ug}var Vg={},dD;function Zu(){if(dD)return Vg;dD=1;var r=ht();return Vg.f=r,Vg}var Kg,hD;function Je(){if(hD)return Kg;hD=1;var r=Be(),e=It(),t=Zu(),i=cr().f;return Kg=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Kg}var Gg,fD;function S3(){if(fD)return Gg;fD=1;var r=Yt(),e=er(),t=ht(),i=va();return Gg=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},Gg}var Yg,pD;function a7(){if(pD)return Yg;pD=1;var r=Jw(),e=zs();return Yg=r?{}.toString:function(){return"[object "+e(this)+"]"},Yg}var Xg,vD;function qn(){if(vD)return Xg;vD=1;var r=Jw(),e=cr().f,t=Bs(),i=It(),n=a7(),s=ht(),o=s("toStringTag");return Xg=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},Xg}var Jg,gD;function O3(){if(gD)return Jg;gD=1;var r=Ye(),e=wt(),t=r.WeakMap;return Jg=e(t)&&/native code/.test(String(t)),Jg}var Qg,mD;function Dn(){if(mD)return Qg;mD=1;var r=O3(),e=Ye(),t=Et(),i=Bs(),n=It(),s=Vw(),o=Ju(),a=da(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=function(g){return function(w){var y;if(!t(w)||(y=h(w)).type!==g)throw new l("Incompatible receiver, "+g+" required");return y}};if(r||s.state){var b=s.state||(s.state=new c);b.get=b.get,b.has=b.has,b.set=b.set,d=function(g,w){if(b.has(g))throw new l(u);return w.facade=g,b.set(g,w),w},h=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var m=o("state");a[m]=!0,d=function(g,w){if(n(g,m))throw new l(u);return w.facade=g,i(g,m,w),w},h=function(g){return n(g,m)?g[m]:{}},f=function(g){return n(g,m)}}return Qg={set:d,get:h,has:f,enforce:p,getterFor:v},Qg}var Zg,yD;function Hi(){if(yD)return Zg;yD=1;var r=Ku(),e=Ce(),t=Wu(),i=tr(),n=ci(),s=Qw(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(b,m,g,w){for(var y=i(b),S=t(y),O=n(S),I=r(m,g),_=0,E=w||s,T=l?E(b,O):c||p?E(b,0):void 0,R,x;O>_;_++)if((v||_ in S)&&(R=S[_],x=I(R,_,y),u))if(l)T[_]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return _;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return Zg={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Zg}var bD;function u7(){if(bD)return tD;bD=1;var r=ce(),e=Ye(),t=Yt(),i=Ce(),n=Fs(),s=rt(),o=Ms(),a=Te(),u=It(),l=dt(),c=jr(),d=Sr(),h=Kw(),f=dr(),p=ua(),v=pa(),b=ha(),m=Qu(),g=e0(),w=Yu(),y=Vu(),S=cr(),O=Zw(),I=Hu(),_=va(),E=t0(),T=ks(),R=Ju(),x=da(),C=Uu(),D=ht(),j=Zu(),ee=Je(),H=S3(),Z=qn(),fe=Dn(),_e=Hi().forEach,te=R("hidden"),ge="Symbol",xe="prototype",De=fe.set,it=fe.getterFor(ge),be=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ie=e.TypeError,$e=e.QObject,$=y.f,P=S.f,q=g.f,F=I.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!$e||!$e[xe]||!$e[xe].findChild,B=function(oe,V,Q){var re=$(be,V);re&&delete be[V],P(oe,V,Q),re&&oe!==be&&P(be,V,re)},le=s&&a(function(){return v(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(oe,V){var Q=N[oe]=v(W);return De(Q,{type:ge,tag:oe,description:V}),s||(Q.description=V),Q},se=function(V,Q,re){V===be&&se(K,Q,re),c(V);var ne=h(Q);return c(re),u(N,ne)?(re.enumerable?(u(V,te)&&V[te][ne]&&(V[te][ne]=!1),re=v(re,{enumerable:p(0,!1)})):(u(V,te)||P(V,te,p(1,v(null))),V[te][ne]=!0),le(V,ne,re)):P(V,ne,re)},de=function(V,Q){c(V);var re=d(Q),ne=b(re).concat(nt(re));return _e(ne,function(we){(!s||t(qe,re,we))&&se(V,we,re[we])}),V},Se=function(V,Q){return Q===void 0?v(V):de(v(V),Q)},qe=function(V){var Q=h(V),re=t(F,this,Q);return this===be&&u(N,Q)&&!u(K,Q)?!1:re||!u(this,Q)||!u(N,Q)||u(this,te)&&this[te][Q]?re:!0},Pe=function(V,Q){var re=d(V),ne=h(Q);if(!(re===be&&u(N,ne)&&!u(K,ne))){var we=$(re,ne);return we&&u(N,ne)&&!(u(re,te)&&re[te][ne])&&(we.enumerable=!0),we}},ft=function(V){var Q=q(d(V)),re=[];return _e(Q,function(ne){!u(N,ne)&&!u(x,ne)&&k(re,ne)}),re},nt=function(oe){var V=oe===be,Q=q(V?K:d(oe)),re=[];return _e(Q,function(ne){u(N,ne)&&(!V||u(be,ne))&&k(re,N[ne])}),re};return o||(A=function(){if(l(W,this))throw new ie("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Q=C(V),re=function(ne){var we=this===void 0?e:this;we===be&&t(re,K,ne),u(we,te)&&u(we[te],Q)&&(we[te][Q]=!1);var di=p(1,ne);try{le(we,Q,di)}catch(Ys){if(!(Ys instanceof Y))throw Ys;B(we,Q,di)}};return s&&U&&le(be,Q,{configurable:!0,set:re}),J(Q,V)},W=A[xe],_(W,"toString",function(){return it(this).tag}),_(A,"withoutSetter",function(oe){return J(C(oe),oe)}),I.f=qe,S.f=se,O.f=de,y.f=Pe,m.f=g.f=ft,w.f=nt,j.f=function(oe){return J(D(oe),oe)},s&&(E(W,"description",{configurable:!0,get:function(){return it(this).description}}),n||_(be,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),_e(b(X),function(oe){ee(oe)}),r({target:ge,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Se,defineProperty:se,defineProperties:de,getOwnPropertyDescriptor:Pe}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:ft}),H(),Z(A,ge),x[te]=!0,tD}var _D={},em,wD;function I3(){if(wD)return em;wD=1;var r=Ms();return em=r&&!!Symbol.for&&!!Symbol.keyFor,em}var ED;function l7(){if(ED)return _D;ED=1;var r=ce(),e=er(),t=It(),i=dr(),n=ks(),s=I3(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),_D}var SD={},OD;function c7(){if(OD)return SD;OD=1;var r=ce(),e=It(),t=ca(),i=Ns(),n=ks(),s=I3(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),SD}var ID={},tm,TD;function d7(){if(TD)return tm;TD=1;var r=Ce(),e=xn(),t=wt(),i=Br(),n=dr(),s=r([].push);return tm=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return gm}var mm,IA;function q7(){return IA||(IA=1,mm={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),mm}var TA;function Us(){if(TA)return cA;TA=1,Ws();var r=q7(),e=Ye(),t=qn(),i=Hs();for(var n in r)t(e[n],n),i[n]=i.Array;return cA}var ym,$A;function A3(){if($A)return ym;$A=1;var r=I7();return Us(),ym=r,ym}var bm,PA;function D7(){return PA||(PA=1,bm=A3()),bm}var A7=D7(),M7=pe(A7),RA={},CA;function N7(){if(CA)return RA;CA=1;var r=ce(),e=xn(),t=w3(),i=Et(),n=Gu(),s=ci(),o=Sr(),a=Xu(),u=ht(),l=fa(),c=Ls(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(b,m){var g=o(this),w=s(g),y=n(b,w),S=n(m===void 0?w:m,w),O,I,_;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:i(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return c(g,y,S);for(I=new(O===void 0?f:O)(p(S-y,0)),_=0;y1?arguments[1]:void 0)}}),LA}var Pm,HA;function Y7(){if(HA)return Pm;HA=1,G7();var r=Tt();return Pm=r("Array","map"),Pm}var Rm,WA;function X7(){if(WA)return Rm;WA=1;var r=dt(),e=Y7(),t=Array.prototype;return Rm=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Rm}var Cm,UA;function J7(){if(UA)return Cm;UA=1;var r=X7();return Cm=r,Cm}var xm,VA;function Q7(){return VA||(VA=1,xm=J7()),xm}var Z7=Q7(),ms=pe(Z7),KA={},GA;function eX(){if(GA)return KA;GA=1;var r=ce(),e=tr(),t=ha(),i=Te(),n=i(function(){t(1)});return r({target:"Object",stat:!0,forced:n},{keys:function(o){return t(e(o))}}),KA}var qm,YA;function tX(){if(YA)return qm;YA=1,eX();var r=Be();return qm=r.Object.keys,qm}var Dm,XA;function rX(){if(XA)return Dm;XA=1;var r=tX();return Dm=r,Dm}var Am,JA;function iX(){return JA||(JA=1,Am=rX()),Am}var nX=iX(),Ze=pe(nX),QA={},ZA;function sX(){if(ZA)return QA;ZA=1;var r=ce(),e=Ce(),t=Date,i=e(t.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return i(new t)}}),QA}var Mm,eM;function oX(){if(eM)return Mm;eM=1,sX();var r=Be();return Mm=r.Date.now,Mm}var Nm,tM;function aX(){if(tM)return Nm;tM=1;var r=oX();return Nm=r,Nm}var Fm,rM;function uX(){return rM||(rM=1,Fm=aX()),Fm}var lX=uX(),su=pe(lX),iM={},km,nM;function Vs(){if(nM)return km;nM=1;var r=Te();return km=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},km}var Bm,sM;function cX(){if(sM)return Bm;sM=1;var r=Hi().forEach,e=Vs(),t=e("forEach");return Bm=t?[].forEach:function(n){return r(this,n,arguments.length>1?arguments[1]:void 0)},Bm}var oM;function dX(){if(oM)return iM;oM=1;var r=ce(),e=cX();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),iM}var jm,aM;function hX(){if(aM)return jm;aM=1,dX();var r=Tt();return jm=r("Array","forEach"),jm}var Lm,uM;function fX(){if(uM)return Lm;uM=1;var r=hX();return Lm=r,Lm}var zm,lM;function pX(){if(lM)return zm;lM=1;var r=zs(),e=It(),t=dt(),i=fX(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return zm=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},zm}var Hm,cM;function vX(){return cM||(cM=1,Hm=pX()),Hm}var gX=vX(),Le=pe(gX),dM={},hM;function mX(){if(hM)return dM;hM=1;var r=ce(),e=Ce(),t=xn(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),dM}var Wm,fM;function yX(){if(fM)return Wm;fM=1,mX();var r=Tt();return Wm=r("Array","reverse"),Wm}var Um,pM;function bX(){if(pM)return Um;pM=1;var r=dt(),e=yX(),t=Array.prototype;return Um=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},Um}var Vm,vM;function _X(){if(vM)return Vm;vM=1;var r=bX();return Vm=r,Vm}var Km,gM;function wX(){return gM||(gM=1,Km=_X()),Km}var EX=wX(),on=pe(EX),mM={},Gm,yM;function SX(){if(yM)return Gm;yM=1;var r=rt(),e=xn(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return Gm=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},Gm}var Ym,bM;function M3(){if(bM)return Ym;bM=1;var r=Ns(),e=TypeError;return Ym=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},Ym}var _M;function OX(){if(_M)return mM;_M=1;var r=ce(),e=tr(),t=Gu(),i=js(),n=ci(),s=SX(),o=_3(),a=Qw(),u=Xu(),l=M3(),c=fa(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,b){var m=e(this),g=n(m),w=t(v,g),y=arguments.length,S,O,I,_,E,T;for(y===0?S=O=0:y===1?(S=0,O=g-w):(S=y-2,O=f(h(i(b),0),g-w)),o(g+S-O),I=a(m,O),_=0;_g-O+S;_--)l(m,_-1)}else if(S>O)for(_=g-O;_>w;_--)E=_+O-1,T=_+S-1,E in m?m[T]=m[E]:l(m,T);for(_=0;_1?arguments[1]:void 0)}}),i("includes"),IM}var ey,$M;function xX(){if($M)return ey;$M=1,CX();var r=Tt();return ey=r("Array","includes"),ey}var PM={},ty,RM;function qX(){if(RM)return ty;RM=1;var r=Et(),e=Br(),t=ht(),i=t("match");return ty=function(n){var s;return r(n)&&((s=n[i])!==void 0?!!s:e(n)==="RegExp")},ty}var ry,CM;function DX(){if(CM)return ry;CM=1;var r=qX(),e=TypeError;return ry=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},ry}var iy,xM;function AX(){if(xM)return iy;xM=1;var r=ht(),e=r("match");return iy=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[e]=!1,"/./"[t](i)}catch{}}return!1},iy}var qM;function MX(){if(qM)return PM;qM=1;var r=ce(),e=Ce(),t=DX(),i=ui(),n=dr(),s=AX(),o=e("".indexOf);return r({target:"String",proto:!0,forced:!s("includes")},{includes:function(u){return!!~o(n(i(this)),n(t(u)),arguments.length>1?arguments[1]:void 0)}}),PM}var ny,DM;function NX(){if(DM)return ny;DM=1,MX();var r=Tt();return ny=r("String","includes"),ny}var sy,AM;function FX(){if(AM)return sy;AM=1;var r=dt(),e=xX(),t=NX(),i=Array.prototype,n=String.prototype;return sy=function(s){var o=s.includes;return s===i||r(i,s)&&o===i.includes?e:typeof s=="string"||s===n||r(n,s)&&o===n.includes?t:o},sy}var oy,MM;function kX(){if(MM)return oy;MM=1;var r=FX();return oy=r,oy}var ay,NM;function BX(){return NM||(NM=1,ay=kX()),ay}var jX=BX(),Ii=pe(jX),FM={},kM;function LX(){if(kM)return FM;kM=1;var r=ce(),e=Te(),t=tr(),i=el(),n=q3(),s=e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getPrototypeOf:function(a){return i(t(a))}}),FM}var uy,BM;function zX(){if(BM)return uy;BM=1,LX();var r=Be();return uy=r.Object.getPrototypeOf,uy}var ly,jM;function HX(){if(jM)return ly;jM=1;var r=zX();return ly=r,ly}var cy,LM;function WX(){return LM||(LM=1,cy=HX()),cy}var UX=WX(),zM=pe(UX),dy,HM;function VX(){if(HM)return dy;HM=1,E3();var r=Tt();return dy=r("Array","concat"),dy}var hy,WM;function KX(){if(WM)return hy;WM=1;var r=dt(),e=VX(),t=Array.prototype;return hy=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},hy}var fy,UM;function GX(){if(UM)return fy;UM=1;var r=KX();return fy=r,fy}var py,VM;function YX(){return VM||(VM=1,py=GX()),py}var XX=YX(),JX=pe(XX),KM={},GM;function QX(){if(GM)return KM;GM=1;var r=ce(),e=Hi().filter,t=fa(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),KM}var vy,YM;function ZX(){if(YM)return vy;YM=1,QX();var r=Tt();return vy=r("Array","filter"),vy}var gy,XM;function eJ(){if(XM)return gy;XM=1;var r=dt(),e=ZX(),t=Array.prototype;return gy=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},gy}var my,JM;function tJ(){if(JM)return my;JM=1;var r=eJ();return my=r,my}var yy,QM;function rJ(){return QM||(QM=1,yy=tJ()),yy}var iJ=rJ(),Wt=pe(iJ),ZM={},by,eN;function nJ(){if(eN)return by;eN=1;var r=rt(),e=Te(),t=Ce(),i=el(),n=ha(),s=Sr(),o=Hu().f,a=t(o),u=t([].push),l=r&&e(function(){var d=Object.create(null);return d[2]=2,!a(d,2)}),c=function(d){return function(h){for(var f=s(h),p=n(f),v=l&&i(f)===null,b=p.length,m=0,g=[],w;b>m;)w=p[m++],(!r||(v?w in f:a(f,w)))&&u(g,d?[w,f[w]]:f[w]);return g}};return by={entries:c(!0),values:c(!1)},by}var tN;function sJ(){if(tN)return ZM;tN=1;var r=ce(),e=nJ().values;return r({target:"Object",stat:!0},{values:function(i){return e(i)}}),ZM}var _y,rN;function oJ(){if(rN)return _y;rN=1,sJ();var r=Be();return _y=r.Object.values,_y}var wy,iN;function aJ(){if(iN)return wy;iN=1;var r=oJ();return wy=r,wy}var Ey,nN;function uJ(){return nN||(nN=1,Ey=aJ()),Ey}var lJ=uJ(),cJ=pe(lJ),sN={},Sy,oN;function s0(){return oN||(oN=1,Sy=` -\v\f\r                 \u2028\u2029\uFEFF`),Sy}var Oy,aN;function N3(){if(aN)return Oy;aN=1;var r=Ce(),e=ui(),t=dr(),i=s0(),n=r("".replace),s=RegExp("^["+i+"]+"),o=RegExp("(^|[^"+i+"])["+i+"]+$"),a=function(u){return function(l){var c=t(e(l));return u&1&&(c=n(c,s,"")),u&2&&(c=n(c,o,"$1")),c}};return Oy={start:a(1),end:a(2),trim:a(3)},Oy}var Iy,uN;function dJ(){if(uN)return Iy;uN=1;var r=Ye(),e=Te(),t=Ce(),i=dr(),n=N3().trim,s=s0(),o=r.parseInt,a=r.Symbol,u=a&&a.iterator,l=/^[+-]?0x/i,c=t(l.exec),d=o(s+"08")!==8||o(s+"0x16")!==22||u&&!e(function(){o(Object(u))});return Iy=d?function(f,p){var v=n(i(f));return o(v,p>>>0||(c(l,v)?16:10))}:o,Iy}var lN;function hJ(){if(lN)return sN;lN=1;var r=ce(),e=dJ();return r({global:!0,forced:parseInt!==e},{parseInt:e}),sN}var Ty,cN;function fJ(){if(cN)return Ty;cN=1,hJ();var r=Be();return Ty=r.parseInt,Ty}var $y,dN;function pJ(){if(dN)return $y;dN=1;var r=fJ();return $y=r,$y}var Py,hN;function vJ(){return hN||(hN=1,Py=pJ()),Py}var gJ=vJ(),vr=pe(gJ),fN={},pN;function mJ(){if(pN)return fN;pN=1;var r=ce(),e=Ww(),t=Gw().indexOf,i=Vs(),n=e([].indexOf),s=!!n&&1/n([1],1,-0)<0,o=s||!i("indexOf");return r({target:"Array",proto:!0,forced:o},{indexOf:function(u){var l=arguments.length>1?arguments[1]:void 0;return s?n(this,u,l)||0:t(this,u,l)}}),fN}var Ry,vN;function yJ(){if(vN)return Ry;vN=1,mJ();var r=Tt();return Ry=r("Array","indexOf"),Ry}var Cy,gN;function bJ(){if(gN)return Cy;gN=1;var r=dt(),e=yJ(),t=Array.prototype;return Cy=function(i){var n=i.indexOf;return i===t||r(t,i)&&n===t.indexOf?e:n},Cy}var xy,mN;function _J(){if(mN)return xy;mN=1;var r=bJ();return xy=r,xy}var qy,yN;function wJ(){return yN||(yN=1,qy=_J()),qy}var EJ=wJ(),Fe=pe(EJ),bN={},_N;function SJ(){if(_N)return bN;_N=1;var r=ce(),e=rt(),t=pa();return r({target:"Object",stat:!0,sham:!e},{create:t}),bN}var Dy,wN;function OJ(){if(wN)return Dy;wN=1,SJ();var r=Be(),e=r.Object;return Dy=function(i,n){return e.create(i,n)},Dy}var Ay,EN;function IJ(){if(EN)return Ay;EN=1;var r=OJ();return Ay=r,Ay}var My,SN;function TJ(){return SN||(SN=1,My=IJ()),My}var $J=TJ(),an=pe($J),ON={},Ny,IN;function PJ(){if(IN)return Ny;IN=1;var r=js(),e=dr(),t=ui(),i=RangeError;return Ny=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},Ny}var Fy,TN;function RJ(){if(TN)return Fy;TN=1;var r=Ce(),e=p3(),t=dr(),i=PJ(),n=ui(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,b=h===void 0?" ":t(h),m,g;return p<=v||b===""?f:(m=p-v,g=s(b,a(m/b.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Fy={start:u(!1),end:u(!0)},Fy}var ky,$N;function CJ(){if($N)return ky;$N=1;var r=Ce(),e=Te(),t=RJ().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return ky=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var m=this,g=c(m),w=h(m),y=g<0?"-":g>9999?"+":"";return y+t(s(g),y?6:4,0)+"-"+t(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(w,3,0)+"Z"}:a,ky}var PN;function xJ(){if(PN)return ON;PN=1;var r=ce(),e=Yt(),t=tr(),i=c3(),n=CJ(),s=Br(),o=Te(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),ON}var By,RN;function qJ(){if(RN)return By;RN=1,xJ(),T3();var r=Be(),e=zu();return r.JSON||(r.JSON={stringify:JSON.stringify}),By=function(i,n,s){return e(r.JSON.stringify,null,arguments)},By}var jy,CN;function DJ(){if(CN)return jy;CN=1;var r=qJ();return jy=r,jy}var Ly,xN;function AJ(){return xN||(xN=1,Ly=DJ()),Ly}var MJ=AJ(),ga=pe(MJ),qN={},DN={},zy,AN;function F3(){if(AN)return zy;AN=1;var r=Ye(),e=As(),t=Br(),i=function(n){return e.slice(0,n.length)===n};return zy=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),zy}var Hy,MN;function NJ(){if(MN)return Hy;MN=1;var r=TypeError;return Hy=function(e,t){if(ed,v=t(h)?h:a(h),b=p?s(arguments,d):[],m=p?function(){e(v,this,b)}:v;return c?l(m,f):l(m)}:l},Wy}var FN;function FJ(){if(FN)return DN;FN=1;var r=ce(),e=Ye(),t=k3(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),DN}var kN={},BN;function kJ(){if(BN)return kN;BN=1;var r=ce(),e=Ye(),t=k3(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),kN}var jN;function B3(){return jN||(jN=1,FJ(),kJ()),qN}var Uy,LN;function BJ(){if(LN)return Uy;LN=1,B3();var r=Be();return Uy=r.setTimeout,Uy}var Vy,zN;function jJ(){return zN||(zN=1,Vy=BJ()),Vy}var LJ=jJ(),Zr=pe(LJ),HN={},Ky,WN;function zJ(){if(WN)return Ky;WN=1;var r=tr(),e=Gu(),t=ci();return Ky=function(n){for(var s=r(this),o=t(s),a=arguments.length,u=e(a>1?arguments[1]:void 0,o),l=a>2?arguments[2]:void 0,c=l===void 0?o:e(l,o);c>u;)s[u++]=n;return s},Ky}var UN;function HJ(){if(UN)return HN;UN=1;var r=ce(),e=zJ(),t=r0();return r({target:"Array",proto:!0},{fill:e}),t("fill"),HN}var Gy,VN;function WJ(){if(VN)return Gy;VN=1,HJ();var r=Tt();return Gy=r("Array","fill"),Gy}var Yy,KN;function UJ(){if(KN)return Yy;KN=1;var r=dt(),e=WJ(),t=Array.prototype;return Yy=function(i){var n=i.fill;return i===t||r(t,i)&&n===t.fill?e:n},Yy}var Xy,GN;function VJ(){if(GN)return Xy;GN=1;var r=UJ();return Xy=r,Xy}var Jy,YN;function KJ(){return YN||(YN=1,Jy=VJ()),Jy}var GJ=KJ(),ma=pe(GJ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 + */var bx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var _x={},to,wx;function Ye(){if(wx)return to;wx=1;var r=function(e){return e&&e.Math===Math&&e};return to=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof bx=="object"&&bx)||r(typeof to=="object"&&to)||function(){return this}()||Function("return this")(),to}var cv,Ex;function $e(){return Ex||(Ex=1,cv=function(r){try{return!!r()}catch{return!0}}),cv}var dv,Sx;function aa(){if(Sx)return dv;Sx=1;var r=$e();return dv=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),dv}var hv,Ox;function zu(){if(Ox)return hv;Ox=1;var r=aa(),e=Function.prototype,t=e.apply,i=e.call;return hv=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)}),hv}var fv,Ix;function Ce(){if(Ix)return fv;Ix=1;var r=aa(),e=Function.prototype,t=e.call,i=r&&e.bind.bind(t,t);return fv=r?i:function(n){return function(){return t.apply(n,arguments)}},fv}var pv,Tx;function Br(){if(Tx)return pv;Tx=1;var r=Ce(),e=r({}.toString),t=r("".slice);return pv=function(i){return t(e(i),8,-1)},pv}var vv,$x;function Uw(){if($x)return vv;$x=1;var r=Br(),e=Ce();return vv=function(t){if(r(t)==="Function")return e(t)},vv}var gv,Px;function wt(){if(Px)return gv;Px=1;var r=typeof document=="object"&&document.all;return gv=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},gv}var mv={},yv,Rx;function rt(){if(Rx)return yv;Rx=1;var r=$e();return yv=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),yv}var bv,Cx;function Yt(){if(Cx)return bv;Cx=1;var r=aa(),e=Function.prototype.call;return bv=r?e.bind(e):function(){return e.apply(e,arguments)},bv}var _v={},xx;function Hu(){if(xx)return _v;xx=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return _v.f=t?function(n){var s=e(this,n);return!!s&&s.enumerable}:r,_v}var wv,qx;function ua(){return qx||(qx=1,wv=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),wv}var Ev,Dx;function Wu(){if(Dx)return Ev;Dx=1;var r=Ce(),e=$e(),t=Br(),i=Object,n=r("".split);return Ev=e(function(){return!i("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?n(s,""):i(s)}:i,Ev}var Sv,Ax;function Ds(){return Ax||(Ax=1,Sv=function(r){return r==null}),Sv}var Ov,Mx;function ui(){if(Mx)return Ov;Mx=1;var r=Ds(),e=TypeError;return Ov=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Ov}var Iv,Nx;function Sr(){if(Nx)return Iv;Nx=1;var r=Wu(),e=ui();return Iv=function(t){return r(e(t))},Iv}var Tv,Fx;function Et(){if(Fx)return Tv;Fx=1;var r=wt();return Tv=function(e){return typeof e=="object"?e!==null:r(e)},Tv}var $v,kx;function Be(){return kx||(kx=1,$v={}),$v}var Pv,Bx;function tr(){if(Bx)return Pv;Bx=1;var r=Be(),e=Ye(),t=wt(),i=function(n){return t(n)?n:void 0};return Pv=function(n,s){return arguments.length<2?i(r[n])||i(e[n]):r[n]&&r[n][s]||e[n]&&e[n][s]},Pv}var Rv,jx;function dt(){if(jx)return Rv;jx=1;var r=Ce();return Rv=r({}.isPrototypeOf),Rv}var Cv,Lx;function As(){if(Lx)return Cv;Lx=1;var r=Ye(),e=r.navigator,t=e&&e.userAgent;return Cv=t?String(t):"",Cv}var xv,zx;function la(){if(zx)return xv;zx=1;var r=Ye(),e=As(),t=r.process,i=r.Deno,n=t&&t.versions||i&&i.version,s=n&&n.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),xv=a,xv}var qv,Hx;function Ms(){if(Hx)return qv;Hx=1;var r=la(),e=$e(),t=Ye(),i=t.String;return qv=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!i(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&r&&r<41}),qv}var Dv,Wx;function c3(){if(Wx)return Dv;Wx=1;var r=Ms();return Dv=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Dv}var Av,Ux;function ca(){if(Ux)return Av;Ux=1;var r=tr(),e=wt(),t=dt(),i=c3(),n=Object;return Av=i?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,n(s))},Av}var Mv,Vx;function Ns(){if(Vx)return Mv;Vx=1;var r=String;return Mv=function(e){try{return r(e)}catch{return"Object"}},Mv}var Nv,Kx;function li(){if(Kx)return Nv;Kx=1;var r=wt(),e=Ns(),t=TypeError;return Nv=function(i){if(r(i))return i;throw new t(e(i)+" is not a function")},Nv}var Fv,Gx;function Vw(){if(Gx)return Fv;Gx=1;var r=li(),e=Ds();return Fv=function(t,i){var n=t[i];return e(n)?void 0:r(n)},Fv}var kv,Yx;function qY(){if(Yx)return kv;Yx=1;var r=Yt(),e=wt(),t=Et(),i=TypeError;return kv=function(n,s){var o,a;if(s==="string"&&e(o=n.toString)&&!t(a=r(o,n))||e(o=n.valueOf)&&!t(a=r(o,n))||s!=="string"&&e(o=n.toString)&&!t(a=r(o,n)))return a;throw new i("Can't convert object to primitive value")},kv}var Bv={exports:{}},jv,Xx;function Fs(){return Xx||(Xx=1,jv=!0),jv}var Lv,Jx;function DY(){if(Jx)return Lv;Jx=1;var r=Ye(),e=Object.defineProperty;return Lv=function(t,i){try{e(r,t,{value:i,configurable:!0,writable:!0})}catch{r[t]=i}return i},Lv}var Qx;function Kw(){if(Qx)return Bv.exports;Qx=1;var r=Fs(),e=Ye(),t=DY(),i="__core-js_shared__",n=Bv.exports=e[i]||t(i,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Bv.exports}var zv,Zx;function ks(){if(Zx)return zv;Zx=1;var r=Kw();return zv=function(e,t){return r[e]||(r[e]=t||{})},zv}var Hv,eq;function rr(){if(eq)return Hv;eq=1;var r=ui(),e=Object;return Hv=function(t){return e(r(t))},Hv}var Wv,tq;function It(){if(tq)return Wv;tq=1;var r=Ce(),e=rr(),t=r({}.hasOwnProperty);return Wv=Object.hasOwn||function(n,s){return t(e(n),s)},Wv}var Uv,rq;function Uu(){if(rq)return Uv;rq=1;var r=Ce(),e=0,t=Math.random(),i=r(1.1.toString);return Uv=function(n){return"Symbol("+(n===void 0?"":n)+")_"+i(++e+t,36)},Uv}var Vv,iq;function ht(){if(iq)return Vv;iq=1;var r=Ye(),e=ks(),t=It(),i=Uu(),n=Ms(),s=c3(),o=r.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||i;return Vv=function(l){return t(a,l)||(a[l]=n&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Vv}var Kv,nq;function d3(){if(nq)return Kv;nq=1;var r=Yt(),e=Et(),t=ca(),i=Vw(),n=qY(),s=ht(),o=TypeError,a=s("toPrimitive");return Kv=function(u,l){if(!e(u)||t(u))return u;var c=i(u,a),d;if(c){if(l===void 0&&(l="default"),d=r(c,u,l),!e(d)||t(d))return d;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(u,l)},Kv}var Gv,sq;function Gw(){if(sq)return Gv;sq=1;var r=d3(),e=ca();return Gv=function(t){var i=r(t,"string");return e(i)?i:i+""},Gv}var Yv,oq;function h3(){if(oq)return Yv;oq=1;var r=Ye(),e=Et(),t=r.document,i=e(t)&&e(t.createElement);return Yv=function(n){return i?t.createElement(n):{}},Yv}var Xv,aq;function f3(){if(aq)return Xv;aq=1;var r=rt(),e=$e(),t=h3();return Xv=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Xv}var uq;function Vu(){if(uq)return mv;uq=1;var r=rt(),e=Yt(),t=Hu(),i=ua(),n=Sr(),s=Gw(),o=It(),a=f3(),u=Object.getOwnPropertyDescriptor;return mv.f=r?u:function(c,d){if(c=n(c),d=s(d),a)try{return u(c,d)}catch{}if(o(c,d))return i(!e(t.f,c,d),c[d])},mv}var Jv,lq;function AY(){if(lq)return Jv;lq=1;var r=$e(),e=wt(),t=/#|\.prototype\./,i=function(u,l){var c=s[n(u)];return c===a?!0:c===o?!1:e(l)?r(l):!!l},n=i.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=i.data={},o=i.NATIVE="N",a=i.POLYFILL="P";return Jv=i,Jv}var Qv,cq;function Ku(){if(cq)return Qv;cq=1;var r=Uw(),e=li(),t=aa(),i=r(r.bind);return Qv=function(n,s){return e(n),s===void 0?n:t?i(n,s):function(){return n.apply(s,arguments)}},Qv}var Zv={},eg,dq;function p3(){if(dq)return eg;dq=1;var r=rt(),e=$e();return eg=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),eg}var tg,hq;function jr(){if(hq)return tg;hq=1;var r=Et(),e=String,t=TypeError;return tg=function(i){if(r(i))return i;throw new t(e(i)+" is not an object")},tg}var fq;function cr(){if(fq)return Zv;fq=1;var r=rt(),e=f3(),t=p3(),i=jr(),n=Gw(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Zv.f=r?t?function(h,f,p){if(i(h),f=n(f),i(p),typeof h=="function"&&f==="prototype"&&"value"in p&&c in p&&!p[c]){var v=a(h,f);v&&v[c]&&(h[f]=p.value,p={configurable:l in p?p[l]:v[l],enumerable:u in p?p[u]:v[u],writable:!1})}return o(h,f,p)}:o:function(h,f,p){if(i(h),f=n(f),i(p),e)try{return o(h,f,p)}catch{}if("get"in p||"set"in p)throw new s("Accessors not supported");return"value"in p&&(h[f]=p.value),h},Zv}var rg,pq;function Bs(){if(pq)return rg;pq=1;var r=rt(),e=cr(),t=ua();return rg=r?function(i,n,s){return e.f(i,n,t(1,s))}:function(i,n,s){return i[n]=s,i},rg}var ig,vq;function ce(){if(vq)return ig;vq=1;var r=Ye(),e=zu(),t=Uw(),i=wt(),n=Vu().f,s=AY(),o=Be(),a=Ku(),u=Bs(),l=It(),c=function(d){var h=function(f,p,v){if(this instanceof h){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,p)}return new d(f,p,v)}return e(d,this,arguments)};return h.prototype=d.prototype,h};return ig=function(d,h){var f=d.target,p=d.global,v=d.stat,b=d.proto,m=p?r:v?r[f]:r[f]&&r[f].prototype,g=p?o:o[f]||u(o,f,{})[f],w=g.prototype,y,S,O,I,_,E,T,R,x;for(I in h)y=s(p?I:f+(v?".":"#")+I,d.forced),S=!y&&m&&l(m,I),E=g[I],S&&(d.dontCallGetSet?(x=n(m,I),T=x&&x.value):T=m[I]),_=S&&T?T:h[I],!(!y&&!b&&typeof E==typeof _)&&(d.bind&&S?R=a(_,r):d.wrap&&S?R=c(_):b&&i(_)?R=t(_):R=_,(d.sham||_&&_.sham||E&&E.sham)&&u(R,"sham",!0),u(g,I,R),b&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,_),d.real&&w&&(y||!w[I])&&u(w,I,_)))},ig}var ng,gq;function MY(){if(gq)return ng;gq=1;var r=Math.ceil,e=Math.floor;return ng=Math.trunc||function(i){var n=+i;return(n>0?e:r)(n)},ng}var sg,mq;function js(){if(mq)return sg;mq=1;var r=MY();return sg=function(e){var t=+e;return t!==t||t===0?0:r(t)},sg}var og,yq;function Gu(){if(yq)return og;yq=1;var r=js(),e=Math.max,t=Math.min;return og=function(i,n){var s=r(i);return s<0?e(s+n,0):t(s,n)},og}var ag,bq;function v3(){if(bq)return ag;bq=1;var r=js(),e=Math.min;return ag=function(t){var i=r(t);return i>0?e(i,9007199254740991):0},ag}var ug,_q;function ci(){if(_q)return ug;_q=1;var r=v3();return ug=function(e){return r(e.length)},ug}var lg,wq;function Yw(){if(wq)return lg;wq=1;var r=Sr(),e=Gu(),t=ci(),i=function(n){return function(s,o,a){var u=r(s),l=t(u);if(l===0)return!n&&-1;var c=e(a,l),d;if(n&&o!==o){for(;l>c;)if(d=u[c++],d!==d)return!0}else for(;l>c;c++)if((n||c in u)&&u[c]===o)return n||c||0;return!n&&-1}};return lg={includes:i(!0),indexOf:i(!1)},lg}var cg,Eq;function da(){return Eq||(Eq=1,cg={}),cg}var dg,Sq;function g3(){if(Sq)return dg;Sq=1;var r=Ce(),e=It(),t=Sr(),i=Yw().indexOf,n=da(),s=r([].push);return dg=function(o,a){var u=t(o),l=0,c=[],d;for(d in u)!e(n,d)&&e(u,d)&&s(c,d);for(;a.length>l;)e(u,d=a[l++])&&(~i(c,d)||s(c,d));return c},dg}var hg,Oq;function Xw(){return Oq||(Oq=1,hg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),hg}var fg,Iq;function ha(){if(Iq)return fg;Iq=1;var r=g3(),e=Xw();return fg=Object.keys||function(i){return r(i,e)},fg}var pg={},Tq;function Yu(){return Tq||(Tq=1,pg.f=Object.getOwnPropertySymbols),pg}var vg,$q;function NY(){if($q)return vg;$q=1;var r=rt(),e=Ce(),t=Yt(),i=$e(),n=ha(),s=Yu(),o=Hu(),a=rr(),u=Wu(),l=Object.assign,c=Object.defineProperty,d=e([].concat);return vg=!l||i(function(){if(r&&l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},f={},p=Symbol("assign detection"),v="abcdefghijklmnopqrst";return h[p]=7,v.split("").forEach(function(b){f[b]=b}),l({},h)[p]!==7||n(l({},f)).join("")!==v})?function(f,p){for(var v=a(f),b=arguments.length,m=1,g=s.f,w=o.f;b>m;)for(var y=u(arguments[m++]),S=g?d(n(y),g(y)):n(y),O=S.length,I=0,_;O>I;)_=S[I++],(!r||t(w,y,_))&&(v[_]=y[_]);return v}:l,vg}var Pq;function FY(){if(Pq)return _x;Pq=1;var r=ce(),e=NY();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),_x}var gg,Rq;function kY(){if(Rq)return gg;Rq=1,FY();var r=Be();return gg=r.Object.assign,gg}var mg,Cq;function BY(){if(Cq)return mg;Cq=1;var r=kY();return mg=r,mg}var yg,xq;function jY(){return xq||(xq=1,yg=BY()),yg}var LY=jY(),ot=pe(LY),qq={},bg,Dq;function Ls(){if(Dq)return bg;Dq=1;var r=Ce();return bg=r([].slice),bg}var _g,Aq;function zY(){if(Aq)return _g;Aq=1;var r=Ce(),e=li(),t=Et(),i=It(),n=Ls(),s=aa(),o=Function,a=r([].concat),u=r([].join),l={},c=function(d,h,f){if(!i(l,h)){for(var p=[],v=0;v=.1;)p=+s[d++%o],p>c&&(p=c),f=Math.sqrt(p*p/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,h===!0?r.lineTo(e,t):r.moveTo(e,t),c-=p,h=!h}function e7(r,e,t,i){r.beginPath();const n=6,s=Math.PI*2/n;r.moveTo(e+i,t);for(let o=1;o1?t-1:0),n=1;ne)throw r("Maximum allowed index exceeded");return t},Pg}var Rg,Vq;function Xu(){if(Vq)return Rg;Vq=1;var r=rt(),e=cr(),t=ua();return Rg=function(i,n,s){r?e.f(i,n,t(0,s)):i[n]=s},Rg}var Cg,Kq;function Qw(){if(Kq)return Cg;Kq=1;var r=ht(),e=r("toStringTag"),t={};return t[e]="z",Cg=String(t)==="[object z]",Cg}var xg,Gq;function zs(){if(Gq)return xg;Gq=1;var r=Qw(),e=wt(),t=Br(),i=ht(),n=i("toStringTag"),s=Object,o=t(function(){return arguments}())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return xg=r?t:function(u){var l,c,d;return u===void 0?"Undefined":u===null?"Null":typeof(c=a(l=s(u),n))=="string"?c:o?t(l):(d=t(l))==="Object"&&e(l.callee)?"Arguments":d},xg}var qg,Yq;function n7(){if(Yq)return qg;Yq=1;var r=Ce(),e=wt(),t=Kw(),i=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(n){return i(n)}),qg=t.inspectSource,qg}var Dg,Xq;function E3(){if(Xq)return Dg;Xq=1;var r=Ce(),e=$e(),t=wt(),i=zs(),n=tr(),s=n7(),o=function(){},a=n("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=r(u.exec),c=!u.test(o),d=function(p){if(!t(p))return!1;try{return a(o,[],p),!0}catch{return!1}},h=function(p){if(!t(p))return!1;switch(i(p)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,s(p))}catch{return!0}};return h.sham=!0,Dg=!a||e(function(){var f;return d(d.call)||!d(Object)||!d(function(){f=!0})||f})?h:d,Dg}var Ag,Jq;function s7(){if(Jq)return Ag;Jq=1;var r=xn(),e=E3(),t=Et(),i=ht(),n=i("species"),s=Array;return Ag=function(o){var a;return r(o)&&(a=o.constructor,e(a)&&(a===s||r(a.prototype))?a=void 0:t(a)&&(a=a[n],a===null&&(a=void 0))),a===void 0?s:a},Ag}var Mg,Qq;function Zw(){if(Qq)return Mg;Qq=1;var r=s7();return Mg=function(e,t){return new(r(e))(t===0?0:t)},Mg}var Ng,Zq;function fa(){if(Zq)return Ng;Zq=1;var r=$e(),e=ht(),t=la(),i=e("species");return Ng=function(n){return t>=51||!r(function(){var s=[],o=s.constructor={};return o[i]=function(){return{foo:1}},s[n](Boolean).foo!==1})},Ng}var eD;function S3(){if(eD)return Hq;eD=1;var r=ce(),e=$e(),t=xn(),i=Et(),n=rr(),s=ci(),o=w3(),a=Xu(),u=Zw(),l=fa(),c=ht(),d=la(),h=c("isConcatSpreadable"),f=d>=51||!e(function(){var b=[];return b[h]=!1,b.concat()[0]!==b}),p=function(b){if(!i(b))return!1;var m=b[h];return m!==void 0?!!m:t(b)},v=!f||!l("concat");return r({target:"Array",proto:!0,arity:1,forced:v},{concat:function(m){var g=n(this),w=u(g,0),y=0,S,O,I,_,E;for(S=-1,I=arguments.length;Sh;)t.f(a,f=c[h++],l[f]);return a},kg}var Bg,sD;function o7(){if(sD)return Bg;sD=1;var r=tr();return Bg=r("document","documentElement"),Bg}var jg,oD;function Ju(){if(oD)return jg;oD=1;var r=ks(),e=Uu(),t=r("keys");return jg=function(i){return t[i]||(t[i]=e(i))},jg}var Lg,aD;function pa(){if(aD)return Lg;aD=1;var r=jr(),e=e0(),t=Xw(),i=da(),n=o7(),s=h3(),o=Ju(),a=">",u="<",l="prototype",c="script",d=o("IE_PROTO"),h=function(){},f=function(g){return u+c+a+g+u+"/"+c+a},p=function(g){g.write(f("")),g.close();var w=g.parentWindow.Object;return g=null,w},v=function(){var g=s("iframe"),w="java"+c+":",y;return g.style.display="none",n.appendChild(g),g.src=String(w),y=g.contentWindow.document,y.open(),y.write(f("document.F=Object")),y.close(),y.F},b,m=function(){try{b=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&b?p(b):v():p(b);for(var g=t.length;g--;)delete m[l][t[g]];return m()};return i[d]=!0,Lg=Object.create||function(w,y){var S;return w!==null?(h[l]=r(w),S=new h,h[l]=null,S[d]=w):S=m(),y===void 0?S:e.f(S,y)},Lg}var zg={},uD;function Qu(){if(uD)return zg;uD=1;var r=g3(),e=Xw(),t=e.concat("length","prototype");return zg.f=Object.getOwnPropertyNames||function(n){return r(n,t)},zg}var Hg={},lD;function t0(){if(lD)return Hg;lD=1;var r=Br(),e=Sr(),t=Qu().f,i=Ls(),n=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return i(n)}};return Hg.f=function(a){return n&&r(a)==="Window"?s(a):t(e(a))},Hg}var Wg,cD;function va(){if(cD)return Wg;cD=1;var r=Bs();return Wg=function(e,t,i,n){return n&&n.enumerable?e[t]=i:r(e,t,i),e},Wg}var Ug,dD;function r0(){if(dD)return Ug;dD=1;var r=cr();return Ug=function(e,t,i){return r.f(e,t,i)},Ug}var Vg={},hD;function Zu(){if(hD)return Vg;hD=1;var r=ht();return Vg.f=r,Vg}var Kg,fD;function Je(){if(fD)return Kg;fD=1;var r=Be(),e=It(),t=Zu(),i=cr().f;return Kg=function(n){var s=r.Symbol||(r.Symbol={});e(s,n)||i(s,n,{value:t.f(n)})},Kg}var Gg,pD;function O3(){if(pD)return Gg;pD=1;var r=Yt(),e=tr(),t=ht(),i=va();return Gg=function(){var n=e("Symbol"),s=n&&n.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&i(s,a,function(u){return r(o,this)},{arity:1})},Gg}var Yg,vD;function a7(){if(vD)return Yg;vD=1;var r=Qw(),e=zs();return Yg=r?{}.toString:function(){return"[object "+e(this)+"]"},Yg}var Xg,gD;function qn(){if(gD)return Xg;gD=1;var r=Qw(),e=cr().f,t=Bs(),i=It(),n=a7(),s=ht(),o=s("toStringTag");return Xg=function(a,u,l,c){var d=l?a:a&&a.prototype;d&&(i(d,o)||e(d,o,{configurable:!0,value:u}),c&&!r&&t(d,"toString",n))},Xg}var Jg,mD;function I3(){if(mD)return Jg;mD=1;var r=Ye(),e=wt(),t=r.WeakMap;return Jg=e(t)&&/native code/.test(String(t)),Jg}var Qg,yD;function Dn(){if(yD)return Qg;yD=1;var r=I3(),e=Ye(),t=Et(),i=Bs(),n=It(),s=Kw(),o=Ju(),a=da(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,d,h,f,p=function(g){return f(g)?h(g):d(g,{})},v=function(g){return function(w){var y;if(!t(w)||(y=h(w)).type!==g)throw new l("Incompatible receiver, "+g+" required");return y}};if(r||s.state){var b=s.state||(s.state=new c);b.get=b.get,b.has=b.has,b.set=b.set,d=function(g,w){if(b.has(g))throw new l(u);return w.facade=g,b.set(g,w),w},h=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var m=o("state");a[m]=!0,d=function(g,w){if(n(g,m))throw new l(u);return w.facade=g,i(g,m,w),w},h=function(g){return n(g,m)?g[m]:{}},f=function(g){return n(g,m)}}return Qg={set:d,get:h,has:f,enforce:p,getterFor:v},Qg}var Zg,bD;function Hi(){if(bD)return Zg;bD=1;var r=Ku(),e=Ce(),t=Wu(),i=rr(),n=ci(),s=Zw(),o=e([].push),a=function(u){var l=u===1,c=u===2,d=u===3,h=u===4,f=u===6,p=u===7,v=u===5||f;return function(b,m,g,w){for(var y=i(b),S=t(y),O=n(S),I=r(m,g),_=0,E=w||s,T=l?E(b,O):c||p?E(b,0):void 0,R,x;O>_;_++)if((v||_ in S)&&(R=S[_],x=I(R,_,y),u))if(l)T[_]=x;else if(x)switch(u){case 3:return!0;case 5:return R;case 6:return _;case 2:o(T,R)}else switch(u){case 4:return!1;case 7:o(T,R)}return f?-1:d||h?h:T}};return Zg={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Zg}var _D;function u7(){if(_D)return rD;_D=1;var r=ce(),e=Ye(),t=Yt(),i=Ce(),n=Fs(),s=rt(),o=Ms(),a=$e(),u=It(),l=dt(),c=jr(),d=Sr(),h=Gw(),f=dr(),p=ua(),v=pa(),b=ha(),m=Qu(),g=t0(),w=Yu(),y=Vu(),S=cr(),O=e0(),I=Hu(),_=va(),E=r0(),T=ks(),R=Ju(),x=da(),C=Uu(),D=ht(),j=Zu(),ee=Je(),H=O3(),Z=qn(),fe=Dn(),_e=Hi().forEach,te=R("hidden"),ge="Symbol",xe="prototype",De=fe.set,it=fe.getterFor(ge),be=Object[xe],A=e.Symbol,W=A&&A[xe],Y=e.RangeError,ie=e.TypeError,Pe=e.QObject,$=y.f,P=S.f,q=g.f,F=I.f,k=i([].push),N=T("symbols"),K=T("op-symbols"),X=T("wks"),U=!Pe||!Pe[xe]||!Pe[xe].findChild,B=function(oe,V,Q){var re=$(be,V);re&&delete be[V],P(oe,V,Q),re&&oe!==be&&P(be,V,re)},le=s&&a(function(){return v(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a!==7})?B:P,J=function(oe,V){var Q=N[oe]=v(W);return De(Q,{type:ge,tag:oe,description:V}),s||(Q.description=V),Q},se=function(V,Q,re){V===be&&se(K,Q,re),c(V);var ne=h(Q);return c(re),u(N,ne)?(re.enumerable?(u(V,te)&&V[te][ne]&&(V[te][ne]=!1),re=v(re,{enumerable:p(0,!1)})):(u(V,te)||P(V,te,p(1,v(null))),V[te][ne]=!0),le(V,ne,re)):P(V,ne,re)},de=function(V,Q){c(V);var re=d(Q),ne=b(re).concat(nt(re));return _e(ne,function(we){(!s||t(qe,re,we))&&se(V,we,re[we])}),V},Se=function(V,Q){return Q===void 0?v(V):de(v(V),Q)},qe=function(V){var Q=h(V),re=t(F,this,Q);return this===be&&u(N,Q)&&!u(K,Q)?!1:re||!u(this,Q)||!u(N,Q)||u(this,te)&&this[te][Q]?re:!0},Re=function(V,Q){var re=d(V),ne=h(Q);if(!(re===be&&u(N,ne)&&!u(K,ne))){var we=$(re,ne);return we&&u(N,ne)&&!(u(re,te)&&re[te][ne])&&(we.enumerable=!0),we}},ft=function(V){var Q=q(d(V)),re=[];return _e(Q,function(ne){!u(N,ne)&&!u(x,ne)&&k(re,ne)}),re},nt=function(oe){var V=oe===be,Q=q(V?K:d(oe)),re=[];return _e(Q,function(ne){u(N,ne)&&(!V||u(be,ne))&&k(re,N[ne])}),re};return o||(A=function(){if(l(W,this))throw new ie("Symbol is not a constructor");var V=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),Q=C(V),re=function(ne){var we=this===void 0?e:this;we===be&&t(re,K,ne),u(we,te)&&u(we[te],Q)&&(we[te][Q]=!1);var di=p(1,ne);try{le(we,Q,di)}catch(Ys){if(!(Ys instanceof Y))throw Ys;B(we,Q,di)}};return s&&U&&le(be,Q,{configurable:!0,set:re}),J(Q,V)},W=A[xe],_(W,"toString",function(){return it(this).tag}),_(A,"withoutSetter",function(oe){return J(C(oe),oe)}),I.f=qe,S.f=se,O.f=de,y.f=Re,m.f=g.f=ft,w.f=nt,j.f=function(oe){return J(D(oe),oe)},s&&(E(W,"description",{configurable:!0,get:function(){return it(this).description}}),n||_(be,"propertyIsEnumerable",qe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:A}),_e(b(X),function(oe){ee(oe)}),r({target:ge,stat:!0,forced:!o},{useSetter:function(){U=!0},useSimple:function(){U=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!s},{create:Se,defineProperty:se,defineProperties:de,getOwnPropertyDescriptor:Re}),r({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:ft}),H(),Z(A,ge),x[te]=!0,rD}var wD={},em,ED;function T3(){if(ED)return em;ED=1;var r=Ms();return em=r&&!!Symbol.for&&!!Symbol.keyFor,em}var SD;function l7(){if(SD)return wD;SD=1;var r=ce(),e=tr(),t=It(),i=dr(),n=ks(),s=T3(),o=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=i(u);if(t(o,l))return o[l];var c=e("Symbol")(l);return o[l]=c,a[c]=l,c}}),wD}var OD={},ID;function c7(){if(ID)return OD;ID=1;var r=ce(),e=It(),t=ca(),i=Ns(),n=ks(),s=T3(),o=n("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(i(u)+" is not a symbol");if(e(o,u))return o[u]}}),OD}var TD={},tm,$D;function d7(){if($D)return tm;$D=1;var r=Ce(),e=xn(),t=wt(),i=Br(),n=dr(),s=r([].push);return tm=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l=p.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(v,!1);case"values":return o(p[v],!1)}return o([v,p[v]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return gm}var mm,TA;function q7(){return TA||(TA=1,mm={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),mm}var $A;function Us(){if($A)return dA;$A=1,Ws();var r=q7(),e=Ye(),t=qn(),i=Hs();for(var n in r)t(e[n],n),i[n]=i.Array;return dA}var ym,PA;function M3(){if(PA)return ym;PA=1;var r=I7();return Us(),ym=r,ym}var bm,RA;function D7(){return RA||(RA=1,bm=M3()),bm}var A7=D7(),M7=pe(A7),CA={},xA;function N7(){if(xA)return CA;xA=1;var r=ce(),e=xn(),t=E3(),i=Et(),n=Gu(),s=ci(),o=Sr(),a=Xu(),u=ht(),l=fa(),c=Ls(),d=l("slice"),h=u("species"),f=Array,p=Math.max;return r({target:"Array",proto:!0,forced:!d},{slice:function(b,m){var g=o(this),w=s(g),y=n(b,w),S=n(m===void 0?w:m,w),O,I,_;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:i(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return c(g,y,S);for(I=new(O===void 0?f:O)(p(S-y,0)),_=0;y1?arguments[1]:void 0)}}),zA}var Pm,WA;function Y7(){if(WA)return Pm;WA=1,G7();var r=Tt();return Pm=r("Array","map"),Pm}var Rm,UA;function X7(){if(UA)return Rm;UA=1;var r=dt(),e=Y7(),t=Array.prototype;return Rm=function(i){var n=i.map;return i===t||r(t,i)&&n===t.map?e:n},Rm}var Cm,VA;function J7(){if(VA)return Cm;VA=1;var r=X7();return Cm=r,Cm}var xm,KA;function Q7(){return KA||(KA=1,xm=J7()),xm}var Z7=Q7(),ms=pe(Z7),GA={},YA;function eX(){if(YA)return GA;YA=1;var r=ce(),e=rr(),t=ha(),i=$e(),n=i(function(){t(1)});return r({target:"Object",stat:!0,forced:n},{keys:function(o){return t(e(o))}}),GA}var qm,XA;function tX(){if(XA)return qm;XA=1,eX();var r=Be();return qm=r.Object.keys,qm}var Dm,JA;function rX(){if(JA)return Dm;JA=1;var r=tX();return Dm=r,Dm}var Am,QA;function iX(){return QA||(QA=1,Am=rX()),Am}var nX=iX(),Ze=pe(nX),ZA={},eM;function sX(){if(eM)return ZA;eM=1;var r=ce(),e=Ce(),t=Date,i=e(t.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return i(new t)}}),ZA}var Mm,tM;function oX(){if(tM)return Mm;tM=1,sX();var r=Be();return Mm=r.Date.now,Mm}var Nm,rM;function aX(){if(rM)return Nm;rM=1;var r=oX();return Nm=r,Nm}var Fm,iM;function uX(){return iM||(iM=1,Fm=aX()),Fm}var lX=uX(),su=pe(lX),nM={},km,sM;function Vs(){if(sM)return km;sM=1;var r=$e();return km=function(e,t){var i=[][e];return!!i&&r(function(){i.call(null,t||function(){return 1},1)})},km}var Bm,oM;function cX(){if(oM)return Bm;oM=1;var r=Hi().forEach,e=Vs(),t=e("forEach");return Bm=t?[].forEach:function(n){return r(this,n,arguments.length>1?arguments[1]:void 0)},Bm}var aM;function dX(){if(aM)return nM;aM=1;var r=ce(),e=cX();return r({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),nM}var jm,uM;function hX(){if(uM)return jm;uM=1,dX();var r=Tt();return jm=r("Array","forEach"),jm}var Lm,lM;function fX(){if(lM)return Lm;lM=1;var r=hX();return Lm=r,Lm}var zm,cM;function pX(){if(cM)return zm;cM=1;var r=zs(),e=It(),t=dt(),i=fX(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return zm=function(o){var a=o.forEach;return o===n||t(n,o)&&a===n.forEach||e(s,r(o))?i:a},zm}var Hm,dM;function vX(){return dM||(dM=1,Hm=pX()),Hm}var gX=vX(),Le=pe(gX),hM={},fM;function mX(){if(fM)return hM;fM=1;var r=ce(),e=Ce(),t=xn(),i=e([].reverse),n=[1,2];return r({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),i(this)}}),hM}var Wm,pM;function yX(){if(pM)return Wm;pM=1,mX();var r=Tt();return Wm=r("Array","reverse"),Wm}var Um,vM;function bX(){if(vM)return Um;vM=1;var r=dt(),e=yX(),t=Array.prototype;return Um=function(i){var n=i.reverse;return i===t||r(t,i)&&n===t.reverse?e:n},Um}var Vm,gM;function _X(){if(gM)return Vm;gM=1;var r=bX();return Vm=r,Vm}var Km,mM;function wX(){return mM||(mM=1,Km=_X()),Km}var EX=wX(),on=pe(EX),yM={},Gm,bM;function SX(){if(bM)return Gm;bM=1;var r=rt(),e=xn(),t=TypeError,i=Object.getOwnPropertyDescriptor,n=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}}();return Gm=n?function(s,o){if(e(s)&&!i(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},Gm}var Ym,_M;function N3(){if(_M)return Ym;_M=1;var r=Ns(),e=TypeError;return Ym=function(t,i){if(!delete t[i])throw new e("Cannot delete property "+r(i)+" of "+r(t))},Ym}var wM;function OX(){if(wM)return yM;wM=1;var r=ce(),e=rr(),t=Gu(),i=js(),n=ci(),s=SX(),o=w3(),a=Zw(),u=Xu(),l=N3(),c=fa(),d=c("splice"),h=Math.max,f=Math.min;return r({target:"Array",proto:!0,forced:!d},{splice:function(v,b){var m=e(this),g=n(m),w=t(v,g),y=arguments.length,S,O,I,_,E,T;for(y===0?S=O=0:y===1?(S=0,O=g-w):(S=y-2,O=f(h(i(b),0),g-w)),o(g+S-O),I=a(m,O),_=0;_g-O+S;_--)l(m,_-1)}else if(S>O)for(_=g-O;_>w;_--)E=_+O-1,T=_+S-1,E in m?m[T]=m[E]:l(m,T);for(_=0;_1?arguments[1]:void 0)}}),i("includes"),TM}var ey,PM;function xX(){if(PM)return ey;PM=1,CX();var r=Tt();return ey=r("Array","includes"),ey}var RM={},ty,CM;function qX(){if(CM)return ty;CM=1;var r=Et(),e=Br(),t=ht(),i=t("match");return ty=function(n){var s;return r(n)&&((s=n[i])!==void 0?!!s:e(n)==="RegExp")},ty}var ry,xM;function DX(){if(xM)return ry;xM=1;var r=qX(),e=TypeError;return ry=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},ry}var iy,qM;function AX(){if(qM)return iy;qM=1;var r=ht(),e=r("match");return iy=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[e]=!1,"/./"[t](i)}catch{}}return!1},iy}var DM;function MX(){if(DM)return RM;DM=1;var r=ce(),e=Ce(),t=DX(),i=ui(),n=dr(),s=AX(),o=e("".indexOf);return r({target:"String",proto:!0,forced:!s("includes")},{includes:function(u){return!!~o(n(i(this)),n(t(u)),arguments.length>1?arguments[1]:void 0)}}),RM}var ny,AM;function NX(){if(AM)return ny;AM=1,MX();var r=Tt();return ny=r("String","includes"),ny}var sy,MM;function FX(){if(MM)return sy;MM=1;var r=dt(),e=xX(),t=NX(),i=Array.prototype,n=String.prototype;return sy=function(s){var o=s.includes;return s===i||r(i,s)&&o===i.includes?e:typeof s=="string"||s===n||r(n,s)&&o===n.includes?t:o},sy}var oy,NM;function kX(){if(NM)return oy;NM=1;var r=FX();return oy=r,oy}var ay,FM;function BX(){return FM||(FM=1,ay=kX()),ay}var jX=BX(),Ii=pe(jX),kM={},BM;function LX(){if(BM)return kM;BM=1;var r=ce(),e=$e(),t=rr(),i=el(),n=D3(),s=e(function(){i(1)});return r({target:"Object",stat:!0,forced:s,sham:!n},{getPrototypeOf:function(a){return i(t(a))}}),kM}var uy,jM;function zX(){if(jM)return uy;jM=1,LX();var r=Be();return uy=r.Object.getPrototypeOf,uy}var ly,LM;function HX(){if(LM)return ly;LM=1;var r=zX();return ly=r,ly}var cy,zM;function WX(){return zM||(zM=1,cy=HX()),cy}var UX=WX(),HM=pe(UX),dy,WM;function VX(){if(WM)return dy;WM=1,S3();var r=Tt();return dy=r("Array","concat"),dy}var hy,UM;function KX(){if(UM)return hy;UM=1;var r=dt(),e=VX(),t=Array.prototype;return hy=function(i){var n=i.concat;return i===t||r(t,i)&&n===t.concat?e:n},hy}var fy,VM;function GX(){if(VM)return fy;VM=1;var r=KX();return fy=r,fy}var py,KM;function YX(){return KM||(KM=1,py=GX()),py}var XX=YX(),JX=pe(XX),GM={},YM;function QX(){if(YM)return GM;YM=1;var r=ce(),e=Hi().filter,t=fa(),i=t("filter");return r({target:"Array",proto:!0,forced:!i},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),GM}var vy,XM;function ZX(){if(XM)return vy;XM=1,QX();var r=Tt();return vy=r("Array","filter"),vy}var gy,JM;function eJ(){if(JM)return gy;JM=1;var r=dt(),e=ZX(),t=Array.prototype;return gy=function(i){var n=i.filter;return i===t||r(t,i)&&n===t.filter?e:n},gy}var my,QM;function tJ(){if(QM)return my;QM=1;var r=eJ();return my=r,my}var yy,ZM;function rJ(){return ZM||(ZM=1,yy=tJ()),yy}var iJ=rJ(),Wt=pe(iJ),eN={},by,tN;function nJ(){if(tN)return by;tN=1;var r=rt(),e=$e(),t=Ce(),i=el(),n=ha(),s=Sr(),o=Hu().f,a=t(o),u=t([].push),l=r&&e(function(){var d=Object.create(null);return d[2]=2,!a(d,2)}),c=function(d){return function(h){for(var f=s(h),p=n(f),v=l&&i(f)===null,b=p.length,m=0,g=[],w;b>m;)w=p[m++],(!r||(v?w in f:a(f,w)))&&u(g,d?[w,f[w]]:f[w]);return g}};return by={entries:c(!0),values:c(!1)},by}var rN;function sJ(){if(rN)return eN;rN=1;var r=ce(),e=nJ().values;return r({target:"Object",stat:!0},{values:function(i){return e(i)}}),eN}var _y,iN;function oJ(){if(iN)return _y;iN=1,sJ();var r=Be();return _y=r.Object.values,_y}var wy,nN;function aJ(){if(nN)return wy;nN=1;var r=oJ();return wy=r,wy}var Ey,sN;function uJ(){return sN||(sN=1,Ey=aJ()),Ey}var lJ=uJ(),cJ=pe(lJ),oN={},Sy,aN;function o0(){return aN||(aN=1,Sy=` +\v\f\r                 \u2028\u2029\uFEFF`),Sy}var Oy,uN;function F3(){if(uN)return Oy;uN=1;var r=Ce(),e=ui(),t=dr(),i=o0(),n=r("".replace),s=RegExp("^["+i+"]+"),o=RegExp("(^|[^"+i+"])["+i+"]+$"),a=function(u){return function(l){var c=t(e(l));return u&1&&(c=n(c,s,"")),u&2&&(c=n(c,o,"$1")),c}};return Oy={start:a(1),end:a(2),trim:a(3)},Oy}var Iy,lN;function dJ(){if(lN)return Iy;lN=1;var r=Ye(),e=$e(),t=Ce(),i=dr(),n=F3().trim,s=o0(),o=r.parseInt,a=r.Symbol,u=a&&a.iterator,l=/^[+-]?0x/i,c=t(l.exec),d=o(s+"08")!==8||o(s+"0x16")!==22||u&&!e(function(){o(Object(u))});return Iy=d?function(f,p){var v=n(i(f));return o(v,p>>>0||(c(l,v)?16:10))}:o,Iy}var cN;function hJ(){if(cN)return oN;cN=1;var r=ce(),e=dJ();return r({global:!0,forced:parseInt!==e},{parseInt:e}),oN}var Ty,dN;function fJ(){if(dN)return Ty;dN=1,hJ();var r=Be();return Ty=r.parseInt,Ty}var $y,hN;function pJ(){if(hN)return $y;hN=1;var r=fJ();return $y=r,$y}var Py,fN;function vJ(){return fN||(fN=1,Py=pJ()),Py}var gJ=vJ(),vr=pe(gJ),pN={},vN;function mJ(){if(vN)return pN;vN=1;var r=ce(),e=Uw(),t=Yw().indexOf,i=Vs(),n=e([].indexOf),s=!!n&&1/n([1],1,-0)<0,o=s||!i("indexOf");return r({target:"Array",proto:!0,forced:o},{indexOf:function(u){var l=arguments.length>1?arguments[1]:void 0;return s?n(this,u,l)||0:t(this,u,l)}}),pN}var Ry,gN;function yJ(){if(gN)return Ry;gN=1,mJ();var r=Tt();return Ry=r("Array","indexOf"),Ry}var Cy,mN;function bJ(){if(mN)return Cy;mN=1;var r=dt(),e=yJ(),t=Array.prototype;return Cy=function(i){var n=i.indexOf;return i===t||r(t,i)&&n===t.indexOf?e:n},Cy}var xy,yN;function _J(){if(yN)return xy;yN=1;var r=bJ();return xy=r,xy}var qy,bN;function wJ(){return bN||(bN=1,qy=_J()),qy}var EJ=wJ(),Fe=pe(EJ),_N={},wN;function SJ(){if(wN)return _N;wN=1;var r=ce(),e=rt(),t=pa();return r({target:"Object",stat:!0,sham:!e},{create:t}),_N}var Dy,EN;function OJ(){if(EN)return Dy;EN=1,SJ();var r=Be(),e=r.Object;return Dy=function(i,n){return e.create(i,n)},Dy}var Ay,SN;function IJ(){if(SN)return Ay;SN=1;var r=OJ();return Ay=r,Ay}var My,ON;function TJ(){return ON||(ON=1,My=IJ()),My}var $J=TJ(),an=pe($J),IN={},Ny,TN;function PJ(){if(TN)return Ny;TN=1;var r=js(),e=dr(),t=ui(),i=RangeError;return Ny=function(s){var o=e(t(this)),a="",u=r(s);if(u<0||u===1/0)throw new i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},Ny}var Fy,$N;function RJ(){if($N)return Fy;$N=1;var r=Ce(),e=v3(),t=dr(),i=PJ(),n=ui(),s=r(i),o=r("".slice),a=Math.ceil,u=function(l){return function(c,d,h){var f=t(n(c)),p=e(d),v=f.length,b=h===void 0?" ":t(h),m,g;return p<=v||b===""?f:(m=p-v,g=s(b,a(m/b.length)),g.length>m&&(g=o(g,0,m)),l?f+g:g+f)}};return Fy={start:u(!1),end:u(!0)},Fy}var ky,PN;function CJ(){if(PN)return ky;PN=1;var r=Ce(),e=$e(),t=RJ().start,i=RangeError,n=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=r(o.getTime),l=r(o.getUTCDate),c=r(o.getUTCFullYear),d=r(o.getUTCHours),h=r(o.getUTCMilliseconds),f=r(o.getUTCMinutes),p=r(o.getUTCMonth),v=r(o.getUTCSeconds);return ky=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(u(this)))throw new i("Invalid time value");var m=this,g=c(m),w=h(m),y=g<0?"-":g>9999?"+":"";return y+t(s(g),y?6:4,0)+"-"+t(p(m)+1,2,0)+"-"+t(l(m),2,0)+"T"+t(d(m),2,0)+":"+t(f(m),2,0)+":"+t(v(m),2,0)+"."+t(w,3,0)+"Z"}:a,ky}var RN;function xJ(){if(RN)return IN;RN=1;var r=ce(),e=Yt(),t=rr(),i=d3(),n=CJ(),s=Br(),o=$e(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return r({target:"Date",proto:!0,forced:a},{toJSON:function(l){var c=t(this),d=i(c,"number");return typeof d=="number"&&!isFinite(d)?null:!("toISOString"in c)&&s(c)==="Date"?e(n,c):c.toISOString()}}),IN}var By,CN;function qJ(){if(CN)return By;CN=1,xJ(),$3();var r=Be(),e=zu();return r.JSON||(r.JSON={stringify:JSON.stringify}),By=function(i,n,s){return e(r.JSON.stringify,null,arguments)},By}var jy,xN;function DJ(){if(xN)return jy;xN=1;var r=qJ();return jy=r,jy}var Ly,qN;function AJ(){return qN||(qN=1,Ly=DJ()),Ly}var MJ=AJ(),ga=pe(MJ),DN={},AN={},zy,MN;function k3(){if(MN)return zy;MN=1;var r=Ye(),e=As(),t=Br(),i=function(n){return e.slice(0,n.length)===n};return zy=function(){return i("Bun/")?"BUN":i("Cloudflare-Workers")?"CLOUDFLARE":i("Deno/")?"DENO":i("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),zy}var Hy,NN;function NJ(){if(NN)return Hy;NN=1;var r=TypeError;return Hy=function(e,t){if(ed,v=t(h)?h:a(h),b=p?s(arguments,d):[],m=p?function(){e(v,this,b)}:v;return c?l(m,f):l(m)}:l},Wy}var kN;function FJ(){if(kN)return AN;kN=1;var r=ce(),e=Ye(),t=B3(),i=t(e.setInterval,!0);return r({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i}),AN}var BN={},jN;function kJ(){if(jN)return BN;jN=1;var r=ce(),e=Ye(),t=B3(),i=t(e.setTimeout,!0);return r({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i}),BN}var LN;function j3(){return LN||(LN=1,FJ(),kJ()),DN}var Uy,zN;function BJ(){if(zN)return Uy;zN=1,j3();var r=Be();return Uy=r.setTimeout,Uy}var Vy,HN;function jJ(){return HN||(HN=1,Vy=BJ()),Vy}var LJ=jJ(),Zr=pe(LJ),WN={},Ky,UN;function zJ(){if(UN)return Ky;UN=1;var r=rr(),e=Gu(),t=ci();return Ky=function(n){for(var s=r(this),o=t(s),a=arguments.length,u=e(a>1?arguments[1]:void 0,o),l=a>2?arguments[2]:void 0,c=l===void 0?o:e(l,o);c>u;)s[u++]=n;return s},Ky}var VN;function HJ(){if(VN)return WN;VN=1;var r=ce(),e=zJ(),t=i0();return r({target:"Array",proto:!0},{fill:e}),t("fill"),WN}var Gy,KN;function WJ(){if(KN)return Gy;KN=1,HJ();var r=Tt();return Gy=r("Array","fill"),Gy}var Yy,GN;function UJ(){if(GN)return Yy;GN=1;var r=dt(),e=WJ(),t=Array.prototype;return Yy=function(i){var n=i.fill;return i===t||r(t,i)&&n===t.fill?e:n},Yy}var Xy,YN;function VJ(){if(YN)return Xy;YN=1;var r=UJ();return Xy=r,Xy}var Jy,XN;function KJ(){return XN||(XN=1,Jy=VJ()),Jy}var GJ=KJ(),ma=pe(GJ);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 * http://naver.github.io/egjs * * Forked By Naver egjs * Copyright (c) hammerjs - * Licensed under the MIT license */function _r(){return _r=Object.assign||function(r){for(var e=1;e"u"?{style:{}}:document.createElement("div"),XJ="function",Zn=Math.round,gn=Math.abs,o0=Date.now;function tl(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?ei={}:ei=window;var j3=tl(YJ.style,"touchAction"),L3=j3!==void 0;function JJ(){if(!L3)return!1;var r={},e=ei.CSS&&ei.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?ei.CSS.supports("touch-action",t):!0}),r}var z3="compute",H3="auto",L_="manipulation",un="none",No="pan-x",Fo="pan-y",Ma=JJ(),QJ=/mobile|tablet|ip(ad|hone|od)|android/i,W3="ontouchstart"in ei,ZJ=tl(ei,"PointerEvent")!==void 0,eQ=W3&&QJ.test(navigator.userAgent),ya="touch",tQ="pen",a0="mouse",rQ="kinect",iQ=25,Lt=1,An=2,at=4,Vt=8,ou=1,ba=2,_a=4,wa=8,ys=16,Nr=ba|_a,ln=wa|ys,U3=Nr|ln,V3=["x","y"],au=["clientX","clientY"];function ti(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function nQ(r){if(en(r,un))return un;var e=en(r,No),t=en(r,Fo);return e&&t?un:e||t?e?No:Fo:en(r,L_)?L_:H3}var K3=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===z3&&(i=this.compute()),L3&&this.manager.element.style&&Ma[i]&&(this.manager.element.style[j3]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return ti(this.manager.recognizers,function(n){rl(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),nQ(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=en(o,un)&&!Ma[un],u=en(o,Fo)&&!Ma[Fo],l=en(o,No)&&!Ma[No];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&Nr||l&&s&ln))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function u0(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function G3(r){var e=r.length;if(e===1)return{x:Zn(r[0].clientX),y:Zn(r[0].clientY)};for(var t=0,i=0,n=0;n=gn(e)?r<0?ba:_a:e<0?wa:ys}function sQ(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Lt||s.eventType===at)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function X3(r,e,t){return{x:e/r||0,y:t/r||0}}function oQ(r,e){return uu(e[0],e[1],au)/uu(r[0],r[1],au)}function aQ(r,e){return z_(e[1],e[0],au)+z_(r[1],r[0],au)}function uQ(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Vt&&(i>iQ||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=X3(i,u,l);s=c.x,o=c.y,n=gn(c.x)>gn(c.y)?c.x:c.y,a=Y3(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function lQ(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=JN(e)),n>1&&!t.firstMultiple?t.firstMultiple=JN(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=G3(i);e.timeStamp=o0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=z_(a,u),e.distance=uu(a,u),sQ(t,e),e.offsetDirection=Y3(e.deltaX,e.deltaY);var l=X3(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=gn(l.x)>gn(l.y)?l.x:l.y,e.scale=o?oQ(o.pointers,i):1,e.rotation=o?aQ(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,uQ(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,u0(h,c)&&(c=h),e.target=c}function cQ(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Lt&&i-n===0,o=e&(at|Vt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,lQ(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function ko(r){return r.trim().split(/\s+/g)}function mo(r,e,t){ti(ko(e),function(i){r.addEventListener(i,t,!1)})}function yo(r,e,t){ti(ko(e),function(i){r.removeEventListener(i,t,!1)})}function QN(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Ks=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){rl(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&mo(this.element,this.evEl,this.domHandler),this.evTarget&&mo(this.target,this.evTarget,this.domHandler),this.evWin&&mo(QN(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&yo(this.element,this.evEl,this.domHandler),this.evTarget&&yo(this.target,this.evTarget,this.domHandler),this.evWin&&yo(QN(this.element),this.evWin,this.domHandler)},r}();function mn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var fQ={touchstart:Lt,touchmove:An,touchend:at,touchcancel:Vt},pQ="touchstart touchmove touchend touchcancel",c0=function(r){hr(e,r);function e(){var i;return e.prototype.evTarget=pQ,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=fQ[n.type],o=vQ.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ya,srcEvent:n})},e}(Ks);function vQ(r,e){var t=Bo(r.touches),i=this.targetIds;if(e&(Lt|An)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Bo(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return u0(l.target,u)}),e===Lt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,bQ)}}function _Q(r,e){r&Lt?(this.primaryTouch=e.changedPointers[0].identifier,eF.call(this,e)):r&(at|Vt)&&eF.call(this,e)}function wQ(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Ti&&o(n.options.event+tF(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=qr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return _s.prototype.attrTest.call(this,n)&&(this.state&ar||!(this.state&ar)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=t5(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(_s),r5=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,_r({event:"swipe",threshold:10,velocity:.3,direction:Nr|ln,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return h0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Nr|ln)?o=n.overallVelocity:s&Nr?o=n.overallVelocityX:s&ln&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&gn(o)>this.options.velocity&&n.eventType&at},t.emit=function(n){var s=t5(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(_s),i5=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,_r({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[un]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&ar)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(_s),n5=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,_r({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[un]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&ar)},e}(_s),s5=function(r){hr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,_r({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[H3]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(at|Vt)&&!l)this.reset();else if(n.eventType&Lt)this.reset(),this._timer=setTimeout(function(){s.state=ri,s.tryEmit()},o.time);else if(n.eventType&at)return ri;return qr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===ri&&(n&&n.eventType&at?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=o0(),this.manager.emit(this.options.event,this._input)))},e}(Ea),o5={domEvents:!1,touchAction:z3,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},rF=[[n5,{enable:!1}],[i5,{enable:!1},["rotate"]],[r5,{direction:Nr}],[h0,{direction:Nr},["swipe"]],[H_],[H_,{event:"doubletap",taps:2},["tap"]],[s5]],IQ=1,iF=2;function nF(r,e){var t=r.element;if(t.style){var i;ti(r.options.cssProps,function(n,s){i=tl(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function TQ(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var sF=function(){function r(t,i){var n=this;this.options=vn({},o5,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=EQ(this),this.touchAction=new K3(this,this.options.touchAction),nF(this,!0),ti(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return vn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?iF:IQ},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&ri)&&(n.curRecognizer=null,a=null);for(var u=0;u"u"?{style:{}}:document.createElement("div"),XJ="function",Zn=Math.round,gn=Math.abs,a0=Date.now;function tl(r,e){for(var t,i,n=e[0].toUpperCase()+e.slice(1),s=0;s"u"?ei={}:ei=window;var L3=tl(YJ.style,"touchAction"),z3=L3!==void 0;function JJ(){if(!z3)return!1;var r={},e=ei.CSS&&ei.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?ei.CSS.supports("touch-action",t):!0}),r}var H3="compute",W3="auto",L_="manipulation",un="none",No="pan-x",Fo="pan-y",Ma=JJ(),QJ=/mobile|tablet|ip(ad|hone|od)|android/i,U3="ontouchstart"in ei,ZJ=tl(ei,"PointerEvent")!==void 0,eQ=U3&&QJ.test(navigator.userAgent),ya="touch",tQ="pen",u0="mouse",rQ="kinect",iQ=25,Lt=1,An=2,at=4,Vt=8,ou=1,ba=2,_a=4,wa=8,ys=16,Nr=ba|_a,ln=wa|ys,V3=Nr|ln,K3=["x","y"],au=["clientX","clientY"];function ti(r,e,t){var i;if(r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(i=0;i-1}function nQ(r){if(en(r,un))return un;var e=en(r,No),t=en(r,Fo);return e&&t?un:e||t?e?No:Fo:en(r,L_)?L_:W3}var G3=function(){function r(t,i){this.manager=t,this.set(i)}var e=r.prototype;return e.set=function(i){i===H3&&(i=this.compute()),z3&&this.manager.element.style&&Ma[i]&&(this.manager.element.style[L3]=i),this.actions=i.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var i=[];return ti(this.manager.recognizers,function(n){rl(n.options.enable,[n])&&(i=i.concat(n.getTouchAction()))}),nQ(i.join(" "))},e.preventDefaults=function(i){var n=i.srcEvent,s=i.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,a=en(o,un)&&!Ma[un],u=en(o,Fo)&&!Ma[Fo],l=en(o,No)&&!Ma[No];if(a){var c=i.pointers.length===1,d=i.distance<2,h=i.deltaTime<250;if(c&&d&&h)return}if(!(l&&u)&&(a||u&&s&Nr||l&&s&ln))return this.preventSrc(n)},e.preventSrc=function(i){this.manager.session.prevented=!0,i.preventDefault()},r}();function l0(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function Y3(r){var e=r.length;if(e===1)return{x:Zn(r[0].clientX),y:Zn(r[0].clientY)};for(var t=0,i=0,n=0;n=gn(e)?r<0?ba:_a:e<0?wa:ys}function sQ(r,e){var t=e.center,i=r.offsetDelta||{},n=r.prevDelta||{},s=r.prevInput||{};(e.eventType===Lt||s.eventType===at)&&(n=r.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=r.offsetDelta={x:t.x,y:t.y}),e.deltaX=n.x+(t.x-i.x),e.deltaY=n.y+(t.y-i.y)}function J3(r,e,t){return{x:e/r||0,y:t/r||0}}function oQ(r,e){return uu(e[0],e[1],au)/uu(r[0],r[1],au)}function aQ(r,e){return z_(e[1],e[0],au)+z_(r[1],r[0],au)}function uQ(r,e){var t=r.lastInterval||e,i=e.timeStamp-t.timeStamp,n,s,o,a;if(e.eventType!==Vt&&(i>iQ||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,c=J3(i,u,l);s=c.x,o=c.y,n=gn(c.x)>gn(c.y)?c.x:c.y,a=X3(u,l),r.lastInterval=e}else n=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=n,e.velocityX=s,e.velocityY=o,e.direction=a}function lQ(r,e){var t=r.session,i=e.pointers,n=i.length;t.firstInput||(t.firstInput=QN(e)),n>1&&!t.firstMultiple?t.firstMultiple=QN(e):n===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=Y3(i);e.timeStamp=a0(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=z_(a,u),e.distance=uu(a,u),sQ(t,e),e.offsetDirection=X3(e.deltaX,e.deltaY);var l=J3(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=gn(l.x)>gn(l.y)?l.x:l.y,e.scale=o?oQ(o.pointers,i):1,e.rotation=o?aQ(o.pointers,i):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,uQ(t,e);var c=r.element,d=e.srcEvent,h;d.composedPath?h=d.composedPath()[0]:d.path?h=d.path[0]:h=d.target,l0(h,c)&&(c=h),e.target=c}function cQ(r,e,t){var i=t.pointers.length,n=t.changedPointers.length,s=e&Lt&&i-n===0,o=e&(at|Vt)&&i-n===0;t.isFirst=!!s,t.isFinal=!!o,s&&(r.session={}),t.eventType=e,lQ(r,t),r.emit("hammer.input",t),r.recognize(t),r.session.prevInput=t}function ko(r){return r.trim().split(/\s+/g)}function mo(r,e,t){ti(ko(e),function(i){r.addEventListener(i,t,!1)})}function yo(r,e,t){ti(ko(e),function(i){r.removeEventListener(i,t,!1)})}function ZN(r){var e=r.ownerDocument||r;return e.defaultView||e.parentWindow||window}var Ks=function(){function r(t,i){var n=this;this.manager=t,this.callback=i,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){rl(t.options.enable,[t])&&n.handler(s)},this.init()}var e=r.prototype;return e.handler=function(){},e.init=function(){this.evEl&&mo(this.element,this.evEl,this.domHandler),this.evTarget&&mo(this.target,this.evTarget,this.domHandler),this.evWin&&mo(ZN(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&yo(this.element,this.evEl,this.domHandler),this.evTarget&&yo(this.target,this.evTarget,this.domHandler),this.evWin&&yo(ZN(this.element),this.evWin,this.domHandler)},r}();function mn(r,e,t){if(r.indexOf&&!t)return r.indexOf(e);for(var i=0;iu[e]}):i=i.sort()),i}var fQ={touchstart:Lt,touchmove:An,touchend:at,touchcancel:Vt},pQ="touchstart touchmove touchend touchcancel",d0=function(r){hr(e,r);function e(){var i;return e.prototype.evTarget=pQ,i=r.apply(this,arguments)||this,i.targetIds={},i}var t=e.prototype;return t.handler=function(n){var s=fQ[n.type],o=vQ.call(this,n,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ya,srcEvent:n})},e}(Ks);function vQ(r,e){var t=Bo(r.touches),i=this.targetIds;if(e&(Lt|An)&&t.length===1)return i[t[0].identifier]=!0,[t,t];var n,s,o=Bo(r.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return l0(l.target,u)}),e===Lt)for(n=0;n-1&&n.splice(a,1)};setTimeout(s,bQ)}}function _Q(r,e){r&Lt?(this.primaryTouch=e.changedPointers[0].identifier,tF.call(this,e)):r&(at|Vt)&&tF.call(this,e)}function wQ(r){for(var e=r.srcEvent.clientX,t=r.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(n,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(i){return!!this.simultaneous[i.id]},e.emit=function(i){var n=this,s=this.state;function o(a){n.manager.emit(a,i)}s=Ti&&o(n.options.event+rF(s))},e.tryEmit=function(i){if(this.canEmit())return this.emit(i);this.state=qr},e.canEmit=function(){for(var i=0;is.threshold&&u&s.direction},t.attrTest=function(n){return _s.prototype.attrTest.call(this,n)&&(this.state&ar||!(this.state&ar)&&this.directionTest(n))},t.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var s=r5(n.direction);s&&(n.additionalEvent=this.options.event+s),r.prototype.emit.call(this,n)},e}(_s),i5=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,_r({event:"swipe",threshold:10,velocity:.3,direction:Nr|ln,pointers:1},i))||this}var t=e.prototype;return t.getTouchAction=function(){return f0.prototype.getTouchAction.call(this)},t.attrTest=function(n){var s=this.options.direction,o;return s&(Nr|ln)?o=n.overallVelocity:s&Nr?o=n.overallVelocityX:s&ln&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&s&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&gn(o)>this.options.velocity&&n.eventType&at},t.emit=function(n){var s=r5(n.offsetDirection);s&&this.manager.emit(this.options.event+s,n),this.manager.emit(this.options.event,n)},e}(_s),n5=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,_r({event:"pinch",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[un]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&ar)},t.emit=function(n){if(n.scale!==1){var s=n.scale<1?"in":"out";n.additionalEvent=this.options.event+s}r.prototype.emit.call(this,n)},e}(_s),s5=function(r){hr(e,r);function e(i){return i===void 0&&(i={}),r.call(this,_r({event:"rotate",threshold:0,pointers:2},i))||this}var t=e.prototype;return t.getTouchAction=function(){return[un]},t.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&ar)},e}(_s),o5=function(r){hr(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,_r({event:"press",pointers:1,time:251,threshold:9},i))||this,n._timer=null,n._input=null,n}var t=e.prototype;return t.getTouchAction=function(){return[W3]},t.process=function(n){var s=this,o=this.options,a=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!a||n.eventType&(at|Vt)&&!l)this.reset();else if(n.eventType&Lt)this.reset(),this._timer=setTimeout(function(){s.state=ri,s.tryEmit()},o.time);else if(n.eventType&at)return ri;return qr},t.reset=function(){clearTimeout(this._timer)},t.emit=function(n){this.state===ri&&(n&&n.eventType&at?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=a0(),this.manager.emit(this.options.event,this._input)))},e}(Ea),a5={domEvents:!1,touchAction:H3,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},iF=[[s5,{enable:!1}],[n5,{enable:!1},["rotate"]],[i5,{direction:Nr}],[f0,{direction:Nr},["swipe"]],[H_],[H_,{event:"doubletap",taps:2},["tap"]],[o5]],IQ=1,nF=2;function sF(r,e){var t=r.element;if(t.style){var i;ti(r.options.cssProps,function(n,s){i=tl(t.style,s),e?(r.oldCssProps[i]=t.style[i],t.style[i]=n):t.style[i]=r.oldCssProps[i]||""}),e||(r.oldCssProps={})}}function TQ(r,e){var t=document.createEvent("Event");t.initEvent(r,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var oF=function(){function r(t,i){var n=this;this.options=vn({},a5,i||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=EQ(this),this.touchAction=new G3(this,this.options.touchAction),sF(this,!0),ti(this.options.recognizers,function(s){var o=n.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=r.prototype;return e.set=function(i){return vn(this.options,i),i.touchAction&&this.touchAction.update(),i.inputTarget&&(this.input.destroy(),this.input.target=i.inputTarget,this.input.init()),this},e.stop=function(i){this.session.stopped=i?nF:IQ},e.recognize=function(i){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(i);var s,o=this.recognizers,a=n.curRecognizer;(!a||a&&a.state&ri)&&(n.curRecognizer=null,a=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var u5=a5(function(r,e,t){for(var i=Object.keys(e),n=0;n{const o=2091639*e+n*23283064365386963e-26;return e=t,t=i,i=o-(n=o|0)};return s.uint32=()=>s()*4294967296,s.fract53=()=>s()+(s()*2097152|0)*11102230246251565e-32,s.algorithm="Alea",s.seed=r,s.version="0.9",s}function MQ(){const r=NQ();let e=r(" "),t=r(" "),i=r(" ");for(let n=0;n>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296}return(r>>>0)*23283064365386963e-26}}function FQ(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const f0=typeof window<"u"?window.Hammer||l5:function(){return FQ()};function Dr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=f0(this._dom.overlay);t.on("tap",z(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Le(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{kQ(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}b3(Dr.prototype);Dr.current=null;Dr.prototype.destroy=function(){this.deactivate();for(const t of on(r=Qr(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Dr.prototype.activate=function(){Dr.current&&Dr.current.deactivate(),Dr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Dr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Dr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function kQ(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const BQ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,jQ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,LQ=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,zQ=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function mi(r){if(r)for(;r.hasChildNodes()===!0;){const e=r.firstChild;e&&(mi(e),r.removeChild(e))}}function as(r){return r instanceof String||typeof r=="string"}function aF(r){return typeof r=="object"&&r!==null}function yn(r,e,t,i){let n=!1;i===!0&&(n=e[t]===null&&r[t]!==void 0),n?delete r[t]:r[t]=e[t]}function c5(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(const i in r)if(e[i]!==void 0)if(e[i]===null||typeof e[i]!="object")yn(r,e,i,t);else{const n=r[i],s=e[i];aF(n)&&aF(s)&&c5(n,s,t)}}function Gs(r,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(et(t))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(et(t))throw new TypeError("Arrays are not supported by deepExtend");for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!Ii(r).call(r,n))if(t[n]&&t[n].constructor===Object)e[n]===void 0&&(e[n]={}),e[n].constructor===Object?Ue(e[n],t[n]):yn(e,t,n,i);else if(et(t[n])){e[n]=[];for(let s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||t===!0)if(typeof e[s]=="object"&&e[s]!==null&&zM(e[s])===Object.prototype)r[s]===void 0?r[s]=Ue({},e[s],t):typeof r[s]=="object"&&r[s]!==null&&zM(r[s])===Object.prototype?Ue(r[s],e[s],t):yn(r,e,s,i);else if(et(e[s])){var n;r[s]=Cr(n=e[s]).call(n)}else yn(r,e,s,i);return r}function cu(r,e){return[...r,e]}function HQ(r){return Cr(r).call(r)}function WQ(r){return r.getBoundingClientRect().left}function UQ(r){return r.getBoundingClientRect().top}function Oe(r,e){if(et(r)){const t=r.length;for(let i=0;i3&&arguments[3]!==void 0?arguments[3]:{};const n=function(f){return f!=null},s=function(f){return f!==null&&typeof f=="object"},o=function(f){for(const p in f)if(Object.prototype.hasOwnProperty.call(f,p))return!1;return!0};if(!s(r))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(t))throw new Error("Parameter option must have a value");if(!s(i))throw new Error("Parameter globalOptions must be an object");const a=function(f,p,v){s(f[v])||(f[v]={});const b=p[v],m=f[v];for(const g in b)Object.prototype.hasOwnProperty.call(b,g)&&(m[g]=b[g])},u=e[t],c=s(i)&&!o(i)?i[t]:void 0,d=c?c.enabled:void 0;if(u===void 0)return;if(typeof u=="boolean"){s(r[t])||(r[t]={}),r[t].enabled=u;return}if(u===null&&!s(r[t]))if(n(c))r[t]=an(c);else return;if(!s(u))return;let h=!0;u.enabled!==void 0?h=u.enabled:d!==void 0&&(h=c.enabled),a(r,e,t),r[t].enabled=h}const GQ={linear(r){return r},easeInQuad(r){return r*r},easeOutQuad(r){return r*(2-r)},easeInOutQuad(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic(r){return r*r*r},easeOutCubic(r){return--r*r*r+1},easeInOutCubic(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart(r){return r*r*r*r},easeOutQuart(r){return 1- --r*r*r*r},easeInOutQuart(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint(r){return r*r*r*r*r},easeOutQuint(r){return 1+--r*r*r*r*r},easeInOutQuint(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function yi(r,e){let t;et(e)||(e=[e]);for(const i of r)if(i){t=i[e[0]];for(let n=1;n0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return YQ[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==="none")return;let i;const n=this._isColorString(e);if(n!==void 0&&(e=n),as(e)===!0){if(f5(e)===!0){const s=e.substr(4).substr(0,e.length-5).split(",");i={r:s[0],g:s[1],b:s[2],a:1}}else if(KQ(e)===!0){const s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(h5(e)===!0){const s=p0(e);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const s=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:s}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+ga(e));this._setColor(i,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=ot({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",Zr(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=ot({},e)),this.color=e;const i=so(e.r,e.g,e.b),n=2*Math.PI,s=this.r*i.s,o=this.centerCoordinates.x+s*Math.sin(n*i.h),a=this.centerCoordinates.y+s*Math.cos(n*i.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const t=so(this.color.r,this.color.g,this.color.b);t.v=e/100;const i=Ua(t.h,t.s,t.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color;const t=so(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const n=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,s),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-t.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),ma(i).call(i),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=z(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=z(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=z(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=z(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new f0(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const t=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,i);let n,s,o,a;this.centerCoordinates={x:t*.5,y:i*.5},this.r=.49*t;const u=2*Math.PI/360,l=1/360,c=1/this.r;let d;for(o=0;o<360;o++)for(a=0;a3&&arguments[3]!==void 0?arguments[3]:1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=s,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},ot(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new XQ(n),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e=="string")this.options.filter=e;else if(et(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Wt(e)!==void 0&&(this.options.filter=Wt(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);Wt(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=Wt(this.options);let t=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):(e===!0||Fe(e).call(e,n)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e1?t-1:0),n=1;n{s.appendChild(o)}),this.domElements.push(s),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(V_("i","b",e))}else n.innerText=e+":";return n}_makeDropdown(e,t,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let s=0;t!==void 0&&Fe(e).call(e,t)!==-1&&(s=Fe(e).call(e,t));for(let u=0;uo&&o!==1&&(u.max=Math.ceil(t*1.2),c=u.max,l="range increased"),u.value=t):u.value=n;const d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=u.value;const h=this;u.onchange=function(){d.value=this.value,h._update(Number(this.value),i)},u.oninput=function(){d.value=this.value};const f=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,f,u,d);l!==""&&this.popupHistory[p]!==c&&(this.popupHistory[p]=c,this._setupPopup(l,p))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Zr(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Zr(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,i){const n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=e,t!==void 0&&(n.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:i,value:t}):this.changedOptions.push({path:i,value:t})));const s=this;n.onchange=function(){s._update(this.checked,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeTextInput(e,t,i){const n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=t,t!==e&&this.changedOptions.push({path:i,value:t});const s=this;n.onchange=function(){s._update(this.value,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeColorField(e,t,i){const n=e[1],s=document.createElement("div");t=t===void 0?n:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?n:t,s.onclick=()=>{this._showColorPicker(t,s,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,s)}_showColorPicker(e,t,i){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(n=>{const s="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";t.style.backgroundColor=s,this._update(s,i)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,i)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=!1;const s=Wt(this.options);let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){n=!0;const u=e[a],l=cu(t,a);if(typeof s=="function"&&(n=s(a,t),n===!1&&!et(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,n=this._handleObject(u,l,!0),this.allowCreation=i===!1)),n!==!1){o=!0;const c=this._getValue(l);if(et(u))this._handleArray(u,c,l);else if(typeof u=="string")this._makeTextInput(u,c,l);else if(typeof u=="boolean")this._makeCheckbox(u,c,l);else if(u instanceof Object){if(!this.hideOption(t,a,this.moduleOptions))if(u.enabled!==void 0){const d=cu(l,"enabled"),h=this._getValue(d);if(h===!0){const f=this._makeLabel(a,l,!0);this._makeItem(l,f),o=this._handleObject(u,l)||o}else this._makeCheckbox(u,h,l)}else{const d=this._makeLabel(a,l,!0);this._makeItem(l,d),o=this._handleObject(u,l)||o}}else console.error("dont know how to handle",u,a,l)}}return o}_handleArray(e,t,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,i),e[1]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:Number(t)}))}_update(e,t){const i=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let s=0;ss-this.padding&&(u=!0),u?o=this.x-i:o=this.x,l?a=this.y-t:a=this.y}else a=this.y-t,a+t+this.padding>n&&(a=n-t-this.padding),as&&(o=s-i-this.padding),o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,s),r.apply(this,arguments)}}var l5=u5(function(r,e,t){for(var i=Object.keys(e),n=0;n{const o=2091639*e+n*23283064365386963e-26;return e=t,t=i,i=o-(n=o|0)};return s.uint32=()=>s()*4294967296,s.fract53=()=>s()+(s()*2097152|0)*11102230246251565e-32,s.algorithm="Alea",s.seed=r,s.version="0.9",s}function MQ(){const r=NQ();let e=r(" "),t=r(" "),i=r(" ");for(let n=0;n>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296}return(r>>>0)*23283064365386963e-26}}function FQ(){const r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}const p0=typeof window<"u"?window.Hammer||c5:function(){return FQ()};function Dr(r){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const t=p0(this._dom.overlay);t.on("tap",z(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Le(i).call(i,n=>{t.on(n,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=n=>{kQ(n.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=n=>{("key"in n?n.key==="Escape":n.keyCode===27)&&this.deactivate()}}_3(Dr.prototype);Dr.current=null;Dr.prototype.destroy=function(){this.deactivate();for(const t of on(r=Qr(e=this._cleanupQueue).call(e,0)).call(r)){var r,e;t()}};Dr.prototype.activate=function(){Dr.current&&Dr.current.deactivate(),Dr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Dr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Dr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function kQ(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const BQ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,jQ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,LQ=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,zQ=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function mi(r){if(r)for(;r.hasChildNodes()===!0;){const e=r.firstChild;e&&(mi(e),r.removeChild(e))}}function as(r){return r instanceof String||typeof r=="string"}function uF(r){return typeof r=="object"&&r!==null}function yn(r,e,t,i){let n=!1;i===!0&&(n=e[t]===null&&r[t]!==void 0),n?delete r[t]:r[t]=e[t]}function d5(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(const i in r)if(e[i]!==void 0)if(e[i]===null||typeof e[i]!="object")yn(r,e,i,t);else{const n=r[i],s=e[i];uF(n)&&uF(s)&&d5(n,s,t)}}function Gs(r,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(et(t))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(et(t))throw new TypeError("Arrays are not supported by deepExtend");for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!Ii(r).call(r,n))if(t[n]&&t[n].constructor===Object)e[n]===void 0&&(e[n]={}),e[n].constructor===Object?Ue(e[n],t[n]):yn(e,t,n,i);else if(et(t[n])){e[n]=[];for(let s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||t===!0)if(typeof e[s]=="object"&&e[s]!==null&&HM(e[s])===Object.prototype)r[s]===void 0?r[s]=Ue({},e[s],t):typeof r[s]=="object"&&r[s]!==null&&HM(r[s])===Object.prototype?Ue(r[s],e[s],t):yn(r,e,s,i);else if(et(e[s])){var n;r[s]=Cr(n=e[s]).call(n)}else yn(r,e,s,i);return r}function cu(r,e){return[...r,e]}function HQ(r){return Cr(r).call(r)}function WQ(r){return r.getBoundingClientRect().left}function UQ(r){return r.getBoundingClientRect().top}function Oe(r,e){if(et(r)){const t=r.length;for(let i=0;i3&&arguments[3]!==void 0?arguments[3]:{};const n=function(f){return f!=null},s=function(f){return f!==null&&typeof f=="object"},o=function(f){for(const p in f)if(Object.prototype.hasOwnProperty.call(f,p))return!1;return!0};if(!s(r))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(t))throw new Error("Parameter option must have a value");if(!s(i))throw new Error("Parameter globalOptions must be an object");const a=function(f,p,v){s(f[v])||(f[v]={});const b=p[v],m=f[v];for(const g in b)Object.prototype.hasOwnProperty.call(b,g)&&(m[g]=b[g])},u=e[t],c=s(i)&&!o(i)?i[t]:void 0,d=c?c.enabled:void 0;if(u===void 0)return;if(typeof u=="boolean"){s(r[t])||(r[t]={}),r[t].enabled=u;return}if(u===null&&!s(r[t]))if(n(c))r[t]=an(c);else return;if(!s(u))return;let h=!0;u.enabled!==void 0?h=u.enabled:d!==void 0&&(h=c.enabled),a(r,e,t),r[t].enabled=h}const GQ={linear(r){return r},easeInQuad(r){return r*r},easeOutQuad(r){return r*(2-r)},easeInOutQuad(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic(r){return r*r*r},easeOutCubic(r){return--r*r*r+1},easeInOutCubic(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart(r){return r*r*r*r},easeOutQuart(r){return 1- --r*r*r*r},easeInOutQuart(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint(r){return r*r*r*r*r},easeOutQuint(r){return 1+--r*r*r*r*r},easeInOutQuint(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function yi(r,e){let t;et(e)||(e=[e]);for(const i of r)if(i){t=i[e[0]];for(let n=1;n0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return YQ[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==="none")return;let i;const n=this._isColorString(e);if(n!==void 0&&(e=n),as(e)===!0){if(p5(e)===!0){const s=e.substr(4).substr(0,e.length-5).split(",");i={r:s[0],g:s[1],b:s[2],a:1}}else if(KQ(e)===!0){const s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(f5(e)===!0){const s=v0(e);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const s=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:s}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+ga(e));this._setColor(i,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=ot({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",Zr(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=ot({},e)),this.color=e;const i=so(e.r,e.g,e.b),n=2*Math.PI,s=this.r*i.s,o=this.centerCoordinates.x+s*Math.sin(n*i.h),a=this.centerCoordinates.y+s*Math.cos(n*i.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const t=so(this.color.r,this.color.g,this.color.b);t.v=e/100;const i=Ua(t.h,t.s,t.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color;const t=so(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const n=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,s),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-t.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),ma(i).call(i),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=z(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=z(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=z(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=z(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new p0(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const t=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,i);let n,s,o,a;this.centerCoordinates={x:t*.5,y:i*.5},this.r=.49*t;const u=2*Math.PI/360,l=1/360,c=1/this.r;let d;for(o=0;o<360;o++)for(a=0;a3&&arguments[3]!==void 0?arguments[3]:1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=s,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},ot(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new XQ(n),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e=="string")this.options.filter=e;else if(et(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Wt(e)!==void 0&&(this.options.filter=Wt(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);Wt(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=Wt(this.options);let t=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):(e===!0||Fe(e).call(e,n)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e1?t-1:0),n=1;n{s.appendChild(o)}),this.domElements.push(s),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(V_("i","b",e))}else n.innerText=e+":";return n}_makeDropdown(e,t,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let s=0;t!==void 0&&Fe(e).call(e,t)!==-1&&(s=Fe(e).call(e,t));for(let u=0;uo&&o!==1&&(u.max=Math.ceil(t*1.2),c=u.max,l="range increased"),u.value=t):u.value=n;const d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=u.value;const h=this;u.onchange=function(){d.value=this.value,h._update(Number(this.value),i)},u.oninput=function(){d.value=this.value};const f=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,f,u,d);l!==""&&this.popupHistory[p]!==c&&(this.popupHistory[p]=c,this._setupPopup(l,p))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Zr(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Zr(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,i){const n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=e,t!==void 0&&(n.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:i,value:t}):this.changedOptions.push({path:i,value:t})));const s=this;n.onchange=function(){s._update(this.checked,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeTextInput(e,t,i){const n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=t,t!==e&&this.changedOptions.push({path:i,value:t});const s=this;n.onchange=function(){s._update(this.value,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,n)}_makeColorField(e,t,i){const n=e[1],s=document.createElement("div");t=t===void 0?n:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?n:t,s.onclick=()=>{this._showColorPicker(t,s,i)};const o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,s)}_showColorPicker(e,t,i){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(n=>{const s="rgba("+n.r+","+n.g+","+n.b+","+n.a+")";t.style.backgroundColor=s,this._update(s,i)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,i)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=!1;const s=Wt(this.options);let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){n=!0;const u=e[a],l=cu(t,a);if(typeof s=="function"&&(n=s(a,t),n===!1&&!et(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,n=this._handleObject(u,l,!0),this.allowCreation=i===!1)),n!==!1){o=!0;const c=this._getValue(l);if(et(u))this._handleArray(u,c,l);else if(typeof u=="string")this._makeTextInput(u,c,l);else if(typeof u=="boolean")this._makeCheckbox(u,c,l);else if(u instanceof Object){if(!this.hideOption(t,a,this.moduleOptions))if(u.enabled!==void 0){const d=cu(l,"enabled"),h=this._getValue(d);if(h===!0){const f=this._makeLabel(a,l,!0);this._makeItem(l,f),o=this._handleObject(u,l)||o}else this._makeCheckbox(u,h,l)}else{const d=this._makeLabel(a,l,!0);this._makeItem(l,d),o=this._handleObject(u,l)||o}}else console.error("dont know how to handle",u,a,l)}}return o}_handleArray(e,t,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,i),e[1]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:Number(t)}))}_update(e,t){const i=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}_constructOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let s=0;ss-this.padding&&(u=!0),u?o=this.x-i:o=this.x,l?a=this.y-t:a=this.y}else a=this.y-t,a+t+this.padding>n&&(a=n-t-this.padding),as&&(o=s-i-this.padding),os.distance?u=" in "+Qe.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+Qe.printLocation(s.path,s.closestMatch,""):n.distance<=o?u='. Did you mean "'+n.closestMatch+'"?'+Qe.printLocation(n.path,e):u=". Did you mean one of these: "+Qe.print(Ze(t))+Qe.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+u,K_),ro=!0}static findInOptions(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=1e9,o="",a=[];const u=e.toLowerCase();let l;for(const d in t){let h;if(t[d].__type__!==void 0&&n===!0){const f=Qe.findInOptions(e,t[d],cu(i,d));s>f.distance&&(o=f.closestMatch,a=f.path,s=f.distance,l=f.indexMatch)}else{var c;Fe(c=d.toLowerCase()).call(c,u)!==-1&&(l=d),h=Qe.levenshteinDistance(e,d),s>h&&(o=d,a=HQ(i),s=h)}}return{closestMatch:o,path:a,distance:s,indexMatch:l}}static printLocation(e,t){let n=` @@ -103,13 +103,13 @@ Minimum version required to store current data is: `+R+`. `;for(let s=0;s":!0,"--":!0},wi="",ws=0,Ee="",he="",Ht=Mt.NULL;function sZ(){ws=0,Ee=wi.charAt(0)}function vt(){ws++,Ee=wi.charAt(ws)}function Wn(){return wi.charAt(ws+1)}function cF(r){var e=r.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function qi(r,e){if(r||(r={}),e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function oZ(r,e,t){for(var i=e.split("."),n=r;i.length;){var s=i.shift();i.length?(n[s]||(n[s]={}),n=n[s]):n[s]=t}}function g5(r,e){for(var t,i,n=null,s=[r],o=r;o.parent;)s.push(o.parent),o=o.parent;if(o.nodes){for(t=0,i=o.nodes.length;t=0;t--){var a,u=s[t];u.nodes||(u.nodes=[]),Fe(a=u.nodes).call(a,n)===-1&&u.nodes.push(n)}e.attr&&(n.attr=qi(n.attr,e.attr))}function aZ(r,e){if(r.edges||(r.edges=[]),r.edges.push(e),r.edge){var t=qi({},r.edge);e.attr=qi(t,e.attr)}}function m5(r,e,t,i,n){var s={from:e,to:t,type:i};return r.edge&&(s.attr=qi({},r.edge)),s.attr=qi(s.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(s.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),s}function Ve(){for(Ht=Mt.NULL,he="";Ee===" "||Ee===" "||Ee===` +`}static print(e){return ga(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;const i=[];let n;for(n=0;n<=t.length;n++)i[n]=[n];let s;for(s=0;s<=e.length;s++)i[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)==e.charAt(s-1)?i[n][s]=i[n-1][s-1]:i[n][s]=Math.min(i[n-1][s-1]+1,Math.min(i[n][s-1]+1,i[n-1][s]+1));return i[t.length][e.length]}};const eZ=Dr,tZ=JQ,us=p0,rZ=QQ,v5=K_,iZ=ZQ;function nZ(r){return wi=r,uZ()}var g5={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},g0=an(g5);g0.color="color.color";g0.style="dashes";var Mt={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},cF={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},wi="",ws=0,Ee="",he="",Ht=Mt.NULL;function sZ(){ws=0,Ee=wi.charAt(0)}function vt(){ws++,Ee=wi.charAt(ws)}function Wn(){return wi.charAt(ws+1)}function dF(r){var e=r.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function qi(r,e){if(r||(r={}),e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function oZ(r,e,t){for(var i=e.split("."),n=r;i.length;){var s=i.shift();i.length?(n[s]||(n[s]={}),n=n[s]):n[s]=t}}function m5(r,e){for(var t,i,n=null,s=[r],o=r;o.parent;)s.push(o.parent),o=o.parent;if(o.nodes){for(t=0,i=o.nodes.length;t=0;t--){var a,u=s[t];u.nodes||(u.nodes=[]),Fe(a=u.nodes).call(a,n)===-1&&u.nodes.push(n)}e.attr&&(n.attr=qi(n.attr,e.attr))}function aZ(r,e){if(r.edges||(r.edges=[]),r.edges.push(e),r.edge){var t=qi({},r.edge);e.attr=qi(t,e.attr)}}function y5(r,e,t,i,n){var s={from:e,to:t,type:i};return r.edge&&(s.attr=qi({},r.edge)),s.attr=qi(s.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(s.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),s}function Ve(){for(Ht=Mt.NULL,he="";Ee===" "||Ee===" "||Ee===` `||Ee==="\r";)vt();do{var r=!1;if(Ee==="#"){for(var e=ws-1;wi.charAt(e)===" "||wi.charAt(e)===" ";)e--;if(wi.charAt(e)===` `||wi.charAt(e)===""){for(;Ee!=""&&Ee!=` `;)vt();r=!0}}if(Ee==="/"&&Wn()==="/"){for(;Ee!=""&&Ee!=` `;)vt();r=!0}if(Ee==="/"&&Wn()==="*"){for(;Ee!="";)if(Ee==="*"&&Wn()==="/"){vt(),vt();break}else vt();r=!0}for(;Ee===" "||Ee===" "||Ee===` -`||Ee==="\r";)vt()}while(r);if(Ee===""){Ht=Mt.DELIMITER;return}var t=Ee+Wn();if(lF[t]){Ht=Mt.DELIMITER,he=t,vt(),vt();return}if(lF[Ee]){Ht=Mt.DELIMITER,he=Ee,vt();return}if(cF(Ee)||Ee==="-"){for(he+=Ee,vt();cF(Ee);)he+=Ee,vt();he==="false"?he=!1:he==="true"?he=!0:isNaN(Number(he))||(he=Number(he)),Ht=Mt.IDENTIFIER;return}if(Ee==='"'){for(vt();Ee!=""&&(Ee!='"'||Ee==='"'&&Wn()==='"');)Ee==='"'?(he+=Ee,vt()):Ee==="\\"&&Wn()==="n"?(he+=` -`,vt()):he+=Ee,vt();if(Ee!='"')throw Nt('End of string " expected');vt(),Ht=Mt.IDENTIFIER;return}for(Ht=Mt.UNKNOWN;Ee!="";)he+=Ee,vt();throw new SyntaxError('Syntax error in part "'+w5(he,30)+'"')}function uZ(){var r={};if(sZ(),Ve(),he==="strict"&&(r.strict=!0,Ve()),(he==="graph"||he==="digraph")&&(r.type=he,Ve()),Ht===Mt.IDENTIFIER&&(r.id=he,Ve()),he!="{")throw Nt("Angle bracket { expected");if(Ve(),y5(r),he!="}")throw Nt("Angle bracket } expected");if(Ve(),he!=="")throw Nt("End of file expected");return Ve(),delete r.node,delete r.edge,delete r.graph,r}function y5(r){for(;he!==""&&he!="}";)lZ(r),he===";"&&Ve()}function lZ(r){var e=b5(r);if(e){_5(r,e);return}var t=cZ(r);if(!t){if(Ht!=Mt.IDENTIFIER)throw Nt("Identifier expected");var i=he;if(Ve(),he==="="){if(Ve(),Ht!=Mt.IDENTIFIER)throw Nt("Identifier expected");r[i]=he,Ve()}else dZ(r,i)}}function b5(r){var e=null;if(he==="subgraph"&&(e={},e.type="subgraph",Ve(),Ht===Mt.IDENTIFIER&&(e.id=he,Ve())),he==="{"){if(Ve(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,y5(e),he!="}")throw Nt("Angle bracket } expected");Ve(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function cZ(r){return he==="node"?(Ve(),r.node=bo(),"node"):he==="edge"?(Ve(),r.edge=bo(),"edge"):he==="graph"?(Ve(),r.graph=bo(),"graph"):null}function dZ(r,e){var t={id:e},i=bo();i&&(t.attr=i),g5(r,t),_5(r,e)}function _5(r,e){for(;he==="->"||he==="--";){var t,i=he;Ve();var n=b5(r);if(n)t=n;else{if(Ht!=Mt.IDENTIFIER)throw Nt("Identifier or subgraph expected");t=he,g5(r,{id:t}),Ve()}var s=bo(),o=m5(r,e,t,i,s);aZ(r,o),e=t}}function bo(){for(var r,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},i={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,s=new Array;he==="[";){for(Ve(),e={};he!==""&&he!="]";){if(Ht!=Mt.IDENTIFIER)throw Nt("Attribute name expected");var o=he;if(Ve(),he!="=")throw Nt("Equal sign = expected");if(Ve(),Ht!=Mt.IDENTIFIER)throw Nt("Attribute value expected");var a=he;o==="style"&&(a=t[a]);var u;o==="arrowhead"&&(u=i[a],o="arrows",a={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=i[a],o="arrows",a={from:{enabled:!0,type:u}}),n.push({attr:e,name:o,value:a}),s.push(o),Ve(),he==","&&Ve()}if(he!="]")throw Nt("Bracket ] expected");Ve()}if(Ii(s).call(s,"dir")){var l={};for(l.arrows={},r=0;r"&&(a.arrows="to"),a};Le(n=e.edges).call(n,function(o){var a,u;if(o.from instanceof Object?a=o.from.nodes:a={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;Le(l=o.from.edges).call(l,function(d){var h=s(d);t.edges.push(h)})}if(hZ(a,u,function(d,h){var f=m5(t,d.id,h.id,o.type,o.attr),p=s(f);t.edges.push(p)}),o.to instanceof Object&&o.to.edges){var c;Le(c=o.to.edges).call(c,function(d){var h=s(d);t.edges.push(h)})}})}return e.attr&&(t.options=e.attr),t}function pZ(r,e){var t;const i={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(i.nodes.fixed=e.fixed),e.parseColor!=null&&(i.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(i.edges.inheritColor=e.inheritColor));const n=r.edges,s=ms(n).call(n,a=>{const u={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.type==="Directed"&&(u.arrows="to"),a.color&&i.edges.inheritColor===!1&&(u.color=a.color),u});return{nodes:ms(t=r.nodes).call(t,a=>{const u={id:a.id,fixed:i.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.size!=null&&(u.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.title!=null&&(u.title=a.title),a.x!=null&&(u.x=a.x),a.y!=null&&(u.y=a.y),a.color!=null&&(i.nodes.parseColor===!0?u.color=a.color:u.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),u}),edges:s}}const vZ={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},gZ={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},mZ={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},yZ={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},bZ={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},_Z={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},wZ={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},EZ={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},SZ={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},OZ={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},IZ={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"};var TZ=Object.freeze({__proto__:null,cn:EZ,cs:IZ,de:gZ,en:vZ,es:mZ,fr:OZ,it:yZ,nl:bZ,pt:_Z,ru:wZ,uk:SZ});function $Z(r,e){try{const[i,n]=e.split(/[-_ /]/,2),s=i!=null?i.toLowerCase():null,o=n!=null?n.toUpperCase():null;if(s&&o){const a=s+"-"+o;if(Object.prototype.hasOwnProperty.call(r,a))return a;var t;console.warn(JX(t="Unknown variant ".concat(o," of language ")).call(t,s,"."))}if(s){const a=s;if(Object.prototype.hasOwnProperty.call(r,a))return a;console.warn("Unknown language ".concat(s))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(i){return console.error(i),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class PZ{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const i=Math.floor(t/2),n=Math.floor(t/4),s=Math.floor(t/8),o=Math.floor(t/16),a=Math.floor(e/2),u=Math.floor(e/4),l=Math.floor(e/8),c=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=i,this.coordinates=[[0,0,a,i],[a,0,u,n],[a,n,l,s],[5*l,n,c,o]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let i=1;i2){t*=.5;let a=0;for(;t>2&&a=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const u=this.coordinates[a];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],i,n,s,o)}else e.drawImage(this.image,i,n,s,o)}}class RZ{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,i){if(!(e===void 0||i===void 0)){if(t===void 0){console.warn("No broken url image defined");return}i.image.onerror=()=>{console.error("Could not load brokenImage:",t)},i.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const i=this.images[e];if(i)return i;const n=new PZ;return this.images[e]=n,n.image.onload=()=>{this._fixImageCoordinates(n.image),n.init(),this._redrawWithImage(n)},n.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,n)},n.image.src=e,n}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var hF={},fF={},Zy={exports:{}},eb,pF;function CZ(){if(pF)return eb;pF=1;var r=Te();return eb=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),eb}var tb,vF;function xZ(){if(vF)return tb;vF=1;var r=Te(),e=Et(),t=Br(),i=CZ(),n=Object.isExtensible,s=r(function(){});return tb=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,tb}var rb,gF;function E5(){if(gF)return rb;gF=1;var r=Te();return rb=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),rb}var mF;function nl(){if(mF)return Zy.exports;mF=1;var r=ce(),e=Ce(),t=da(),i=Et(),n=It(),s=cr().f,o=Qu(),a=e0(),u=xZ(),l=Uu(),c=E5(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,S){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!S)return"E";p(y)}return y[h].objectID},b=function(y,S){if(!n(y,h)){if(!u(y))return!0;if(!S)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){w.enable=function(){},d=!0;var y=o.f,S=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(I){for(var _=y(I),E=0,T=_.length;E_;_++)if(T=D(f[_]),T&&o(h,T))return T;return new d(!1)}O=a(f,I)}for(R=g?f.next:O.next;!(x=e(R,O)).done;){try{T=D(x.value)}catch(j){l(O,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},ab}var ub,SF;function m0(){if(SF)return ub;SF=1;var r=dt(),e=TypeError;return ub=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},ub}var lb,OF;function y0(){if(OF)return lb;OF=1;var r=ce(),e=Ye(),t=nl(),i=Te(),n=Bs(),s=sl(),o=m0(),a=wt(),u=Et(),l=Ds(),c=qn(),d=cr().f,h=Hi().forEach,f=rt(),p=Dn(),v=p.set,b=p.getterFor;return lb=function(m,g,w){var y=m.indexOf("Map")!==-1,S=m.indexOf("Weak")!==-1,O=y?"set":"add",I=e[m],_=I&&I.prototype,E={},T;if(!f||!a(I)||!(S||_.forEach&&!i(function(){new I().entries().next()})))T=w.getConstructor(g,m,y,O),t.enable();else{T=g(function(C,D){v(o(C,R),{type:m,collection:new I}),l(D)||s(D,C[O],{that:C,AS_ENTRIES:y})});var R=T.prototype,x=b(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in _&&!(S&&C==="clear")&&n(R,C,function(j,ee){var H=x(this).collection;if(!D&&S&&!u(j))return C==="get"?void 0:!1;var Z=H[C](j===0?0:j,ee);return D?this:Z})}),S||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,m,!1,!0),E[m]=T,r({global:!0,forced:!0},E),S||w.setStrong(T,m,y),T},lb}var cb,IF;function b0(){if(IF)return cb;IF=1;var r=va();return cb=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},cb}var db,TF;function AZ(){if(TF)return db;TF=1;var r=er(),e=t0(),t=ht(),i=rt(),n=t("species");return db=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},db}var hb,$F;function O5(){if($F)return hb;$F=1;var r=pa(),e=t0(),t=b0(),i=Ku(),n=m0(),s=Ds(),o=sl(),a=i0(),u=n0(),l=AZ(),c=rt(),d=nl().fastKey,h=Dn(),f=h.set,p=h.getterFor;return hb={getConstructor:function(v,b,m,g){var w=v(function(_,E){n(_,y),f(_,{type:b,index:r(null),first:null,last:null,size:0}),c||(_.size=0),s(E)||o(E,_[g],{that:_,AS_ENTRIES:m})}),y=w.prototype,S=p(b),O=function(_,E,T){var R=S(_),x=I(_,E),C,D;return x?x.value=T:(R.last=x={index:D=d(E,!0),key:E,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:_.size++,D!=="F"&&(R.index[D]=x)),_},I=function(_,E){var T=S(_),R=d(E),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===E)return x};return t(y,{clear:function(){for(var E=this,T=S(E),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:E.size=0},delete:function(_){var E=this,T=S(E),R=I(E,_);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:E.size--}return!!R},forEach:function(E){for(var T=S(this),R=i(E,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(E){return!!I(this,E)}}),t(y,m?{get:function(E){var T=I(this,E);return T&&T.value},set:function(E,T){return O(this,E===0?0:E,T)}}:{add:function(E){return O(this,E=E===0?0:E,E)}}),c&&e(y,"size",{configurable:!0,get:function(){return S(this).size}}),w},setStrong:function(v,b,m){var g=b+" Iterator",w=p(b),y=p(g);a(v,b,function(S,O){f(this,{type:g,target:S,state:w(S),kind:O,last:null})},function(){for(var S=y(this),O=S.kind,I=S.last;I&&I.removed;)I=I.previous;return!S.target||!(S.last=I=I?I.next:S.state.first)?(S.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},m?"entries":"values",!m,!0),l(b)}},hb}var PF;function MZ(){if(PF)return fF;PF=1;var r=y0(),e=O5();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),fF}var RF;function NZ(){return RF||(RF=1,MZ()),hF}var CF={},fb,xF;function I5(){return xF||(xF=1,fb=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),fb}var pb,qF;function FZ(){if(qF)return pb;qF=1;var r=er(),e=I5(),t=r("Map");return pb={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},pb}var DF;function kZ(){if(DF)return CF;DF=1;var r=ce(),e=Ce(),t=li(),i=ui(),n=sl(),s=FZ(),o=Fs(),a=Te(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,b){i(v),t(b);var m=new u,g=0;return n(v,function(w){var y=b(w,g++);l(m,y)?h(c(m,y),w):d(m,y,[w])}),m}}),CF}var AF={},vb,MF;function BZ(){if(MF)return vb;MF=1;var r=Ce(),e=js(),t=dr(),i=ui(),n=r("".charAt),s=r("".charCodeAt),o=r("".slice),a=function(u){return function(l,c){var d=t(i(l)),h=e(c),f=d.length,p,v;return h<0||h>=f?u?"":void 0:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return vb={codeAt:a(!1),charAt:a(!0)},vb}var NF;function _0(){if(NF)return AF;NF=1;var r=BZ().charAt,e=dr(),t=Dn(),i=i0(),n=n0(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),AF}var gb,FF;function jZ(){if(FF)return gb;FF=1,Ws(),NZ(),kZ(),_0();var r=Be();return gb=r.Map,gb}var mb,kF;function LZ(){if(kF)return mb;kF=1;var r=jZ();return Us(),mb=r,mb}var yb,BF;function zZ(){return BF||(BF=1,yb=LZ()),yb}var HZ=zZ(),w0=pe(HZ);class WZ{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},ot(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&Fe(t).call(t,i)===-1){const n=e[i];this.add(i,n)}}}clear(){this._groups=new w0,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const n=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[n]),this._groups.set(e,i)}else{const n=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[n],this._groups.set(e,i)}return i}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var jF={},LF;function UZ(){if(LF)return jF;LF=1;var r=ce();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),jF}var bb,zF;function VZ(){if(zF)return bb;zF=1,UZ();var r=Be();return bb=r.Number.isNaN,bb}var _b,HF;function KZ(){if(HF)return _b;HF=1;var r=VZ();return _b=r,_b}var wb,WF;function GZ(){return WF||(WF=1,wb=KZ()),wb}var YZ=GZ(),G_=pe(YZ),UF={},Eb,VF;function XZ(){if(VF)return Eb;VF=1;var r=Ye(),e=r.isFinite;return Eb=Number.isFinite||function(i){return typeof i=="number"&&e(i)},Eb}var KF;function JZ(){if(KF)return UF;KF=1;var r=ce(),e=XZ();return r({target:"Number",stat:!0},{isFinite:e}),UF}var Sb,GF;function QZ(){if(GF)return Sb;GF=1,JZ();var r=Be();return Sb=r.Number.isFinite,Sb}var Ob,YF;function ZZ(){if(YF)return Ob;YF=1;var r=QZ();return Ob=r,Ob}var Ib,XF;function eee(){return XF||(XF=1,Ib=ZZ()),Ib}var tee=eee(),tn=pe(tee),JF={},QF;function ree(){if(QF)return JF;QF=1;var r=ce(),e=Hi().some,t=Vs(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),JF}var Tb,ZF;function iee(){if(ZF)return Tb;ZF=1,ree();var r=Tt();return Tb=r("Array","some"),Tb}var $b,ek;function nee(){if(ek)return $b;ek=1;var r=dt(),e=iee(),t=Array.prototype;return $b=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},$b}var Pb,tk;function see(){if(tk)return Pb;tk=1;var r=nee();return Pb=r,Pb}var Rb,rk;function oee(){return rk||(rk=1,Rb=see()),Rb}var aee=oee(),uee=pe(aee),Cb={exports:{}},ik={},nk;function lee(){if(nk)return ik;nk=1;var r=ce(),e=rt(),t=cr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),ik}var sk;function cee(){if(sk)return Cb.exports;sk=1,lee();var r=Be(),e=r.Object,t=Cb.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Cb.exports}var xb,ok;function T5(){if(ok)return xb;ok=1;var r=cee();return xb=r,xb}var qb,ak;function dee(){if(ak)return qb;ak=1;var r=T5();return qb=r,qb}var Db,uk;function hee(){if(uk)return Db;uk=1;var r=dee();return Db=r,Db}var Ab,lk;function fee(){return lk||(lk=1,Ab=hee()),Ab}var pee=fee(),vee=pe(pee),ck={},dk;function gee(){if(dk)return ck;dk=1;var r=ht(),e=cr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),ck}var hk={},fk;function mee(){return fk||(fk=1,P3()),hk}var pk={},vk;function yee(){return vk||(vk=1,R3()),pk}var gk={},mk;function bee(){if(mk)return gk;mk=1;var r=Je();return r("metadata"),gk}var Mb,yk;function _ee(){if(yk)return Mb;yk=1;var r=A3();return gee(),mee(),yee(),bee(),Mb=r,Mb}var bk={},Nb,_k;function $5(){if(_k)return Nb;_k=1;var r=er(),e=Ce(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return Nb=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},Nb}var wk;function wee(){if(wk)return bk;wk=1;var r=ce(),e=$5();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),bk}var Ek={},Fb,Sk;function P5(){if(Sk)return Fb;Sk=1;for(var r=ks(),e=er(),t=Ce(),i=ca(),n=ht(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;ch;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),y2}var l1,_2;function yte(){if(_2)return l1;_2=1,mte();var r=Be();return l1=r.Object.getOwnPropertyDescriptors,l1}var c1,w2;function bte(){if(w2)return c1;w2=1;var r=yte();return c1=r,c1}var d1,E2;function _te(){return E2||(E2=1,d1=bte()),d1}var wte=_te(),Ai=pe(wte),h1={exports:{}},S2={},O2;function Ete(){if(O2)return S2;O2=1;var r=ce(),e=rt(),t=Zw().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),S2}var I2;function Ste(){if(I2)return h1.exports;I2=1,Ete();var r=Be(),e=r.Object,t=h1.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),h1.exports}var f1,T2;function Ote(){if(T2)return f1;T2=1;var r=Ste();return f1=r,f1}var p1,$2;function Ite(){return $2||($2=1,p1=Ote()),p1}var Tte=Ite(),ol=pe(Tte),v1,P2;function $te(){return P2||(P2=1,v1=T5()),v1}var Pte=$te(),al=pe(Pte);function E0(r,e){const t=["node","edge","label"];let i=!0;const n=yi(e,"chosen");if(typeof n=="boolean")i=n;else if(typeof n=="object"){if(Fe(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const s=yi(e,["chosen",r]);(typeof s=="boolean"||typeof s=="function")&&(i=s)}return i}function Y_(r,e,t){if(r.width<=0||r.height<=0)return!1;if(t!==void 0){const s={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const o=-t.angle;e={x:Math.cos(o)*s.x-Math.sin(o)*s.y,y:Math.sin(o)*s.x+Math.cos(o)*s.y}}else e=s}const i=r.x+r.width,n=r.y+r.width;return r.lefte.x&&r.tope.y}function du(r){return typeof r=="string"&&r!==""}function C5(r,e,t,i){let n=i.x,s=i.y;if(typeof i.distanceToBorder=="function"){const o=i.distanceToBorder(r,e),a=Math.sin(e)*o,u=Math.cos(e)*o;u===o?(n+=o,s=i.y):a===o?(n=i.x,s-=o):(n+=u,s-=a)}else i.shape.width>i.shape.height?(n=i.x+i.shape.width*.5,s=i.y-t):(n=i.x+t,s=i.y-i.shape.height*.5);return{x:n,y:s}}var g1,R2;function Rte(){if(R2)return g1;R2=1,Ws();var r=Tt();return g1=r("Array","values"),g1}var m1,C2;function Cte(){if(C2)return m1;C2=1;var r=Rte();return m1=r,m1}var y1,x2;function xte(){if(x2)return y1;x2=1,Us();var r=zs(),e=It(),t=dt(),i=Cte(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return y1=function(o){var a=o.values;return o===n||t(n,o)&&a===n.values||e(s,r(o))?i:a},y1}var b1,q2;function qte(){return q2||(q2=1,b1=xte()),b1}var Dte=qte(),x5=pe(Dte);class Ate{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let n=t;(t===void 0||t==="")&&(n=" ");const s=this.measureText(n,i),o=ot({},x5(s));o.text=t,o.width=s.width,o.mod=i,(t===void 0||t==="")&&(o.width=0),this.lines[e].blocks.push(o),this.lines[e].width+=o.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;ee&&(e=n.width),t+=n.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class D2{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[i,n]=this.prepareRegExp(e),s=i.test(this.text.substr(this.position,n));return s&&t&&(this.position+=n-1),s}parseEndTag(e,t,i){let n=this.mod()===e;return e==="mono"?n=n&&this.mono:n=n&&!this.mono,n&&this.match(t)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,i;if(e instanceof RegExp)i=e,t=1;else{const n=Mte[e];n!==void 0?i=n:i=new RegExp(e),t=e.length}return[i,t]}}class Nte{constructor(e,t,i,n){this.ctx=e,this.parent=t,this.selected=i,this.hover=n;const s=(o,a)=>{if(o===void 0)return 0;const u=this.parent.getFormattingValues(e,i,n,a);let l=0;return o!==""&&(l=this.ctx.measureText(o).width),{width:l,values:u}};this.lines=new Ate(s)}process(e){if(!du(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,` +`||Ee==="\r";)vt()}while(r);if(Ee===""){Ht=Mt.DELIMITER;return}var t=Ee+Wn();if(cF[t]){Ht=Mt.DELIMITER,he=t,vt(),vt();return}if(cF[Ee]){Ht=Mt.DELIMITER,he=Ee,vt();return}if(dF(Ee)||Ee==="-"){for(he+=Ee,vt();dF(Ee);)he+=Ee,vt();he==="false"?he=!1:he==="true"?he=!0:isNaN(Number(he))||(he=Number(he)),Ht=Mt.IDENTIFIER;return}if(Ee==='"'){for(vt();Ee!=""&&(Ee!='"'||Ee==='"'&&Wn()==='"');)Ee==='"'?(he+=Ee,vt()):Ee==="\\"&&Wn()==="n"?(he+=` +`,vt()):he+=Ee,vt();if(Ee!='"')throw Nt('End of string " expected');vt(),Ht=Mt.IDENTIFIER;return}for(Ht=Mt.UNKNOWN;Ee!="";)he+=Ee,vt();throw new SyntaxError('Syntax error in part "'+E5(he,30)+'"')}function uZ(){var r={};if(sZ(),Ve(),he==="strict"&&(r.strict=!0,Ve()),(he==="graph"||he==="digraph")&&(r.type=he,Ve()),Ht===Mt.IDENTIFIER&&(r.id=he,Ve()),he!="{")throw Nt("Angle bracket { expected");if(Ve(),b5(r),he!="}")throw Nt("Angle bracket } expected");if(Ve(),he!=="")throw Nt("End of file expected");return Ve(),delete r.node,delete r.edge,delete r.graph,r}function b5(r){for(;he!==""&&he!="}";)lZ(r),he===";"&&Ve()}function lZ(r){var e=_5(r);if(e){w5(r,e);return}var t=cZ(r);if(!t){if(Ht!=Mt.IDENTIFIER)throw Nt("Identifier expected");var i=he;if(Ve(),he==="="){if(Ve(),Ht!=Mt.IDENTIFIER)throw Nt("Identifier expected");r[i]=he,Ve()}else dZ(r,i)}}function _5(r){var e=null;if(he==="subgraph"&&(e={},e.type="subgraph",Ve(),Ht===Mt.IDENTIFIER&&(e.id=he,Ve())),he==="{"){if(Ve(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,b5(e),he!="}")throw Nt("Angle bracket } expected");Ve(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function cZ(r){return he==="node"?(Ve(),r.node=bo(),"node"):he==="edge"?(Ve(),r.edge=bo(),"edge"):he==="graph"?(Ve(),r.graph=bo(),"graph"):null}function dZ(r,e){var t={id:e},i=bo();i&&(t.attr=i),m5(r,t),w5(r,e)}function w5(r,e){for(;he==="->"||he==="--";){var t,i=he;Ve();var n=_5(r);if(n)t=n;else{if(Ht!=Mt.IDENTIFIER)throw Nt("Identifier or subgraph expected");t=he,m5(r,{id:t}),Ve()}var s=bo(),o=y5(r,e,t,i,s);aZ(r,o),e=t}}function bo(){for(var r,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},i={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,s=new Array;he==="[";){for(Ve(),e={};he!==""&&he!="]";){if(Ht!=Mt.IDENTIFIER)throw Nt("Attribute name expected");var o=he;if(Ve(),he!="=")throw Nt("Equal sign = expected");if(Ve(),Ht!=Mt.IDENTIFIER)throw Nt("Attribute value expected");var a=he;o==="style"&&(a=t[a]);var u;o==="arrowhead"&&(u=i[a],o="arrows",a={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=i[a],o="arrows",a={from:{enabled:!0,type:u}}),n.push({attr:e,name:o,value:a}),s.push(o),Ve(),he==","&&Ve()}if(he!="]")throw Nt("Bracket ] expected");Ve()}if(Ii(s).call(s,"dir")){var l={};for(l.arrows={},r=0;r"&&(a.arrows="to"),a};Le(n=e.edges).call(n,function(o){var a,u;if(o.from instanceof Object?a=o.from.nodes:a={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;Le(l=o.from.edges).call(l,function(d){var h=s(d);t.edges.push(h)})}if(hZ(a,u,function(d,h){var f=y5(t,d.id,h.id,o.type,o.attr),p=s(f);t.edges.push(p)}),o.to instanceof Object&&o.to.edges){var c;Le(c=o.to.edges).call(c,function(d){var h=s(d);t.edges.push(h)})}})}return e.attr&&(t.options=e.attr),t}function pZ(r,e){var t;const i={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(i.nodes.fixed=e.fixed),e.parseColor!=null&&(i.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(i.edges.inheritColor=e.inheritColor));const n=r.edges,s=ms(n).call(n,a=>{const u={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.type==="Directed"&&(u.arrows="to"),a.color&&i.edges.inheritColor===!1&&(u.color=a.color),u});return{nodes:ms(t=r.nodes).call(t,a=>{const u={id:a.id,fixed:i.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.size!=null&&(u.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.title!=null&&(u.title=a.title),a.x!=null&&(u.x=a.x),a.y!=null&&(u.y=a.y),a.color!=null&&(i.nodes.parseColor===!0?u.color=a.color:u.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),u}),edges:s}}const vZ={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},gZ={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},mZ={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},yZ={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},bZ={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},_Z={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},wZ={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},EZ={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},SZ={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},OZ={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},IZ={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"};var TZ=Object.freeze({__proto__:null,cn:EZ,cs:IZ,de:gZ,en:vZ,es:mZ,fr:OZ,it:yZ,nl:bZ,pt:_Z,ru:wZ,uk:SZ});function $Z(r,e){try{const[i,n]=e.split(/[-_ /]/,2),s=i!=null?i.toLowerCase():null,o=n!=null?n.toUpperCase():null;if(s&&o){const a=s+"-"+o;if(Object.prototype.hasOwnProperty.call(r,a))return a;var t;console.warn(JX(t="Unknown variant ".concat(o," of language ")).call(t,s,"."))}if(s){const a=s;if(Object.prototype.hasOwnProperty.call(r,a))return a;console.warn("Unknown language ".concat(s))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(i){return console.error(i),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class PZ{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const i=Math.floor(t/2),n=Math.floor(t/4),s=Math.floor(t/8),o=Math.floor(t/16),a=Math.floor(e/2),u=Math.floor(e/4),l=Math.floor(e/8),c=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=i,this.coordinates=[[0,0,a,i],[a,0,u,n],[a,n,l,s],[5*l,n,c,o]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let i=1;i2){t*=.5;let a=0;for(;t>2&&a=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const u=this.coordinates[a];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],i,n,s,o)}else e.drawImage(this.image,i,n,s,o)}}class RZ{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,i){if(!(e===void 0||i===void 0)){if(t===void 0){console.warn("No broken url image defined");return}i.image.onerror=()=>{console.error("Could not load brokenImage:",t)},i.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const i=this.images[e];if(i)return i;const n=new PZ;return this.images[e]=n,n.image.onload=()=>{this._fixImageCoordinates(n.image),n.init(),this._redrawWithImage(n)},n.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,n)},n.image.src=e,n}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var fF={},pF={},Zy={exports:{}},eb,vF;function CZ(){if(vF)return eb;vF=1;var r=$e();return eb=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),eb}var tb,gF;function xZ(){if(gF)return tb;gF=1;var r=$e(),e=Et(),t=Br(),i=CZ(),n=Object.isExtensible,s=r(function(){});return tb=s||i?function(a){return!e(a)||i&&t(a)==="ArrayBuffer"?!1:n?n(a):!0}:n,tb}var rb,mF;function S5(){if(mF)return rb;mF=1;var r=$e();return rb=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),rb}var yF;function nl(){if(yF)return Zy.exports;yF=1;var r=ce(),e=Ce(),t=da(),i=Et(),n=It(),s=cr().f,o=Qu(),a=t0(),u=xZ(),l=Uu(),c=S5(),d=!1,h=l("meta"),f=0,p=function(y){s(y,h,{value:{objectID:"O"+f++,weakData:{}}})},v=function(y,S){if(!i(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!n(y,h)){if(!u(y))return"F";if(!S)return"E";p(y)}return y[h].objectID},b=function(y,S){if(!n(y,h)){if(!u(y))return!0;if(!S)return!1;p(y)}return y[h].weakData},m=function(y){return c&&d&&u(y)&&!n(y,h)&&p(y),y},g=function(){w.enable=function(){},d=!0;var y=o.f,S=e([].splice),O={};O[h]=1,y(O).length&&(o.f=function(I){for(var _=y(I),E=0,T=_.length;E_;_++)if(T=D(f[_]),T&&o(h,T))return T;return new d(!1)}O=a(f,I)}for(R=g?f.next:O.next;!(x=e(R,O)).done;){try{T=D(x.value)}catch(j){l(O,"throw",j)}if(typeof T=="object"&&T&&o(h,T))return T}return new d(!1)},ab}var ub,OF;function y0(){if(OF)return ub;OF=1;var r=dt(),e=TypeError;return ub=function(t,i){if(r(i,t))return t;throw new e("Incorrect invocation")},ub}var lb,IF;function b0(){if(IF)return lb;IF=1;var r=ce(),e=Ye(),t=nl(),i=$e(),n=Bs(),s=sl(),o=y0(),a=wt(),u=Et(),l=Ds(),c=qn(),d=cr().f,h=Hi().forEach,f=rt(),p=Dn(),v=p.set,b=p.getterFor;return lb=function(m,g,w){var y=m.indexOf("Map")!==-1,S=m.indexOf("Weak")!==-1,O=y?"set":"add",I=e[m],_=I&&I.prototype,E={},T;if(!f||!a(I)||!(S||_.forEach&&!i(function(){new I().entries().next()})))T=w.getConstructor(g,m,y,O),t.enable();else{T=g(function(C,D){v(o(C,R),{type:m,collection:new I}),l(D)||s(D,C[O],{that:C,AS_ENTRIES:y})});var R=T.prototype,x=b(m);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(C){var D=C==="add"||C==="set";C in _&&!(S&&C==="clear")&&n(R,C,function(j,ee){var H=x(this).collection;if(!D&&S&&!u(j))return C==="get"?void 0:!1;var Z=H[C](j===0?0:j,ee);return D?this:Z})}),S||d(R,"size",{configurable:!0,get:function(){return x(this).collection.size}})}return c(T,m,!1,!0),E[m]=T,r({global:!0,forced:!0},E),S||w.setStrong(T,m,y),T},lb}var cb,TF;function _0(){if(TF)return cb;TF=1;var r=va();return cb=function(e,t,i){for(var n in t)i&&i.unsafe&&e[n]?e[n]=t[n]:r(e,n,t[n],i);return e},cb}var db,$F;function AZ(){if($F)return db;$F=1;var r=tr(),e=r0(),t=ht(),i=rt(),n=t("species");return db=function(s){var o=r(s);i&&o&&!o[n]&&e(o,n,{configurable:!0,get:function(){return this}})},db}var hb,PF;function I5(){if(PF)return hb;PF=1;var r=pa(),e=r0(),t=_0(),i=Ku(),n=y0(),s=Ds(),o=sl(),a=n0(),u=s0(),l=AZ(),c=rt(),d=nl().fastKey,h=Dn(),f=h.set,p=h.getterFor;return hb={getConstructor:function(v,b,m,g){var w=v(function(_,E){n(_,y),f(_,{type:b,index:r(null),first:null,last:null,size:0}),c||(_.size=0),s(E)||o(E,_[g],{that:_,AS_ENTRIES:m})}),y=w.prototype,S=p(b),O=function(_,E,T){var R=S(_),x=I(_,E),C,D;return x?x.value=T:(R.last=x={index:D=d(E,!0),key:E,value:T,previous:C=R.last,next:null,removed:!1},R.first||(R.first=x),C&&(C.next=x),c?R.size++:_.size++,D!=="F"&&(R.index[D]=x)),_},I=function(_,E){var T=S(_),R=d(E),x;if(R!=="F")return T.index[R];for(x=T.first;x;x=x.next)if(x.key===E)return x};return t(y,{clear:function(){for(var E=this,T=S(E),R=T.first;R;)R.removed=!0,R.previous&&(R.previous=R.previous.next=null),R=R.next;T.first=T.last=null,T.index=r(null),c?T.size=0:E.size=0},delete:function(_){var E=this,T=S(E),R=I(E,_);if(R){var x=R.next,C=R.previous;delete T.index[R.index],R.removed=!0,C&&(C.next=x),x&&(x.previous=C),T.first===R&&(T.first=x),T.last===R&&(T.last=C),c?T.size--:E.size--}return!!R},forEach:function(E){for(var T=S(this),R=i(E,arguments.length>1?arguments[1]:void 0),x;x=x?x.next:T.first;)for(R(x.value,x.key,this);x&&x.removed;)x=x.previous},has:function(E){return!!I(this,E)}}),t(y,m?{get:function(E){var T=I(this,E);return T&&T.value},set:function(E,T){return O(this,E===0?0:E,T)}}:{add:function(E){return O(this,E=E===0?0:E,E)}}),c&&e(y,"size",{configurable:!0,get:function(){return S(this).size}}),w},setStrong:function(v,b,m){var g=b+" Iterator",w=p(b),y=p(g);a(v,b,function(S,O){f(this,{type:g,target:S,state:w(S),kind:O,last:null})},function(){for(var S=y(this),O=S.kind,I=S.last;I&&I.removed;)I=I.previous;return!S.target||!(S.last=I=I?I.next:S.state.first)?(S.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},m?"entries":"values",!m,!0),l(b)}},hb}var RF;function MZ(){if(RF)return pF;RF=1;var r=b0(),e=I5();return r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),pF}var CF;function NZ(){return CF||(CF=1,MZ()),fF}var xF={},fb,qF;function T5(){return qF||(qF=1,fb=function(r,e){return e===1?function(t,i){return t[r](i)}:function(t,i,n){return t[r](i,n)}}),fb}var pb,DF;function FZ(){if(DF)return pb;DF=1;var r=tr(),e=T5(),t=r("Map");return pb={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},pb}var AF;function kZ(){if(AF)return xF;AF=1;var r=ce(),e=Ce(),t=li(),i=ui(),n=sl(),s=FZ(),o=Fs(),a=$e(),u=s.Map,l=s.has,c=s.get,d=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(p){return p}).get("a").length!==1});return r({target:"Map",stat:!0,forced:o||f},{groupBy:function(v,b){i(v),t(b);var m=new u,g=0;return n(v,function(w){var y=b(w,g++);l(m,y)?h(c(m,y),w):d(m,y,[w])}),m}}),xF}var MF={},vb,NF;function BZ(){if(NF)return vb;NF=1;var r=Ce(),e=js(),t=dr(),i=ui(),n=r("".charAt),s=r("".charCodeAt),o=r("".slice),a=function(u){return function(l,c){var d=t(i(l)),h=e(c),f=d.length,p,v;return h<0||h>=f?u?"":void 0:(p=s(d,h),p<55296||p>56319||h+1===f||(v=s(d,h+1))<56320||v>57343?u?n(d,h):p:u?o(d,h,h+2):(p-55296<<10)+(v-56320)+65536)}};return vb={codeAt:a(!1),charAt:a(!0)},vb}var FF;function w0(){if(FF)return MF;FF=1;var r=BZ().charAt,e=dr(),t=Dn(),i=n0(),n=s0(),s="String Iterator",o=t.set,a=t.getterFor(s);return i(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),c=l.string,d=l.index,h;return d>=c.length?n(void 0,!0):(h=r(c,d),l.index+=h.length,n(h,!1))}),MF}var gb,kF;function jZ(){if(kF)return gb;kF=1,Ws(),NZ(),kZ(),w0();var r=Be();return gb=r.Map,gb}var mb,BF;function LZ(){if(BF)return mb;BF=1;var r=jZ();return Us(),mb=r,mb}var yb,jF;function zZ(){return jF||(jF=1,yb=LZ()),yb}var HZ=zZ(),E0=pe(HZ);class WZ{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},ot(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&Fe(t).call(t,i)===-1){const n=e[i];this.add(i,n)}}}clear(){this._groups=new E0,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const n=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[n]),this._groups.set(e,i)}else{const n=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[n],this._groups.set(e,i)}return i}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var LF={},zF;function UZ(){if(zF)return LF;zF=1;var r=ce();return r({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),LF}var bb,HF;function VZ(){if(HF)return bb;HF=1,UZ();var r=Be();return bb=r.Number.isNaN,bb}var _b,WF;function KZ(){if(WF)return _b;WF=1;var r=VZ();return _b=r,_b}var wb,UF;function GZ(){return UF||(UF=1,wb=KZ()),wb}var YZ=GZ(),G_=pe(YZ),VF={},Eb,KF;function XZ(){if(KF)return Eb;KF=1;var r=Ye(),e=r.isFinite;return Eb=Number.isFinite||function(i){return typeof i=="number"&&e(i)},Eb}var GF;function JZ(){if(GF)return VF;GF=1;var r=ce(),e=XZ();return r({target:"Number",stat:!0},{isFinite:e}),VF}var Sb,YF;function QZ(){if(YF)return Sb;YF=1,JZ();var r=Be();return Sb=r.Number.isFinite,Sb}var Ob,XF;function ZZ(){if(XF)return Ob;XF=1;var r=QZ();return Ob=r,Ob}var Ib,JF;function eee(){return JF||(JF=1,Ib=ZZ()),Ib}var tee=eee(),tn=pe(tee),QF={},ZF;function ree(){if(ZF)return QF;ZF=1;var r=ce(),e=Hi().some,t=Vs(),i=t("some");return r({target:"Array",proto:!0,forced:!i},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),QF}var Tb,ek;function iee(){if(ek)return Tb;ek=1,ree();var r=Tt();return Tb=r("Array","some"),Tb}var $b,tk;function nee(){if(tk)return $b;tk=1;var r=dt(),e=iee(),t=Array.prototype;return $b=function(i){var n=i.some;return i===t||r(t,i)&&n===t.some?e:n},$b}var Pb,rk;function see(){if(rk)return Pb;rk=1;var r=nee();return Pb=r,Pb}var Rb,ik;function oee(){return ik||(ik=1,Rb=see()),Rb}var aee=oee(),uee=pe(aee),Cb={exports:{}},nk={},sk;function lee(){if(sk)return nk;sk=1;var r=ce(),e=rt(),t=cr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),nk}var ok;function cee(){if(ok)return Cb.exports;ok=1,lee();var r=Be(),e=r.Object,t=Cb.exports=function(n,s,o){return e.defineProperty(n,s,o)};return e.defineProperty.sham&&(t.sham=!0),Cb.exports}var xb,ak;function $5(){if(ak)return xb;ak=1;var r=cee();return xb=r,xb}var qb,uk;function dee(){if(uk)return qb;uk=1;var r=$5();return qb=r,qb}var Db,lk;function hee(){if(lk)return Db;lk=1;var r=dee();return Db=r,Db}var Ab,ck;function fee(){return ck||(ck=1,Ab=hee()),Ab}var pee=fee(),vee=pe(pee),dk={},hk;function gee(){if(hk)return dk;hk=1;var r=ht(),e=cr().f,t=r("metadata"),i=Function.prototype;return i[t]===void 0&&e(i,t,{value:null}),dk}var fk={},pk;function mee(){return pk||(pk=1,R3()),fk}var vk={},gk;function yee(){return gk||(gk=1,C3()),vk}var mk={},yk;function bee(){if(yk)return mk;yk=1;var r=Je();return r("metadata"),mk}var Mb,bk;function _ee(){if(bk)return Mb;bk=1;var r=M3();return gee(),mee(),yee(),bee(),Mb=r,Mb}var _k={},Nb,wk;function P5(){if(wk)return Nb;wk=1;var r=tr(),e=Ce(),t=r("Symbol"),i=t.keyFor,n=e(t.prototype.valueOf);return Nb=t.isRegisteredSymbol||function(o){try{return i(n(o))!==void 0}catch{return!1}},Nb}var Ek;function wee(){if(Ek)return _k;Ek=1;var r=ce(),e=P5();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),_k}var Sk={},Fb,Ok;function R5(){if(Ok)return Fb;Ok=1;for(var r=ks(),e=tr(),t=Ce(),i=ca(),n=ht(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=r("wks"),c=0,d=a(s),h=d.length;ch;)p=l(u,f=c[h++]),p!==void 0&&s(d,f,p);return d}}),b2}var l1,w2;function yte(){if(w2)return l1;w2=1,mte();var r=Be();return l1=r.Object.getOwnPropertyDescriptors,l1}var c1,E2;function bte(){if(E2)return c1;E2=1;var r=yte();return c1=r,c1}var d1,S2;function _te(){return S2||(S2=1,d1=bte()),d1}var wte=_te(),Ai=pe(wte),h1={exports:{}},O2={},I2;function Ete(){if(I2)return O2;I2=1;var r=ce(),e=rt(),t=e0().f;return r({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),O2}var T2;function Ste(){if(T2)return h1.exports;T2=1,Ete();var r=Be(),e=r.Object,t=h1.exports=function(n,s){return e.defineProperties(n,s)};return e.defineProperties.sham&&(t.sham=!0),h1.exports}var f1,$2;function Ote(){if($2)return f1;$2=1;var r=Ste();return f1=r,f1}var p1,P2;function Ite(){return P2||(P2=1,p1=Ote()),p1}var Tte=Ite(),ol=pe(Tte),v1,R2;function $te(){return R2||(R2=1,v1=$5()),v1}var Pte=$te(),al=pe(Pte);function S0(r,e){const t=["node","edge","label"];let i=!0;const n=yi(e,"chosen");if(typeof n=="boolean")i=n;else if(typeof n=="object"){if(Fe(t).call(t,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+t.join("', '")+"'");const s=yi(e,["chosen",r]);(typeof s=="boolean"||typeof s=="function")&&(i=s)}return i}function Y_(r,e,t){if(r.width<=0||r.height<=0)return!1;if(t!==void 0){const s={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const o=-t.angle;e={x:Math.cos(o)*s.x-Math.sin(o)*s.y,y:Math.sin(o)*s.x+Math.cos(o)*s.y}}else e=s}const i=r.x+r.width,n=r.y+r.width;return r.lefte.x&&r.tope.y}function du(r){return typeof r=="string"&&r!==""}function x5(r,e,t,i){let n=i.x,s=i.y;if(typeof i.distanceToBorder=="function"){const o=i.distanceToBorder(r,e),a=Math.sin(e)*o,u=Math.cos(e)*o;u===o?(n+=o,s=i.y):a===o?(n=i.x,s-=o):(n+=u,s-=a)}else i.shape.width>i.shape.height?(n=i.x+i.shape.width*.5,s=i.y-t):(n=i.x+t,s=i.y-i.shape.height*.5);return{x:n,y:s}}var g1,C2;function Rte(){if(C2)return g1;C2=1,Ws();var r=Tt();return g1=r("Array","values"),g1}var m1,x2;function Cte(){if(x2)return m1;x2=1;var r=Rte();return m1=r,m1}var y1,q2;function xte(){if(q2)return y1;q2=1,Us();var r=zs(),e=It(),t=dt(),i=Cte(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return y1=function(o){var a=o.values;return o===n||t(n,o)&&a===n.values||e(s,r(o))?i:a},y1}var b1,D2;function qte(){return D2||(D2=1,b1=xte()),b1}var Dte=qte(),q5=pe(Dte);class Ate{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let n=t;(t===void 0||t==="")&&(n=" ");const s=this.measureText(n,i),o=ot({},q5(s));o.text=t,o.width=s.width,o.mod=i,(t===void 0||t==="")&&(o.width=0),this.lines[e].blocks.push(o),this.lines[e].width+=o.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;ee&&(e=n.width),t+=n.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class A2{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[i,n]=this.prepareRegExp(e),s=i.test(this.text.substr(this.position,n));return s&&t&&(this.position+=n-1),s}parseEndTag(e,t,i){let n=this.mod()===e;return e==="mono"?n=n&&this.mono:n=n&&!this.mono,n&&this.match(t)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,i;if(e instanceof RegExp)i=e,t=1;else{const n=Mte[e];n!==void 0?i=n:i=new RegExp(e),t=e.length}return[i,t]}}class Nte{constructor(e,t,i,n){this.ctx=e,this.parent=t,this.selected=i,this.hover=n;const s=(o,a)=>{if(o===void 0)return 0;const u=this.parent.getFormattingValues(e,i,n,a);let l=0;return o!==""&&(l=this.ctx.measureText(o).width),{width:l,values:u}};this.lines=new Ate(s)}process(e){if(!du(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,` `),e=e.replace(/\r/g,` `);const i=String(e).split(` -`),n=i.length;if(t.multi)for(let s=0;s0)for(let a=0;a0)for(let s=0;s/&/.test(n)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||i(n)||t.add(n),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new D2(e);let i=!0;const n=s=>/\\/.test(s)?(t.positionthis.parent.fontOptions.maxWdt}getLongestFit(e){let t="",i=0;for(;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let n=e.split("\r");for(;n.length>0;){let s=this.getLongestFit(n);if(s===0){const o=n[0],a=this.getLongestFitWord(o);this.lines.newLine(Cr(o).call(o,0,a),t),n[0]=Cr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=Cr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=Cr(n).call(n,o)}}}}const io=["bold","ital","boldital","mono"];class ls{constructor(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),du(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(Oe(io,t=>{this.fontOptions[t]={}}),ls.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Oe(e,(t,i)=>{t!=null&&typeof t!="object"&&(this.fontOptions[i]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=yi(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=yi(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=yi(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=yi(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=yi(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=yi(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),Ue(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=E0("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}addFontOptionsToPile(e,t){for(let i=0;i{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(Fe(io).call(io,a)!==-1?t[a]={}:t[a]=o))})}return t}getFontOption(e,t,i){let n;for(let s=0;s{s[u]=a}),s.size=Number(s.size),s.vadjust=Number(s.vadjust)}}draw(e,t,i,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,s,t,i,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",s=arguments.length>4?arguments[4]:void 0;[t,i]=this._setAlignment(e,t,i,n),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=d,c.strokeWidth>0&&e.strokeText(c.text,t+u,i+c.vadjust),e.fillText(c.text,t+u,i+c.vadjust),u+=c.width}i+=a.height}}}_setAlignment(e,t,i,n){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;const s=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*s):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*s):e.textBaseline="middle"}else e.textBaseline=n;return[t,i]}_getColor(e,t,i){let n=e||"#000000",s=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));n=ir(n,o),s=ir(s,o)}return[n,s]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,i=this.size.top-.5*2;if(this.isEdgeLabel){const s=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=s,i=-this.size.height*.5;break;case"top":t=s,i=-(this.size.height+2);break;case"bottom":t=s,i=2;break}}return{left:t,top:i,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=n-this.size.width*.5,this.size.top=s-this.size.height*.5,this.size.yLine=s+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,i,n){const s=function(u,l,c){return l==="normal"?c==="mod"?"":u[c]:u[l][c]!==void 0?u[l][c]:u[c]},o={color:s(this.fontOptions,n,"color"),size:s(this.fontOptions,n,"size"),face:s(this.fontOptions,n,"face"),mod:s(this.fontOptions,n,"mod"),vadjust:s(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(n==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,i));let a="";return o.mod!==void 0&&o.mod!==""&&(a+=o.mod+" "),a+=o.size+"px "+o.face,e.font=a.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,i,n){return new Nte(e,this,t,i).process(n)}_processLabel(e,t,i){if(this.labelDirty===!1&&!this.differentState(t,i))return;const n=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&n.width0&&n.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),ma(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,i,n,s){i!==void 0&&this.resize(i,n,s),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s)}getDimensionsFromLabel(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);let n=this.textSize.width,s=this.textSize.height;const o=14;return n===0&&(n=o,s=o),{width:n,height:s}}}let Fte=class extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),g3(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}};class S0 extends Mn{constructor(e,t,i){super(e,t,i),this.labelOffset=0,this.selected=!1}setOptions(e,t,i){this.options=e,t===void 0&&i===void 0||this.setImages(t,i)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof t=="object"?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=this.options.size*2*i,t=this.options.size*2*n}else{const i=this._getImagePadding();e=this.imageObj.width+i.left+i.right,t=this.imageObj.height+i.top+i.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,i,n){this.initContextForDraw(e,n),Xw(e,t,i,n.size),this.performFill(e,n)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let i=1;this.options.shapeProperties.interpolation===!0&&(i=this.imageObj.width/this.width/this.body.view.scale);const n=this._getImagePadding(),s=this.left+n.left,o=this.top+n.top,a=this.width-n.left-n.right,u=this.height-n.top-n.bottom;this.imageObj.drawImageAtPosition(e,i,s,o,a,u),this.disableShadow(e,t)}}_drawImageLabel(e,t,i,n,s){let o=0;if(this.height!==void 0){o=this.height*.5;const u=this.labelModule.getTextSize(e,n,s);u.lineCount>=1&&(o+=u.height/2)}const a=i+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,n,s,"hanging")}}let kte=class extends S0{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i),s=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=s/2,this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this._drawRawCircle(e,t,i,o),this.updateBoundingBox(t,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,i,n,s)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class Bte extends S0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s,this.radius=.5*this.width;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){this.switchImages(n),this.resize();let a=t,u=i;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this._drawRawCircle(e,a,u,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Ui extends Mn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,i)){var s,o;this.labelModule.getTextSize(e,t,i);const a=2*n.size;this.width=(s=this.customSizeWidth)!==null&&s!==void 0?s:a,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:a,this.radius=.5*this.width}}_drawShape(e,t,i,n,s,o,a,u){return this.resize(e,o,a,u),this.left=n-this.width/2,this.top=s-this.height/2,this.initContextForDraw(e,u),t7(t)(e,n,s,u.size),this.performFill(e,u),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,n,s)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,a,n,s,"hanging");const l=s+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,n,l,o,a,"hanging")}this.updateBoundingBox(n,s)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function A2(r,e){var t=Ze(r);if(Di){var i=Di(r);e&&(i=Wt(i).call(i,function(n){return Wi(r,n).enumerable})),t.push.apply(t,i)}return t}function jte(r){for(var e=1;e{e.save(),u(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class zte extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){if(this.needsRefresh(t,i)){const s=this.getDimensionsFromLabel(e,t,i).width+this.margin.right+this.margin.left;this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),m3(e,t-this.width/2,i-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Hte=class extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"diamond",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Wte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"circle",2,t,i,n,s,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class M2 extends Mn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.height=n.height*2,this.width=n.width+n.height,this.radius=.5*this.width}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width*.5,this.top=i-this.height*.5,this.initContextForDraw(e,o),B_(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,t,i,n,s)}distanceToBorder(e,t){e&&this.resize(e);const i=this.width*.5,n=this.height*.5,s=Math.sin(t)*i,o=Math.cos(t)*n;return i*n/Math.sqrt(s*s+o*o)}}class Ute extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){return this.resize(e,n,s),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=i-this.height/2,this._icon(e,t,i,n,s,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,n),this.updateBoundingBox(t,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,i,n,s,o){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:n?"bold":"",(this.options.icon.weight!=null&&n?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,i),this.disableShadow(e,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Vte=class extends S0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){e.save(),this.switchImages(n),this.resize();let a=t,u=i;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,d=(n?c:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,d),e.beginPath();let h=n?this.options.color.highlight.border:s?this.options.color.hover.border:this.options.color.border,f=n?this.options.color.highlight.background:s?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(h=ir(h,o.opacity),f=ir(f,o.opacity)),e.strokeStyle=h,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),ma(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Kte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"square",2,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Gte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"hexagon",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Yte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"star",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Xte extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.textSize=this.labelModule.getTextSize(e,t,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s),this.disableShadow(e,o),this.updateBoundingBox(t,i,e,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Jte=class extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangle",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Qte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangleDown",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function N2(r,e){var t=Ze(r);if(Di){var i=Di(r);e&&(i=Wt(i).call(i,function(n){return Wi(r,n).enumerable})),t.push.apply(t,i)}return t}function F2(r){for(var e=1;et[l]!=null);u.push("font"),lu(u,e,a),e.color=W_(e.color)}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;if(lu(["color","fixed","shadow"],e,t,i),Ke.checkMass(t),e.opacity!==void 0&&(Ke.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Ke.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Ke.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),rr(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=W_(t.color);c5(e.color,a)}else i===!0&&t.color===null&&(e.color=$i(n.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),i===!0&&t.font===null&&(e.font=$i(n.font)),Ke.updateGroupOptions(e,t,s),t.scaling!==void 0&&rr(e.scaling,t.scaling,"label",n.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=ir(e.borderColor,t),e.color=ir(e.color,t),e.shadowColor=ir(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Ke.updateGroupOptions(this.options,F2(F2({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Fte(this.options,this.body,this.labelModule);break;case"circle":this.shape=new kte(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Bte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Lte(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new zte(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Hte(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Wte(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new M2(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Ute(this.options,this.body,this.labelModule);break;case"image":this.shape=new Vte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Kte(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Gte(this.options,this.body,this.labelModule);break;case"star":this.shape=new Yte(this.options,this.body,this.labelModule);break;case"text":this.shape=new Xte(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Jte(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Qte(this.options,this.body,this.labelModule);break;default:this.shape=new M2(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.size=this.options.scaling.min+n*s}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&Y_(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Y_(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.lefte.left&&this.shape.tope.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",p5),e.mass=1}}}class Zte{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=z(s=this.create).call(s,this),this.nodesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items,a.data,a.oldData)},remove:(o,a)=>{this.remove(a.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,a,u,l){if(a===o)return .5;{const c=1/(a-o);return Math.max(0,(l-o)*c)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=$i(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",z(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",z(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Oe(this.nodesListeners,(i,n)=>{this.body.data.nodes&&this.body.data.nodes.off(n,i)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(Ke.parseOptions(this.options,e),e.opacity!==void 0&&(G_(e.opacity)||!tn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of Ze(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.nodes;if(u3("id",e))this.body.data.nodes=e;else if(et(e))this.body.data.nodes=new nu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new nu;else throw new TypeError("Array or DataSet expected");if(i&&Oe(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Oe(this.nodesListeners,function(o,a){n.body.data.nodes.on(a,o)});const s=this.body.data.nodes.getIds();this.add(s,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i;const n=[];for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:Ke;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Oe(this.body.nodes,(t,i)=>{const n=this.body.data.nodes.get(i);n!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(n))})}getPositions(e){const t={};if(e!==void 0){if(et(e)===!0){for(let i=0;i{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var k2={},B2;function ere(){if(B2)return k2;B2=1;var r=ce(),e=Math.hypot,t=Math.abs,i=Math.sqrt,n=!!e&&e(1/0,NaN)!==1/0;return r({target:"Math",stat:!0,arity:2,forced:n},{hypot:function(o,a){for(var u=0,l=0,c=arguments.length,d=0,h,f;l0?(f=h/d,u+=f*f):u+=h;return d===1/0?1/0:d*i(u)}}),k2}var _1,j2;function tre(){if(j2)return _1;j2=1,ere();var r=Be();return _1=r.Math.hypot,_1}var w1,L2;function rre(){if(L2)return w1;L2=1;var r=tre();return w1=r,w1}var E1,z2;function ire(){return z2||(z2=1,E1=rre()),E1}var nre=ire(),sre=pe(nre);class tt{static transform(e,t){et(e)||(e=[e]);const i=t.point.x,n=t.point.y,s=t.angle,o=t.length;for(let a=0;a4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,s):this._drawLine(e,t,s)}_drawLine(e,t,i,n,s){if(this.from!=this.to)this._line(e,t,i,n,s);else{const[o,a,u]=this._getCircleData(e);this._circle(e,t,o,a,u)}}_drawDashedLine(e,t,i,n,s){e.lineCap="round";const o=et(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,i);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)y3(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[i,n]=Cr(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const i=C5(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}_pointOnCircle(e,t,i,n){const s=n*2*Math.PI;return{x:e+i*Math.cos(s),y:t-i*Math.sin(s)}}_findBorderPositionCircle(e,t,i){const n=i.x,s=i.y;let o=i.low,a=i.high;const u=i.direction,l=10,c=this.options.selfReference.size,d=.05;let h,f=(o+a)*.5,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));let v=0;do{f=(o+a)*.5,h=this._pointOnCircle(n,s,c,f);const b=Math.atan2(e.y-h.y,e.x-h.x),m=e.distanceToBorder(t,b)+p,g=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),w=m-g;if(Math.abs(w)0?u>0?o=f:a=f:u>0?a=f:o=f,++v}while(o<=a&&v1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,p=h-o;return Math.sqrt(f*f+p*p)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const p=o.width;t==="from"?(l=this.from,c=this.to,d=o.fromArrowScale<0,h=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,c=this.from,d=o.toArrowScale<0,h=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,c=this.from,d=o.middleArrowScale<0,h=Math.abs(o.middleArrowScale),f=o.middleArrowType);const v=15*h+3*p;if(l!=c){const w=sre(l.x-c.x,l.y-c.y),y=v/w;if(t!=="middle")if(this.options.smooth.enabled===!0){const S=this._findBorderPosition(l,e,{via:i}),O=this.getPoint(S.t+y*(t==="from"?1:-1),i);a=Math.atan2(S.y-O.y,S.x-O.x),u=S}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const S=(d?-y:y)/2,O=this.getPoint(.5+S,i),I=this.getPoint(.5-S,i);a=Math.atan2(O.y-I.y,O.x-I.x),u=this.getPoint(.5,i)}}else{const[w,y,S]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:w,y,low:O,high:I,direction:-1});a=_.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=_}else if(t==="to"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:w,y,low:O,high:I,direction:1});a=_.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=_}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(w,y,S,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const b=u.x-v*.9*Math.cos(a),m=u.y-v*.9*Math.sin(a);return{point:u,core:{x:b,y:m},angle:a,length:v,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,q5.draw(e,s)&&(this.enableShadow(e,t),ma(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const i=et(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function U2(r,e){var t=Ze(r);if(Di){var i=Di(r);e&&(i=Wt(i).call(i,function(n){return Wi(r,n).enumerable})),t.push.apply(t,i)}return t}function V2(r){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const n=10,s=.2;let o=!1,a=1,u=0,l=this.to,c,d,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let f=0;do{d=(u+a)*.5,c=this.getPoint(d,i);const p=Math.atan2(l.y-c.y,l.x-c.x),v=l.distanceToBorder(t,p)+h,b=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=v-b;if(Math.abs(m)0&&(l=this._getDistanceToLine(p,v,h,f,s,o),u=l{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,i){this._bezierCurve(e,t,i)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[i,n,s]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:i+s*Math.sin(o),y:n+s-s*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToBezierEdge(e,t,i,n,s,o,this.via)}}class G2 extends O0{constructor(e,t,i){super(e,t,i)}_line(e,t,i){this._bezierCurve(e,t,i)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let i=Math.abs(this.from.x-this.to.x),n=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let s,o;i<=n?s=o=e*n:s=o=e*i,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return t==="discrete"&&(i<=n?a=ithis.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return i<=n?this.from.x<=this.to.x?a=this.to.xa?this.to.x:a:this.from.y>=this.to.y?u=this.to.y>u?this.to.y:u:u=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,i.via)}_getDistanceToEdge(e,t,i,n,s,o){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,i,n,s,o,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,n=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,s=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:n,y:s}}}class yre extends O0{constructor(e,t,i){super(e,t,i)}_getDistanceToBezierEdge2(e,t,i,n,s,o,a,u){let l=1e9,c=e,d=t;const h=[0,0,0,0];for(let f=1;f<10;f++){const p=.1*f;h[0]=Math.pow(1-p,3),h[1]=3*p*Math.pow(1-p,2),h[2]=3*Math.pow(p,2)*(1-p),h[3]=Math.pow(p,3);const v=h[0]*e+h[1]*a.x+h[2]*u.x+h[3]*i,b=h[0]*t+h[1]*a.y+h[2]*u.y+h[3]*n;if(f>0){const m=this._getDistanceToLine(c,d,v,b,s,o);l=mMath.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(n=this.from.y,o=this.to.y,i=this.from.x-a*e,s=this.to.x+a*e):(n=this.from.y-a*t,o=this.to.y+a*t,i=this.from.x,s=this.to.x),[{x:i,y:n},{x:s,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,i,n,s,o){let[a,u]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,i,n,s,o,a,u)}getPoint(e){let[t,i]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,s=[Math.pow(1-n,3),3*n*Math.pow(1-n,2),3*Math.pow(n,2)*(1-n),Math.pow(n,3)],o=s[0]*this.fromPoint.x+s[1]*t.x+s[2]*i.x+s[3]*this.toPoint.x,a=s[0]*this.fromPoint.y+s[1]*t.y+s[2]*i.y+s[3]*this.toPoint.y;return{x:o,y:a}}}class X2 extends D5{constructor(e,t,i){super(e,t,i)}_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let i=this.to,n=this.from;e.id===this.from.id&&(i=this.from,n=this.to);const s=Math.atan2(i.y-n.y,i.x-n.x),o=i.x-n.x,a=i.y-n.y,u=Math.sqrt(o*o+a*a),l=e.distanceToBorder(t,s),c=(u-l)/u;return{x:(1-c)*n.x+c*i.x,y:(1-c)*n.y+c*i.y,t:0}}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToLine(e,t,i,n,s,o)}}class Pi{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=$i(n),this.globalOptions=n,this.defaultOptions=s,this.body=t,this.imagelist=i,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new ls(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;Pi.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=R5(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=E0("edge",i),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Gs(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(tn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=n.endPointOffset.from!==void 0?n.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(tn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=n.endPointOffset.to!==void 0?n.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),du(t.label)?e.label=t.label:du(e.label)||(e.label=void 0),rr(e,t,"smooth",n),rr(e,t,"shadow",n),rr(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=an(n.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),rr(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=an(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Fe(a).call(a,"to")!=-1,e.arrows.middle.enabled=Fe(a).call(a,"middle")!=-1,e.arrows.from.enabled=Fe(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")rr(e.arrows,t.arrows,"to",n.arrows),rr(e.arrows,t.arrows,"middle",n.arrows),rr(e.arrows,t.arrows,"from",n.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+ga(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=an(n.arrows));if(t.color!==void 0&&t.color!==null){const a=as(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ue(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(as(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,a.opacity===void 0&&(u.opacity=1);else{let l=!1;a.color!==void 0&&(u.color=a.color,l=!0),a.highlight!==void 0&&(u.highlight=a.highlight,l=!0),a.hover!==void 0&&(u.hover=a.hover,l=!0),a.inherit!==void 0&&(u.inherit=a.inherit),a.opacity!==void 0&&(u.opacity=Math.min(1,Math.max(0,a.opacity))),l===!0?u.inherit=!1:u.inherit===void 0&&(u.inherit="from")}}else i===!0&&t.color===null&&(e.color=$i(n.color));i===!0&&t.font===null&&(e.font=$i(n.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,n=this.options.color.inherit,s={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const o=this.options.selectionWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.highlight,s.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.hover,s.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(s,this.options.id,this.selected,this.hover),s.color!==void 0&&(s.inheritsColor=!1),s.shadow===!1&&(s.shadowColor!==this.options.shadow.color||s.shadowSize!==this.options.shadow.size||s.shadowX!==this.options.shadow.x||s.shadowY!==this.options.shadow.y)&&(s.shadow=!0));else s.shadow=this.options.shadow.enabled,s.width=Math.max(s.width,.3/this.body.view.scale);return s}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof K2&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof Y2&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof G2&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof X2&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new K2(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new Y2(this.options,this.body,this.labelModule):this.edgeType=new G2(this.options,this.body,this.labelModule):this.edgeType=new X2(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.width=this.options.scaling.min+n*s}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(n.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=n.from.core),t.fromArrowSrc&&(n.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(n.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(n.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(n.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=n.to.core),t.toArrowSrc&&(n.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(n.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(n.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(n.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,t),t.middleArrowSrc&&(n.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(n.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(n.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.to)}drawLabel(e,t){if(this.options.label!==void 0){const i=this.from,n=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let s;if(i.id!=n.id){this.labelModule.pointToSelf=!1,s=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=C5(e,this.options.selfReference.angle,this.options.selfReference.size,i);s=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const n=this._getRotation();Y_(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}const i={left:e.x,top:e.y};return this.isOverlappingWith(i)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const i=this.from.x,n=this.from.y,s=this.to.x,o=this.to.y,a=e.left,u=e.top;return this.edgeType.getDistanceToEdge(i,n,s,o,a,u)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);const n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return n;const s=this.from.y-this.to.y,o=this.from.x-this.to.x;let a=Math.atan2(s,o);return(a<-1&&o<0||a>0&&o<0)&&(a+=Math.PI),n.angle=a,n}_pointOnCircle(e,t,i,n){return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class bre{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=z(n=this.create).call(n,this),this.edgesListeners={add:(s,o)=>{this.add(o.items)},update:(s,o)=>{this.update(o.items)},remove:(s,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,o,a,u){if(o===s)return .5;{const l=1/(o-s);return Math.max(0,(u-s)*l)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Ue(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n==="dynamic"&&(n="continuous");let o=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const u=e.body.edges[a],l=e.body.data.edges.get(a);if(l!=null){const c=l.smooth;c!==void 0&&c.enabled===!0&&c.type==="dynamic"&&(n===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:n}}),o=!0)}}s===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",z(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",z(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Oe(this.edgesListeners,(n,s)=>{this.body.data.edges&&this.body.data.edges.off(s,n)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){Pi.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&this.body.edges[i].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.edges;if(u3("id",e))this.body.data.edges=e;else if(et(e))this.body.data.edges=new nu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new nu;else throw new TypeError("Array or DataSet expected");if(i&&Oe(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Oe(this.edgesListeners,(s,o)=>{this.body.data.edges.on(o,s)});const n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.edges,n=this.body.data.edges;for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const i=this.body.edges;Oe(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Oe(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new Pi(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const n=i[e];n.from=null,n.to=null,n.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];Oe(this.body.edges,(t,i)=>{const n=this.body.nodes[t.toId],s=this.body.nodes[t.fromId];n!==void 0&&n.isCluster===!0||s!==void 0&&s.isCluster===!0||(n===void 0||s===void 0)&&e.push(i)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,i=[];Le(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class A5{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=il("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,s=this._formBarnesHutTree(t,i);this.barnesHutTree=s;for(let o=0;o0&&this._getForceContributions(s.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){const i=e.centerOfMass.x-t.x,n=e.centerOfMass.y-t.y,s=Math.sqrt(i*i+n*n);s*e.calcSize>this.thetaInversed?this._calculateForces(s,i,n,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(s,i,n,t,e)}}_calculateForces(e,t,i,n,s){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));const o=this.options.gravitationalConstant*s.mass*n.options.mass/Math.pow(e,3),a=t*o,u=i*o;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=u}_formBarnesHutTree(e,t){let i;const n=t.length;let s=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,u=e[t[0]].y;for(let b=1;b0&&(ga&&(a=g),wu&&(u=w))}const l=Math.abs(a-s)-Math.abs(u-o);l>0?(o-=.5*l,u+=.5*l):(s+=.5*l,a-=.5*l);const d=Math.max(1e-5,Math.abs(a-s)),h=.5*d,f=.5*(s+a),p=.5*(o+u),v={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:p-h,maxY:p+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(v.root);for(let b=0;b0&&this._placeInTree(v.root,i);return v}_updateBranchMass(e,t){const i=e.centerOfMass,n=e.mass+t.options.mass,s=1/n;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=s,i.y=i.y*e.mass+t.y*t.options.mass,i.y*=s,e.mass=n;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?n.maxY>t.y?s="NW":s="SW":n.maxY>t.y?s="NE":s="SE",this._placeInRegion(e,t,s)}_placeInRegion(e,t,i){const n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let i,n,s,o;const a=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY,o=e.range.minY+a;break;case"NE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY,o=e.range.minY+a;break;case"SW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY+a,o=e.range.maxY;break;case"SE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY+a,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:s,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class _re{constructor(e,t,i){this._rng=il("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(i)}setOptions(e){this.options=e}solve(){let e,t,i,n,s,o,a,u;const l=this.body.nodes,c=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,h=this.options.nodeDistance,f=-2/3/h,p=4/3;for(let v=0;v0){const o=s.edges.length+1,a=this.options.centralGravity*o*s.options.mass;n[s.id].x=t*a,n[s.id].y=i*a}}}class Ire{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},ot(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,lu(["stabilization"],this.options,e),rr(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||G_(t.x))&&(t.x=0),(typeof t.y!="number"||G_(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Sre(this.body,this.physicsBody,e),this.edgesSolver=new S1(this.body,this.physicsBody,e),this.gravitySolver=new Ore(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new _re(this.body,this.physicsBody,e),this.edgesSolver=new S1(this.body,this.physicsBody,e),this.gravitySolver=new Va(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new wre(this.body,this.physicsBody,e),this.edgesSolver=new Ere(this.body,this.physicsBody,e),this.gravitySolver=new Va(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new A5(this.body,this.physicsBody,e),this.edgesSolver=new S1(this.body,this.physicsBody,e),this.gravitySolver=new Va(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=z(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=su();this.physicsTick(),(su()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&Zr(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,i=0;const n=5;for(let s=0;so&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);const n=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:n.x,vy:n.y},t.options.fixed.x===!1?(n.x=this.calculateComponentVelocity(n.x,i.x,t.options.mass),t.x+=n.x*this.timestep):(i.x=0,n.x=0),t.options.fixed.y===!1?(n.y=this.calculateComponentVelocity(n.y,i.y,t.options.mass),t.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,Zr(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let i=0;for(;e()&&i"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");O1=crypto.getRandomValues.bind(crypto)}return O1($re)}const Rre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var J2={randomUUID:Rre};function Cre(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Pre();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Tre(i)}function _o(r,e,t){return J2.randomUUID?J2.randomUUID():Cre(r)}class kt{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.shape.boundingBox.left&&(s=a.shape.boundingBox.left),oa.shape.boundingBox.top&&(i=a.shape.boundingBox.top),n1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.x&&(s=a.x),oa.y&&(i=a.y),n{delete this.containedEdges[i.id]}),Oe(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Oe(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Oe(t.edges,i=>{Oe(this.edges,n=>{var s,o;const a=Fe(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Oe(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),Qr(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class qre{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},ot(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const i=[];for(let n=0;n=e&&i.push(s.id)}for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const i={},n={};Oe(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Oe(s.edges,a=>{this.clusteredEdges[a.id]===void 0&&(n[a.id]=a)}))}),this._cluster(i,n,e,t)}clusterByEdgeCount(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const n=[],s={};let o,a,u;for(let l=0;l0&&Ze(d).length>0&&v===!0){const m=function(){for(let g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var i;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const s=this.body.nodes[e];t=this._checkOptions(t,s),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=s.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=s.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=s.options.fixed.x,t.clusterNodeProperties.fixed.y=s.options.fixed.y);const o={},a={},u=s.id,l=kt.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[p.id]=p)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=Ze(e),h=[];for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const s=[];for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&this.clusteredNodes[c]!==void 0&&s.push(c);for(let c=0;cn?a.x:n,s=a.yo?a.y:o;return{x:.5*(i+n),y:.5*(s+o)}}openCluster(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const n=this.body.nodes[e];if(n===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(n.isCluster!==!0||n.containedNodes===void 0||n.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const s=this.findNode(e),o=Fe(s).call(s,e)-1;if(o>=0){const c=s[o];this.body.nodes[c]._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}const a=n.containedNodes,u=n.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const c={},d={x:n.x,y:n.y};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];c[f]={x:p.x,y:p.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];h[f]!==void 0&&(p.x=h[f].x===void 0?n.x:h[f].x,p.y=h[f].y===void 0?n.y:h[f].y)}}else Oe(a,function(c){c.options.fixed.x===!1&&(c.x=n.x),c.options.fixed.y===!1&&(c.y=n.y)});for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=this.body.nodes[c];d.vx=n.vx,d.vy=n.vy,d.setOptions({physics:!0}),delete this.clusteredNodes[c]}const l=[];for(let c=0;c0&&on&&(n=l.edges.length),e+=l.edges.length,t+=Math.pow(l.edges.length,2),i+=1}e=e/i,t=t/i;const s=t-Math.pow(e,2),o=Math.sqrt(s);let a=Math.floor(e+2*o);return a>n&&(a=n),a}_createClusteredEdge(e,t,i,n,s){const o=kt.cloneOptions(i,"edge");Ue(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+_o(),s!==void 0&&Ue(o,s);const a=this.body.functions.createEdge(o);return a.clusteringEdgeReplacingIds=[i.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,i,n){if(t instanceof Pi){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Ke){const s=e,o={};o[s.id]=s,e=o}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");n===void 0&&(n=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,n);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&this.body.edges[s]!==void 0){const o=this.body.edges[s];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this.clusteredNodes[s]={clusterId:i.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}_filter(e,t){const i=[];return Oe(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Oe(this.body.nodes,l=>{l.isCluster===!0&&u(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}n(function(u){for(let l=0;l{const l=this.body.edges[u];(l===void 0||!l.endPointsValid())&&(i[u]=u)}),n(function(u){Oe(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Oe(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Oe(d,f=>{const p=this.body.edges[f];p!==void 0&&p.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Oe(i,l=>{delete u.containedEdges[l],Oe(u.edges,(c,d)=>{if(c.id===l){u.edges[d]=null;return}c.clusteringEdgeReplacingIds=this._filter(c.clusteringEdgeReplacingIds,function(h){return!i[h]})}),u.edges=this._filter(u.edges,function(c){return c!==null})})}),Oe(i,u=>{delete this.clusteredEdges[u]}),Oe(i,u=>{delete this.body.edges[u]});const s=Ze(this.body.edges);Oe(s,u=>{const l=this.body.edges[u],c=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(c!==this._isClusteredEdge(l.id))if(c){const d=this._getClusterNodeForNode(l.fromId);d!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,d);const h=this._getClusterNodeForNode(l.toId);h!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,h)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];n(function(l){const c=Ze(l.containedNodes).length,d=l.options.allowSingleNodeCluster===!0;(d&&c<1||!d&&c<2)&&u.push(l.id)});for(let l=0;l0,o=o||a}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class Dre{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},ot(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=Zr(()=>{var t;this.zooming=!1,z(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",z(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&Gs(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(z(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const i=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,s=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,n,s),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(i,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,n,s)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const t=this.body.nodes;let i;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i=t[n],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.nodes,n=this.body.nodeIndices;let s;const o=[],a=[],u=20,l=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:l.y,left:l.x,bottom:c.y,right:c.x},h=[];for(let b=0;b{for(const b of h)b()}}}_drawEdges(e){const t=this.body.edges,i=this.body.edgeIndices;for(let n=0;n{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",z(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&Gs(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const n=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:s}=this;n.observe(s),this._cleanupCallbacks.push(()=>{n.unobserve(s)})}else{const n=Fre(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=z(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;Le(e=on(t=Qr(i=this._cleanupCallbacks).call(i,0)).call(t)).call(e,n=>{try{n()}catch(s){console.error(s)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;const n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),s={x:n.x-this.cameraState.position.x,y:n.y-this.cameraState.position.y};this.body.view.translation.x+=s.x*this.body.view.scale,this.body.view.translation.y+=s.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Fe(e).call(e,"%")!==-1||Fe(e).call(e,"px")!==-1)return e;if(Fe(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new us(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:us.DIRECTION_ALL}),hu(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new us(this.frame),M5(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let i=!1;const n=this.frame.canvas.width,s=this.frame.canvas.height,o=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==u)&&this._getCameraState(o),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(s/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function Bre(r,e){const t=ot({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!et(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class jre{constructor(e,t){var i,n;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",z(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",z(n=this.releaseNode).call(n,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Bre(e,this.body.nodeIndices);const i=this.canvas.frame.canvas.clientWidth,n=this.canvas.frame.canvas.clientHeight;let s,o;if(i===0||n===0)o=1,s=kt.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=kt.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const d=Math.min(i/600,n/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),s=kt.getRange(this.body.nodes,e.nodes);const l=Math.abs(s.maxX-s.minX)*1.1,c=Math.abs(s.maxY-s.minY)*1.1,d=i/l,h=n/c;o=d<=h?d:h}o>e.maxZoomLevel?o=e.maxZoomLevel:o1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!tn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!tn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!tn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!tn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var n;this.viewFunction=z(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var s;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=z(s=this._transitionRedraw).call(s,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},n=this.body.view.translation,s={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=GQ[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=z(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function eB(r){var e=r&&r.preventDefault||!1,t=r&&r.container||window,i={},n={keydown:{},keyup:{}},s={},o;for(o=97;o<=122;o++)s[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)s[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)s[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)s["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)s["num"+o]={code:96+o,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(c){l(c,"keydown")},u=function(c){l(c,"keyup")},l=function(c,d){if(n[d][c.keyCode]!==void 0){for(var h=n[d][c.keyCode],f=0;f{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e{this._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=z(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=eB({container:window,preventDefault:!0}):this.keycharm=eB({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,i,n,s,o,a,u,l,c,d,h,f,p,v,b,m,g,w,y,S,O,I,_;z(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),z(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),z(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),z(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),z(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),z(p=this.keycharm).call(p,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),z(v=this.keycharm).call(v,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),z(b=this.keycharm).call(b,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),z(m=this.keycharm).call(m,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(w=this.keycharm).call(w,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(y=this.keycharm).call(y,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(S=this.keycharm).call(S,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(I=this.keycharm).call(I,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(_=this.keycharm).call(_,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class zre{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,p,v,b;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new Lre(e,t),this.body.eventListeners.onTap=z(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=z(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=z(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=z(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=z(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=z(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=z(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=z(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=z(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=z(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=z(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=z(v=this.onContext).call(v,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=z(b=this.getPointer).call(b,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},ot(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(lu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),rr(this.options,e,"keyboard"),e.tooltip&&(ot(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=W_(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-WQ(this.canvas.frame.canvas),y:e.y-UQ(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const i=function(n,s){const o=[];for(let a=0;a{const a=o.node;o.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+n)),o.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const n=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const i=this.body.selectionBox.position,n={minX:Math.min(i.start.x,i.end.x),minY:Math.min(i.start.y,i.end.y),maxX:Math.max(i.start.x,i.end.x),maxY:Math.max(i.start.y,i.end.y)},s=Wt(t=this.body.nodeIndices).call(t,a=>{const u=this.body.nodes[a];return u.x>=n.minX&&u.x<=n.maxX&&u.y>=n.minY&&u.y<=n.maxY});Le(s).call(s,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const o=this.getPointer(e.center);this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const i=this.drag.selection;i&&i.length?(Le(i).call(i,function(n){n.node.options.fixed.x=n.xFixed,n.node.options.fixed.y=n.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const i=this.pinch.scale*e.scale;this.zoom(i,t)}zoom(e,t){if(this.options.zoomView===!0){const i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let n;this.drag!==void 0&&this.drag.dragging===!0&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));const s=this.body.view.translation,o=e/i,a=(1-o)*t.x+s.x*o,u=(1-o)*t.y+s.y*o;if(this.body.view.scale=e,this.body.view.translation={x:a,y:u},n!=null){const l=this.canvas.canvasToDOM(n);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),ithis._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:i,right:t,bottom:i},s=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,a="node";if(this.popupObj===void 0){const u=this.body.nodeIndices,l=this.body.nodes;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new rZ(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){const n=this.selectionHandler.getNodeAt(e);i=n===void 0?!1:n.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var tB={},rB={},iB;function Hre(){if(iB)return rB;iB=1;var r=y0(),e=O5();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),rB}var nB;function Wre(){return nB||(nB=1,Hre()),tB}var sB={},$1,oB;function Nn(){if(oB)return $1;oB=1;var r=Ns(),e=TypeError;return $1=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},$1}var P1,aB;function Fn(){if(aB)return P1;aB=1;var r=er(),e=I5(),t=r("Set"),i=t.prototype;return P1={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},P1}var R1,uB;function kn(){if(uB)return R1;uB=1;var r=Yt();return R1=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},R1}var C1,lB;function Sa(){if(lB)return C1;lB=1;var r=kn();return C1=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},C1}var x1,cB;function I0(){if(cB)return x1;cB=1;var r=Fn(),e=Sa(),t=r.Set,i=r.add;return x1=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},x1}var q1,dB;function Oa(){return dB||(dB=1,q1=function(r){return r.size}),q1}var D1,hB;function Ure(){return hB||(hB=1,D1=function(r){return{iterator:r,next:r.next,done:!1}}),D1}var A1,fB;function Bn(){if(fB)return A1;fB=1;var r=li(),e=jr(),t=Yt(),i=js(),n=Ure(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},A1=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},A1}var M1,pB;function Vre(){if(pB)return M1;pB=1;var r=Nn(),e=Fn(),t=I0(),i=Oa(),n=Bn(),s=Sa(),o=kn(),a=e.has,u=e.remove;return M1=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},M1}var N1,vB;function jn(){return vB||(vB=1,N1=function(){return!1}),N1}var gB;function Kre(){if(gB)return sB;gB=1;var r=ce(),e=Vre(),t=Te(),i=jn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),sB}var mB={},F1,yB;function Gre(){if(yB)return F1;yB=1;var r=Nn(),e=Fn(),t=Oa(),i=Bn(),n=Sa(),s=kn(),o=e.Set,a=e.add,u=e.has;return F1=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},F1}var bB;function Yre(){if(bB)return mB;bB=1;var r=ce(),e=Te(),t=Gre(),i=jn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),mB}var _B={},k1,wB;function Xre(){if(wB)return k1;wB=1;var r=Nn(),e=Fn().has,t=Oa(),i=Bn(),n=Sa(),s=kn(),o=g0();return k1=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},k1}var EB;function Jre(){if(EB)return _B;EB=1;var r=ce(),e=Xre(),t=jn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),_B}var SB={},B1,OB;function Qre(){if(OB)return B1;OB=1;var r=Nn(),e=Oa(),t=Sa(),i=Bn();return B1=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},B1}var IB;function Zre(){if(IB)return SB;IB=1;var r=ce(),e=Qre(),t=jn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),SB}var TB={},j1,$B;function eie(){if($B)return j1;$B=1;var r=Nn(),e=Fn().has,t=Oa(),i=Bn(),n=kn(),s=g0();return j1=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};wo(this,Gi,new GB),wo(this,Yi,new GB),wo(this,J1,void 0),X_(J1,this,e)}get sizeNodes(){return We(Gi,this).size}get sizeEdges(){return We(Yi,this).size}getNodes(){return We(Gi,this).getSelection()}getEdges(){return We(Yi,this).getSelection()}addNodes(){We(Gi,this).add(...arguments)}addEdges(){We(Yi,this).add(...arguments)}deleteNodes(e){We(Gi,this).delete(e)}deleteEdges(e){We(Yi,this).delete(e)}clear(){We(Gi,this).clear(),We(Yi,this).clear()}commit(){const e={nodes:We(Gi,this).commit(),edges:We(Yi,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&Gs(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}generateClickEvent(e,t,i,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,i);if(s===!0)o.nodes=[],o.edges=[];else{const a=this.getSelection();o.nodes=a.nodes,o.edges=a.edges}n!==void 0&&(o.previousSelection=n),e=="click"&&(o.items=this.getClickedItems(i)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof Ke?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],i=this.body.nodes;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this._pointerToPositionObject(e),n=this._getAllNodesOverlappingWith(i);if(n.length>0)return t===!0?this.body.nodes[n[n.length-1]]:n[n.length-1]}_getEdgesOverlappingWith(e,t){const i=this.body.edges;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this.canvas.DOMtoCanvas(e);let n=10,s=null;const o=this.body.edges;for(let a=0;a0&&(this.generateClickEvent("deselectEdge",t,e,s),i=!0),n.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,s),i=!0),n.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),n.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return ms(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return ms(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const i of e.nodes){const n=this.body.nodes[i];if(!n)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(n,t.highlightEdges)}if(e.edges)for(const i of e.edges){const n=this.body.edges[i];if(!n)throw new RangeError('Edge with id "'+i+'" not found');this.selectObject(n)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),i=[],n=this.body.nodeIndices,s=this.body.nodes;for(let u=n.length-1;u>=0;u--){const c=s[n[u]].getItemsOnPoint(t);i.push.apply(i,c)}const o=this.body.edgeIndices,a=this.body.edges;for(let u=o.length-1;u>=0;u--){const c=a[o[u]].getItemsOnPoint(t);i.push.apply(i,c)}return i}}var YB={},Q1,XB;function _ie(){if(XB)return Q1;XB=1;var r=Ls(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var I="",_,E,T,R;for(_=65;_<76;_++){switch(E=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)p.push({k:E+R,v:T})}for(p.sort(function(x,C){return C.v-x.v}),R=0;Ro(E)?1:-1}};return r({target:"Array",proto:!0,forced:S},{sort:function(_){_!==void 0&&t(_);var E=i(this);if(y)return _===void 0?v(E):v(E,_);var T=[],R=n(E),x,C;for(C=0;C=0:p>v;v+=b)v in f&&(d=l(d,f[v],v,h));return d}};return o_={left:o(!1),right:o(!0)},o_}var a_,aj;function xie(){if(aj)return a_;aj=1;var r=F3();return a_=r==="NODE",a_}var uj;function qie(){if(uj)return sj;uj=1;var r=ce(),e=Cie().left,t=Vs(),i=la(),n=xie(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),sj}var u_,lj;function Die(){if(lj)return u_;lj=1,qie();var r=Tt();return u_=r("Array","reduce"),u_}var l_,cj;function Aie(){if(cj)return l_;cj=1;var r=dt(),e=Die(),t=Array.prototype;return l_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},l_}var c_,dj;function Mie(){if(dj)return c_;dj=1;var r=Aie();return c_=r,c_}var d_,hj;function Nie(){return hj||(hj=1,d_=Mie()),d_}var Fie=Nie(),k5=pe(Fie);class B5{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class kie extends B5{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){cs(e).call(e,function(t,i){return t.x-i.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class Bie extends B5{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){cs(e).call(e,function(t,i){return t.y-i.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var fj={},pj;function jie(){if(pj)return fj;pj=1;var r=ce(),e=Hi().every,t=Vs(),i=t("every");return r({target:"Array",proto:!0,forced:!i},{every:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),fj}var h_,vj;function Lie(){if(vj)return h_;vj=1,jie();var r=Tt();return h_=r("Array","every"),h_}var f_,gj;function zie(){if(gj)return f_;gj=1;var r=dt(),e=Lie(),t=Array.prototype;return f_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},f_}var p_,mj;function Hie(){if(mj)return p_;mj=1;var r=zie();return p_=r,p_}var v_,yj;function Wie(){return yj||(yj=1,v_=Hie()),v_}var Uie=Wie(),j5=pe(Uie);function Vie(r,e){const t=new _i;return Le(r).call(r,i=>{var n;Le(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),Le(t).call(t,i=>{const n=i.from.id,s=i.to.id;e[n]==null&&(e[n]=0),(e[s]==null||e[n]>=e[s])&&(e[s]=e[n]+1)}),e}function Kie(r){return L5(e=>{var t,i;return j5(t=Wt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function Gie(r){return L5(e=>{var t,i;return j5(t=Wt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.from===e)},(e,t)=>td+1+h.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[d,h]of i){if(!i.has(d)||!r(h))continue;s[d]=0;const f=[h];let p=0,v;for(;v=f.pop();){var l,c;if(!i.has(d))continue;const b=s[v.id]+u;if(Le(l=Wt(c=v.edges).call(c,m=>m.connected&&m.to!==m.from&&m[t]!==v&&i.has(m.toId)&&i.has(m.fromId))).call(l,m=>{const g=m[a],w=s[g];(w==null||e(b,w))&&(s[g]=b,f.push(m[t]))}),p>o)return Vie(i,s);++p}}return s}class Yie{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},i=n=>{if(t[n]!==void 0)return t[n];let s=this.levels[n];if(this.childrenReference[n]){const o=this.childrenReference[n];if(o.length>0)for(let a=0;as-o);for(const s of n)t.set(s,i++);for(const s in this.levels)Object.prototype.hasOwnProperty.call(this.levels,s)&&(this.levels[s]=t.get(this.levels[s]))}getTreeSize(e,t){let i=1e9,n=-1e9,s=1e9,o=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const u=e[a];i=Math.min(u.x,i),n=Math.max(u.x,n),s=Math.min(u.y,s),o=Math.max(u.y,o)}return{min_x:i,max_x:n,min_y:s,max_y:o}}hasSameParent(e,t){const i=this.parentReference[e.id],n=this.parentReference[t.id];if(i===void 0||n===void 0)return!1;for(let s=0;s{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const i=this.options.hierarchical,n=i.enabled;if(Gs(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),rr(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return n===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(n===!0)return this.body.emitter.emit("refresh"),Ue(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=il(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{const n=e.edges.smooth;n.type!==void 0&&n.type!=="dynamic"&&(i=n.type),this.optionsBackup.edges={smooth:{enabled:n.enabled===void 0?!0:n.enabled,type:n.type===void 0?"dynamic":n.type,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}},e.edges.smooth={enabled:n.enabled===void 0?!0:n.enabled,type:i,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let i=0;is){const u=e.length;for(;e.length>s&&n<=10;){n+=1;const l=e.length;n%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const c=e.length;if(l==c&&n%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*u)})}n>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const a=70;for(let u=0;u0){let e,t,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new Yie;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(n===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const i={},n=()=>{const m=o();let g=0;for(let w=0;w{const w=this.hierarchical.trees;for(const y in w)Object.prototype.hasOwnProperty.call(w,y)&&w[y]===m&&this.direction.shift(y,g)},o=()=>{const m=[];for(let g=0;g{if(!g[m.id]&&(g[m.id]=!0,this.hierarchical.childrenReference[m.id])){const w=this.hierarchical.childrenReference[m.id];if(w.length>0)for(let y=0;y1&&arguments[1]!==void 0?arguments[1]:1e9,w=1e9,y=1e9,S=1e9,O=-1e9;for(const I in m)if(Object.prototype.hasOwnProperty.call(m,I)){const _=e.body.nodes[I],E=e.hierarchical.levels[_.id],T=e.direction.getPosition(_),[R,x]=e._getSpaceAroundNode(_,m);w=Math.min(R,w),y=Math.min(x,y),E<=g&&(S=Math.min(T,S),O=Math.max(T,O))}return[S,O,w,y]},l=(m,g)=>{const w=this.hierarchical.getMaxLevel(m.id),y=this.hierarchical.getMaxLevel(g.id);return Math.min(w,y)},c=(m,g,w)=>{const y=this.hierarchical;for(let S=0;S1)for(let _=0;_2&&arguments[2]!==void 0?arguments[2]:!1;const y=e.direction.getPosition(m),S=e.direction.getPosition(g),O=Math.abs(S-y),I=e.options.hierarchical.nodeSpacing;if(O>I){const _={},E={};a(m,_),a(g,E);const T=l(m,g),R=u(_,T),x=u(E,T),C=R[1],D=x[0],j=x[2];if(Math.abs(C-D)>I){let H=C-D+I;H<-j+I&&(H=-j+I),H<0&&(e._shiftBlock(g.id,H),t=!0,w===!0&&e._centerParent(g))}}},h=(m,g)=>{const w=g.id,y=g.edges,S=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,I={},_=[];for(let j=0;j{let H=0;for(let Z=0;Z{let H=0;for(let Z=0;Z{let H=this.direction.getPosition(g);const Z={};for(let fe=0;fe{const ee=this.direction.getPosition(g);if(i[g.id]===void 0){const ge={};a(g,ge),i[g.id]=ge}const H=u(i[g.id]),Z=H[2],fe=H[3],_e=j-ee;let te=0;_e>0?te=Math.min(_e,fe-this.options.hierarchical.nodeSpacing):_e<0&&(te=-Math.min(-_e,Z-this.options.hierarchical.nodeSpacing)),te!=0&&(this._shiftBlock(g.id,te),t=!0)},C=j=>{const ee=this.direction.getPosition(g),[H,Z]=this._getSpaceAroundNode(g),fe=j-ee;let _e=ee;fe>0?_e=Math.min(ee+(Z-this.options.hierarchical.nodeSpacing),j):fe<0&&(_e=Math.max(ee-(H-this.options.hierarchical.nodeSpacing),j)),_e!==ee&&(this.direction.setPosition(g,_e),t=!0)};let D=R(m,_);x(D),D=R(m,y),C(D)},f=m=>{let g=this.hierarchical.getLevels();g=on(g).call(g);for(let w=0;w{let g=this.hierarchical.getLevels();g=on(g).call(g);for(let w=0;w{for(const m in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,m)&&this._centerParent(this.body.nodes[m])},b=()=>{let m=this.hierarchical.getLevels();m=on(m).call(m);for(let g=0;g0&&Math.abs(d)0&&(l=this.direction.getPosition(n[o-1])+u),this.direction.setPosition(a,l,i),this._validatePositionAndContinue(a,i,l),s++}}}}_placeBranchNodes(e,t){var i;const n=this.hierarchical.childrenReference[e];if(n===void 0)return;const s=[];for(let a=0;at&&this.positionedNodes[u.id]===void 0){const c=this.options.hierarchical.nodeSpacing;let d;a===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(s[a-1])+c,this.direction.setPosition(u,d,l),this._validatePositionAndContinue(u,l,d)}else return}const o=this._getCenterPosition(s);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-n{var n;Fe(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Oe(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Oe(e,n=>{i.push(Number(n))}),cs(i).call(i,function(n,s){return s-n}),i}_determineLevelsByHubsize(){const e=(i,n)=>{this.hierarchical.levelDownstream(i,n)},t=this._getHubSizes();for(let i=0;i{const o=this.body.nodes[s];n===this._getActiveEdges(o).length&&this._crawlNetwork(e,s)})}}_determineLevelsCustomCallback(){const t=function(n,s,o){},i=(n,s,o)=>{let a=this.hierarchical.levels[n.id];a===void 0&&(a=this.hierarchical.levels[n.id]=1e5);const u=t(kt.cloneOptions(n,"node"),kt.cloneOptions(s,"node"),kt.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=k5(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new w0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Gie(t):this.hierarchical.levels=Kie(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,i)=>{this.hierarchical.levels[i.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const i={},n=(s,o)=>{if(i[s.id]===void 0){this.hierarchical.setTreeIndex(s,o),i[s.id]=!0;let a;const u=this._getActiveEdges(s);for(let l=0;l{if(i[s])return;i[s]=!0,this.direction.shift(s,t);const o=this.hierarchical.childrenReference[s];if(o!==void 0)for(let a=0;a{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{this._clean()}),this.body.emitter.on("_dataChanged",z(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",z(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Ue(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const i=this.selectionHandler.getSelectedNodeCount(),n=this.selectionHandler.getSelectedEdgeCount(),s=i+n,o=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(o)),i===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(o)):n===1&&i===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(o)),s!==0&&(i>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(o)):i===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",z(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,z(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",z(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=Ue({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,i=>{i!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(i),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,i,n,s;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,z(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",z(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",z(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",z(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",z(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",z(s=this._dragStartEdge).call(s,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,i,n,s;const o=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(o.from.x,o.from.y),u=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(u.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this._temporaryBindUI("onTouch",z(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",z(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",z(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",z(s=this._controlNodeDragEnd).call(s,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const c=o.edgeType.findBorderPositions(l);a.selected===!1&&(a.x=c.from.x,a.y=c.from.y),u.selected===!1&&(u.x=c.to.x,u.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let i;if(e.length>0){for(let n=0;n0&&typeof this.options.deleteEdge=="function"&&(i=this.options.deleteEdge);if(typeof i=="function"){const n={nodes:e,edges:t};if(i.length===2)i(n,s=>{s!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(s.edges),this.body.data.nodes.getDataSet().remove(s.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const i=Ue({},this.options.controlNodeStyle);i.id="targetNode"+_o(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;const n=this.body.functions.createNode(i);return n.shape.boundingBox={left:e,right:e,top:t,bottom:t},n}_createEditButton(){var e;this._clean(),this.manipulationDOM={},mi(this.editModeDiv);const t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,z(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(mi(this.editModeDiv),mi(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of Qr(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),mi(this.manipulationDiv),mi(this.editModeDiv),mi(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var t;const i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";const n=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,z(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=n,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+ga(Ze(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e{i.destroy()});const n=s=>{let{keyCode:o,key:a}=s;(a==="Enter"||a===" "||o===13||o===32)&&t()};e.addEventListener("keyup",n,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",n,!1)})}_cleanupTemporaryNodesAndEdges(){for(let s=0;s=0;a--)if(s[a]!==this.selectedControlNode.id){o=this.body.nodes[s[a]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(o.id,n.to.id):this._performEditEdge(n.from.id,o.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=ot({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);const s=this.body.functions.createEdge({id:"connectionEdge"+_o(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[s.id]=s,this.body.edgeIndices.push(s.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(s.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}if(e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const u=this.body.nodes[this.temporaryIds.nodes[0]];u.x=this.canvas._XconvertDOMtoCanvas(t.x),u.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[n]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(n,o.id)),e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:_o(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,i=>{i!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const i={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(i,n=>{n!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const i={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let n=this.options.editEdge;if(typeof n=="object"&&(n=n.editWithoutDrag),typeof n=="function")if(n.length===2)n(i,s=>{s==null||this.inMode!=="editEdge"?(this.body.edges[i.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(s),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const G="string",L="boolean",M="number",oo="array",ue="object",z5="dom",Qie="any",g_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],m_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:G,undefined:"undefined"},chosen:{label:{boolean:L,function:"function"},node:{boolean:L,function:"function"},__type__:{object:ue,boolean:L}},color:{border:{string:G},background:{string:G},highlight:{border:{string:G},background:{string:G},__type__:{object:ue,string:G}},hover:{border:{string:G},background:{string:G},__type__:{object:ue,string:G}},__type__:{object:ue,string:G}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:L},y:{boolean:L},__type__:{object:ue,boolean:L}},font:{align:{string:G},color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},__type__:{object:ue,string:G}},group:{string:G,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:G},__type__:{object:ue,boolean:L,number:M}},hidden:{boolean:L},icon:{face:{string:G},code:{string:G},size:{number:M},color:{string:G},weight:{string:G,number:M},__type__:{object:ue}},id:{string:G,number:M},image:{selected:{string:G,undefined:"undefined"},unselected:{string:G,undefined:"undefined"},__type__:{object:ue,string:G}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:ue,number:M}},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},level:{number:M,undefined:"undefined"},margin:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:ue,number:M}},mass:{number:M},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:ue,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:ue}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:ue,boolean:L}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:L,array:oo},borderRadius:{number:M},interpolation:{boolean:L},useImageSize:{boolean:L},useBorderWithImage:{boolean:L},coordinateOrigin:{string:["center","top-left"]},__type__:{object:ue}},size:{number:M},title:{string:G,dom:z5,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:ue,boolean:L,number:M}},x:{number:M},y:{number:M},__type__:{object:ue}},Zie={configure:{enabled:{boolean:L},filter:{boolean:L,string:G,array:oo,function:"function"},container:{dom:z5},showButton:{boolean:L},__type__:{object:ue,boolean:L,string:G,array:oo,function:"function"}},edges:{arrows:{to:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:g_},imageHeight:{number:M},imageWidth:{number:M},src:{string:G},__type__:{object:ue,boolean:L}},middle:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:g_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:ue,boolean:L}},from:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:g_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:ue,boolean:L}},__type__:{string:["from","to","middle"],object:ue}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:ue,number:M}},arrowStrikethrough:{boolean:L},background:{enabled:{boolean:L},color:{string:G},size:{number:M},dashes:{boolean:L,array:oo},__type__:{object:ue,boolean:L}},chosen:{label:{boolean:L,function:"function"},edge:{boolean:L,function:"function"},__type__:{object:ue,boolean:L}},color:{color:{string:G},highlight:{string:G},hover:{string:G},inherit:{string:["from","to","both"],boolean:L},opacity:{number:M},__type__:{object:ue,string:G}},dashes:{boolean:L,array:oo},font:{color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},__type__:{object:ue,string:G}},hidden:{boolean:L},hoverWidth:{function:"function",number:M},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},length:{number:M,undefined:"undefined"},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:ue,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:ue}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:L},__type__:{object:ue}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:ue,boolean:L}},smooth:{enabled:{boolean:L},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:L},__type__:{object:ue,boolean:L}},title:{string:G,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:ue,boolean:L,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:ue}},groups:{useDefaultGroups:{boolean:L},__any__:m_,__type__:{object:ue}},interaction:{dragNodes:{boolean:L},dragView:{boolean:L},hideEdgesOnDrag:{boolean:L},hideEdgesOnZoom:{boolean:L},hideNodesOnDrag:{boolean:L},hover:{boolean:L},keyboard:{enabled:{boolean:L},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:ue}},bindToWindow:{boolean:L},autoFocus:{boolean:L},__type__:{object:ue,boolean:L}},multiselect:{boolean:L},navigationButtons:{boolean:L},selectable:{boolean:L},selectConnectedEdges:{boolean:L},hoverConnectedEdges:{boolean:L},tooltipDelay:{number:M},zoomView:{boolean:L},zoomSpeed:{number:M},__type__:{object:ue}},layout:{randomSeed:{undefined:"undefined",number:M,string:G},improvedLayout:{boolean:L},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:L},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:L},edgeMinimization:{boolean:L},parentCentralization:{boolean:L},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:ue,boolean:L}},__type__:{object:ue}},manipulation:{enabled:{boolean:L},initiallyActive:{boolean:L},addNode:{boolean:L,function:"function"},addEdge:{boolean:L,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:ue,boolean:L,function:"function"}},deleteNode:{boolean:L,function:"function"},deleteEdge:{boolean:L,function:"function"},controlNodeStyle:m_,__type__:{object:ue,boolean:L}},nodes:m_,physics:{enabled:{boolean:L},barnesHut:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:ue}},forceAtlas2Based:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:ue}},repulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},__type__:{object:ue}},hierarchicalRepulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:ue}},maxVelocity:{number:M},minVelocity:{number:M},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:L},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:L},fit:{boolean:L},__type__:{object:ue,boolean:L}},timestep:{number:M},adaptiveTimestep:{boolean:L},wind:{x:{number:M},y:{number:M},__type__:{object:ue}},__type__:{object:ue,boolean:L}},autoResize:{boolean:L},clickToUse:{boolean:L},locale:{string:G},locales:{__any__:{any:Qie},__type__:{object:ue}},height:{string:G},width:{string:G},__type__:{object:ue}},H5={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},ene=(r,e,t)=>{var i;return!!(Ii(r).call(r,"physics")&&Ii(i=H5.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class tne{constructor(){}getDistances(e,t,i){const n={},s=e.edges;for(let a=0;a2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();const s=.01,o=1;let a=0;const u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let c=1e9,d=0,h=0,f=0,p=0,v=0;for(;c>s&&ao&&vthis.body.emitter.emit("_requestRedraw")),this.groups=new WZ,this.canvas=new kre(this.body),this.selectionHandler=new bie(this.body,this.canvas),this.interactionHandler=new zre(this.body,this.canvas,this.selectionHandler),this.view=new jre(this.body,this.canvas),this.renderer=new Dre(this.body,this.canvas),this.physics=new Ire(this.body),this.layoutEngine=new Xie(this.body),this.clustering=new qre(this.body),this.manipulation=new Jie(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Zte(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new bre(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new rne(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}b3(ae.prototype);ae.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(iZ.validate(r,Zie)===!0&&console.error("%cErrors have been found in the supplied options object.",p5),Gs(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=$Z(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new tZ(this,this.body.container,H5,this.canvas.pixelRatio,ene)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ue(i.nodes,this.nodesHandler.options),Ue(i.edges,this.edgesHandler.options),Ue(i.layout,this.layoutEngine.options),Ue(i.interaction,this.selectionHandler.options),Ue(i.interaction,this.renderer.options),Ue(i.interaction,this.interactionHandler.options),Ue(i.manipulation,this.manipulation.options),Ue(i.physics,this.physics.options),Ue(i.global,this.canvas.options),Ue(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new eZ(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};ae.prototype._updateVisibleIndices=function(){const r=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&!this.clustering._isClusteredNode(t)&&r[t].options.hidden===!1&&this.body.nodeIndices.push(r[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t],n=r[i.fromId],s=r[i.toId],o=n!==void 0&&s!==void 0;!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&o&&n.options.hidden===!1&&s.options.hidden===!1&&this.body.edgeIndices.push(i.id)}};ae.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};ae.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=fZ(r.dot);this.setData(e);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=pZ(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};ae.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];mi(this.body.container)};ae.prototype._updateValueRange=function(r){let e,t,i,n=0;for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e].getValue();s!==void 0&&(t=t===void 0?s:Math.min(s,t),i=i===void 0?s:Math.max(s,i),n+=s)}if(t!==void 0&&i!==void 0)for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&r[e].setValueRange(t,i,n)};ae.prototype.isActive=function(){return!this.activator||this.activator.active};ae.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};ae.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};ae.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};ae.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};ae.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};ae.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};ae.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};ae.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};ae.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};ae.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};ae.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};ae.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};ae.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};ae.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};ae.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};ae.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};ae.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};ae.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};ae.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};ae.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};ae.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};ae.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};ae.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};ae.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};ae.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};ae.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};ae.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};ae.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};ae.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};ae.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};ae.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};ae.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};ae.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};ae.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};ae.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};ae.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};ae.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};ae.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};ae.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};ae.prototype.getNodeAt=function(){const r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ae.prototype.getEdgeAt=function(){const r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ae.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};ae.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};ae.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};ae.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};ae.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};ae.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};ae.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};ae.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};ae.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};ae.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};ae.prototype.getOptionsFromConfigurator=function(){let r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const ine=wr({__name:"EditorWindow",setup(r){const e=Pr();return hw(async()=>{if(!e.value)return;const t=await IU(),i={nodes:t.nodes,edges:t.edges},n={};new ae(e.value,i,n)}),(t,i)=>(Ct(),bi(Rt,null,[gt(bw,null,{default:_u(()=>i[0]||(i[0]=[Re("div",null," Редактор сценариев ",-1)])),_:1}),Re("div",{ref_key:"network",ref:e,class:"graph-container"},null,512)],64))}}),nne=Tu(ine,[["__scopeId","data-v-3a1f22ee"]]),sne=wr({__name:"EditorView",setup(r){return(e,t)=>(Ct(),xi(nne))}}),one=wr({__name:"GamesWindow",setup(r){return(e,t)=>(Ct(),xi(bw,null,{default:_u(()=>t[0]||(t[0]=[Re("div",null," Каталог игр ",-1)])),_:1}))}}),ane=wr({__name:"GamesView",setup(r){return(e,t)=>(Ct(),xi(one))}}),W5=fU({history:H4("/"),routes:[{path:"/",name:"home",component:dV},{path:"/editor",name:"editor",component:sne},{path:"/games",name:"games",component:ane}]}),T0=u4(vU);T0.use(h4());T0.use(W5);T0.mount("#app"); +`),n=i.length;if(t.multi)for(let s=0;s0)for(let a=0;a0)for(let s=0;s/&/.test(n)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||i(n)||t.add(n),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new A2(e);let i=!0;const n=s=>/\\/.test(s)?(t.positionthis.parent.fontOptions.maxWdt}getLongestFit(e){let t="",i=0;for(;i1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let n=e.split("\r");for(;n.length>0;){let s=this.getLongestFit(n);if(s===0){const o=n[0],a=this.getLongestFitWord(o);this.lines.newLine(Cr(o).call(o,0,a),t),n[0]=Cr(o).call(o,a)}else{let o=s;n[s-1]===" "?s--:n[o]===" "&&o++;const a=Cr(n).call(n,0,s).join("");s==n.length&&i?this.lines.append(a,t):this.lines.newLine(a,t),n=Cr(n).call(n,o)}}}}const io=["bold","ital","boldital","mono"];class ls{constructor(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=i}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),du(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(Oe(io,t=>{this.fontOptions[t]={}}),ls.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Oe(e,(t,i)=>{t!=null&&typeof t!="object"&&(this.fontOptions[i]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=yi(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(typeof i=="object"){const s=yi(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=yi(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const n=yi(e,"heightConstraint");if(typeof n=="number")t.minHgt=Number(n);else if(typeof n=="object"){const s=yi(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=yi(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),Ue(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=S0("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}addFontOptionsToPile(e,t){for(let i=0;i{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(Fe(io).call(io,a)!==-1?t[a]={}:t[a]=o))})}return t}getFontOption(e,t,i){let n;for(let s=0;s{s[u]=a}),s.size=Number(s.size),s.vadjust=Number(s.vadjust)}}draw(e,t,i,n,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,s,t,i,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",s=arguments.length>4?arguments[4]:void 0;[t,i]=this._setAlignment(e,t,i,n),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=d,c.strokeWidth>0&&e.strokeText(c.text,t+u,i+c.vadjust),e.fillText(c.text,t+u,i+c.vadjust),u+=c.width}i+=a.height}}}_setAlignment(e,t,i,n){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;const s=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*s):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*s):e.textBaseline="middle"}else e.textBaseline=n;return[t,i]}_getColor(e,t,i){let n=e||"#000000",s=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));n=nr(n,o),s=nr(s,o)}return[n,s]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,i=this.size.top-.5*2;if(this.isEdgeLabel){const s=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=s,i=-this.size.height*.5;break;case"top":t=s,i=-(this.size.height+2);break;case"bottom":t=s,i=2;break}}return{left:t,top:i,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=n-this.size.width*.5,this.size.top=s-this.size.height*.5,this.size.yLine=s+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,i,n){const s=function(u,l,c){return l==="normal"?c==="mod"?"":u[c]:u[l][c]!==void 0?u[l][c]:u[c]},o={color:s(this.fontOptions,n,"color"),size:s(this.fontOptions,n,"size"),face:s(this.fontOptions,n,"face"),mod:s(this.fontOptions,n,"mod"),vadjust:s(this.fontOptions,n,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(n==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,i));let a="";return o.mod!==void 0&&o.mod!==""&&(a+=o.mod+" "),a+=o.size+"px "+o.face,e.font=a.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,i,n){return new Nte(e,this,t,i).process(n)}_processLabel(e,t,i){if(this.labelDirty===!1&&!this.differentState(t,i))return;const n=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&n.width0&&n.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),ma(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,i,n,s){i!==void 0&&this.resize(i,n,s),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s)}getDimensionsFromLabel(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);let n=this.textSize.width,s=this.textSize.height;const o=14;return n===0&&(n=o,s=o),{width:n,height:s}}}let Fte=class extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.width=n.width+this.margin.right+this.margin.left,this.height=n.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),m3(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}updateBoundingBox(e,t,i,n,s){this._updateBoundingBox(e,t,i,n,s);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}};class O0 extends Mn{constructor(e,t,i){super(e,t,i),this.labelOffset=0,this.selected=!1}setOptions(e,t,i){this.options=e,t===void 0&&i===void 0||this.setImages(t,i)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const i=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=i}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const t=this.options.imagePadding;typeof t=="object"?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let i=1,n=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=this.options.size*2*i,t=this.options.size*2*n}else{const i=this._getImagePadding();e=this.imageObj.width+i.left+i.right,t=this.imageObj.height+i.top+i.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,i,n){this.initContextForDraw(e,n),Jw(e,t,i,n.size),this.performFill(e,n)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let i=1;this.options.shapeProperties.interpolation===!0&&(i=this.imageObj.width/this.width/this.body.view.scale);const n=this._getImagePadding(),s=this.left+n.left,o=this.top+n.top,a=this.width-n.left-n.right,u=this.height-n.top-n.bottom;this.imageObj.drawImageAtPosition(e,i,s,o,a,u),this.disableShadow(e,t)}}_drawImageLabel(e,t,i,n,s){let o=0;if(this.height!==void 0){o=this.height*.5;const u=this.labelModule.getTextSize(e,n,s);u.lineCount>=1&&(o+=u.height/2)}const a=i+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,n,s,"hanging")}}let kte=class extends O0{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i),s=Math.max(n.width+this.margin.right+this.margin.left,n.height+this.margin.top+this.margin.bottom);this.options.size=s/2,this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this._drawRawCircle(e,t,i,o),this.updateBoundingBox(t,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,i,n,s)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class Bte extends O0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s,this.radius=.5*this.width;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){this.switchImages(n),this.resize();let a=t,u=i;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this._drawRawCircle(e,a,u,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Ui extends Mn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,i)){var s,o;this.labelModule.getTextSize(e,t,i);const a=2*n.size;this.width=(s=this.customSizeWidth)!==null&&s!==void 0?s:a,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:a,this.radius=.5*this.width}}_drawShape(e,t,i,n,s,o,a,u){return this.resize(e,o,a,u),this.left=n-this.width/2,this.top=s-this.height/2,this.initContextForDraw(e,u),t7(t)(e,n,s,u.size),this.performFill(e,u),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,n,s)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,a,n,s,"hanging");const l=s+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,n,l,o,a,"hanging")}this.updateBoundingBox(n,s)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function M2(r,e){var t=Ze(r);if(Di){var i=Di(r);e&&(i=Wt(i).call(i,function(n){return Wi(r,n).enumerable})),t.push.apply(t,i)}return t}function jte(r){for(var e=1;e{e.save(),u(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class zte extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){if(this.needsRefresh(t,i)){const s=this.getDimensionsFromLabel(e,t,i).width+this.margin.right+this.margin.left;this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,o),y3(e,t-this.width/2,i-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Hte=class extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"diamond",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Wte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"circle",2,t,i,n,s,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class N2 extends Mn{constructor(e,t,i){super(e,t,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,i)){const n=this.getDimensionsFromLabel(e,t,i);this.height=n.height*2,this.width=n.width+n.height,this.radius=.5*this.width}}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width*.5,this.top=i-this.height*.5,this.initContextForDraw(e,o),B_(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,i,e,n,s),this.labelModule.draw(e,t,i,n,s)}distanceToBorder(e,t){e&&this.resize(e);const i=this.width*.5,n=this.height*.5,s=Math.sin(t)*i,o=Math.cos(t)*n;return i*n/Math.sqrt(s*s+o*o)}}class Ute extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){return this.resize(e,n,s),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=i-this.height/2,this._icon(e,t,i,n,s,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,n),this.updateBoundingBox(t,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,i,n,s,o){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:n?"bold":"",(this.options.icon.weight!=null&&n?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,i),this.disableShadow(e,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Vte=class extends O0{constructor(e,t,i,n,s){super(e,t,i),this.setImages(n,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const s=this.options.size*2;this.width=s,this.height=s;return}this.needsRefresh(t,i)&&this._resizeImage()}draw(e,t,i,n,s,o){e.save(),this.switchImages(n),this.resize();let a=t,u=i;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=i,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=i-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,d=(n?c:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,d),e.beginPath();let h=n?this.options.color.highlight.border:s?this.options.color.hover.border:this.options.color.border,f=n?this.options.color.highlight.background:s?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(h=nr(h,o.opacity),f=nr(f,o.opacity)),e.strokeStyle=h,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),ma(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,a,u,n,s),this.updateBoundingBox(t,i),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Kte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"square",2,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Gte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"hexagon",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Yte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"star",4,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class Xte extends Mn{constructor(e,t,i){super(e,t,i),this._setMargins(i)}resize(e,t,i){this.needsRefresh(t,i)&&(this.textSize=this.labelModule.getTextSize(e,t,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,i,n,s,o){this.resize(e,n,s),this.left=t-this.width/2,this.top=i-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,n,s),this.disableShadow(e,o),this.updateBoundingBox(t,i,e,n,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let Jte=class extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangle",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class Qte extends Ui{constructor(e,t,i){super(e,t,i)}draw(e,t,i,n,s,o){return this._drawShape(e,"triangleDown",3,t,i,n,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function F2(r,e){var t=Ze(r);if(Di){var i=Di(r);e&&(i=Wt(i).call(i,function(n){return Wi(r,n).enumerable})),t.push.apply(t,i)}return t}function k2(r){for(var e=1;et[l]!=null);u.push("font"),lu(u,e,a),e.color=W_(e.color)}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;if(lu(["color","fixed","shadow"],e,t,i),Ke.checkMass(t),e.opacity!==void 0&&(Ke.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(Ke.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!Ke.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),ir(e,t,"shadow",n),t.color!==void 0&&t.color!==null){const a=W_(t.color);d5(e.color,a)}else i===!0&&t.color===null&&(e.color=$i(n.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),i===!0&&t.font===null&&(e.font=$i(n.font)),Ke.updateGroupOptions(e,t,s),t.scaling!==void 0&&ir(e.scaling,t.scaling,"label",n.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=nr(e.borderColor,t),e.color=nr(e.color,t),e.shadowColor=nr(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),Ke.updateGroupOptions(this.options,k2(k2({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Fte(this.options,this.body,this.labelModule);break;case"circle":this.shape=new kte(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Bte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Lte(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new zte(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Hte(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Wte(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new N2(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Ute(this.options,this.body,this.labelModule);break;case"image":this.shape=new Vte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Kte(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Gte(this.options,this.body,this.labelModule);break;case"star":this.shape=new Yte(this.options,this.body,this.labelModule);break;case"text":this.shape=new Xte(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Jte(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Qte(this.options,this.body,this.labelModule);break;default:this.shape=new N2(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.size=this.options.scaling.min+n*s}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&Y_(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Y_(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.lefte.left&&this.shape.tope.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",v5),e.mass=1}}}class Zte{constructor(e,t,i,n){var s;if(this.body=e,this.images=t,this.groups=i,this.layoutEngine=n,this.body.functions.createNode=z(s=this.create).call(s,this),this.nodesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items,a.data,a.oldData)},remove:(o,a)=>{this.remove(a.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,a,u,l){if(a===o)return .5;{const c=1/(a-o);return Math.max(0,(l-o)*c)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=$i(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",z(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",z(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Oe(this.nodesListeners,(i,n)=>{this.body.data.nodes&&this.body.data.nodes.off(n,i)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(Ke.parseOptions(this.options,e),e.opacity!==void 0&&(G_(e.opacity)||!tn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of Ze(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.nodes;if(l3("id",e))this.body.data.nodes=e;else if(et(e))this.body.data.nodes=new nu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new nu;else throw new TypeError("Array or DataSet expected");if(i&&Oe(this.nodesListeners,function(n,s){i.off(s,n)}),this.body.nodes={},this.body.data.nodes){const n=this;Oe(this.nodesListeners,function(o,a){n.body.data.nodes.on(a,o)});const s=this.body.data.nodes.getIds();this.add(s,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i;const n=[];for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:Ke;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Oe(this.body.nodes,(t,i)=>{const n=this.body.data.nodes.get(i);n!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(n))})}getPositions(e){const t={};if(e!==void 0){if(et(e)===!0){for(let i=0;i{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var B2={},j2;function ere(){if(j2)return B2;j2=1;var r=ce(),e=Math.hypot,t=Math.abs,i=Math.sqrt,n=!!e&&e(1/0,NaN)!==1/0;return r({target:"Math",stat:!0,arity:2,forced:n},{hypot:function(o,a){for(var u=0,l=0,c=arguments.length,d=0,h,f;l0?(f=h/d,u+=f*f):u+=h;return d===1/0?1/0:d*i(u)}}),B2}var _1,L2;function tre(){if(L2)return _1;L2=1,ere();var r=Be();return _1=r.Math.hypot,_1}var w1,z2;function rre(){if(z2)return w1;z2=1;var r=tre();return w1=r,w1}var E1,H2;function ire(){return H2||(H2=1,E1=rre()),E1}var nre=ire(),sre=pe(nre);class tt{static transform(e,t){et(e)||(e=[e]);const i=t.point.x,n=t.point.y,s=t.angle,o=t.length;for(let a=0;a4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,s):this._drawLine(e,t,s)}_drawLine(e,t,i,n,s){if(this.from!=this.to)this._line(e,t,i,n,s);else{const[o,a,u]=this._getCircleData(e);this._circle(e,t,o,a,u)}}_drawDashedLine(e,t,i,n,s){e.lineCap="round";const o=et(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,i);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)b3(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[i,n]=Cr(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:i,y:n,low:.6,high:.8,direction:1})}}}_getCircleData(e){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const i=x5(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}_pointOnCircle(e,t,i,n){const s=n*2*Math.PI;return{x:e+i*Math.cos(s),y:t-i*Math.sin(s)}}_findBorderPositionCircle(e,t,i){const n=i.x,s=i.y;let o=i.low,a=i.high;const u=i.direction,l=10,c=this.options.selfReference.size,d=.05;let h,f=(o+a)*.5,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));let v=0;do{f=(o+a)*.5,h=this._pointOnCircle(n,s,c,f);const b=Math.atan2(e.y-h.y,e.x-h.x),m=e.distanceToBorder(t,b)+p,g=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),w=m-g;if(Math.abs(w)0?u>0?o=f:a=f:u>0?a=f:o=f,++v}while(o<=a&&v1?c=1:c<0&&(c=0);const d=e+c*a,h=t+c*u,f=d-s,p=h-o;return Math.sqrt(f*f+p*p)}getArrowData(e,t,i,n,s,o){let a,u,l,c,d,h,f;const p=o.width;t==="from"?(l=this.from,c=this.to,d=o.fromArrowScale<0,h=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,c=this.from,d=o.toArrowScale<0,h=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,c=this.from,d=o.middleArrowScale<0,h=Math.abs(o.middleArrowScale),f=o.middleArrowType);const v=15*h+3*p;if(l!=c){const w=sre(l.x-c.x,l.y-c.y),y=v/w;if(t!=="middle")if(this.options.smooth.enabled===!0){const S=this._findBorderPosition(l,e,{via:i}),O=this.getPoint(S.t+y*(t==="from"?1:-1),i);a=Math.atan2(S.y-O.y,S.x-O.x),u=S}else a=Math.atan2(l.y-c.y,l.x-c.x),u=this._findBorderPosition(l,e);else{const S=(d?-y:y)/2,O=this.getPoint(.5+S,i),I=this.getPoint(.5-S,i);a=Math.atan2(O.y-I.y,O.x-I.x),u=this.getPoint(.5,i)}}else{const[w,y,S]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:w,y,low:O,high:I,direction:-1});a=_.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=_}else if(t==="to"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:w,y,low:O,high:I,direction:1});a=_.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=_}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(w,y,S,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const b=u.x-v*.9*Math.cos(a),m=u.y-v*.9*Math.sin(a);return{point:u,core:{x:b,y:m},angle:a,length:v,type:f}}drawArrowHead(e,t,i,n,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,D5.draw(e,s)&&(this.enableShadow(e,t),ma(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){const i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const i=et(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function V2(r,e){var t=Ze(r);if(Di){var i=Di(r);e&&(i=Wt(i).call(i,function(n){return Wi(r,n).enumerable})),t.push.apply(t,i)}return t}function K2(r){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const n=10,s=.2;let o=!1,a=1,u=0,l=this.to,c,d,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let f=0;do{d=(u+a)*.5,c=this.getPoint(d,i);const p=Math.atan2(l.y-c.y,l.x-c.x),v=l.distanceToBorder(t,p)+h,b=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=v-b;if(Math.abs(m)0&&(l=this._getDistanceToLine(p,v,h,f,s,o),u=l{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,i){this._bezierCurve(e,t,i)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[i,n,s]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:i+s*Math.sin(o),y:n+s-s*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToBezierEdge(e,t,i,n,s,o,this.via)}}class Y2 extends I0{constructor(e,t,i){super(e,t,i)}_line(e,t,i){this._bezierCurve(e,t,i)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let i=Math.abs(this.from.x-this.to.x),n=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let s,o;i<=n?s=o=e*n:s=o=e*i,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return t==="discrete"&&(i<=n?a=ithis.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return i<=n?this.from.x<=this.to.x?a=this.to.xa?this.to.x:a:this.from.y>=this.to.y?u=this.to.y>u?this.to.y:u:u=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,i.via)}_getDistanceToEdge(e,t,i,n,s,o){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,i,n,s,o,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,n=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,s=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:n,y:s}}}class yre extends I0{constructor(e,t,i){super(e,t,i)}_getDistanceToBezierEdge2(e,t,i,n,s,o,a,u){let l=1e9,c=e,d=t;const h=[0,0,0,0];for(let f=1;f<10;f++){const p=.1*f;h[0]=Math.pow(1-p,3),h[1]=3*p*Math.pow(1-p,2),h[2]=3*Math.pow(p,2)*(1-p),h[3]=Math.pow(p,3);const v=h[0]*e+h[1]*a.x+h[2]*u.x+h[3]*i,b=h[0]*t+h[1]*a.y+h[2]*u.y+h[3]*n;if(f>0){const m=this._getDistanceToLine(c,d,v,b,s,o);l=mMath.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(n=this.from.y,o=this.to.y,i=this.from.x-a*e,s=this.to.x+a*e):(n=this.from.y-a*t,o=this.to.y+a*t,i=this.from.x,s=this.to.x),[{x:i,y:n},{x:s,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,i,n,s,o){let[a,u]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,i,n,s,o,a,u)}getPoint(e){let[t,i]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,s=[Math.pow(1-n,3),3*n*Math.pow(1-n,2),3*Math.pow(n,2)*(1-n),Math.pow(n,3)],o=s[0]*this.fromPoint.x+s[1]*t.x+s[2]*i.x+s[3]*this.toPoint.x,a=s[0]*this.fromPoint.y+s[1]*t.y+s[2]*i.y+s[3]*this.toPoint.y;return{x:o,y:a}}}class J2 extends A5{constructor(e,t,i){super(e,t,i)}_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let i=this.to,n=this.from;e.id===this.from.id&&(i=this.from,n=this.to);const s=Math.atan2(i.y-n.y,i.x-n.x),o=i.x-n.x,a=i.y-n.y,u=Math.sqrt(o*o+a*a),l=e.distanceToBorder(t,s),c=(u-l)/u;return{x:(1-c)*n.x+c*i.x,y:(1-c)*n.y+c*i.y,t:0}}_getDistanceToEdge(e,t,i,n,s,o){return this._getDistanceToLine(e,t,i,n,s,o)}}class Pi{constructor(e,t,i,n,s){if(t===void 0)throw new Error("No body provided");this.options=$i(n),this.globalOptions=n,this.defaultOptions=s,this.body=t,this.imagelist=i,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new ls(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;Pi.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=C5(e.value));const i=[e,this.options,this.defaultOptions];return this.chooser=S0("edge",i),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Gs(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(tn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=n.endPointOffset.from!==void 0?n.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(tn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=n.endPointOffset.to!==void 0?n.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),du(t.label)?e.label=t.label:du(e.label)||(e.label=void 0),ir(e,t,"smooth",n),ir(e,t,"shadow",n),ir(e,t,"background",n),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=an(n.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),ir(e.scaling,t.scaling,"label",n.scaling)):i===!0&&t.scaling===null&&(e.scaling=an(n.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=Fe(a).call(a,"to")!=-1,e.arrows.middle.enabled=Fe(a).call(a,"middle")!=-1,e.arrows.from.enabled=Fe(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")ir(e.arrows,t.arrows,"to",n.arrows),ir(e.arrows,t.arrows,"middle",n.arrows),ir(e.arrows,t.arrows,"from",n.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+ga(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=an(n.arrows));if(t.color!==void 0&&t.color!==null){const a=as(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)Ue(u,n.color,!1,i);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(as(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,a.opacity===void 0&&(u.opacity=1);else{let l=!1;a.color!==void 0&&(u.color=a.color,l=!0),a.highlight!==void 0&&(u.highlight=a.highlight,l=!0),a.hover!==void 0&&(u.hover=a.hover,l=!0),a.inherit!==void 0&&(u.inherit=a.inherit),a.opacity!==void 0&&(u.opacity=Math.min(1,Math.max(0,a.opacity))),l===!0?u.inherit=!1:u.inherit===void 0&&(u.inherit="from")}}else i===!0&&t.color===null&&(e.color=$i(n.color));i===!0&&t.font===null&&(e.font=$i(n.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,n=this.options.color.inherit,s={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:n?void 0:this.options.color.color,inheritsColor:n,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const o=this.options.selectionWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.highlight,s.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.hover,s.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(s,this.options.id,this.selected,this.hover),s.color!==void 0&&(s.inheritsColor=!1),s.shadow===!1&&(s.shadowColor!==this.options.shadow.color||s.shadowSize!==this.options.shadow.size||s.shadowX!==this.options.shadow.x||s.shadowY!==this.options.shadow.y)&&(s.shadow=!0));else s.shadow=this.options.shadow.enabled,s.width=Math.max(s.width,.3/this.body.view.scale);return s}updateLabelModule(e){const t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let t=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof G2&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof X2&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof Y2&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof J2&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new G2(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new X2(this.options,this.body,this.labelModule):this.edgeType=new Y2(this.options,this.body,this.labelModule):this.edgeType=new J2(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,i){if(this.options.value!==void 0){const n=this.options.scaling.customScalingFunction(e,t,i,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+n*o}this.options.width=this.options.scaling.min+n*s}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const i=this.edgeType.getViaNode(),n={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(n.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=n.from.core),t.fromArrowSrc&&(n.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(n.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(n.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(n.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=n.to.core),t.toArrowSrc&&(n.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(n.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(n.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(n.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,t),t.middleArrowSrc&&(n.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(n.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(n.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,n.to)}drawLabel(e,t){if(this.options.label!==void 0){const i=this.from,n=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let s;if(i.id!=n.id){this.labelModule.pointToSelf=!1,s=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=x5(e,this.options.selfReference.angle,this.options.selfReference.size,i);s=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const n=this._getRotation();Y_(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}const i={left:e.x,top:e.y};return this.isOverlappingWith(i)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const i=this.from.x,n=this.from.y,s=this.to.x,o=this.to.y,a=e.left,u=e.top;return this.edgeType.getDistanceToEdge(i,n,s,o,a,u)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);const n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return n;const s=this.from.y-this.to.y,o=this.from.x-this.to.x;let a=Math.atan2(s,o);return(a<-1&&o<0||a>0&&o<0)&&(a+=Math.PI),n.angle=a,n}_pointOnCircle(e,t,i,n){return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class bre{constructor(e,t,i){var n;this.body=e,this.images=t,this.groups=i,this.body.functions.createEdge=z(n=this.create).call(n,this),this.edgesListeners={add:(s,o)=>{this.add(o.items)},update:(s,o)=>{this.update(o.items)},remove:(s,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,o,a,u){if(o===s)return .5;{const l=1/(o-s);return Math.max(0,(u-s)*l)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},Ue(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(n){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n==="dynamic"&&(n="continuous");let o=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const u=e.body.edges[a],l=e.body.data.edges.get(a);if(l!=null){const c=l.smooth;c!==void 0&&c.enabled===!0&&c.type==="dynamic"&&(n===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:n}}),o=!0)}}s===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",z(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",z(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",()=>{Oe(this.edgesListeners,(n,s)=>{this.body.data.edges&&this.body.data.edges.off(s,n)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){Pi.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(const i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&this.body.edges[i].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.data.edges;if(l3("id",e))this.body.data.edges=e;else if(et(e))this.body.data.edges=new nu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new nu;else throw new TypeError("Array or DataSet expected");if(i&&Oe(this.edgesListeners,(n,s)=>{i.off(s,n)}),this.body.edges={},this.body.data.edges){Oe(this.edgesListeners,(s,o)=>{this.body.data.edges.on(o,s)});const n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.edges,n=this.body.data.edges;for(let s=0;s1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const i=this.body.edges;Oe(e,n=>{const s=i[n];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Oe(this.body.edges,(e,t)=>{const i=this.body.data.edges.get(t);i!==void 0&&e.setOptions(i)})}create(e){return new Pi(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const n=i[e];n.from=null,n.to=null,n.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];Oe(this.body.edges,(t,i)=>{const n=this.body.nodes[t.toId],s=this.body.nodes[t.fromId];n!==void 0&&n.isCluster===!0||s!==void 0&&s.isCluster===!0||(n===void 0||s===void 0)&&e.push(i)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,i=[];Le(e).call(e,(n,s)=>{t[s]===void 0&&i.push(s)}),this.add(i,!0)}}class M5{constructor(e,t,i){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(i),this._rng=il("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,n=i.length,s=this._formBarnesHutTree(t,i);this.barnesHutTree=s;for(let o=0;o0&&this._getForceContributions(s.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){const i=e.centerOfMass.x-t.x,n=e.centerOfMass.y-t.y,s=Math.sqrt(i*i+n*n);s*e.calcSize>this.thetaInversed?this._calculateForces(s,i,n,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(s,i,n,t,e)}}_calculateForces(e,t,i,n,s){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));const o=this.options.gravitationalConstant*s.mass*n.options.mass/Math.pow(e,3),a=t*o,u=i*o;this.physicsBody.forces[n.id].x+=a,this.physicsBody.forces[n.id].y+=u}_formBarnesHutTree(e,t){let i;const n=t.length;let s=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,u=e[t[0]].y;for(let b=1;b0&&(ga&&(a=g),wu&&(u=w))}const l=Math.abs(a-s)-Math.abs(u-o);l>0?(o-=.5*l,u+=.5*l):(s+=.5*l,a-=.5*l);const d=Math.max(1e-5,Math.abs(a-s)),h=.5*d,f=.5*(s+a),p=.5*(o+u),v={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:p-h,maxY:p+h},size:d,calcSize:1/d,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(v.root);for(let b=0;b0&&this._placeInTree(v.root,i);return v}_updateBranchMass(e,t){const i=e.centerOfMass,n=e.mass+t.options.mass,s=1/n;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=s,i.y=i.y*e.mass+t.y*t.options.mass,i.y*=s,e.mass=n;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?n.maxY>t.y?s="NW":s="SW":n.maxY>t.y?s="NE":s="SE",this._placeInRegion(e,t,s)}_placeInRegion(e,t,i){const n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let i,n,s,o;const a=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY,o=e.range.minY+a;break;case"NE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY,o=e.range.minY+a;break;case"SW":i=e.range.minX,n=e.range.minX+a,s=e.range.minY+a,o=e.range.maxY;break;case"SE":i=e.range.minX+a,n=e.range.maxX,s=e.range.minY+a,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:s,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}class _re{constructor(e,t,i){this._rng=il("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(i)}setOptions(e){this.options=e}solve(){let e,t,i,n,s,o,a,u;const l=this.body.nodes,c=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,h=this.options.nodeDistance,f=-2/3/h,p=4/3;for(let v=0;v0){const o=s.edges.length+1,a=this.options.centralGravity*o*s.options.mass;n[s.id].x=t*a,n[s.id].y=i*a}}}class Ire{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},ot(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,lu(["stabilization"],this.options,e),ir(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||G_(t.x))&&(t.x=0),(typeof t.y!="number"||G_(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Sre(this.body,this.physicsBody,e),this.edgesSolver=new S1(this.body,this.physicsBody,e),this.gravitySolver=new Ore(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new _re(this.body,this.physicsBody,e),this.edgesSolver=new S1(this.body,this.physicsBody,e),this.gravitySolver=new Va(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new wre(this.body,this.physicsBody,e),this.edgesSolver=new Ere(this.body,this.physicsBody,e),this.gravitySolver=new Va(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new M5(this.body,this.physicsBody,e),this.edgesSolver=new S1(this.body,this.physicsBody,e),this.gravitySolver=new Va(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=z(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=su();this.physicsTick(),(su()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&Zr(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,i=0;const n=5;for(let s=0;so&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);const n=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:n.x,vy:n.y},t.options.fixed.x===!1?(n.x=this.calculateComponentVelocity(n.x,i.x,t.options.mass),t.x+=n.x*this.timestep):(i.x=0,n.x=0),t.options.fixed.y===!1?(n.y=this.calculateComponentVelocity(n.y,i.y,t.options.mass),t.y+=n.y*this.timestep):(i.y=0,n.y=0),Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,Zr(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let i=0;for(;e()&&i"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");O1=crypto.getRandomValues.bind(crypto)}return O1($re)}const Rre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Q2={randomUUID:Rre};function Cre(r,e,t){var n;r=r||{};const i=r.random??((n=r.rng)==null?void 0:n.call(r))??Pre();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Tre(i)}function _o(r,e,t){return Q2.randomUUID?Q2.randomUUID():Cre(r)}class kt{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.shape.boundingBox.left&&(s=a.shape.boundingBox.left),oa.shape.boundingBox.top&&(i=a.shape.boundingBox.top),n1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,n=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;ua.x&&(s=a.x),oa.y&&(i=a.y),n{delete this.containedEdges[i.id]}),Oe(t.containedNodes,(i,n)=>{this.containedNodes[n]=i}),t.containedNodes={},Oe(t.containedEdges,(i,n)=>{this.containedEdges[n]=i}),t.containedEdges={},Oe(t.edges,i=>{Oe(this.edges,n=>{var s,o;const a=Fe(s=n.clusteringEdgeReplacingIds).call(s,i.id);a!==-1&&(Oe(i.clusteringEdgeReplacingIds,u=>{n.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=n.id}),Qr(o=n.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class qre{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},ot(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e=="object"&&(t=this._checkOptions(e),e=this._getHubSize());const i=[];for(let n=0;n=e&&i.push(s.id)}for(let n=0;n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const i={},n={};Oe(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(i[o]=s,Oe(s.edges,a=>{this.clusteredEdges[a.id]===void 0&&(n[a.id]=a)}))}),this._cluster(i,n,e,t)}clusterByEdgeCount(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const n=[],s={};let o,a,u;for(let l=0;l0&&Ze(d).length>0&&v===!0){const m=function(){for(let g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var i;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const s=this.body.nodes[e];t=this._checkOptions(t,s),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=s.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=s.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=s.options.fixed.x,t.clusterNodeProperties.fixed.y=s.options.fixed.y);const o={},a={},u=s.id,l=kt.cloneOptions(s);o[u]=s;for(let d=0;d-1&&(a[p.id]=p)}}this._cluster(o,a,t,n)}_createClusterEdges(e,t,i,n){let s,o,a,u,l,c;const d=Ze(e),h=[];for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const s=[];for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&this.clusteredNodes[c]!==void 0&&s.push(c);for(let c=0;cn?a.x:n,s=a.yo?a.y:o;return{x:.5*(i+n),y:.5*(s+o)}}openCluster(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const n=this.body.nodes[e];if(n===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(n.isCluster!==!0||n.containedNodes===void 0||n.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const s=this.findNode(e),o=Fe(s).call(s,e)-1;if(o>=0){const c=s[o];this.body.nodes[c]._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}const a=n.containedNodes,u=n.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const c={},d={x:n.x,y:n.y};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];c[f]={x:p.x,y:p.y}}const h=t.releaseFunction(d,c);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const p=this.body.nodes[f];h[f]!==void 0&&(p.x=h[f].x===void 0?n.x:h[f].x,p.y=h[f].y===void 0?n.y:h[f].y)}}else Oe(a,function(c){c.options.fixed.x===!1&&(c.x=n.x),c.options.fixed.y===!1&&(c.y=n.y)});for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=this.body.nodes[c];d.vx=n.vx,d.vy=n.vy,d.setOptions({physics:!0}),delete this.clusteredNodes[c]}const l=[];for(let c=0;c0&&on&&(n=l.edges.length),e+=l.edges.length,t+=Math.pow(l.edges.length,2),i+=1}e=e/i,t=t/i;const s=t-Math.pow(e,2),o=Math.sqrt(s);let a=Math.floor(e+2*o);return a>n&&(a=n),a}_createClusteredEdge(e,t,i,n,s){const o=kt.cloneOptions(i,"edge");Ue(o,n),o.from=e,o.to=t,o.id="clusterEdge:"+_o(),s!==void 0&&Ue(o,s);const a=this.body.functions.createEdge(o);return a.clusteringEdgeReplacingIds=[i.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,i,n){if(t instanceof Pi){const s=t,o={};o[s.id]=s,t=o}if(e instanceof Ke){const s=e,o={};o[s.id]=s,e=o}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");n===void 0&&(n=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,n);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&this.body.edges[s]!==void 0){const o=this.body.edges[s];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this.clusteredNodes[s]={clusterId:i.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}_filter(e,t){const i=[];return Oe(e,n=>{t(n)&&i.push(n)}),i}_updateState(){let e;const t=[],i={},n=u=>{Oe(this.body.nodes,l=>{l.isCluster===!0&&u(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}n(function(u){for(let l=0;l{const l=this.body.edges[u];(l===void 0||!l.endPointsValid())&&(i[u]=u)}),n(function(u){Oe(u.containedEdges,(l,c)=>{!l.endPointsValid()&&!i[c]&&(i[c]=c)})}),Oe(this.body.edges,(u,l)=>{let c=!0;const d=u.clusteringEdgeReplacingIds;if(d!==void 0){let h=0;Oe(d,f=>{const p=this.body.edges[f];p!==void 0&&p.endPointsValid()&&(h+=1)}),c=h>0}(!u.endPointsValid()||!c)&&(i[l]=l)}),n(u=>{Oe(i,l=>{delete u.containedEdges[l],Oe(u.edges,(c,d)=>{if(c.id===l){u.edges[d]=null;return}c.clusteringEdgeReplacingIds=this._filter(c.clusteringEdgeReplacingIds,function(h){return!i[h]})}),u.edges=this._filter(u.edges,function(c){return c!==null})})}),Oe(i,u=>{delete this.clusteredEdges[u]}),Oe(i,u=>{delete this.body.edges[u]});const s=Ze(this.body.edges);Oe(s,u=>{const l=this.body.edges[u],c=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(c!==this._isClusteredEdge(l.id))if(c){const d=this._getClusterNodeForNode(l.fromId);d!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,d);const h=this._getClusterNodeForNode(l.toId);h!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,h)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];n(function(l){const c=Ze(l.containedNodes).length,d=l.options.allowSingleNodeCluster===!0;(d&&c<1||!d&&c<2)&&u.push(l.id)});for(let l=0;l0,o=o||a}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class Dre{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},ot(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=Zr(()=>{var t;this.zooming=!1,z(t=this._requestRedraw).call(t,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",z(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&Gs(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(z(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const i=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,s=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,n,s),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(i,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,n,s)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const t=this.body.nodes;let i;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i=t[n],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const i=this.body.nodes,n=this.body.nodeIndices;let s;const o=[],a=[],u=20,l=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),d={top:l.y,left:l.x,bottom:c.y,right:c.x},h=[];for(let b=0;b{for(const b of h)b()}}}_drawEdges(e){const t=this.body.edges,i=this.body.edgeIndices;for(let n=0;n{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",z(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&Gs(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const n=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:s}=this;n.observe(s),this._cleanupCallbacks.push(()=>{n.unobserve(s)})}else{const n=Fre(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(n)})}const i=z(t=this._onResize).call(t,this);window.addEventListener("resize",i),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",i)})}}_cleanUp(){var e,t,i;Le(e=on(t=Qr(i=this._cleanupCallbacks).call(i,0)).call(t)).call(e,n=>{try{n()}catch(s){console.error(s)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;const n=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),s={x:n.x-this.cameraState.position.x,y:n.y-this.cameraState.position.y};this.body.view.translation.x+=s.x*this.body.view.scale,this.body.view.translation.y+=s.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Fe(e).call(e,"%")!==-1||Fe(e).call(e,"px")!==-1)return e;if(Fe(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new us(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:us.DIRECTION_ALL}),hu(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new us(this.frame),N5(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let i=!1;const n=this.frame.canvas.width,s=this.frame.canvas.height,o=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==u)&&this._getCameraState(o),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,i=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(s/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function Bre(r,e){const t=ot({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!et(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class jre{constructor(e,t){var i,n;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",z(i=this.fit).call(i,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",z(n=this.releaseNode).call(n,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Bre(e,this.body.nodeIndices);const i=this.canvas.frame.canvas.clientWidth,n=this.canvas.frame.canvas.clientHeight;let s,o;if(i===0||n===0)o=1,s=kt.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=kt.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const d=Math.min(i/600,n/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),s=kt.getRange(this.body.nodes,e.nodes);const l=Math.abs(s.maxX-s.minX)*1.1,c=Math.abs(s.maxY-s.minY)*1.1,d=i/l,h=n/c;o=d<=h?d:h}o>e.maxZoomLevel?o=e.maxZoomLevel:o1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!tn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!tn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!tn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!tn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var n;this.viewFunction=z(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var s;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=z(s=this._transitionRedraw).call(s,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},n=this.body.view.translation,s={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=GQ[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=z(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function tB(r){var e=r&&r.preventDefault||!1,t=r&&r.container||window,i={},n={keydown:{},keyup:{}},s={},o;for(o=97;o<=122;o++)s[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)s[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)s[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)s["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)s["num"+o]={code:96+o,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(c){l(c,"keydown")},u=function(c){l(c,"keyup")},l=function(c,d){if(n[d][c.keyCode]!==void 0){for(var h=n[d][c.keyCode],f=0;f{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e{this._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=z(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=t/e,s=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,o=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=tB({container:window,preventDefault:!0}):this.keycharm=tB({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,i,n,s,o,a,u,l,c,d,h,f,p,v,b,m,g,w,y,S,O,I,_;z(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),z(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),z(i=this.keycharm).call(i,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),z(n=this.keycharm).call(n,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),z(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(c=this.keycharm).call(c,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(d=this.keycharm).call(d,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),z(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),z(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),z(p=this.keycharm).call(p,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),z(v=this.keycharm).call(v,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),z(b=this.keycharm).call(b,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),z(m=this.keycharm).call(m,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(w=this.keycharm).call(w,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(y=this.keycharm).call(y,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(S=this.keycharm).call(S,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),z(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(I=this.keycharm).call(I,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),z(_=this.keycharm).call(_,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class zre{constructor(e,t,i){var n,s,o,a,u,l,c,d,h,f,p,v,b;this.body=e,this.canvas=t,this.selectionHandler=i,this.navigationHandler=new Lre(e,t),this.body.eventListeners.onTap=z(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=z(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=z(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=z(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=z(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=z(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=z(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=z(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=z(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=z(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=z(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=z(v=this.onContext).call(v,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=z(b=this.getPointer).call(b,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},ot(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(lu(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),ir(this.options,e,"keyboard"),e.tooltip&&(ot(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=W_(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-WQ(this.canvas.frame.canvas),y:e.y-UQ(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const i=function(n,s){const o=[];for(let a=0;a{const a=o.node;o.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+n)),o.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const n=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const i=this.body.selectionBox.position,n={minX:Math.min(i.start.x,i.end.x),minY:Math.min(i.start.y,i.end.y),maxX:Math.max(i.start.x,i.end.x),maxY:Math.max(i.start.y,i.end.y)},s=Wt(t=this.body.nodeIndices).call(t,a=>{const u=this.body.nodes[a];return u.x>=n.minX&&u.x<=n.maxX&&u.y>=n.minY&&u.y<=n.maxY});Le(s).call(s,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const o=this.getPointer(e.center);this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const i=this.drag.selection;i&&i.length?(Le(i).call(i,function(n){n.node.options.fixed.x=n.xFixed,n.node.options.fixed.y=n.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const i=this.pinch.scale*e.scale;this.zoom(i,t)}zoom(e,t){if(this.options.zoomView===!0){const i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let n;this.drag!==void 0&&this.drag.dragging===!0&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));const s=this.body.view.translation,o=e/i,a=(1-o)*t.x+s.x*o,u=(1-o)*t.y+s.y*o;if(this.body.view.scale=e,this.body.view.translation={x:a,y:u},n!=null){const l=this.canvas.canvasToDOM(n);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),ithis._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:i,right:t,bottom:i},s=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,a="node";if(this.popupObj===void 0){const u=this.body.nodeIndices,l=this.body.nodes;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let c;const d=[];for(let h=0;h0&&(this.popupObj=l[d[d.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new rZ(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){const n=this.selectionHandler.getNodeAt(e);i=n===void 0?!1:n.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var rB={},iB={},nB;function Hre(){if(nB)return iB;nB=1;var r=b0(),e=I5();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),iB}var sB;function Wre(){return sB||(sB=1,Hre()),rB}var oB={},$1,aB;function Nn(){if(aB)return $1;aB=1;var r=Ns(),e=TypeError;return $1=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},$1}var P1,uB;function Fn(){if(uB)return P1;uB=1;var r=tr(),e=T5(),t=r("Set"),i=t.prototype;return P1={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:i},P1}var R1,lB;function kn(){if(lB)return R1;lB=1;var r=Yt();return R1=function(e,t,i){for(var n=i?e:e.iterator,s=e.next,o,a;!(o=r(s,n)).done;)if(a=t(o.value),a!==void 0)return a},R1}var C1,cB;function Sa(){if(cB)return C1;cB=1;var r=kn();return C1=function(e,t,i){return i?r(e.keys(),t,!0):e.forEach(t)},C1}var x1,dB;function T0(){if(dB)return x1;dB=1;var r=Fn(),e=Sa(),t=r.Set,i=r.add;return x1=function(n){var s=new t;return e(n,function(o){i(s,o)}),s},x1}var q1,hB;function Oa(){return hB||(hB=1,q1=function(r){return r.size}),q1}var D1,fB;function Ure(){return fB||(fB=1,D1=function(r){return{iterator:r,next:r.next,done:!1}}),D1}var A1,pB;function Bn(){if(pB)return A1;pB=1;var r=li(),e=jr(),t=Yt(),i=js(),n=Ure(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(c,d){this.set=c,this.size=u(d,0),this.has=r(c.has),this.keys=r(c.keys)};return l.prototype={getIterator:function(){return n(e(t(this.keys,this.set)))},includes:function(c){return t(this.has,this.set,c)}},A1=function(c){e(c);var d=+c.size;if(d!==d)throw new a(s);var h=i(d);if(h<0)throw new o(s);return new l(c,h)},A1}var M1,vB;function Vre(){if(vB)return M1;vB=1;var r=Nn(),e=Fn(),t=T0(),i=Oa(),n=Bn(),s=Sa(),o=kn(),a=e.has,u=e.remove;return M1=function(c){var d=r(this),h=n(c),f=t(d);return i(d)<=h.size?s(d,function(p){h.includes(p)&&u(f,p)}):o(h.getIterator(),function(p){a(f,p)&&u(f,p)}),f},M1}var N1,gB;function jn(){return gB||(gB=1,N1=function(){return!1}),N1}var mB;function Kre(){if(mB)return oB;mB=1;var r=ce(),e=Vre(),t=$e(),i=jn(),n=!i("difference",function(o){return o.size===0}),s=n||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),oB}var yB={},F1,bB;function Gre(){if(bB)return F1;bB=1;var r=Nn(),e=Fn(),t=Oa(),i=Bn(),n=Sa(),s=kn(),o=e.Set,a=e.add,u=e.has;return F1=function(c){var d=r(this),h=i(c),f=new o;return t(d)>h.size?s(h.getIterator(),function(p){u(d,p)&&a(f,p)}):n(d,function(p){h.includes(p)&&a(f,p)}),f},F1}var _B;function Yre(){if(_B)return yB;_B=1;var r=ce(),e=$e(),t=Gre(),i=jn(),n=!i("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:n},{intersection:t}),yB}var wB={},k1,EB;function Xre(){if(EB)return k1;EB=1;var r=Nn(),e=Fn().has,t=Oa(),i=Bn(),n=Sa(),s=kn(),o=m0();return k1=function(u){var l=r(this),c=i(u);if(t(l)<=c.size)return n(l,function(h){if(c.includes(h))return!1},!0)!==!1;var d=c.getIterator();return s(d,function(h){if(e(l,h))return o(d,"normal",!1)})!==!1},k1}var SB;function Jre(){if(SB)return wB;SB=1;var r=ce(),e=Xre(),t=jn(),i=!t("isDisjointFrom",function(n){return!n});return r({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:e}),wB}var OB={},B1,IB;function Qre(){if(IB)return B1;IB=1;var r=Nn(),e=Oa(),t=Sa(),i=Bn();return B1=function(s){var o=r(this),a=i(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},B1}var TB;function Zre(){if(TB)return OB;TB=1;var r=ce(),e=Qre(),t=jn(),i=!t("isSubsetOf",function(n){return n});return r({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:e}),OB}var $B={},j1,PB;function eie(){if(PB)return j1;PB=1;var r=Nn(),e=Fn().has,t=Oa(),i=Bn(),n=kn(),s=m0();return j1=function(a){var u=r(this),l=i(a);if(t(u)0&&arguments[0]!==void 0?arguments[0]:()=>{};wo(this,Gi,new YB),wo(this,Yi,new YB),wo(this,J1,void 0),X_(J1,this,e)}get sizeNodes(){return We(Gi,this).size}get sizeEdges(){return We(Yi,this).size}getNodes(){return We(Gi,this).getSelection()}getEdges(){return We(Yi,this).getSelection()}addNodes(){We(Gi,this).add(...arguments)}addEdges(){We(Yi,this).add(...arguments)}deleteNodes(e){We(Gi,this).delete(e)}deleteEdges(e){We(Yi,this).delete(e)}clear(){We(Gi,this).clear(),We(Yi,this).clear()}commit(){const e={nodes:We(Gi,this).commit(),edges:We(Yi,this).commit()};for(var t=arguments.length,i=new Array(t),n=0;n{this.updateSelection()})}setOptions(e){e!==void 0&&Gs(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}generateClickEvent(e,t,i,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,i);if(s===!0)o.nodes=[],o.edges=[];else{const a=this.getSelection();o.nodes=a.nodes,o.edges=a.edges}n!==void 0&&(o.previousSelection=n),e=="click"&&(o.items=this.getClickedItems(i)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof Ke?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],i=this.body.nodes;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this._pointerToPositionObject(e),n=this._getAllNodesOverlappingWith(i);if(n.length>0)return t===!0?this.body.nodes[n[n.length-1]]:n[n.length-1]}_getEdgesOverlappingWith(e,t){const i=this.body.edges;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;const i=this.canvas.DOMtoCanvas(e);let n=10,s=null;const o=this.body.edges;for(let a=0;a0&&(this.generateClickEvent("deselectEdge",t,e,s),i=!0),n.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,s),i=!0),n.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),n.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!0&&this.generateClickEvent("select",t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return ms(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return ms(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const i of e.nodes){const n=this.body.nodes[i];if(!n)throw new RangeError('Node with id "'+i+'" not found');this.selectObject(n,t.highlightEdges)}if(e.edges)for(const i of e.edges){const n=this.body.edges[i];if(!n)throw new RangeError('Edge with id "'+i+'" not found');this.selectObject(n)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),i=[],n=this.body.nodeIndices,s=this.body.nodes;for(let u=n.length-1;u>=0;u--){const c=s[n[u]].getItemsOnPoint(t);i.push.apply(i,c)}const o=this.body.edgeIndices,a=this.body.edges;for(let u=o.length-1;u>=0;u--){const c=a[o[u]].getItemsOnPoint(t);i.push.apply(i,c)}return i}}var XB={},Q1,JB;function _ie(){if(JB)return Q1;JB=1;var r=Ls(),e=Math.floor,t=function(i,n){var s=i.length;if(s<8)for(var o=1,a,u;o0;)i[u]=i[--u];u!==o++&&(i[u]=a)}else for(var l=e(s/2),c=t(r(i,0,l),n),d=t(r(i,l),n),h=c.length,f=d.length,p=0,v=0;p3)){if(d)return!0;if(f)return f<603;var I="",_,E,T,R;for(_=65;_<76;_++){switch(E=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:T=3;break;case 68:case 71:T=4;break;default:T=2}for(R=0;R<47;R++)p.push({k:E+R,v:T})}for(p.sort(function(x,C){return C.v-x.v}),R=0;Ro(E)?1:-1}};return r({target:"Array",proto:!0,forced:S},{sort:function(_){_!==void 0&&t(_);var E=i(this);if(y)return _===void 0?v(E):v(E,_);var T=[],R=n(E),x,C;for(C=0;C=0:p>v;v+=b)v in f&&(d=l(d,f[v],v,h));return d}};return o_={left:o(!1),right:o(!0)},o_}var a_,uj;function xie(){if(uj)return a_;uj=1;var r=k3();return a_=r==="NODE",a_}var lj;function qie(){if(lj)return oj;lj=1;var r=ce(),e=Cie().left,t=Vs(),i=la(),n=xie(),s=!n&&i>79&&i<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),oj}var u_,cj;function Die(){if(cj)return u_;cj=1,qie();var r=Tt();return u_=r("Array","reduce"),u_}var l_,dj;function Aie(){if(dj)return l_;dj=1;var r=dt(),e=Die(),t=Array.prototype;return l_=function(i){var n=i.reduce;return i===t||r(t,i)&&n===t.reduce?e:n},l_}var c_,hj;function Mie(){if(hj)return c_;hj=1;var r=Aie();return c_=r,c_}var d_,fj;function Nie(){return fj||(fj=1,d_=Mie()),d_}var Fie=Nie(),B5=pe(Fie);class j5{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}}class kie extends j5{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){cs(e).call(e,function(t,i){return t.x-i.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}}class Bie extends j5{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;i!==void 0&&this.layout.hierarchical.addToOrdering(e,i),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){cs(e).call(e,function(t,i){return t.y-i.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}}var pj={},vj;function jie(){if(vj)return pj;vj=1;var r=ce(),e=Hi().every,t=Vs(),i=t("every");return r({target:"Array",proto:!0,forced:!i},{every:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),pj}var h_,gj;function Lie(){if(gj)return h_;gj=1,jie();var r=Tt();return h_=r("Array","every"),h_}var f_,mj;function zie(){if(mj)return f_;mj=1;var r=dt(),e=Lie(),t=Array.prototype;return f_=function(i){var n=i.every;return i===t||r(t,i)&&n===t.every?e:n},f_}var p_,yj;function Hie(){if(yj)return p_;yj=1;var r=zie();return p_=r,p_}var v_,bj;function Wie(){return bj||(bj=1,v_=Hie()),v_}var Uie=Wie(),L5=pe(Uie);function Vie(r,e){const t=new _i;return Le(r).call(r,i=>{var n;Le(n=i.edges).call(n,s=>{s.connected&&t.add(s)})}),Le(t).call(t,i=>{const n=i.from.id,s=i.to.id;e[n]==null&&(e[n]=0),(e[s]==null||e[n]>=e[s])&&(e[s]=e[n]+1)}),e}function Kie(r){return z5(e=>{var t,i;return L5(t=Wt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.to===e)},(e,t)=>t>e,"from",r)}function Gie(r){return z5(e=>{var t,i;return L5(t=Wt(i=e.edges).call(i,n=>r.has(n.toId))).call(t,n=>n.from===e)},(e,t)=>td+1+h.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[d,h]of i){if(!i.has(d)||!r(h))continue;s[d]=0;const f=[h];let p=0,v;for(;v=f.pop();){var l,c;if(!i.has(d))continue;const b=s[v.id]+u;if(Le(l=Wt(c=v.edges).call(c,m=>m.connected&&m.to!==m.from&&m[t]!==v&&i.has(m.toId)&&i.has(m.fromId))).call(l,m=>{const g=m[a],w=s[g];(w==null||e(b,w))&&(s[g]=b,f.push(m[t]))}),p>o)return Vie(i,s);++p}}return s}class Yie{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const t={},i=n=>{if(t[n]!==void 0)return t[n];let s=this.levels[n];if(this.childrenReference[n]){const o=this.childrenReference[n];if(o.length>0)for(let a=0;as-o);for(const s of n)t.set(s,i++);for(const s in this.levels)Object.prototype.hasOwnProperty.call(this.levels,s)&&(this.levels[s]=t.get(this.levels[s]))}getTreeSize(e,t){let i=1e9,n=-1e9,s=1e9,o=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const u=e[a];i=Math.min(u.x,i),n=Math.max(u.x,n),s=Math.min(u.y,s),o=Math.max(u.y,o)}return{min_x:i,max_x:n,min_y:s,max_y:o}}hasSameParent(e,t){const i=this.parentReference[e.id],n=this.parentReference[t.id];if(i===void 0||n===void 0)return!1;for(let s=0;s{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const i=this.options.hierarchical,n=i.enabled;if(Gs(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),ir(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return n===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(n===!0)return this.body.emitter.emit("refresh"),Ue(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=il(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{const n=e.edges.smooth;n.type!==void 0&&n.type!=="dynamic"&&(i=n.type),this.optionsBackup.edges={smooth:{enabled:n.enabled===void 0?!0:n.enabled,type:n.type===void 0?"dynamic":n.type,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}},e.edges.smooth={enabled:n.enabled===void 0?!0:n.enabled,type:i,roundness:n.roundness===void 0?.5:n.roundness,forceDirection:n.forceDirection===void 0?!1:n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let i=0;is){const u=e.length;for(;e.length>s&&n<=10;){n+=1;const l=e.length;n%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const c=e.length;if(l==c&&n%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*u)})}n>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const a=70;for(let u=0;u0){let e,t,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new Yie;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(n===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const i={},n=()=>{const m=o();let g=0;for(let w=0;w{const w=this.hierarchical.trees;for(const y in w)Object.prototype.hasOwnProperty.call(w,y)&&w[y]===m&&this.direction.shift(y,g)},o=()=>{const m=[];for(let g=0;g{if(!g[m.id]&&(g[m.id]=!0,this.hierarchical.childrenReference[m.id])){const w=this.hierarchical.childrenReference[m.id];if(w.length>0)for(let y=0;y1&&arguments[1]!==void 0?arguments[1]:1e9,w=1e9,y=1e9,S=1e9,O=-1e9;for(const I in m)if(Object.prototype.hasOwnProperty.call(m,I)){const _=e.body.nodes[I],E=e.hierarchical.levels[_.id],T=e.direction.getPosition(_),[R,x]=e._getSpaceAroundNode(_,m);w=Math.min(R,w),y=Math.min(x,y),E<=g&&(S=Math.min(T,S),O=Math.max(T,O))}return[S,O,w,y]},l=(m,g)=>{const w=this.hierarchical.getMaxLevel(m.id),y=this.hierarchical.getMaxLevel(g.id);return Math.min(w,y)},c=(m,g,w)=>{const y=this.hierarchical;for(let S=0;S1)for(let _=0;_2&&arguments[2]!==void 0?arguments[2]:!1;const y=e.direction.getPosition(m),S=e.direction.getPosition(g),O=Math.abs(S-y),I=e.options.hierarchical.nodeSpacing;if(O>I){const _={},E={};a(m,_),a(g,E);const T=l(m,g),R=u(_,T),x=u(E,T),C=R[1],D=x[0],j=x[2];if(Math.abs(C-D)>I){let H=C-D+I;H<-j+I&&(H=-j+I),H<0&&(e._shiftBlock(g.id,H),t=!0,w===!0&&e._centerParent(g))}}},h=(m,g)=>{const w=g.id,y=g.edges,S=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,I={},_=[];for(let j=0;j{let H=0;for(let Z=0;Z{let H=0;for(let Z=0;Z{let H=this.direction.getPosition(g);const Z={};for(let fe=0;fe{const ee=this.direction.getPosition(g);if(i[g.id]===void 0){const ge={};a(g,ge),i[g.id]=ge}const H=u(i[g.id]),Z=H[2],fe=H[3],_e=j-ee;let te=0;_e>0?te=Math.min(_e,fe-this.options.hierarchical.nodeSpacing):_e<0&&(te=-Math.min(-_e,Z-this.options.hierarchical.nodeSpacing)),te!=0&&(this._shiftBlock(g.id,te),t=!0)},C=j=>{const ee=this.direction.getPosition(g),[H,Z]=this._getSpaceAroundNode(g),fe=j-ee;let _e=ee;fe>0?_e=Math.min(ee+(Z-this.options.hierarchical.nodeSpacing),j):fe<0&&(_e=Math.max(ee-(H-this.options.hierarchical.nodeSpacing),j)),_e!==ee&&(this.direction.setPosition(g,_e),t=!0)};let D=R(m,_);x(D),D=R(m,y),C(D)},f=m=>{let g=this.hierarchical.getLevels();g=on(g).call(g);for(let w=0;w{let g=this.hierarchical.getLevels();g=on(g).call(g);for(let w=0;w{for(const m in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,m)&&this._centerParent(this.body.nodes[m])},b=()=>{let m=this.hierarchical.getLevels();m=on(m).call(m);for(let g=0;g0&&Math.abs(d)0&&(l=this.direction.getPosition(n[o-1])+u),this.direction.setPosition(a,l,i),this._validatePositionAndContinue(a,i,l),s++}}}}_placeBranchNodes(e,t){var i;const n=this.hierarchical.childrenReference[e];if(n===void 0)return;const s=[];for(let a=0;at&&this.positionedNodes[u.id]===void 0){const c=this.options.hierarchical.nodeSpacing;let d;a===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(s[a-1])+c,this.direction.setPosition(u,d,l),this._validatePositionAndContinue(u,l,d)}else return}const o=this._getCenterPosition(s);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-n{var n;Fe(n=this.body.edgeIndices).call(n,i.id)!==-1&&t.push(i)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Oe(t,n=>{const s=this.body.nodes[n],o=this._getActiveEdges(s).length;e[o]=!0});const i=[];return Oe(e,n=>{i.push(Number(n))}),cs(i).call(i,function(n,s){return s-n}),i}_determineLevelsByHubsize(){const e=(i,n)=>{this.hierarchical.levelDownstream(i,n)},t=this._getHubSizes();for(let i=0;i{const o=this.body.nodes[s];n===this._getActiveEdges(o).length&&this._crawlNetwork(e,s)})}}_determineLevelsCustomCallback(){const t=function(n,s,o){},i=(n,s,o)=>{let a=this.hierarchical.levels[n.id];a===void 0&&(a=this.hierarchical.levels[n.id]=1e5);const u=t(kt.cloneOptions(n,"node"),kt.cloneOptions(s,"node"),kt.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(i),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=B5(e=this.body.nodeIndices).call(e,(i,n)=>(i.set(n,this.body.nodes[n]),i),new E0);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Gie(t):this.hierarchical.levels=Kie(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,i)=>{this.hierarchical.levels[i.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const i={},n=(s,o)=>{if(i[s.id]===void 0){this.hierarchical.setTreeIndex(s,o),i[s.id]=!0;let a;const u=this._getActiveEdges(s);for(let l=0;l{if(i[s])return;i[s]=!0,this.direction.shift(s,t);const o=this.hierarchical.childrenReference[s];if(o!==void 0)for(let a=0;a{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l{this._clean()}),this.body.emitter.on("_dataChanged",z(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",z(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,Ue(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const i=this.selectionHandler.getSelectedNodeCount(),n=this.selectionHandler.getSelectedEdgeCount(),s=i+n,o=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(o)),i===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(o)):n===1&&i===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(o)),s!==0&&(i>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(o)):i===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",z(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t;const i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,z(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",z(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=Ue({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,i=>{i!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(i),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,i,n,s;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,z(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",z(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",z(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",z(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",z(n=this._finishConnect).call(n,this)),this._temporaryBindUI("onDragStart",z(s=this._dragStartEdge).call(s,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,z(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,i,n,s;const o=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(o.from.x,o.from.y),u=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(u.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this._temporaryBindUI("onTouch",z(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",z(i=this._controlNodeDragStart).call(i,this)),this._temporaryBindUI("onDrag",z(n=this._controlNodeDrag).call(n,this)),this._temporaryBindUI("onDragEnd",z(s=this._controlNodeDragEnd).call(s,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const c=o.edgeType.findBorderPositions(l);a.selected===!1&&(a.x=c.from.x,a.y=c.from.y),u.selected===!1&&(u.x=c.to.x,u.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let i;if(e.length>0){for(let n=0;n0&&typeof this.options.deleteEdge=="function"&&(i=this.options.deleteEdge);if(typeof i=="function"){const n={nodes:e,edges:t};if(i.length===2)i(n,s=>{s!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(s.edges),this.body.data.nodes.getDataSet().remove(s.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const i=Ue({},this.options.controlNodeStyle);i.id="targetNode"+_o(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;const n=this.body.functions.createNode(i);return n.shape.boundingBox={left:e,right:e,top:t,bottom:t},n}_createEditButton(){var e;this._clean(),this.manipulationDOM={},mi(this.editModeDiv);const t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,z(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(mi(this.editModeDiv),mi(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of Qr(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),mi(this.manipulationDiv),mi(this.editModeDiv),mi(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var t;const i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";const n=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,z(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,z(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,i){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=n,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+ga(Ze(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e{i.destroy()});const n=s=>{let{keyCode:o,key:a}=s;(a==="Enter"||a===" "||o===13||o===32)&&t()};e.addEventListener("keyup",n,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",n,!1)})}_cleanupTemporaryNodesAndEdges(){for(let s=0;s=0;a--)if(s[a]!==this.selectedControlNode.id){o=this.body.nodes[s[a]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(o.id,n.to.id):this._performEditEdge(n.from.id,o.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=ot({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);const s=this.body.functions.createEdge({id:"connectionEdge"+_o(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[s.id]=s,this.body.edgeIndices.push(s.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(s.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}if(e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const u=this.body.nodes[this.temporaryIds.nodes[0]];u.x=this.canvas._XconvertDOMtoCanvas(t.x),u.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t);let n;this.temporaryIds.edges[0]!==void 0&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(i);let o;for(let u=s.length-1;u>=0;u--){var a;if(Fe(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[n]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(n,o.id)),e.controlEdge={from:n,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:_o(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(t,i=>{i!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const i={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(i,n=>{n!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const i={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let n=this.options.editEdge;if(typeof n=="object"&&(n=n.editWithoutDrag),typeof n=="function")if(n.length===2)n(i,s=>{s==null||this.inMode!=="editEdge"?(this.body.edges[i.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(s),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const G="string",L="boolean",M="number",oo="array",ue="object",H5="dom",Qie="any",g_=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],m_={borderWidth:{number:M},borderWidthSelected:{number:M,undefined:"undefined"},brokenImage:{string:G,undefined:"undefined"},chosen:{label:{boolean:L,function:"function"},node:{boolean:L,function:"function"},__type__:{object:ue,boolean:L}},color:{border:{string:G},background:{string:G},highlight:{border:{string:G},background:{string:G},__type__:{object:ue,string:G}},hover:{border:{string:G},background:{string:G},__type__:{object:ue,string:G}},__type__:{object:ue,string:G}},opacity:{number:M,undefined:"undefined"},fixed:{x:{boolean:L},y:{boolean:L},__type__:{object:ue,boolean:L}},font:{align:{string:G},color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},__type__:{object:ue,string:G}},group:{string:G,number:M,undefined:"undefined"},heightConstraint:{minimum:{number:M},valign:{string:G},__type__:{object:ue,boolean:L,number:M}},hidden:{boolean:L},icon:{face:{string:G},code:{string:G},size:{number:M},color:{string:G},weight:{string:G,number:M},__type__:{object:ue}},id:{string:G,number:M},image:{selected:{string:G,undefined:"undefined"},unselected:{string:G,undefined:"undefined"},__type__:{object:ue,string:G}},imagePadding:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:ue,number:M}},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},level:{number:M,undefined:"undefined"},margin:{top:{number:M},right:{number:M},bottom:{number:M},left:{number:M},__type__:{object:ue,number:M}},mass:{number:M},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:ue,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:ue}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:ue,boolean:L}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:L,array:oo},borderRadius:{number:M},interpolation:{boolean:L},useImageSize:{boolean:L},useBorderWithImage:{boolean:L},coordinateOrigin:{string:["center","top-left"]},__type__:{object:ue}},size:{number:M},title:{string:G,dom:H5,undefined:"undefined"},value:{number:M,undefined:"undefined"},widthConstraint:{minimum:{number:M},maximum:{number:M},__type__:{object:ue,boolean:L,number:M}},x:{number:M},y:{number:M},__type__:{object:ue}},Zie={configure:{enabled:{boolean:L},filter:{boolean:L,string:G,array:oo,function:"function"},container:{dom:H5},showButton:{boolean:L},__type__:{object:ue,boolean:L,string:G,array:oo,function:"function"}},edges:{arrows:{to:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:g_},imageHeight:{number:M},imageWidth:{number:M},src:{string:G},__type__:{object:ue,boolean:L}},middle:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:g_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:ue,boolean:L}},from:{enabled:{boolean:L},scaleFactor:{number:M},type:{string:g_},imageWidth:{number:M},imageHeight:{number:M},src:{string:G},__type__:{object:ue,boolean:L}},__type__:{string:["from","to","middle"],object:ue}},endPointOffset:{from:{number:M},to:{number:M},__type__:{object:ue,number:M}},arrowStrikethrough:{boolean:L},background:{enabled:{boolean:L},color:{string:G},size:{number:M},dashes:{boolean:L,array:oo},__type__:{object:ue,boolean:L}},chosen:{label:{boolean:L,function:"function"},edge:{boolean:L,function:"function"},__type__:{object:ue,boolean:L}},color:{color:{string:G},highlight:{string:G},hover:{string:G},inherit:{string:["from","to","both"],boolean:L},opacity:{number:M},__type__:{object:ue,string:G}},dashes:{boolean:L,array:oo},font:{color:{string:G},size:{number:M},face:{string:G},background:{string:G},strokeWidth:{number:M},strokeColor:{string:G},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:M},multi:{boolean:L,string:G},bold:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},boldital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},ital:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},mono:{color:{string:G},size:{number:M},face:{string:G},mod:{string:G},vadjust:{number:M},__type__:{object:ue,string:G}},__type__:{object:ue,string:G}},hidden:{boolean:L},hoverWidth:{function:"function",number:M},label:{string:G,undefined:"undefined"},labelHighlightBold:{boolean:L},length:{number:M,undefined:"undefined"},physics:{boolean:L},scaling:{min:{number:M},max:{number:M},label:{enabled:{boolean:L},min:{number:M},max:{number:M},maxVisible:{number:M},drawThreshold:{number:M},__type__:{object:ue,boolean:L}},customScalingFunction:{function:"function"},__type__:{object:ue}},selectionWidth:{function:"function",number:M},selfReferenceSize:{number:M},selfReference:{size:{number:M},angle:{number:M},renderBehindTheNode:{boolean:L},__type__:{object:ue}},shadow:{enabled:{boolean:L},color:{string:G},size:{number:M},x:{number:M},y:{number:M},__type__:{object:ue,boolean:L}},smooth:{enabled:{boolean:L},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:M},forceDirection:{string:["horizontal","vertical","none"],boolean:L},__type__:{object:ue,boolean:L}},title:{string:G,undefined:"undefined"},width:{number:M},widthConstraint:{maximum:{number:M},__type__:{object:ue,boolean:L,number:M}},value:{number:M,undefined:"undefined"},__type__:{object:ue}},groups:{useDefaultGroups:{boolean:L},__any__:m_,__type__:{object:ue}},interaction:{dragNodes:{boolean:L},dragView:{boolean:L},hideEdgesOnDrag:{boolean:L},hideEdgesOnZoom:{boolean:L},hideNodesOnDrag:{boolean:L},hover:{boolean:L},keyboard:{enabled:{boolean:L},speed:{x:{number:M},y:{number:M},zoom:{number:M},__type__:{object:ue}},bindToWindow:{boolean:L},autoFocus:{boolean:L},__type__:{object:ue,boolean:L}},multiselect:{boolean:L},navigationButtons:{boolean:L},selectable:{boolean:L},selectConnectedEdges:{boolean:L},hoverConnectedEdges:{boolean:L},tooltipDelay:{number:M},zoomView:{boolean:L},zoomSpeed:{number:M},__type__:{object:ue}},layout:{randomSeed:{undefined:"undefined",number:M,string:G},improvedLayout:{boolean:L},clusterThreshold:{number:M},hierarchical:{enabled:{boolean:L},levelSeparation:{number:M},nodeSpacing:{number:M},treeSpacing:{number:M},blockShifting:{boolean:L},edgeMinimization:{boolean:L},parentCentralization:{boolean:L},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:ue,boolean:L}},__type__:{object:ue}},manipulation:{enabled:{boolean:L},initiallyActive:{boolean:L},addNode:{boolean:L,function:"function"},addEdge:{boolean:L,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:ue,boolean:L,function:"function"}},deleteNode:{boolean:L,function:"function"},deleteEdge:{boolean:L,function:"function"},controlNodeStyle:m_,__type__:{object:ue,boolean:L}},nodes:m_,physics:{enabled:{boolean:L},barnesHut:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:ue}},forceAtlas2Based:{theta:{number:M},gravitationalConstant:{number:M},centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:ue}},repulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},__type__:{object:ue}},hierarchicalRepulsion:{centralGravity:{number:M},springLength:{number:M},springConstant:{number:M},nodeDistance:{number:M},damping:{number:M},avoidOverlap:{number:M},__type__:{object:ue}},maxVelocity:{number:M},minVelocity:{number:M},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:L},iterations:{number:M},updateInterval:{number:M},onlyDynamicEdges:{boolean:L},fit:{boolean:L},__type__:{object:ue,boolean:L}},timestep:{number:M},adaptiveTimestep:{boolean:L},wind:{x:{number:M},y:{number:M},__type__:{object:ue}},__type__:{object:ue,boolean:L}},autoResize:{boolean:L},clickToUse:{boolean:L},locale:{string:G},locales:{__any__:{any:Qie},__type__:{object:ue}},height:{string:G},width:{string:G},__type__:{object:ue}},W5={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},ene=(r,e,t)=>{var i;return!!(Ii(r).call(r,"physics")&&Ii(i=W5.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")};class tne{constructor(){}getDistances(e,t,i){const n={},s=e.edges;for(let a=0;a2&&arguments[2]!==void 0?arguments[2]:!1;const n=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();const s=.01,o=1;let a=0;const u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let c=1e9,d=0,h=0,f=0,p=0,v=0;for(;c>s&&ao&&vthis.body.emitter.emit("_requestRedraw")),this.groups=new WZ,this.canvas=new kre(this.body),this.selectionHandler=new bie(this.body,this.canvas),this.interactionHandler=new zre(this.body,this.canvas,this.selectionHandler),this.view=new jre(this.body,this.canvas),this.renderer=new Dre(this.body,this.canvas),this.physics=new Ire(this.body),this.layoutEngine=new Xie(this.body),this.clustering=new qre(this.body),this.manipulation=new Jie(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Zte(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new bre(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new rne(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}_3(ae.prototype);ae.prototype.setOptions=function(r){if(r===null&&(r=void 0),r!==void 0){if(iZ.validate(r,Zie)===!0&&console.error("%cErrors have been found in the supplied options object.",v5),Gs(["locale","locales","clickToUse"],this.options,r),r.locale!==void 0&&(r.locale=$Z(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new tZ(this,this.body.container,W5,this.canvas.pixelRatio,ene)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){const i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};Ue(i.nodes,this.nodesHandler.options),Ue(i.edges,this.edgesHandler.options),Ue(i.layout,this.layoutEngine.options),Ue(i.interaction,this.selectionHandler.options),Ue(i.interaction,this.renderer.options),Ue(i.interaction,this.interactionHandler.options),Ue(i.manipulation,this.manipulation.options),Ue(i.physics,this.physics.options),Ue(i.global,this.canvas.options),Ue(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new eZ(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};ae.prototype._updateVisibleIndices=function(){const r=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&!this.clustering._isClusteredNode(t)&&r[t].options.hidden===!1&&this.body.nodeIndices.push(r[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t],n=r[i.fromId],s=r[i.toId],o=n!==void 0&&s!==void 0;!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&o&&n.options.hidden===!1&&s.options.hidden===!1&&this.body.edgeIndices.push(i.id)}};ae.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};ae.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=fZ(r.dot);this.setData(e);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=pZ(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};ae.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&delete this.body.edges[r];mi(this.body.container)};ae.prototype._updateValueRange=function(r){let e,t,i,n=0;for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const s=r[e].getValue();s!==void 0&&(t=t===void 0?s:Math.min(s,t),i=i===void 0?s:Math.max(s,i),n+=s)}if(t!==void 0&&i!==void 0)for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&r[e].setValueRange(t,i,n)};ae.prototype.isActive=function(){return!this.activator||this.activator.active};ae.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};ae.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};ae.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};ae.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};ae.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};ae.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};ae.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};ae.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};ae.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};ae.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};ae.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};ae.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};ae.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};ae.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};ae.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};ae.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};ae.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};ae.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};ae.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};ae.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};ae.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};ae.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};ae.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};ae.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};ae.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};ae.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};ae.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};ae.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};ae.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};ae.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};ae.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};ae.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};ae.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};ae.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};ae.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};ae.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};ae.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};ae.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};ae.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};ae.prototype.getNodeAt=function(){const r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ae.prototype.getEdgeAt=function(){const r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};ae.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};ae.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};ae.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};ae.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};ae.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};ae.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};ae.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};ae.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};ae.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};ae.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};ae.prototype.getOptionsFromConfigurator=function(){let r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const ine=wr({__name:"EditorWindow",setup(r){const e=Pr();return fw(async()=>{if(!e.value)return;const t=await IU(),i={nodes:t.nodes,edges:t.edges},n={};new ae(e.value,i,n)}),(t,i)=>(Ct(),bi(Rt,null,[gt(_w,null,{default:_u(()=>i[0]||(i[0]=[Ie("div",null," Редактор сценариев ",-1)])),_:1}),Ie("div",{ref_key:"network",ref:e,class:"graph-container"},null,512)],64))}}),nne=Tu(ine,[["__scopeId","data-v-3a1f22ee"]]),sne=wr({__name:"EditorView",setup(r){return(e,t)=>(Ct(),xi(nne))}}),one=wr({__name:"GamesWindow",setup(r){return(e,t)=>(Ct(),xi(_w,null,{default:_u(()=>t[0]||(t[0]=[Ie("div",null," Каталог игр ",-1)])),_:1}))}}),ane=wr({__name:"GamesView",setup(r){return(e,t)=>(Ct(),xi(one))}}),J_=fU({history:H4("/"),routes:[{path:"/",name:"home",component:dV},{path:"/editor",name:"editor",component:sne},{path:"/games",name:"games",component:ane}]}),$0=u4(vU);$0.use(h4());$0.use(J_);$0.mount("#app"); diff --git a/cmd/evening_detective/static/admin/assets/index-Dj_v_NXo.css b/cmd/evening_detective/static/admin/assets/index-CcF8a8OC.css similarity index 69% rename from cmd/evening_detective/static/admin/assets/index-Dj_v_NXo.css rename to cmd/evening_detective/static/admin/assets/index-CcF8a8OC.css index 18afaf3..4a20894 100644 --- a/cmd/evening_detective/static/admin/assets/index-Dj_v_NXo.css +++ b/cmd/evening_detective/static/admin/assets/index-CcF8a8OC.css @@ -1 +1 @@ -:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);background:var(--main-back-color);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.input-custom{width:100%;box-sizing:border-box;margin-bottom:15px}.button-custom{margin-left:auto;background-color:var(--main-color);font-weight:600;color:#fff}.button-custom-inline{margin:10px;background-color:var(--main-color);font-weight:600;color:#fff;padding:6px 8px;border:1px solid #ddd;border-radius:15px;font-size:14px}.button-custom:hover,.button-custom-inline:hover{background-color:var(--second-color)}.input-custom,.button-custom{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container{display:flex}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}.qr[data-v-666b8d35]{position:absolute;top:130px;right:30px;text-align:center;width:120px}.header-block[data-v-5b6894ef]{background-color:var(--main-color);font-size:large;color:#fff;vertical-align:middle;padding:10px 0 10px 16px;font-weight:700}.buttons-block[data-v-4d8d73b6]{padding-top:5px}.button-menu[data-v-4d8d73b6]{margin:5px 10px 5px 0}table[data-v-4d8d73b6]{width:700px;border-collapse:collapse;margin:30px auto;border:1px solid #444444}th[data-v-4d8d73b6],td[data-v-4d8d73b6]{padding:12px;text-align:left}th[data-v-4d8d73b6]{background-color:var(--main-color);color:#fff;font-weight:700}tr[data-v-4d8d73b6]:nth-child(odd){background-color:#efefef}tr[data-v-4d8d73b6]:nth-child(2n){background-color:#fff}tr[data-v-4d8d73b6]:hover{background-color:#cfcfcf}.time[data-v-4d8d73b6]{white-space:nowrap}.team-name[data-v-4d8d73b6]{font-weight:600}.link-button[data-v-4d8d73b6]{display:inline;border:none;background:none;padding:0;margin:0;font:inherit;cursor:pointer;color:var(--main-color);text-decoration:underline;font-weight:600;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:inherit;text-align:left}.link-button[data-v-4d8d73b6]:hover{color:var(--second-color);text-decoration:none}.link-button[data-v-4d8d73b6]:active{color:#036}.link-button[data-v-4d8d73b6]:focus{outline:none;text-decoration:none;box-shadow:0 0 0 2px #0066cc4d}.form-block[data-v-4d8d73b6]{width:700px;margin:0 auto}a[data-v-4d8d73b6]{color:var(--second-color);text-decoration:none;transition:all .2s ease;cursor:pointer}a[data-v-4d8d73b6]:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}a[data-v-4d8d73b6]:focus-visible{outline:2px solid #3182ce;outline-offset:2px;border-radius:2px}a[disabled][data-v-4d8d73b6]{color:#a0aec0;pointer-events:none;cursor:not-allowed}.button-container[data-v-4d8d73b6]{margin-bottom:30px}.cell-center[data-v-4d8d73b6]{text-align:center}.graph-container[data-v-3a1f22ee]{width:100%;height:700px;border:1px solid #e0e0e0;border-radius:8px} +:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64);--main-color: rgba(34, 50, 60, 1);--second-color: rgb(97, 74, 22);--main-back-color: rgba(240, 240, 240, 1);--main-back-item-color: rgba(254, 254, 254, 1)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100dvh;color:var(--color-text);background:var(--main-back-color);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.input-custom{width:100%;box-sizing:border-box;margin-bottom:15px}.button-custom{margin-left:auto;background-color:var(--main-color);font-weight:600;color:#fff}.button-custom-inline{margin:10px;background-color:var(--main-color);font-weight:600;color:#fff;padding:6px 8px;border:1px solid #ddd;border-radius:15px;font-size:14px}.button-custom:hover,.button-custom-inline:hover{background-color:var(--second-color)}.input-custom,.button-custom{padding:12px 16px;border:1px solid #ddd;border-radius:15px;font-size:16px}.button-container{display:flex}.center-message{display:flex;justify-content:center;align-items:center;height:calc(100dvh - 100px);text-align:center}.qr[data-v-666b8d35]{position:absolute;top:130px;right:30px;text-align:center;width:120px}.header-block[data-v-5b6894ef]{background-color:var(--main-color);font-size:large;color:#fff;vertical-align:middle;padding:10px 0 10px 16px;font-weight:700}.buttons-block[data-v-27835e5c]{padding-top:5px}.button-menu[data-v-27835e5c]{margin:5px 10px 5px 0}table[data-v-27835e5c]{width:700px;border-collapse:collapse;margin:30px auto;border:1px solid #444444}th[data-v-27835e5c],td[data-v-27835e5c]{padding:12px;text-align:left}th[data-v-27835e5c]{background-color:var(--main-color);color:#fff;font-weight:700}tr[data-v-27835e5c]:nth-child(odd){background-color:#efefef}tr[data-v-27835e5c]:nth-child(2n){background-color:#fff}tr[data-v-27835e5c]:hover{background-color:#cfcfcf}.time[data-v-27835e5c]{white-space:nowrap}.team-name[data-v-27835e5c]{font-weight:600}.link-button[data-v-27835e5c]{display:inline;border:none;background:none;padding:0;margin:0;font:inherit;cursor:pointer;color:var(--main-color);text-decoration:underline;font-weight:600;-webkit-appearance:none;-moz-appearance:none;appearance:none;line-height:inherit;text-align:left}.link-button[data-v-27835e5c]:hover{color:var(--second-color);text-decoration:none}.link-button[data-v-27835e5c]:active{color:#036}.link-button[data-v-27835e5c]:focus{outline:none;text-decoration:none;box-shadow:0 0 0 2px #0066cc4d}.form-block[data-v-27835e5c]{width:700px;margin:0 auto}a[data-v-27835e5c]{color:var(--second-color);text-decoration:none;transition:all .2s ease;cursor:pointer}a[data-v-27835e5c]:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}a[data-v-27835e5c]:focus-visible{outline:2px solid #3182ce;outline-offset:2px;border-radius:2px}a[disabled][data-v-27835e5c]{color:#a0aec0;pointer-events:none;cursor:not-allowed}.button-container[data-v-27835e5c]{margin-bottom:30px}.cell-center[data-v-27835e5c]{text-align:center}.graph-container[data-v-3a1f22ee]{width:100%;height:700px;border:1px solid #e0e0e0;border-radius:8px} diff --git a/cmd/evening_detective/static/admin/index.html b/cmd/evening_detective/static/admin/index.html index 472acbe..878a825 100644 --- a/cmd/evening_detective/static/admin/index.html +++ b/cmd/evening_detective/static/admin/index.html @@ -5,8 +5,8 @@ ВД Админка - - + +