@nuxt/devtools 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/chunks/module-main.mjs +2 -2
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/__blank/index.html +17 -17
- package/dist/client/_nuxt/{Badge.efa8b534.js → Badge.a4bd58d4.js} +1 -1
- package/dist/client/_nuxt/{CodeDiff.vue.52d6bbaa.js → CodeDiff.vue.a8c9e639.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.1525d3d2.js → ComposableItem.vue.bd112256.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.dabda5da.js → DataSchemaButton.vue.fbb61806.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.345f79f6.js → DataSchemaDrawer.f84a2081.js} +6 -5
- package/dist/client/_nuxt/{DrawerRight.vue.e75b5510.js → DrawerRight.vue.b9dc765f.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.73c682ac.js → DurationDisplay.vue.1f34b658.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.253590ec.js → FilepathItem.vue.a4d269b8.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.b3c1cf3a.js → HelpFab.vue.c0c3f8e6.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.45c2e269.js → LaunchPage.vue.012ddba7.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.0e359f85.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.28dd841e.js → NCodeBlock.vue.01eb6d1c.js} +1 -1
- package/dist/client/_nuxt/{NDropdown.vue.36b68b91.js → NDropdown.vue.b3117df4.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.635c5682.js → NIconTitle.vue.79485c3a.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.19da93af.js → NLink.vue.6dc3b4af.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.283d6615.js → NMarkdown.vue.7a10e6e6.js} +1 -1
- package/dist/client/_nuxt/{NSectionBlock.e780f891.js → NSectionBlock.2d8e1431.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.60befa30.js → NSelect.vue.9cac29ef.js} +1 -1
- package/dist/client/_nuxt/{NSelectTabs.vue.1cae281d.js → NSelectTabs.vue.72adf277.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.eb1bdf97.js → NSwitch.vue.67a4fdb0.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.eef318b6.js → NTip.vue.d505e897.js} +1 -1
- package/dist/client/_nuxt/{Navbar.vue.d85c454f.js → Navbar.vue.8dc15d25.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.83907c9e.js → StateEditor.vue.2463efc9.js} +1 -1
- package/dist/client/_nuxt/{__blank.fd22bfe8.js → __blank.20eb2cab.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.3961243f.js → analyze-build.423f57eb.js} +1 -1
- package/dist/client/_nuxt/{assets.22c374b3.js → assets.dc245910.js} +1 -1
- package/dist/client/_nuxt/{client.766a1bb7.js → client.c59e50d6.js} +1 -1
- package/dist/client/_nuxt/components.31c6fd6f.js +98 -0
- package/dist/client/_nuxt/{custom-_name_.4e0a3203.js → custom-_name_.9b02fa14.js} +1 -1
- package/dist/client/_nuxt/{default.7b425b73.js → default.30ac8af4.js} +1 -1
- package/dist/client/_nuxt/entry.05b33d7f.js +27 -0
- package/dist/client/_nuxt/entry.79095383.css +1 -0
- package/dist/client/_nuxt/{error-404.9d0e04bf.js → error-404.5c6d1cc1.js} +1 -1
- package/dist/client/_nuxt/{error-500.10115977.js → error-500.b5b10475.js} +1 -1
- package/dist/client/_nuxt/{full.4288bf38.js → full.03097bfb.js} +1 -1
- package/dist/client/_nuxt/{hooks.1d6c1af1.js → hooks.d674696d.js} +1 -1
- package/dist/client/_nuxt/{imports.39a7562f.js → imports.b827859f.js} +1 -1
- package/dist/client/_nuxt/{index.94061115.js → index.b2055c8f.js} +1 -1
- package/dist/client/_nuxt/{index.14b447a4.js → index.b5454355.js} +1 -1
- package/dist/client/_nuxt/json-editor-vue.1bc58c26.js +129 -0
- package/dist/client/_nuxt/{middleware.66f1417a.js → middleware.434dc02a.js} +1 -1
- package/dist/client/_nuxt/{modules.3b512e2b.js → modules.7dc02a95.js} +1 -1
- package/dist/client/_nuxt/{none.d43da723.js → none.2b3e8ddc.js} +1 -1
- package/dist/client/_nuxt/{open-graph.c7507223.js → open-graph.693bd031.js} +1 -1
- package/dist/client/_nuxt/{overview.dae47b2d.js → overview.f2e48477.js} +1 -1
- package/dist/client/_nuxt/{pages.0902f86b.js → pages.745a0630.js} +1 -1
- package/dist/client/_nuxt/{payload.7de203b9.js → payload.897ca8fa.js} +1 -1
- package/dist/client/_nuxt/{plugins.30d46375.js → plugins.cd2e64ba.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.a32dc753.js → runtime-configs.1f844468.js} +1 -1
- package/dist/client/_nuxt/{server-routes.7e333622.js → server-routes.91c861d0.js} +1 -1
- package/dist/client/_nuxt/settings.367ae337.js +1 -0
- package/dist/client/_nuxt/{state-components.7549d0ff.js → state-components.a223a28c.js} +1 -1
- package/dist/client/_nuxt/{state-modules.a4af1949.js → state-modules.c0927595.js} +1 -1
- package/dist/client/_nuxt/{storage-options.0b849b9a.js → storage-options.8fdc9b2a.js} +1 -1
- package/dist/client/_nuxt/{storage.6d27a7d0.js → storage.76034502.js} +1 -1
- package/dist/client/_nuxt/terminals.cb4eb909.js +9 -0
- package/dist/client/_nuxt/timeline.60d410a7.js +29 -0
- package/dist/client/_nuxt/unocss-runtime.68d64d4a.js +2 -0
- package/dist/client/_nuxt/{virtual-files.d393fac8.js → virtual-files.829bd209.js} +1 -1
- package/dist/client/index.html +17 -17
- package/dist/client/modules/analyze-build/index.html +17 -17
- package/dist/client/modules/assets/index.html +17 -17
- package/dist/client/modules/components/index.html +17 -17
- package/dist/client/modules/hooks/index.html +17 -17
- package/dist/client/modules/imports/index.html +17 -17
- package/dist/client/modules/middleware/index.html +17 -17
- package/dist/client/modules/modules/index.html +17 -17
- package/dist/client/modules/open-graph/index.html +17 -17
- package/dist/client/modules/overview/index.html +17 -17
- package/dist/client/modules/pages/index.html +17 -17
- package/dist/client/modules/payload/index.html +17 -17
- package/dist/client/modules/plugins/index.html +17 -17
- package/dist/client/modules/runtime-configs/index.html +17 -17
- package/dist/client/modules/server-routes/index.html +17 -17
- package/dist/client/modules/storage/index.html +17 -17
- package/dist/client/modules/terminals/index.html +17 -17
- package/dist/client/modules/timeline/index.html +17 -17
- package/dist/client/modules/virtual-files/index.html +17 -17
- package/dist/client/settings/index.html +17 -17
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.mjs +1 -0
- package/dist/shared/{devtools.6d7e3a3a.mjs → devtools.4169e037.mjs} +3 -1
- package/package.json +32 -32
- package/dist/client/_nuxt/NCheckbox.vue.e6a37232.js +0 -1
- package/dist/client/_nuxt/components.f4ae9003.js +0 -99
- package/dist/client/_nuxt/entry.13b4d578.css +0 -1
- package/dist/client/_nuxt/entry.2f74e286.js +0 -27
- package/dist/client/_nuxt/json-editor-vue.87488a70.js +0 -130
- package/dist/client/_nuxt/settings.5586d729.js +0 -1
- package/dist/client/_nuxt/terminals.2f1b22dc.js +0 -9
- package/dist/client/_nuxt/timeline.849dbd44.js +0 -57
- package/dist/client/_nuxt/unocss-runtime.e58f9c20.js +0 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import{o as te,m as Te,k as Z,v as La,d as Kn,a as Jt,t as au,f as Y,e as _k,i as Se,h as ut,p as lt,F as lr,n as bi,a5 as Au,_ as Sw,r as yn,af as Ek,ag as Sk,a7 as Ok,ah as Tk,ai as kk,w as Pk,j as Ve,aj as Ow,ak as Ik,l as $i,C as Ck,al as xk,E as Ak,am as Rk,ad as Dk,an as Mk,ao as Nk,ap as ts,a0 as Fk,aq as Bk,a9 as Lk,ar as jk,H as ng}from"./entry.05b33d7f.js";import{_ as zk}from"./HelpFab.vue.c0c3f8e6.js";import{u as Hk,a as Wk}from"./state-components.a223a28c.js";import{_ as Vk}from"./NCheckbox.vue.0e359f85.js";import{_ as Tw}from"./Navbar.vue.8dc15d25.js";import{_ as kw}from"./Badge.a4bd58d4.js";import{_ as Pw}from"./FilepathItem.vue.a4d269b8.js";import{_ as Uk}from"./DrawerRight.vue.b9dc765f.js";import{_ as Gk}from"./NSelectTabs.vue.72adf277.js";import{_ as Kk}from"./NSectionBlock.2d8e1431.js";import{_ as qk}from"./NIconTitle.vue.79485c3a.js";import{D as Al}from"./constants.4e5eba24.js";const Yk={class:"markdown-body"},Xk=Z("h1",null,"Components",-1),Qk=Z("p",null,[La("Vue components under the "),Z("code",null,"components/"),La(" directory are automatically registered and can be used in your templates without importing them.")],-1),Jk=Z("p",null,[Z("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Zk=[Xk,Qk,Jk],eP={__name:"components",setup(t,{expose:n}){return n({frontmatter:{}}),(r,i)=>(te(),Te("div",Yk,Zk))}},tP=/\d/,rP=["-","_","/","."];function iP(t=""){if(!tP.test(t))return t.toUpperCase()===t}function nP(t,n){const e=n??rP,r=[];if(!t||typeof t!="string")return r;let i="",a,o;for(const s of t){const u=e.includes(s);if(u===!0){r.push(i),i="",a=void 0;continue}const l=iP(s);if(o===!1){if(a===!1&&l===!0){r.push(i),i=s,a=l;continue}if(a===!0&&l===!1&&i.length>1){const h=i[i.length-1];r.push(i.slice(0,Math.max(0,i.length-1))),i=h+s,a=l;continue}}i+=s,a=l,o=u}return r.push(i),r}function aP(t){return t?t[0].toUpperCase()+t.slice(1):""}function Iw(t){return t?(Array.isArray(t)?t:nP(t)).map(n=>aP(n)).join(""):""}const oP={"text-sm":"","font-mono":""},sP=Z("span",{mr1:"",op20:""},"<",-1),uP=Z("span",{ml1:"",op20:""},"/>",-1),Cw=Kn({__name:"ComponentName",props:{component:{}},setup(t){const n=t,e=Jt(()=>n.component.pascalName||Iw(n.component.name||n.component.__name||n.component.kebabName||""));return(r,i)=>(te(),Te("code",oP,[sP,La(au(Y(e)),1),uP]))}}),lP={flex:"~ col gap1","items-start":"","of-hidden":""},hP={flex:"~ gap2",px3:""},dP={px3:"",pb2:""},cP={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},fP={"text-sm":""},vP={"text-primary":""},pP=Z("span",{op50:""}," references",-1),gP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},yP={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},mP={"text-sm":""},bP={"text-primary":""},$P=Z("span",{op50:""}," dependencies",-1),wP={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},xw=Kn({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(t){const n=t,e=Jt(()=>n.component.pascalName||Iw(n.component.name||n.component.__name||n.component.kebabName||"")),r=Jt(()=>n.component.filePath||n.component.file||n.component.__file||""),i=_k();return(a,o)=>{const s=Cw,u=Sw,l=kw,h=Pw;return te(),Te("div",lP,[Z("div",hP,[Se(s,{component:a.component},null,8,["component"]),Se(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=d=>Y(i)(`<${Y(e)}></${Y(e)}>`))}),a.component.global?(te(),ut(l,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0)]),Z("div",dP,[Y(r)?(te(),ut(h,{key:0,filepath:Y(r),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)]),a.dependents?(te(),Te("div",cP,[Z("div",fP,[Z("strong",vP,au(a.dependents.length),1),pP]),a.dependents.length?(te(),Te("div",gP,[(te(!0),Te(lr,null,bi(a.dependents,d=>(te(),ut(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),a.dependencies?(te(),Te("div",yP,[Z("div",mP,[Z("strong",bP,au(a.dependencies.length),1),$P]),a.dependencies.length?(te(),Te("div",wP,[(te(!0),Te(lr,null,bi(a.dependencies,d=>(te(),ut(h,{key:d,filepath:d},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),Au(a.$slots,"default")])}}});/**
|
|
2
|
+
* vis-data
|
|
3
|
+
* http://visjs.org/
|
|
4
|
+
*
|
|
5
|
+
* Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
|
|
6
|
+
*
|
|
7
|
+
* @version 7.1.7
|
|
8
|
+
* @date 2023-09-13T18:13:28.258Z
|
|
9
|
+
*
|
|
10
|
+
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
|
+
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
12
|
+
*
|
|
13
|
+
* @license
|
|
14
|
+
* vis.js is dual licensed under both
|
|
15
|
+
*
|
|
16
|
+
* 1. The Apache 2.0 License
|
|
17
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* and
|
|
20
|
+
*
|
|
21
|
+
* 2. The MIT License
|
|
22
|
+
* http://opensource.org/licenses/MIT
|
|
23
|
+
*
|
|
24
|
+
* vis.js may be distributed under either license.
|
|
25
|
+
*/function Ru(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var ag=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Aw={exports:{}},rs=function(t){return t&&t.Math==Math&&t},Ne=rs(typeof globalThis=="object"&&globalThis)||rs(typeof window=="object"&&window)||rs(typeof self=="object"&&self)||rs(typeof ag=="object"&&ag)||function(){return this}()||Function("return this")(),fe=function(t){try{return!!t()}catch{return!0}},_P=fe,no=!_P(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),EP=no,Rw=Function.prototype,og=Rw.apply,sg=Rw.call,qn=typeof Reflect=="object"&&Reflect.apply||(EP?sg.bind(og):function(){return sg.apply(og,arguments)}),Dw=no,Mw=Function.prototype,Ud=Mw.call,SP=Dw&&Mw.bind.bind(Ud,Ud),$e=Dw?SP:function(t){return function(){return Ud.apply(t,arguments)}},Nw=$e,OP=Nw({}.toString),TP=Nw("".slice),oi=function(t){return TP(OP(t),8,-1)},kP=oi,PP=$e,Fw=function(t){if(kP(t)==="Function")return PP(t)},Gd=typeof document=="object"&&document.all,IP=typeof Gd>"u"&&Gd!==void 0,Bw={all:Gd,IS_HTMLDDA:IP},Lw=Bw,CP=Lw.all,Pe=Lw.IS_HTMLDDA?function(t){return typeof t=="function"||t===CP}:function(t){return typeof t=="function"},Vi={},xP=fe,Xe=!xP(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),AP=no,is=Function.prototype.call,Qe=AP?is.bind(is):function(){return is.apply(is,arguments)},Du={},jw={}.propertyIsEnumerable,zw=Object.getOwnPropertyDescriptor,RP=zw&&!jw.call({1:2},1);Du.f=RP?function(n){var e=zw(this,n);return!!e&&e.enumerable}:jw;var Ui=function(t,n){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:n}},DP=$e,MP=fe,NP=oi,Rl=Object,FP=DP("".split),Mu=MP(function(){return!Rl("z").propertyIsEnumerable(0)})?function(t){return NP(t)=="String"?FP(t,""):Rl(t)}:Rl,ao=function(t){return t==null},BP=ao,LP=TypeError,kv=function(t){if(BP(t))throw LP("Can't call method on "+t);return t},jP=Mu,zP=kv,mr=function(t){return jP(zP(t))},ug=Pe,Hw=Bw,HP=Hw.all,st=Hw.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:ug(t)||t===HP}:function(t){return typeof t=="object"?t!==null:ug(t)},_e={},Dl=_e,Ml=Ne,WP=Pe,lg=function(t){return WP(t)?t:void 0},gt=function(t,n){return arguments.length<2?lg(Dl[t])||lg(Ml[t]):Dl[t]&&Dl[t][n]||Ml[t]&&Ml[t][n]},VP=$e,Ue=VP({}.isPrototypeOf),si=typeof navigator<"u"&&String(navigator.userAgent)||"",Ww=Ne,Nl=si,hg=Ww.process,dg=Ww.Deno,cg=hg&&hg.versions||dg&&dg.version,fg=cg&&cg.v8,qt,ou;fg&&(qt=fg.split("."),ou=qt[0]>0&&qt[0]<4?1:+(qt[0]+qt[1]));!ou&&Nl&&(qt=Nl.match(/Edge\/(\d+)/),(!qt||qt[1]>=74)&&(qt=Nl.match(/Chrome\/(\d+)/),qt&&(ou=+qt[1])));var Yn=ou,vg=Yn,UP=fe,Xn=!!Object.getOwnPropertySymbols&&!UP(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&vg&&vg<41}),GP=Xn,Vw=GP&&!Symbol.sham&&typeof Symbol.iterator=="symbol",KP=gt,qP=Pe,YP=Ue,XP=Vw,QP=Object,oo=XP?function(t){return typeof t=="symbol"}:function(t){var n=KP("Symbol");return qP(n)&&YP(n.prototype,QP(t))},JP=String,Qn=function(t){try{return JP(t)}catch{return"Object"}},ZP=Pe,eI=Qn,tI=TypeError,Pt=function(t){if(ZP(t))return t;throw tI(eI(t)+" is not a function")},rI=Pt,iI=ao,Pv=function(t,n){var e=t[n];return iI(e)?void 0:rI(e)},Fl=Qe,Bl=Pe,Ll=st,nI=TypeError,aI=function(t,n){var e,r;if(n==="string"&&Bl(e=t.toString)&&!Ll(r=Fl(e,t))||Bl(e=t.valueOf)&&!Ll(r=Fl(e,t))||n!=="string"&&Bl(e=t.toString)&&!Ll(r=Fl(e,t)))return r;throw nI("Can't convert object to primitive value")},Uw={exports:{}},oI=!0,pg=Ne,sI=Object.defineProperty,uI=function(t,n){try{sI(pg,t,{value:n,configurable:!0,writable:!0})}catch{pg[t]=n}return n},lI=Ne,hI=uI,gg="__core-js_shared__",dI=lI[gg]||hI(gg,{}),Iv=dI,yg=Iv;(Uw.exports=function(t,n){return yg[t]||(yg[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Jn=Uw.exports,cI=kv,fI=Object,At=function(t){return fI(cI(t))},vI=$e,pI=At,gI=vI({}.hasOwnProperty),He=Object.hasOwn||function(n,e){return gI(pI(n),e)},yI=$e,mI=0,bI=Math.random(),$I=yI(1 .toString),Nu=function(t){return"Symbol("+(t===void 0?"":t)+")_"+$I(++mI+bI,36)},wI=Ne,_I=Jn,mg=He,EI=Nu,SI=Xn,OI=Vw,mn=wI.Symbol,jl=_I("wks"),TI=OI?mn.for||mn:mn&&mn.withoutSetter||EI,Ie=function(t){return mg(jl,t)||(jl[t]=SI&&mg(mn,t)?mn[t]:TI("Symbol."+t)),jl[t]},kI=Qe,bg=st,$g=oo,PI=Pv,II=aI,CI=Ie,xI=TypeError,AI=CI("toPrimitive"),RI=function(t,n){if(!bg(t)||$g(t))return t;var e=PI(t,AI),r;if(e){if(n===void 0&&(n="default"),r=kI(e,t,n),!bg(r)||$g(r))return r;throw xI("Can't convert object to primitive value")}return n===void 0&&(n="number"),II(t,n)},DI=RI,MI=oo,Fu=function(t){var n=DI(t,"string");return MI(n)?n:n+""},NI=Ne,wg=st,Kd=NI.document,FI=wg(Kd)&&wg(Kd.createElement),Cv=function(t){return FI?Kd.createElement(t):{}},BI=Xe,LI=fe,jI=Cv,Gw=!BI&&!LI(function(){return Object.defineProperty(jI("div"),"a",{get:function(){return 7}}).a!=7}),zI=Xe,HI=Qe,WI=Du,VI=Ui,UI=mr,GI=Fu,KI=He,qI=Gw,_g=Object.getOwnPropertyDescriptor;Vi.f=zI?_g:function(n,e){if(n=UI(n),e=GI(e),qI)try{return _g(n,e)}catch{}if(KI(n,e))return VI(!HI(WI.f,n,e),n[e])};var YI=fe,XI=Pe,QI=/#|\.prototype\./,so=function(t,n){var e=ZI[JI(t)];return e==tC?!0:e==eC?!1:XI(n)?YI(n):!!n},JI=so.normalize=function(t){return String(t).replace(QI,".").toLowerCase()},ZI=so.data={},eC=so.NATIVE="N",tC=so.POLYFILL="P",Kw=so,Eg=Fw,rC=Pt,iC=no,nC=Eg(Eg.bind),ui=function(t,n){return rC(t),n===void 0?t:iC?nC(t,n):function(){return t.apply(n,arguments)}},Rt={},aC=Xe,oC=fe,qw=aC&&oC(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),sC=st,uC=String,lC=TypeError,Dt=function(t){if(sC(t))return t;throw lC(uC(t)+" is not an object")},hC=Xe,dC=Gw,cC=qw,ns=Dt,Sg=Fu,fC=TypeError,zl=Object.defineProperty,vC=Object.getOwnPropertyDescriptor,Hl="enumerable",Wl="configurable",Vl="writable";Rt.f=hC?cC?function(n,e,r){if(ns(n),e=Sg(e),ns(r),typeof n=="function"&&e==="prototype"&&"value"in r&&Vl in r&&!r[Vl]){var i=vC(n,e);i&&i[Vl]&&(n[e]=r.value,r={configurable:Wl in r?r[Wl]:i[Wl],enumerable:Hl in r?r[Hl]:i[Hl],writable:!1})}return zl(n,e,r)}:zl:function(n,e,r){if(ns(n),e=Sg(e),ns(r),dC)try{return zl(n,e,r)}catch{}if("get"in r||"set"in r)throw fC("Accessors not supported");return"value"in r&&(n[e]=r.value),n};var pC=Xe,gC=Rt,yC=Ui,Dr=pC?function(t,n,e){return gC.f(t,n,yC(1,e))}:function(t,n,e){return t[n]=e,t},as=Ne,mC=qn,bC=Fw,$C=Pe,wC=Vi.f,_C=Kw,an=_e,EC=ui,on=Dr,Og=He,SC=function(t){var n=function(e,r,i){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,i)}return mC(t,this,arguments)};return n.prototype=t.prototype,n},X=function(t,n){var e=t.target,r=t.global,i=t.stat,a=t.proto,o=r?as:i?as[e]:(as[e]||{}).prototype,s=r?an:an[e]||on(an,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,$,g;for(c in n)l=_C(r?c:e+(i?".":"#")+c,t.forced),h=!l&&o&&Og(o,c),v=s[c],h&&(t.dontCallGetSet?(g=wC(o,c),p=g&&g.value):p=o[c]),f=h&&p?p:n[c],!(h&&typeof v==typeof f)&&(t.bind&&h?$=EC(f,as):t.wrap&&h?$=SC(f):a&&$C(f)?$=bC(f):$=f,(t.sham||f&&f.sham||v&&v.sham)&&on($,"sham",!0),on(s,c,$),a&&(d=e+"Prototype",Og(an,d)||on(an,d,{}),on(an[d],c,f),t.real&&u&&(l||!u[c])&&on(u,c,f)))},OC=X,TC=Xe,Tg=Rt.f;OC({target:"Object",stat:!0,forced:Object.defineProperty!==Tg,sham:!TC},{defineProperty:Tg});var kC=_e,Yw=kC.Object,PC=Aw.exports=function(n,e,r){return Yw.defineProperty(n,e,r)};Yw.defineProperty.sham&&(PC.sham=!0);var IC=Aw.exports,CC=IC,Xw=CC,xC=Xw,AC=xC,RC=AC,DC=RC,MC=DC,Qw=MC,Bu=J(Qw),NC=oi,li=Array.isArray||function(n){return NC(n)=="Array"},FC=Math.ceil,BC=Math.floor,LC=Math.trunc||function(n){var e=+n;return(e>0?BC:FC)(e)},jC=LC,Lu=function(t){var n=+t;return n!==n||n===0?0:jC(n)},zC=Lu,HC=Math.min,WC=function(t){return t>0?HC(zC(t),9007199254740991):0},VC=WC,Wt=function(t){return VC(t.length)},UC=TypeError,GC=9007199254740991,xv=function(t){if(t>GC)throw UC("Maximum allowed index exceeded");return t},KC=Fu,qC=Rt,YC=Ui,Zn=function(t,n,e){var r=KC(n);r in t?qC.f(t,r,YC(0,e)):t[r]=e},XC=Ie,QC=XC("toStringTag"),Jw={};Jw[QC]="z";var Av=String(Jw)==="[object z]",JC=Av,ZC=Pe,zs=oi,ex=Ie,tx=ex("toStringTag"),rx=Object,ix=zs(function(){return arguments}())=="Arguments",nx=function(t,n){try{return t[n]}catch{}},Mr=JC?zs:function(t){var n,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=nx(n=rx(t),tx))=="string"?e:ix?zs(n):(r=zs(n))=="Object"&&ZC(n.callee)?"Arguments":r},ax=$e,ox=Pe,qd=Iv,sx=ax(Function.toString);ox(qd.inspectSource)||(qd.inspectSource=function(t){return sx(t)});var Zw=qd.inspectSource,ux=$e,lx=fe,e0=Pe,hx=Mr,dx=gt,cx=Zw,t0=function(){},fx=[],r0=dx("Reflect","construct"),Rv=/^\s*(?:class|function)\b/,vx=ux(Rv.exec),px=!Rv.exec(t0),ma=function(n){if(!e0(n))return!1;try{return r0(t0,fx,n),!0}catch{return!1}},i0=function(n){if(!e0(n))return!1;switch(hx(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return px||!!vx(Rv,cx(n))}catch{return!0}};i0.sham=!0;var ju=!r0||lx(function(){var t;return ma(ma.call)||!ma(Object)||!ma(function(){t=!0})||t})?i0:ma,kg=li,gx=ju,yx=st,mx=Ie,bx=mx("species"),Pg=Array,$x=function(t){var n;return kg(t)&&(n=t.constructor,gx(n)&&(n===Pg||kg(n.prototype))?n=void 0:yx(n)&&(n=n[bx],n===null&&(n=void 0))),n===void 0?Pg:n},wx=$x,zu=function(t,n){return new(wx(t))(n===0?0:n)},_x=fe,Ex=Ie,Sx=Yn,Ox=Ex("species"),uo=function(t){return Sx>=51||!_x(function(){var n=[],e=n.constructor={};return e[Ox]=function(){return{foo:1}},n[t](Boolean).foo!==1})},Tx=X,kx=fe,Px=li,Ix=st,Cx=At,xx=Wt,Ig=xv,Cg=Zn,Ax=zu,Rx=uo,Dx=Ie,Mx=Yn,n0=Dx("isConcatSpreadable"),Nx=Mx>=51||!kx(function(){var t=[];return t[n0]=!1,t.concat()[0]!==t}),Fx=function(t){if(!Ix(t))return!1;var n=t[n0];return n!==void 0?!!n:Px(t)},Bx=!Nx||!Rx("concat");Tx({target:"Array",proto:!0,arity:1,forced:Bx},{concat:function(n){var e=Cx(this),r=Ax(e,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],Fx(l))for(u=xx(l),Ig(i+u),o=0;o<u;o++,i++)o in l&&Cg(r,i,l[o]);else Ig(i+1),Cg(r,i++,l);return r.length=i,r}});var Lx=Mr,jx=String,Gi=function(t){if(Lx(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return jx(t)},Hu={},zx=Lu,Hx=Math.max,Wx=Math.min,Wu=function(t,n){var e=zx(t);return e<0?Hx(e+n,0):Wx(e,n)},Vx=mr,Ux=Wu,Gx=Wt,xg=function(t){return function(n,e,r){var i=Vx(n),a=Gx(i),o=Ux(r,a),s;if(t&&e!=e){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===e)return t||o||0;return!t&&-1}},Kx={includes:xg(!0),indexOf:xg(!1)},lo={},qx=$e,Ul=He,Yx=mr,Xx=Kx.indexOf,Qx=lo,Ag=qx([].push),a0=function(t,n){var e=Yx(t),r=0,i=[],a;for(a in e)!Ul(Qx,a)&&Ul(e,a)&&Ag(i,a);for(;n.length>r;)Ul(e,a=n[r++])&&(~Xx(i,a)||Ag(i,a));return i},Dv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Jx=a0,Zx=Dv,Vu=Object.keys||function(n){return Jx(n,Zx)},eA=Xe,tA=qw,rA=Rt,iA=Dt,nA=mr,aA=Vu;Hu.f=eA&&!tA?Object.defineProperties:function(n,e){iA(n);for(var r=nA(e),i=aA(e),a=i.length,o=0,s;a>o;)rA.f(n,s=i[o++],r[s]);return n};var oA=gt,o0=oA("document","documentElement"),sA=Jn,uA=Nu,Rg=sA("keys"),Uu=function(t){return Rg[t]||(Rg[t]=uA(t))},lA=Dt,hA=Hu,Dg=Dv,dA=lo,cA=o0,fA=Cv,vA=Uu,Mg=">",Ng="<",Yd="prototype",Xd="script",s0=vA("IE_PROTO"),Gl=function(){},u0=function(t){return Ng+Xd+Mg+t+Ng+"/"+Xd+Mg},Fg=function(t){t.write(u0("")),t.close();var n=t.parentWindow.Object;return t=null,n},pA=function(){var t=fA("iframe"),n="java"+Xd+":",e;return t.style.display="none",cA.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(u0("document.F=Object")),e.close(),e.F},os,Hs=function(){try{os=new ActiveXObject("htmlfile")}catch{}Hs=typeof document<"u"?document.domain&&os?Fg(os):pA():Fg(os);for(var t=Dg.length;t--;)delete Hs[Yd][Dg[t]];return Hs()};dA[s0]=!0;var Ki=Object.create||function(n,e){var r;return n!==null?(Gl[Yd]=lA(n),r=new Gl,Gl[Yd]=null,r[s0]=n):r=Hs(),e===void 0?r:hA.f(r,e)},ho={},gA=a0,yA=Dv,mA=yA.concat("length","prototype");ho.f=Object.getOwnPropertyNames||function(n){return gA(n,mA)};var Mv={},Bg=Wu,bA=Wt,$A=Zn,wA=Array,_A=Math.max,l0=function(t,n,e){for(var r=bA(t),i=Bg(n,r),a=Bg(e===void 0?r:e,r),o=wA(_A(a-i,0)),s=0;i<a;i++,s++)$A(o,s,t[i]);return o.length=s,o},EA=oi,SA=mr,h0=ho.f,OA=l0,d0=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],TA=function(t){try{return h0(t)}catch{return OA(d0)}};Mv.f=function(n){return d0&&EA(n)=="Window"?TA(n):h0(SA(n))};var co={};co.f=Object.getOwnPropertySymbols;var kA=Dr,ea=function(t,n,e,r){return r&&r.enumerable?t[n]=e:kA(t,n,e),t},PA=Rt,Nv=function(t,n,e){return PA.f(t,n,e)},fo={},IA=Ie;fo.f=IA;var Lg=_e,CA=He,xA=fo,AA=Rt.f,Ce=function(t){var n=Lg.Symbol||(Lg.Symbol={});CA(n,t)||AA(n,t,{value:xA.f(t)})},RA=Qe,DA=gt,MA=Ie,NA=ea,c0=function(){var t=DA("Symbol"),n=t&&t.prototype,e=n&&n.valueOf,r=MA("toPrimitive");n&&!n[r]&&NA(n,r,function(i){return RA(e,this)},{arity:1})},FA=Av,BA=Mr,LA=FA?{}.toString:function(){return"[object "+BA(this)+"]"},jA=Av,zA=Rt.f,HA=Dr,WA=He,VA=LA,UA=Ie,jg=UA("toStringTag"),qi=function(t,n,e,r){if(t){var i=e?t:t.prototype;WA(i,jg)||zA(i,jg,{configurable:!0,value:n}),r&&!jA&&HA(i,"toString",VA)}},GA=Ne,KA=Pe,zg=GA.WeakMap,qA=KA(zg)&&/native code/.test(String(zg)),YA=qA,f0=Ne,XA=st,QA=Dr,Kl=He,ql=Iv,JA=Uu,ZA=lo,Hg="Object already initialized",Qd=f0.TypeError,eR=f0.WeakMap,su,ja,uu,tR=function(t){return uu(t)?ja(t):su(t,{})},rR=function(t){return function(n){var e;if(!XA(n)||(e=ja(n)).type!==t)throw Qd("Incompatible receiver, "+t+" required");return e}};if(YA||ql.state){var or=ql.state||(ql.state=new eR);or.get=or.get,or.has=or.has,or.set=or.set,su=function(t,n){if(or.has(t))throw Qd(Hg);return n.facade=t,or.set(t,n),n},ja=function(t){return or.get(t)||{}},uu=function(t){return or.has(t)}}else{var sn=JA("state");ZA[sn]=!0,su=function(t,n){if(Kl(t,sn))throw Qd(Hg);return n.facade=t,QA(t,sn,n),n},ja=function(t){return Kl(t,sn)?t[sn]:{}},uu=function(t){return Kl(t,sn)}}var ta={set:su,get:ja,has:uu,enforce:tR,getterFor:rR},iR=ui,nR=$e,aR=Mu,oR=At,sR=Wt,uR=zu,Wg=nR([].push),jr=function(t){var n=t==1,e=t==2,r=t==3,i=t==4,a=t==6,o=t==7,s=t==5||a;return function(u,l,h,d){for(var c=oR(u),f=aR(c),v=iR(l,h),p=sR(f),$=0,g=d||uR,y=n?g(u,p):e||o?g(u,0):void 0,b,m;p>$;$++)if((s||$ in f)&&(b=f[$],m=v(b,$,c),t))if(n)y[$]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return $;case 2:Wg(y,b)}else switch(t){case 4:return!1;case 7:Wg(y,b)}return a?-1:r||i?i:y}},ra={forEach:jr(0),map:jr(1),filter:jr(2),some:jr(3),every:jr(4),find:jr(5),findIndex:jr(6),filterReject:jr(7)},Gu=X,Fv=Ne,Bv=Qe,lR=$e,Rn=Xe,Dn=Xn,hR=fe,qe=He,dR=Ue,Jd=Dt,Ku=mr,Lv=Fu,cR=Gi,Zd=Ui,za=Ki,v0=Vu,fR=ho,p0=Mv,vR=co,g0=Vi,y0=Rt,pR=Hu,m0=Du,Vg=ea,gR=Nv,jv=Jn,yR=Uu,b0=lo,Ug=Nu,mR=Ie,bR=fo,$R=Ce,wR=c0,_R=qi,$0=ta,qu=ra.forEach,_t=yR("hidden"),Yu="Symbol",Ha="prototype",ER=$0.set,Gg=$0.getterFor(Yu),Zt=Object[Ha],ki=Fv.Symbol,Oa=ki&&ki[Ha],SR=Fv.TypeError,Yl=Fv.QObject,w0=g0.f,wi=y0.f,_0=p0.f,OR=m0.f,E0=lR([].push),Cr=jv("symbols"),vo=jv("op-symbols"),TR=jv("wks"),ec=!Yl||!Yl[Ha]||!Yl[Ha].findChild,tc=Rn&&hR(function(){return za(wi({},"a",{get:function(){return wi(this,"a",{value:7}).a}})).a!=7})?function(t,n,e){var r=w0(Zt,n);r&&delete Zt[n],wi(t,n,e),r&&t!==Zt&&wi(Zt,n,r)}:wi,Xl=function(t,n){var e=Cr[t]=za(Oa);return ER(e,{type:Yu,tag:t,description:n}),Rn||(e.description=n),e},Xu=function(n,e,r){n===Zt&&Xu(vo,e,r),Jd(n);var i=Lv(e);return Jd(r),qe(Cr,i)?(r.enumerable?(qe(n,_t)&&n[_t][i]&&(n[_t][i]=!1),r=za(r,{enumerable:Zd(0,!1)})):(qe(n,_t)||wi(n,_t,Zd(1,{})),n[_t][i]=!0),tc(n,i,r)):wi(n,i,r)},zv=function(n,e){Jd(n);var r=Ku(e),i=v0(r).concat(k0(r));return qu(i,function(a){(!Rn||Bv(S0,r,a))&&Xu(n,a,r[a])}),n},kR=function(n,e){return e===void 0?za(n):zv(za(n),e)},S0=function(n){var e=Lv(n),r=Bv(OR,this,e);return this===Zt&&qe(Cr,e)&&!qe(vo,e)?!1:r||!qe(this,e)||!qe(Cr,e)||qe(this,_t)&&this[_t][e]?r:!0},O0=function(n,e){var r=Ku(n),i=Lv(e);if(!(r===Zt&&qe(Cr,i)&&!qe(vo,i))){var a=w0(r,i);return a&&qe(Cr,i)&&!(qe(r,_t)&&r[_t][i])&&(a.enumerable=!0),a}},T0=function(n){var e=_0(Ku(n)),r=[];return qu(e,function(i){!qe(Cr,i)&&!qe(b0,i)&&E0(r,i)}),r},k0=function(t){var n=t===Zt,e=_0(n?vo:Ku(t)),r=[];return qu(e,function(i){qe(Cr,i)&&(!n||qe(Zt,i))&&E0(r,Cr[i])}),r};Dn||(ki=function(){if(dR(Oa,this))throw SR("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:cR(arguments[0]),e=Ug(n),r=function(i){this===Zt&&Bv(r,vo,i),qe(this,_t)&&qe(this[_t],e)&&(this[_t][e]=!1),tc(this,e,Zd(1,i))};return Rn&&ec&&tc(Zt,e,{configurable:!0,set:r}),Xl(e,n)},Oa=ki[Ha],Vg(Oa,"toString",function(){return Gg(this).tag}),Vg(ki,"withoutSetter",function(t){return Xl(Ug(t),t)}),m0.f=S0,y0.f=Xu,pR.f=zv,g0.f=O0,fR.f=p0.f=T0,vR.f=k0,bR.f=function(t){return Xl(mR(t),t)},Rn&&gR(Oa,"description",{configurable:!0,get:function(){return Gg(this).description}}));Gu({global:!0,constructor:!0,wrap:!0,forced:!Dn,sham:!Dn},{Symbol:ki});qu(v0(TR),function(t){$R(t)});Gu({target:Yu,stat:!0,forced:!Dn},{useSetter:function(){ec=!0},useSimple:function(){ec=!1}});Gu({target:"Object",stat:!0,forced:!Dn,sham:!Rn},{create:kR,defineProperty:Xu,defineProperties:zv,getOwnPropertyDescriptor:O0});Gu({target:"Object",stat:!0,forced:!Dn},{getOwnPropertyNames:T0});wR();_R(ki,Yu);b0[_t]=!0;var PR=Xn,P0=PR&&!!Symbol.for&&!!Symbol.keyFor,IR=X,CR=gt,xR=He,AR=Gi,I0=Jn,RR=P0,Ql=I0("string-to-symbol-registry"),DR=I0("symbol-to-string-registry");IR({target:"Symbol",stat:!0,forced:!RR},{for:function(t){var n=AR(t);if(xR(Ql,n))return Ql[n];var e=CR("Symbol")(n);return Ql[n]=e,DR[e]=n,e}});var MR=X,NR=He,FR=oo,BR=Qn,LR=Jn,jR=P0,Kg=LR("symbol-to-string-registry");MR({target:"Symbol",stat:!0,forced:!jR},{keyFor:function(n){if(!FR(n))throw TypeError(BR(n)+" is not a symbol");if(NR(Kg,n))return Kg[n]}});var zR=$e,po=zR([].slice),HR=$e,qg=li,WR=Pe,Yg=oi,VR=Gi,Xg=HR([].push),UR=function(t){if(WR(t))return t;if(qg(t)){for(var n=t.length,e=[],r=0;r<n;r++){var i=t[r];typeof i=="string"?Xg(e,i):(typeof i=="number"||Yg(i)=="Number"||Yg(i)=="String")&&Xg(e,VR(i))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(qg(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},GR=X,C0=gt,x0=qn,KR=Qe,go=$e,A0=fe,Qg=Pe,Jg=oo,R0=po,qR=UR,YR=Xn,XR=String,Xr=C0("JSON","stringify"),ss=go(/./.exec),Zg=go("".charAt),QR=go("".charCodeAt),JR=go("".replace),ZR=go(1 .toString),eD=/[\uD800-\uDFFF]/g,ey=/^[\uD800-\uDBFF]$/,ty=/^[\uDC00-\uDFFF]$/,ry=!YR||A0(function(){var t=C0("Symbol")();return Xr([t])!="[null]"||Xr({a:t})!="{}"||Xr(Object(t))!="{}"}),iy=A0(function(){return Xr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Xr("\uDEAD")!=='"\\udead"'}),tD=function(t,n){var e=R0(arguments),r=qR(n);if(!(!Qg(r)&&(t===void 0||Jg(t))))return e[1]=function(i,a){if(Qg(r)&&(a=KR(r,this,XR(i),a)),!Jg(a))return a},x0(Xr,null,e)},rD=function(t,n,e){var r=Zg(e,n-1),i=Zg(e,n+1);return ss(ey,t)&&!ss(ty,i)||ss(ty,t)&&!ss(ey,r)?"\\u"+ZR(QR(t,0),16):t};Xr&&GR({target:"JSON",stat:!0,arity:3,forced:ry||iy},{stringify:function(n,e,r){var i=R0(arguments),a=x0(ry?tD:Xr,null,i);return iy&&typeof a=="string"?JR(a,eD,rD):a}});var iD=X,nD=Xn,aD=fe,D0=co,oD=At,sD=!nD||aD(function(){D0.f(1)});iD({target:"Object",stat:!0,forced:sD},{getOwnPropertySymbols:function(n){var e=D0.f;return e?e(oD(n)):[]}});var uD=Ce;uD("asyncIterator");var lD=Ce;lD("hasInstance");var hD=Ce;hD("isConcatSpreadable");var dD=Ce;dD("iterator");var cD=Ce;cD("match");var fD=Ce;fD("matchAll");var vD=Ce;vD("replace");var pD=Ce;pD("search");var gD=Ce;gD("species");var yD=Ce;yD("split");var mD=Ce,bD=c0;mD("toPrimitive");bD();var $D=gt,wD=Ce,_D=qi;wD("toStringTag");_D($D("Symbol"),"Symbol");var ED=Ce;ED("unscopables");var SD=Ne,OD=qi;OD(SD.JSON,"JSON",!0);var TD=_e,kD=TD.Symbol,ia={},rc=Xe,PD=He,M0=Function.prototype,ID=rc&&Object.getOwnPropertyDescriptor,Hv=PD(M0,"name"),CD=Hv&&function(){}.name==="something",xD=Hv&&(!rc||rc&&ID(M0,"name").configurable),AD={EXISTS:Hv,PROPER:CD,CONFIGURABLE:xD},RD=fe,N0=!RD(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),DD=He,MD=Pe,ND=At,FD=Uu,BD=N0,ny=FD("IE_PROTO"),ic=Object,LD=ic.prototype,Qu=BD?ic.getPrototypeOf:function(t){var n=ND(t);if(DD(n,ny))return n[ny];var e=n.constructor;return MD(e)&&n instanceof e?e.prototype:n instanceof ic?LD:null},jD=fe,zD=Pe,HD=st,WD=Ki,ay=Qu,VD=ea,UD=Ie,nc=UD("iterator"),F0=!1,wr,Jl,Zl;[].keys&&(Zl=[].keys(),"next"in Zl?(Jl=ay(ay(Zl)),Jl!==Object.prototype&&(wr=Jl)):F0=!0);var GD=!HD(wr)||jD(function(){var t={};return wr[nc].call(t)!==t});GD?wr={}:wr=WD(wr);zD(wr[nc])||VD(wr,nc,function(){return this});var B0={IteratorPrototype:wr,BUGGY_SAFARI_ITERATORS:F0},KD=B0.IteratorPrototype,qD=Ki,YD=Ui,XD=qi,QD=ia,JD=function(){return this},ZD=function(t,n,e,r){var i=n+" Iterator";return t.prototype=qD(KD,{next:YD(+!r,e)}),XD(t,i,!1,!0),QD[i]=JD,t},eM=$e,tM=Pt,rM=function(t,n,e){try{return eM(tM(Object.getOwnPropertyDescriptor(t,n)[e]))}catch{}},iM=Pe,nM=String,aM=TypeError,oM=function(t){if(typeof t=="object"||iM(t))return t;throw aM("Can't set "+nM(t)+" as a prototype")},sM=rM,uM=Dt,lM=oM,L0=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,n={},e;try{e=sM(Object.prototype,"__proto__","set"),e(n,[]),t=n instanceof Array}catch{}return function(i,a){return uM(i),lM(a),t?e(i,a):i.__proto__=a,i}}():void 0),hM=X,dM=Qe,cM=AD,fM=ZD,vM=Qu,pM=qi,oy=ea,gM=Ie,sy=ia,yM=B0,mM=cM.PROPER,us=yM.BUGGY_SAFARI_ITERATORS,eh=gM("iterator"),uy="keys",ls="values",ly="entries",bM=function(){return this},Wv=function(t,n,e,r,i,a,o){fM(e,n,r);var s=function(g){if(g===i&&c)return c;if(!us&&g in h)return h[g];switch(g){case uy:return function(){return new e(this,g)};case ls:return function(){return new e(this,g)};case ly:return function(){return new e(this,g)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,h=t.prototype,d=h[eh]||h["@@iterator"]||i&&h[i],c=!us&&d||s(i),f=n=="Array"&&h.entries||d,v,p,$;if(f&&(v=vM(f.call(new t)),v!==Object.prototype&&v.next&&(pM(v,u,!0,!0),sy[u]=bM)),mM&&i==ls&&d&&d.name!==ls&&(l=!0,c=function(){return dM(d,this)}),i)if(p={values:s(ls),keys:a?c:s(uy),entries:s(ly)},o)for($ in p)(us||l||!($ in h))&&oy(h,$,p[$]);else hM({target:n,proto:!0,forced:us||l},p);return o&&h[eh]!==c&&oy(h,eh,c,{name:i}),sy[n]=c,p},Vv=function(t,n){return{value:t,done:n}},$M=mr,hy=ia,j0=ta;Rt.f;var wM=Wv,hs=Vv,z0="Array Iterator",_M=j0.set,EM=j0.getterFor(z0);wM(Array,"Array",function(t,n){_M(this,{type:z0,target:$M(t),index:0,kind:n})},function(){var t=EM(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=void 0,hs(void 0,!0)):e=="keys"?hs(r,!1):e=="values"?hs(n[r],!1):hs([r,n[r]],!1)},"values");hy.Arguments=hy.Array;var SM={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},OM=SM,TM=Ne,kM=Mr,PM=Dr,dy=ia,IM=Ie,cy=IM("toStringTag");for(var th in OM){var fy=TM[th],rh=fy&&fy.prototype;rh&&kM(rh)!==cy&&PM(rh,cy,th),dy[th]=dy.Array}var CM=kD,H0=CM,xM=Ce;xM("dispose");var AM=H0,RM=AM,DM=Ce;DM("asyncDispose");var MM=X,NM=gt,FM=$e,W0=NM("Symbol"),BM=W0.keyFor,LM=FM(W0.prototype.valueOf);MM({target:"Symbol",stat:!0},{isRegistered:function(n){try{return BM(LM(n))!==void 0}catch{return!1}}});var jM=X,zM=Jn,V0=gt,HM=$e,WM=oo,VM=Ie,lu=V0("Symbol"),vy=lu.isWellKnown,U0=V0("Object","getOwnPropertyNames"),UM=HM(lu.prototype.valueOf),py=zM("wks");for(var ih=0,gy=U0(lu),GM=gy.length;ih<GM;ih++)try{var yy=gy[ih];WM(lu[yy])&&VM(yy)}catch{}jM({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(n){if(vy&&vy(n))return!0;try{for(var e=UM(n),r=0,i=U0(py),a=i.length;r<a;r++)if(py[i[r]]==e)return!0}catch{}return!1}});var KM=Ce;KM("matcher");var qM=Ce;qM("metadataKey");var YM=Ce;YM("observable");var XM=Ce;XM("metadata");var QM=Ce;QM("patternMatch");var JM=Ce;JM("replaceAll");var ZM=RM,eN=ZM,tN=eN,Uv=tN,bn=J(Uv),Gv=$e,rN=Lu,iN=Gi,nN=kv,aN=Gv("".charAt),my=Gv("".charCodeAt),oN=Gv("".slice),by=function(t){return function(n,e){var r=iN(nN(n)),i=rN(e),a=r.length,o,s;return i<0||i>=a?t?"":void 0:(o=my(r,i),o<55296||o>56319||i+1===a||(s=my(r,i+1))<56320||s>57343?t?aN(r,i):o:t?oN(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},sN={codeAt:by(!1),charAt:by(!0)},uN=sN.charAt,lN=Gi,G0=ta,hN=Wv,$y=Vv,K0="String Iterator",dN=G0.set,cN=G0.getterFor(K0);hN(String,"String",function(t){dN(this,{type:K0,string:lN(t),index:0})},function(){var n=cN(this),e=n.string,r=n.index,i;return r>=e.length?$y(void 0,!0):(i=uN(e,r),n.index+=i.length,$y(i,!1))});var fN=fo,vN=fN.f("iterator"),pN=vN,q0=pN,gN=q0,yN=gN,mN=yN,bN=mN,$N=bN,Y0=$N,wN=J(Y0);function at(t){"@babel/helpers - typeof";return at=typeof bn=="function"&&typeof wN=="symbol"?function(n){return typeof n}:function(n){return n&&typeof bn=="function"&&n.constructor===bn&&n!==bn.prototype?"symbol":typeof n},at(t)}var _N=fo,EN=_N.f("toPrimitive"),SN=EN,ON=SN,TN=ON,kN=TN,PN=kN,IN=PN,CN=IN,xN=CN,AN=J(xN);function RN(t,n){if(at(t)!=="object"||t===null)return t;var e=t[AN];if(e!==void 0){var r=e.call(t,n||"default");if(at(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}function X0(t){var n=RN(t,"string");return at(n)==="symbol"?n:String(n)}function wy(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Bu(t,X0(r.key),r)}}function Ju(t,n,e){return n&&wy(t.prototype,n),e&&wy(t,e),Bu(t,"prototype",{writable:!1}),t}function De(t,n,e){return n=X0(n),n in t?Bu(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Q0=$e,DN=Pt,MN=st,NN=He,_y=po,FN=no,J0=Function,BN=Q0([].concat),LN=Q0([].join),nh={},jN=function(t,n,e){if(!NN(nh,n)){for(var r=[],i=0;i<n;i++)r[i]="a["+i+"]";nh[n]=J0("C,a","return new C("+LN(r,",")+")")}return nh[n](t,e)},Z0=FN?J0.bind:function(n){var e=DN(this),r=e.prototype,i=_y(arguments,1),a=function(){var s=BN(i,_y(arguments));return this instanceof a?jN(e,s.length,s):e.apply(n,s)};return MN(r)&&(a.prototype=r),a},zN=X,Ey=Z0;zN({target:"Function",proto:!0,forced:Function.bind!==Ey},{bind:Ey});var HN=_e,yt=function(t){return HN[t+"Prototype"]},WN=yt,VN=WN("Function").bind,UN=Ue,GN=VN,ah=Function.prototype,KN=function(t){var n=t.bind;return t===ah||UN(ah,t)&&n===ah.bind?GN:n},qN=KN,e_=qN,YN=e_,t_=J(YN),XN=Pt,QN=At,JN=Mu,ZN=Wt,e2=TypeError,Sy=function(t){return function(n,e,r,i){XN(e);var a=QN(n),o=JN(a),s=ZN(a),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw e2("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in o&&(i=e(i,o[u],u,a));return i}},t2={left:Sy(!1),right:Sy(!0)},r2=fe,Zu=function(t,n){var e=[][t];return!!e&&r2(function(){e.call(null,n||function(){return 1},1)})},i2=oi,yo=typeof process<"u"&&i2(process)=="process",n2=X,a2=t2.left,o2=Zu,Oy=Yn,s2=yo,u2=!s2&&Oy>79&&Oy<83,l2=u2||!o2("reduce");n2({target:"Array",proto:!0,forced:l2},{reduce:function(n){var e=arguments.length;return a2(this,n,e,e>1?arguments[1]:void 0)}});var h2=yt,d2=h2("Array").reduce,c2=Ue,f2=d2,oh=Array.prototype,v2=function(t){var n=t.reduce;return t===oh||c2(oh,t)&&n===oh.reduce?f2:n},p2=v2,g2=p2,y2=g2,m2=J(y2),b2=X,$2=ra.filter,w2=uo,_2=w2("filter");b2({target:"Array",proto:!0,forced:!_2},{filter:function(n){return $2(this,n,arguments.length>1?arguments[1]:void 0)}});var E2=yt,S2=E2("Array").filter,O2=Ue,T2=S2,sh=Array.prototype,k2=function(t){var n=t.filter;return t===sh||O2(sh,t)&&n===sh.filter?T2:n},P2=k2,I2=P2,C2=I2,$n=J(C2),x2=X,A2=ra.map,R2=uo,D2=R2("map");x2({target:"Array",proto:!0,forced:!D2},{map:function(n){return A2(this,n,arguments.length>1?arguments[1]:void 0)}});var M2=yt,N2=M2("Array").map,F2=Ue,B2=N2,uh=Array.prototype,L2=function(t){var n=t.map;return t===uh||F2(uh,t)&&n===uh.map?B2:n},j2=L2,z2=j2,H2=z2,Yt=J(H2),W2=li,V2=Wt,U2=xv,G2=ui,r_=function(t,n,e,r,i,a,o,s){for(var u=i,l=0,h=o?G2(o,s):!1,d,c;l<r;)l in e&&(d=h?h(e[l],l,n):e[l],a>0&&W2(d)?(c=V2(d),u=r_(t,n,d,c,u,a-1)-1):(U2(u+1),t[u]=d),u++),l++;return u},K2=r_,q2=X,Y2=K2,X2=Pt,Q2=At,J2=Wt,Z2=zu;q2({target:"Array",proto:!0},{flatMap:function(n){var e=Q2(this),r=J2(e),i;return X2(n),i=Z2(e,0),i.length=Y2(i,e,e,r,0,1,n,arguments.length>1?arguments[1]:void 0),i}});var eF=yt;eF("Array").flatMap;var tF=Qe,Ty=Dt,rF=Pv,i_=function(t,n,e){var r,i;Ty(t);try{if(r=rF(t,"return"),!r){if(n==="throw")throw e;return e}r=tF(r,t)}catch(a){i=!0,r=a}if(n==="throw")throw e;if(i)throw r;return Ty(r),e},iF=Dt,nF=i_,aF=function(t,n,e,r){try{return r?n(iF(e)[0],e[1]):n(e)}catch(i){nF(t,"throw",i)}},oF=Ie,sF=ia,uF=oF("iterator"),lF=Array.prototype,n_=function(t){return t!==void 0&&(sF.Array===t||lF[uF]===t)},hF=Mr,ky=Pv,dF=ao,cF=ia,fF=Ie,vF=fF("iterator"),el=function(t){if(!dF(t))return ky(t,vF)||ky(t,"@@iterator")||cF[hF(t)]},pF=Qe,gF=Pt,yF=Dt,mF=Qn,bF=el,$F=TypeError,Kv=function(t,n){var e=arguments.length<2?bF(t):n;if(gF(e))return yF(pF(e,t));throw $F(mF(t)+" is not iterable")},wF=ui,_F=Qe,EF=At,SF=aF,OF=n_,TF=ju,kF=Wt,Py=Zn,PF=Kv,IF=el,Iy=Array,CF=function(n){var e=EF(n),r=TF(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=wF(a,i>2?arguments[2]:void 0));var s=IF(e),u=0,l,h,d,c,f,v;if(s&&!(this===Iy&&OF(s)))for(c=PF(e,s),f=c.next,h=r?new this:[];!(d=_F(f,c)).done;u++)v=o?SF(c,a,[d.value,u],!0):d.value,Py(h,u,v);else for(l=kF(e),h=r?new this(l):Iy(l);l>u;u++)v=o?a(e[u],u):e[u],Py(h,u,v);return h.length=u,h},xF=Ie,a_=xF("iterator"),o_=!1;try{var AF=0,Cy={next:function(){return{done:!!AF++}},return:function(){o_=!0}};Cy[a_]=function(){return this},Array.from(Cy,function(){throw 2})}catch{}var s_=function(t,n){if(!n&&!o_)return!1;var e=!1;try{var r={};r[a_]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},RF=X,DF=CF,MF=s_,NF=!MF(function(t){Array.from(t)});RF({target:"Array",stat:!0,forced:NF},{from:DF});var FF=_e,BF=FF.Array.from,LF=BF,u_=LF,jF=u_,qv=J(jF),zF=el,HF=zF,WF=HF,VF=WF,UF=VF,GF=UF,KF=GF,qF=KF,YF=qF,XF=YF,mo=J(XF),QF=_e,JF=QF.Object.getOwnPropertySymbols,ZF=JF,eB=ZF,tB=eB,xy=J(tB),l_={exports:{}},rB=X,iB=fe,nB=mr,h_=Vi.f,d_=Xe,aB=!d_||iB(function(){h_(1)});rB({target:"Object",stat:!0,forced:aB,sham:!d_},{getOwnPropertyDescriptor:function(n,e){return h_(nB(n),e)}});var oB=_e,c_=oB.Object,sB=l_.exports=function(n,e){return c_.getOwnPropertyDescriptor(n,e)};c_.getOwnPropertyDescriptor.sham&&(sB.sham=!0);var uB=l_.exports,lB=uB,hB=lB,dB=hB,f_=J(dB),cB=gt,fB=$e,vB=ho,pB=co,gB=Dt,yB=fB([].concat),Yv=cB("Reflect","ownKeys")||function(n){var e=vB.f(gB(n)),r=pB.f;return r?yB(e,r(n)):e},mB=X,bB=Xe,$B=Yv,wB=mr,_B=Vi,EB=Zn;mB({target:"Object",stat:!0,sham:!bB},{getOwnPropertyDescriptors:function(n){for(var e=wB(n),r=_B.f,i=$B(e),a={},o=0,s,u;i.length>o;)u=r(e,s=i[o++]),u!==void 0&&EB(a,s,u);return a}});var SB=_e,OB=SB.Object.getOwnPropertyDescriptors,TB=OB,kB=TB,PB=kB,Ay=J(PB),v_={exports:{}},IB=X,CB=Xe,Ry=Hu.f;IB({target:"Object",stat:!0,forced:Object.defineProperties!==Ry,sham:!CB},{defineProperties:Ry});var xB=_e,p_=xB.Object,AB=v_.exports=function(n,e){return p_.defineProperties(n,e)};p_.defineProperties.sham&&(AB.sham=!0);var RB=v_.exports,DB=RB,MB=DB,NB=MB,FB=J(NB),BB=Xw,LB=J(BB),jB=X,zB=li;jB({target:"Array",stat:!0},{isArray:zB});var HB=_e,WB=HB.Array.isArray,VB=WB,g_=VB,UB=g_,GB=UB,KB=GB,qB=KB,YB=qB,XB=YB,y_=J(XB);function QB(t){if(y_(t))return t}function JB(t,n){var e=t==null?null:typeof bn<"u"&&mo(t)||t["@@iterator"];if(e!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;u=!1}else for(;!(u=(r=a.call(e)).done)&&(s.push(r.value),s.length!==n);u=!0);}catch(h){l=!0,i=h}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var ZB=X,Dy=li,eL=ju,tL=st,My=Wu,rL=Wt,iL=mr,nL=Zn,aL=Ie,oL=uo,sL=po,uL=oL("slice"),lL=aL("species"),lh=Array,hL=Math.max;ZB({target:"Array",proto:!0,forced:!uL},{slice:function(n,e){var r=iL(this),i=rL(r),a=My(n,i),o=My(e===void 0?i:e,i),s,u,l;if(Dy(r)&&(s=r.constructor,eL(s)&&(s===lh||Dy(s.prototype))?s=void 0:tL(s)&&(s=s[lL],s===null&&(s=void 0)),s===lh||s===void 0))return sL(r,a,o);for(u=new(s===void 0?lh:s)(hL(o-a,0)),l=0;a<o;a++,l++)a in r&&nL(u,l,r[a]);return u.length=l,u}});var dL=yt,cL=dL("Array").slice,fL=Ue,vL=cL,hh=Array.prototype,pL=function(t){var n=t.slice;return t===hh||fL(hh,t)&&n===hh.slice?vL:n},gL=pL,m_=gL,yL=m_,mL=yL,bL=mL,$L=bL,wL=$L,b_=wL,_L=J(b_),EL=u_,SL=EL,OL=SL,TL=OL,kL=TL,PL=kL,$_=J(PL);function ac(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function w_(t,n){var e;if(t){if(typeof t=="string")return ac(t,n);var r=_L(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return $_(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ac(t,n)}}function IL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
26
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bt(t,n){return QB(t)||JB(t,n)||w_(t,n)||IL()}function CL(t){if(y_(t))return ac(t)}function xL(t){if(typeof bn<"u"&&mo(t)!=null||t["@@iterator"]!=null)return $_(t)}function AL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Et(t){return CL(t)||xL(t)||w_(t)||AL()}var RL=H0,tl=J(RL),DL=yt,ML=DL("Array").concat,NL=Ue,FL=ML,dh=Array.prototype,BL=function(t){var n=t.concat;return t===dh||NL(dh,t)&&n===dh.concat?FL:n},LL=BL,jL=LL,zL=jL,rl=J(zL),HL=m_,il=J(HL),WL=X,VL=Yv;WL({target:"Reflect",stat:!0},{ownKeys:VL});var UL=_e,GL=UL.Reflect.ownKeys,KL=GL,qL=KL,YL=qL,XL=J(YL),QL=g_,Ct=J(QL),JL=X,ZL=At,__=Vu,ej=fe,tj=ej(function(){__(1)});JL({target:"Object",stat:!0,forced:tj},{keys:function(n){return __(ZL(n))}});var rj=_e,ij=rj.Object.keys,nj=ij,aj=nj,oj=aj,Xv=J(oj),sj=ra.forEach,uj=Zu,lj=uj("forEach"),hj=lj?[].forEach:function(n){return sj(this,n,arguments.length>1?arguments[1]:void 0)},dj=X,Ny=hj;dj({target:"Array",proto:!0,forced:[].forEach!=Ny},{forEach:Ny});var cj=yt,fj=cj("Array").forEach,vj=fj,pj=vj,gj=Mr,yj=He,mj=Ue,bj=pj,ch=Array.prototype,$j={DOMTokenList:!0,NodeList:!0},E_=function(t){var n=t.forEach;return t===ch||mj(ch,t)&&n===ch.forEach||yj($j,gj(t))?bj:n},wj=E_,Mi=J(wj),_j=X,Ej=$e,Sj=li,Oj=Ej([].reverse),Fy=[1,2];_j({target:"Array",proto:!0,forced:String(Fy)===String(Fy.reverse())},{reverse:function(){return Sj(this)&&(this.length=this.length),Oj(this)}});var Tj=yt,kj=Tj("Array").reverse,Pj=Ue,Ij=kj,fh=Array.prototype,Cj=function(t){var n=t.reverse;return t===fh||Pj(fh,t)&&n===fh.reverse?Ij:n},xj=Cj,S_=xj,Aj=S_,Rj=J(Aj),Dj=Xe,Mj=li,Nj=TypeError,Fj=Object.getOwnPropertyDescriptor,Bj=Dj&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Lj=Bj?function(t,n){if(Mj(t)&&!Fj(t,"length").writable)throw Nj("Cannot set read only .length");return t.length=n}:function(t,n){return t.length=n},By=Qn,jj=TypeError,O_=function(t,n){if(!delete t[n])throw jj("Cannot delete property "+By(n)+" of "+By(t))},zj=X,Hj=At,Wj=Wu,Vj=Lu,Uj=Wt,Gj=Lj,Kj=xv,qj=zu,Yj=Zn,vh=O_,Xj=uo,Qj=Xj("splice"),Jj=Math.max,Zj=Math.min;zj({target:"Array",proto:!0,forced:!Qj},{splice:function(n,e){var r=Hj(this),i=Uj(r),a=Wj(n,i),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=Zj(Jj(Vj(e),0),i-a)),Kj(i+s-u),l=qj(r,u),h=0;h<u;h++)d=a+h,d in r&&Yj(l,h,r[d]);if(l.length=u,s<u){for(h=a;h<i-u;h++)d=h+u,c=h+s,d in r?r[c]=r[d]:vh(r,c);for(h=i;h>i-u+s;h--)vh(r,h-1)}else if(s>u)for(h=i-u;h>a;h--)d=h+u-1,c=h+s-1,d in r?r[c]=r[d]:vh(r,c);for(h=0;h<s;h++)r[h+a]=arguments[h+2];return Gj(r,i-u+s),l}});var ez=yt,tz=ez("Array").splice,rz=Ue,iz=tz,ph=Array.prototype,nz=function(t){var n=t.splice;return t===ph||rz(ph,t)&&n===ph.splice?iz:n},az=nz,oz=az,sz=oz,T_=J(sz),Ly=Xe,uz=$e,lz=Qe,hz=fe,gh=Vu,dz=co,cz=Du,fz=At,vz=Mu,un=Object.assign,jy=Object.defineProperty,pz=uz([].concat),gz=!un||hz(function(){if(Ly&&un({b:1},un(jy({},"a",{enumerable:!0,get:function(){jy(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(i){n[i]=i}),un({},t)[e]!=7||gh(un({},n)).join("")!=r})?function(n,e){for(var r=fz(n),i=arguments.length,a=1,o=dz.f,s=cz.f;i>a;)for(var u=vz(arguments[a++]),l=o?pz(gh(u),o(u)):gh(u),h=l.length,d=0,c;h>d;)c=l[d++],(!Ly||lz(s,u,c))&&(r[c]=u[c]);return r}:un,yz=X,zy=gz;yz({target:"Object",stat:!0,arity:2,forced:Object.assign!==zy},{assign:zy});var mz=_e,bz=mz.Object.assign,$z=bz,wz=$z,_z=wz,Ez=J(_z),Sz=X,Oz=fe,Tz=At,k_=Qu,kz=N0,Pz=Oz(function(){k_(1)});Sz({target:"Object",stat:!0,forced:Pz,sham:!kz},{getPrototypeOf:function(n){return k_(Tz(n))}});var Iz=_e,Cz=Iz.Object.getPrototypeOf,xz=Cz,Az=xz,Rz=X,Dz=Xe,Mz=Ki;Rz({target:"Object",stat:!0,sham:!Dz},{create:Mz});var Nz=_e,Fz=Nz.Object,Bz=function(n,e){return Fz.create(n,e)},Lz=Bz,P_=Lz,jz=P_,zz=J(jz),oc=_e,Hz=qn;oc.JSON||(oc.JSON={stringify:JSON.stringify});var Wz=function(n,e,r){return Hz(oc.JSON.stringify,null,arguments)},Vz=Wz,Uz=Vz,Gz=Uz,Kz=J(Gz),qz=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Yz=TypeError,I_=function(t,n){if(t<n)throw Yz("Not enough arguments");return t},C_=Ne,Xz=qn,Qz=Pe,Jz=qz,Zz=si,e3=po,t3=I_,r3=C_.Function,i3=/MSIE .\./.test(Zz)||Jz&&function(){var t=C_.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),x_=function(t,n){var e=n?2:1;return i3?function(r,i){var a=t3(arguments.length,1)>e,o=Qz(r)?r:r3(r),s=a?e3(arguments,e):[],u=a?function(){Xz(o,this,s)}:o;return n?t(u,i):t(u)}:t},n3=X,A_=Ne,a3=x_,Hy=a3(A_.setInterval,!0);n3({global:!0,bind:!0,forced:A_.setInterval!==Hy},{setInterval:Hy});var o3=X,R_=Ne,s3=x_,Wy=s3(R_.setTimeout,!0);o3({global:!0,bind:!0,forced:R_.setTimeout!==Wy},{setTimeout:Wy});var u3=_e,l3=u3.setTimeout,h3=l3,d3=J(h3),D_={exports:{}};(function(t){t.exports=n;function n(r){if(r)return e(r)}function e(r){for(var i in n.prototype)r[i]=n.prototype[i];return r}n.prototype.on=n.prototype.addEventListener=function(r,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(i),this},n.prototype.once=function(r,i){function a(){this.off(r,a),i.apply(this,arguments)}return a.fn=i,this.on(r,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(r,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+r];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===i||o.fn===i){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+r],this},n.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+r],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},n.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},n.prototype.hasListeners=function(r){return!!this.listeners(r).length}})(D_);var c3=D_.exports,f3=J(c3);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
28
|
+
* http://naver.github.io/egjs
|
|
29
|
+
*
|
|
30
|
+
* Forked By Naver egjs
|
|
31
|
+
* Copyright (c) hammerjs
|
|
32
|
+
* Licensed under the MIT license */function tr(){return tr=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},tr.apply(this,arguments)}function Vt(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}function ds(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var sc;typeof Object.assign!="function"?sc=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}:sc=Object.assign;var Ni=sc,Vy=["","webkit","Moz","MS","ms","o"],v3=typeof document>"u"?{style:{}}:document.createElement("div"),p3="function",wn=Math.round,Fi=Math.abs,Qv=Date.now;function nl(t,n){for(var e,r,i=n[0].toUpperCase()+n.slice(1),a=0;a<Vy.length;){if(e=Vy[a],r=e?e+i:n,r in t)return r;a++}}var _r;typeof window>"u"?_r={}:_r=window;var M_=nl(v3.style,"touchAction"),N_=M_!==void 0;function g3(){if(!N_)return!1;var t={},n=_r.CSS&&_r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=n?_r.CSS.supports("touch-action",e):!0}),t}var F_="compute",B_="auto",uc="manipulation",Pi="none",Wa="pan-x",Va="pan-y",cs=g3(),y3=/mobile|tablet|ip(ad|hone|od)|android/i,L_="ontouchstart"in _r,m3=nl(_r,"PointerEvent")!==void 0,b3=L_&&y3.test(navigator.userAgent),bo="touch",$3="pen",Jv="mouse",w3="kinect",_3=25,vt=1,Yi=2,Le=4,Tt=8,hu=1,$o=2,wo=4,_o=8,Mn=16,vr=$o|wo,Ii=_o|Mn,j_=vr|Ii,z_=["x","y"],du=["clientX","clientY"];function Er(t,n,e){var r;if(t)if(t.forEach)t.forEach(n,e);else if(t.length!==void 0)for(r=0;r<t.length;)n.call(e,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&n.call(e,t[r],r,t)}function al(t,n){return typeof t===p3?t.apply(n&&n[0]||void 0,n):t}function Si(t,n){return t.indexOf(n)>-1}function E3(t){if(Si(t,Pi))return Pi;var n=Si(t,Wa),e=Si(t,Va);return n&&e?Pi:n||e?n?Wa:Va:Si(t,uc)?uc:B_}var H_=function(){function t(e,r){this.manager=e,this.set(r)}var n=t.prototype;return n.set=function(r){r===F_&&(r=this.compute()),N_&&this.manager.element.style&&cs[r]&&(this.manager.element.style[M_]=r),this.actions=r.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var r=[];return Er(this.manager.recognizers,function(i){al(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),E3(r.join(" "))},n.preventDefaults=function(r){var i=r.srcEvent,a=r.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=Si(o,Pi)&&!cs[Pi],u=Si(o,Va)&&!cs[Va],l=Si(o,Wa)&&!cs[Wa];if(s){var h=r.pointers.length===1,d=r.distance<2,c=r.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&vr||l&&a&Ii))return this.preventSrc(i)},n.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},t}();function Zv(t,n){for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function W_(t){var n=t.length;if(n===1)return{x:wn(t[0].clientX),y:wn(t[0].clientY)};for(var e=0,r=0,i=0;i<n;)e+=t[i].clientX,r+=t[i].clientY,i++;return{x:wn(e/n),y:wn(r/n)}}function Uy(t){for(var n=[],e=0;e<t.pointers.length;)n[e]={clientX:wn(t.pointers[e].clientX),clientY:wn(t.pointers[e].clientY)},e++;return{timeStamp:Qv(),pointers:n,center:W_(n),deltaX:t.deltaX,deltaY:t.deltaY}}function cu(t,n,e){e||(e=z_);var r=n[e[0]]-t[e[0]],i=n[e[1]]-t[e[1]];return Math.sqrt(r*r+i*i)}function lc(t,n,e){e||(e=z_);var r=n[e[0]]-t[e[0]],i=n[e[1]]-t[e[1]];return Math.atan2(i,r)*180/Math.PI}function V_(t,n){return t===n?hu:Fi(t)>=Fi(n)?t<0?$o:wo:n<0?_o:Mn}function S3(t,n){var e=n.center,r=t.offsetDelta||{},i=t.prevDelta||{},a=t.prevInput||{};(n.eventType===vt||a.eventType===Le)&&(i=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=t.offsetDelta={x:e.x,y:e.y}),n.deltaX=i.x+(e.x-r.x),n.deltaY=i.y+(e.y-r.y)}function U_(t,n,e){return{x:n/t||0,y:e/t||0}}function O3(t,n){return cu(n[0],n[1],du)/cu(t[0],t[1],du)}function T3(t,n){return lc(n[1],n[0],du)+lc(t[1],t[0],du)}function k3(t,n){var e=t.lastInterval||n,r=n.timeStamp-e.timeStamp,i,a,o,s;if(n.eventType!==Tt&&(r>_3||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,h=U_(r,u,l);a=h.x,o=h.y,i=Fi(h.x)>Fi(h.y)?h.x:h.y,s=V_(u,l),t.lastInterval=n}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=i,n.velocityX=a,n.velocityY=o,n.direction=s}function P3(t,n){var e=t.session,r=n.pointers,i=r.length;e.firstInput||(e.firstInput=Uy(n)),i>1&&!e.firstMultiple?e.firstMultiple=Uy(n):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=W_(r);n.timeStamp=Qv(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=lc(s,u),n.distance=cu(s,u),S3(e,n),n.offsetDirection=V_(n.deltaX,n.deltaY);var l=U_(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=Fi(l.x)>Fi(l.y)?l.x:l.y,n.scale=o?O3(o.pointers,r):1,n.rotation=o?T3(o.pointers,r):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,k3(e,n);var h=t.element,d=n.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,Zv(c,h)&&(h=c),n.target=h}function I3(t,n,e){var r=e.pointers.length,i=e.changedPointers.length,a=n&vt&&r-i===0,o=n&(Le|Tt)&&r-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=n,P3(t,e),t.emit("hammer.input",e),t.recognize(e),t.session.prevInput=e}function Ua(t){return t.trim().split(/\s+/g)}function Ia(t,n,e){Er(Ua(n),function(r){t.addEventListener(r,e,!1)})}function Ca(t,n,e){Er(Ua(n),function(r){t.removeEventListener(r,e,!1)})}function Gy(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||window}var na=function(){function t(e,r){var i=this;this.manager=e,this.callback=r,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){al(e.options.enable,[e])&&i.handler(a)},this.init()}var n=t.prototype;return n.handler=function(){},n.init=function(){this.evEl&&Ia(this.element,this.evEl,this.domHandler),this.evTarget&&Ia(this.target,this.evTarget,this.domHandler),this.evWin&&Ia(Gy(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&Ca(this.element,this.evEl,this.domHandler),this.evTarget&&Ca(this.target,this.evTarget,this.domHandler),this.evWin&&Ca(Gy(this.element),this.evWin,this.domHandler)},t}();function Bi(t,n,e){if(t.indexOf&&!e)return t.indexOf(n);for(var r=0;r<t.length;){if(e&&t[r][e]==n||!e&&t[r]===n)return r;r++}return-1}var C3={pointerdown:vt,pointermove:Yi,pointerup:Le,pointercancel:Tt,pointerout:Tt},x3={2:bo,3:$3,4:Jv,5:w3},G_="pointerdown",K_="pointermove pointerup pointercancel";_r.MSPointerEvent&&!_r.PointerEvent&&(G_="MSPointerDown",K_="MSPointerMove MSPointerUp MSPointerCancel");var q_=function(t){Vt(n,t);function n(){var r,i=n.prototype;return i.evEl=G_,i.evWin=K_,r=t.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var e=n.prototype;return e.handler=function(i){var a=this.store,o=!1,s=i.type.toLowerCase().replace("ms",""),u=C3[s],l=x3[i.pointerType]||i.pointerType,h=l===bo,d=Bi(a,i.pointerId,"pointerId");u&vt&&(i.button===0||h)?d<0&&(a.push(i),d=a.length-1):u&(Le|Tt)&&(o=!0),!(d<0)&&(a[d]=i,this.callback(this.manager,u,{pointers:a,changedPointers:[i],pointerType:l,srcEvent:i}),o&&a.splice(d,1))},n}(na);function Ga(t){return Array.prototype.slice.call(t,0)}function ep(t,n,e){for(var r=[],i=[],a=0;a<t.length;){var o=n?t[a][n]:t[a];Bi(i,o)<0&&r.push(t[a]),i[a]=o,a++}return e&&(n?r=r.sort(function(s,u){return s[n]>u[n]}):r=r.sort()),r}var A3={touchstart:vt,touchmove:Yi,touchend:Le,touchcancel:Tt},R3="touchstart touchmove touchend touchcancel",tp=function(t){Vt(n,t);function n(){var r;return n.prototype.evTarget=R3,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=n.prototype;return e.handler=function(i){var a=A3[i.type],o=D3.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:bo,srcEvent:i})},n}(na);function D3(t,n){var e=Ga(t.touches),r=this.targetIds;if(n&(vt|Yi)&&e.length===1)return r[e[0].identifier]=!0,[e,e];var i,a,o=Ga(t.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Zv(l.target,u)}),n===vt)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),n&(Le|Tt)&&delete r[o[i].identifier],i++;if(s.length)return[ep(a.concat(s),"identifier",!0),s]}var M3={mousedown:vt,mousemove:Yi,mouseup:Le},N3="mousedown",F3="mousemove mouseup",rp=function(t){Vt(n,t);function n(){var r,i=n.prototype;return i.evEl=N3,i.evWin=F3,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=n.prototype;return e.handler=function(i){var a=M3[i.type];a&vt&&i.button===0&&(this.pressed=!0),a&Yi&&i.which!==1&&(a=Le),this.pressed&&(a&Le&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:Jv,srcEvent:i}))},n}(na),B3=2500,Ky=25;function qy(t){var n=t.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(r);var a=function(){var s=i.indexOf(r);s>-1&&i.splice(s,1)};setTimeout(a,B3)}}function L3(t,n){t&vt?(this.primaryTouch=n.changedPointers[0].identifier,qy.call(this,n)):t&(Le|Tt)&&qy.call(this,n)}function j3(t){for(var n=t.srcEvent.clientX,e=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(n-i.x),o=Math.abs(e-i.y);if(a<=Ky&&o<=Ky)return!0}return!1}var Y_=function(){var t=function(n){Vt(e,n);function e(i,a){var o;return o=n.call(this,i,a)||this,o.handler=function(s,u,l){var h=l.pointerType===bo,d=l.pointerType===Jv;if(!(d&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(h)L3.call(ds(ds(o)),u,l);else if(d&&j3.call(ds(ds(o)),l))return;o.callback(s,u,l)}},o.touch=new tp(o.manager,o.handler),o.mouse=new rp(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var r=e.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(na);return t}();function z3(t){var n,e=t.options.inputClass;return e?n=e:m3?n=q_:b3?n=tp:L_?n=Y_:n=rp,new n(t,I3)}function _n(t,n,e){return Array.isArray(t)?(Er(t,e[n],e),!0):!1}var Ws=1,zt=2,Nn=4,Qr=8,Sr=Qr,Ka=16,dr=32,H3=1;function W3(){return H3++}function fs(t,n){var e=n.manager;return e?e.get(t):t}function Yy(t){return t&Ka?"cancel":t&Qr?"end":t&Nn?"move":t&zt?"start":""}var Eo=function(){function t(e){e===void 0&&(e={}),this.options=tr({enable:!0},e),this.id=W3(),this.manager=null,this.state=Ws,this.simultaneous={},this.requireFail=[]}var n=t.prototype;return n.set=function(r){return Ni(this.options,r),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(r){if(_n(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=fs(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},n.dropRecognizeWith=function(r){return _n(r,"dropRecognizeWith",this)?this:(r=fs(r,this),delete this.simultaneous[r.id],this)},n.requireFailure=function(r){if(_n(r,"requireFailure",this))return this;var i=this.requireFail;return r=fs(r,this),Bi(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},n.dropRequireFailure=function(r){if(_n(r,"dropRequireFailure",this))return this;r=fs(r,this);var i=Bi(this.requireFail,r);return i>-1&&this.requireFail.splice(i,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},n.emit=function(r){var i=this,a=this.state;function o(s){i.manager.emit(s,r)}a<Qr&&o(i.options.event+Yy(a)),o(i.options.event),r.additionalEvent&&o(r.additionalEvent),a>=Qr&&o(i.options.event+Yy(a))},n.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=dr},n.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(dr|Ws)))return!1;r++}return!0},n.recognize=function(r){var i=Ni({},r);if(!al(this.options.enable,[this,i])){this.reset(),this.state=dr;return}this.state&(Sr|Ka|dr)&&(this.state=Ws),this.state=this.process(i),this.state&(zt|Nn|Qr|Ka)&&this.tryEmit(i)},n.process=function(r){},n.getTouchAction=function(){},n.reset=function(){},t}(),hc=function(t){Vt(n,t);function n(r){var i;return r===void 0&&(r={}),i=t.call(this,tr({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var e=n.prototype;return e.getTouchAction=function(){return[uc]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&vt&&this.count===0)return this.failTimeout();if(u&&l&&s){if(i.eventType!==Le)return this.failTimeout();var h=this.pTime?i.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||cu(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!d||!h?this.count=1:this.count+=1,this._input=i;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Sr,a.tryEmit()},o.interval),zt):Sr}return dr},e.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=dr},this.options.interval),dr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Sr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},n}(Eo),Fn=function(t){Vt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,tr({pointers:1},r))||this}var e=n.prototype;return e.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},e.process=function(i){var a=this.state,o=i.eventType,s=a&(zt|Nn),u=this.attrTest(i);return s&&(o&Tt||!u)?a|Ka:s||u?o&Le?a|Qr:a&zt?a|Nn:zt:dr},n}(Eo);function X_(t){return t===Mn?"down":t===_o?"up":t===$o?"left":t===wo?"right":""}var ip=function(t){Vt(n,t);function n(r){var i;return r===void 0&&(r={}),i=t.call(this,tr({event:"pan",threshold:10,pointers:1,direction:j_},r))||this,i.pX=null,i.pY=null,i}var e=n.prototype;return e.getTouchAction=function(){var i=this.options.direction,a=[];return i&vr&&a.push(Va),i&Ii&&a.push(Wa),a},e.directionTest=function(i){var a=this.options,o=!0,s=i.distance,u=i.direction,l=i.deltaX,h=i.deltaY;return u&a.direction||(a.direction&vr?(u=l===0?hu:l<0?$o:wo,o=l!==this.pX,s=Math.abs(i.deltaX)):(u=h===0?hu:h<0?_o:Mn,o=h!==this.pY,s=Math.abs(i.deltaY))),i.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(i){return Fn.prototype.attrTest.call(this,i)&&(this.state&zt||!(this.state&zt)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=X_(i.direction);a&&(i.additionalEvent=this.options.event+a),t.prototype.emit.call(this,i)},n}(Fn),Q_=function(t){Vt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,tr({event:"swipe",threshold:10,velocity:.3,direction:vr|Ii,pointers:1},r))||this}var e=n.prototype;return e.getTouchAction=function(){return ip.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(vr|Ii)?o=i.overallVelocity:a&vr?o=i.overallVelocityX:a&Ii&&(o=i.overallVelocityY),t.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Fi(o)>this.options.velocity&&i.eventType&Le},e.emit=function(i){var a=X_(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},n}(Fn),J_=function(t){Vt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,tr({event:"pinch",threshold:0,pointers:2},r))||this}var e=n.prototype;return e.getTouchAction=function(){return[Pi]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&zt)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}t.prototype.emit.call(this,i)},n}(Fn),Z_=function(t){Vt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,tr({event:"rotate",threshold:0,pointers:2},r))||this}var e=n.prototype;return e.getTouchAction=function(){return[Pi]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&zt)},n}(Fn),eE=function(t){Vt(n,t);function n(r){var i;return r===void 0&&(r={}),i=t.call(this,tr({event:"press",pointers:1,time:251,threshold:9},r))||this,i._timer=null,i._input=null,i}var e=n.prototype;return e.getTouchAction=function(){return[B_]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!s||i.eventType&(Le|Tt)&&!l)this.reset();else if(i.eventType&vt)this.reset(),this._timer=setTimeout(function(){a.state=Sr,a.tryEmit()},o.time);else if(i.eventType&Le)return Sr;return dr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===Sr&&(i&&i.eventType&Le?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=Qv(),this.manager.emit(this.options.event,this._input)))},n}(Eo),tE={domEvents:!1,touchAction:F_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Xy=[[Z_,{enable:!1}],[J_,{enable:!1},["rotate"]],[Q_,{direction:vr}],[ip,{direction:vr},["swipe"]],[hc],[hc,{event:"doubletap",taps:2},["tap"]],[eE]],V3=1,Qy=2;function Jy(t,n){var e=t.element;if(e.style){var r;Er(t.options.cssProps,function(i,a){r=nl(e.style,a),n?(t.oldCssProps[r]=e.style[r],e.style[r]=i):e.style[r]=t.oldCssProps[r]||""}),n||(t.oldCssProps={})}}function U3(t,n){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var Zy=function(){function t(e,r){var i=this;this.options=Ni({},tE,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=z3(this),this.touchAction=new H_(this,this.options.touchAction),Jy(this,!0),Er(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=t.prototype;return n.set=function(r){return Ni(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},n.stop=function(r){this.session.stopped=r?Qy:V3},n.recognize=function(r){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(r);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&Sr)&&(i.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],i.stopped!==Qy&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(zt|Nn|Qr)&&(i.curRecognizer=a,s=a),u++}},n.get=function(r){if(r instanceof Eo)return r;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===r)return i[a];return null},n.add=function(r){if(_n(r,"add",this))return this;var i=this.get(r.options.event);return i&&this.remove(i),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},n.remove=function(r){if(_n(r,"remove",this))return this;var i=this.get(r);if(r){var a=this.recognizers,o=Bi(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(r,i){if(r===void 0||i===void 0)return this;var a=this.handlers;return Er(Ua(r),function(o){a[o]=a[o]||[],a[o].push(i)}),this},n.off=function(r,i){if(r===void 0)return this;var a=this.handlers;return Er(Ua(r),function(o){i?a[o]&&a[o].splice(Bi(a[o],i),1):delete a[o]}),this},n.emit=function(r,i){this.options.domEvents&&U3(r,i);var a=this.handlers[r]&&this.handlers[r].slice();if(!(!a||!a.length)){i.type=r,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},n.destroy=function(){this.element&&Jy(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),G3={touchstart:vt,touchmove:Yi,touchend:Le,touchcancel:Tt},K3="touchstart",q3="touchstart touchmove touchend touchcancel",Y3=function(t){Vt(n,t);function n(){var r,i=n.prototype;return i.evTarget=K3,i.evWin=q3,r=t.apply(this,arguments)||this,r.started=!1,r}var e=n.prototype;return e.handler=function(i){var a=G3[i.type];if(a===vt&&(this.started=!0),!!this.started){var o=X3.call(this,i,a);a&(Le|Tt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:bo,srcEvent:i})}},n}(na);function X3(t,n){var e=Ga(t.touches),r=Ga(t.changedTouches);return n&(Le|Tt)&&(e=ep(e.concat(r),"identifier",!0)),[e,r]}function rE(t,n,e){var r="DEPRECATED METHOD: "+n+`
|
|
33
|
+
`+e+` AT
|
|
34
|
+
`;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,r,a),t.apply(this,arguments)}}var iE=rE(function(t,n,e){for(var r=Object.keys(n),i=0;i<r.length;)(!e||e&&t[r[i]]===void 0)&&(t[r[i]]=n[r[i]]),i++;return t},"extend","Use `assign`."),Q3=rE(function(t,n){return iE(t,n,!0)},"merge","Use `assign`.");function J3(t,n,e){var r=n.prototype,i;i=t.prototype=Object.create(r),i.constructor=t,i._super=r,e&&Ni(i,e)}function em(t,n){return function(){return t.apply(n,arguments)}}var Z3=function(){var t=function(e,r){return r===void 0&&(r={}),new Zy(e,tr({recognizers:Xy.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=j_,t.DIRECTION_DOWN=Mn,t.DIRECTION_LEFT=$o,t.DIRECTION_RIGHT=wo,t.DIRECTION_UP=_o,t.DIRECTION_HORIZONTAL=vr,t.DIRECTION_VERTICAL=Ii,t.DIRECTION_NONE=hu,t.DIRECTION_DOWN=Mn,t.INPUT_START=vt,t.INPUT_MOVE=Yi,t.INPUT_END=Le,t.INPUT_CANCEL=Tt,t.STATE_POSSIBLE=Ws,t.STATE_BEGAN=zt,t.STATE_CHANGED=Nn,t.STATE_ENDED=Qr,t.STATE_RECOGNIZED=Sr,t.STATE_CANCELLED=Ka,t.STATE_FAILED=dr,t.Manager=Zy,t.Input=na,t.TouchAction=H_,t.TouchInput=tp,t.MouseInput=rp,t.PointerEventInput=q_,t.TouchMouseInput=Y_,t.SingleTouchInput=Y3,t.Recognizer=Eo,t.AttrRecognizer=Fn,t.Tap=hc,t.Pan=ip,t.Swipe=Q_,t.Pinch=J_,t.Rotate=Z_,t.Press=eE,t.on=Ia,t.off=Ca,t.each=Er,t.merge=Q3,t.extend=iE,t.bindFn=em,t.assign=Ni,t.inherit=J3,t.bindFn=em,t.prefixed=nl,t.toArray=Ga,t.inArray=Bi,t.uniqueArray=ep,t.splitStr=Ua,t.boolOrFn=al,t.hasParent=Zv,t.addEventListeners=Ia,t.removeEventListeners=Ca,t.defaults=Ni({},tE,{preset:Xy}),t}(),e5=Z3;function nE(t,n){var e=typeof tl<"u"&&mo(t)||t["@@iterator"];if(!e){if(Ct(t)||(e=t5(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
35
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function t5(t,n){var e;if(t){if(typeof t=="string")return tm(t,n);var r=il(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return qv(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tm(t,n)}}function tm(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var aE=tl("DELETE");function r5(t){for(var n,e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return oE.apply(void 0,rl(n=[{},t]).call(n,r))}function oE(){var t=fu.apply(void 0,arguments);return uE(t),t}function fu(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];if(n.length<2)return n[0];if(n.length>2){var r;return fu.apply(void 0,rl(r=[oE(n[0],n[1])]).call(r,Et(il(n).call(n,2))))}var i=n[0],a=n[1],o=nE(XL(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===aE?delete i[u]:i[u]!==null&&a[u]!==null&&at(i[u])==="object"&&at(a[u])==="object"&&!Ct(i[u])&&!Ct(a[u])?i[u]=fu(i[u],a[u]):i[u]=sE(a[u]))}}catch(l){o.e(l)}finally{o.f()}return i}function sE(t){return Ct(t)?Yt(t).call(t,function(n){return sE(n)}):at(t)==="object"&&t!==null?fu({},t):t}function uE(t){for(var n=0,e=Xv(t);n<e.length;n++){var r=e[n];t[r]===aE?delete t[r]:at(t[r])==="object"&&t[r]!==null&&uE(t[r])}}function i5(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var n5=typeof window<"u"?window.Hammer||e5:function(){return i5()};function $r(t){var n=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var r=n5(this._dom.overlay);r.on("tap",t_(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){r.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Mi(i).call(i,function(a){r.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){a5(a.target,t)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}f3($r.prototype);$r.current=null;$r.prototype.destroy=function(){var t,n;this.deactivate();var e=nE(Rj(t=T_(n=this._cleanupQueue).call(n,0)).call(t)),r;try{for(e.s();!(r=e.n()).done;){var i=r.value;i()}}catch(a){e.e(a)}finally{e.f()}};$r.prototype.activate=function(){$r.current&&$r.current.deactivate(),$r.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)};$r.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")};$r.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function a5(t,n){for(;t;){if(t===n)return!0;t=t.parentNode}return!1}var o5=ju,s5=Qn,u5=TypeError,lE=function(t){if(o5(t))return t;throw u5(s5(t)+" is not a constructor")},l5=X,h5=gt,yh=qn,d5=Z0,rm=lE,c5=Dt,im=st,f5=Ki,hE=fe,np=h5("Reflect","construct"),v5=Object.prototype,p5=[].push,dE=hE(function(){function t(){}return!(np(function(){},[],t)instanceof t)}),cE=!hE(function(){np(function(){})}),nm=dE||cE;l5({target:"Reflect",stat:!0,forced:nm,sham:nm},{construct:function(n,e){rm(n),c5(e);var r=arguments.length<3?n:rm(arguments[2]);if(cE&&!dE)return np(n,e,r);if(n==r){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var i=[null];return yh(p5,i,e),new(yh(d5,n,i))}var a=r.prototype,o=f5(im(a)?a:v5),s=yh(n,o,e);return im(s)?s:o}});var g5=_e,y5=g5.Reflect.construct,m5=y5,b5=m5,$5=b5,Vs=J($5);function yi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var w5=P_,_5=w5,E5=_5,S5=E5,O5=S5,fE=O5,T5=J(fE),k5=X,P5=L0;k5({target:"Object",stat:!0},{setPrototypeOf:P5});var I5=_e,C5=I5.Object.setPrototypeOf,x5=C5,A5=x5,R5=A5,D5=R5,M5=D5,N5=M5,F5=N5,vE=F5,dc=J(vE),B5=e_,L5=B5,j5=L5,z5=j5,H5=z5,W5=H5,pE=J(W5);function cc(t,n){var e;return cc=dc?pE(e=dc).call(e):function(i,a){return i.__proto__=a,i},cc(t,n)}function V5(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=T5(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Bu(t,"prototype",{writable:!1}),n&&cc(t,n)}function U5(t,n){if(n&&(at(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yi(t)}var G5=Az,K5=G5,q5=K5,Y5=q5,X5=Y5,gE=X5,am=J(gE);function vu(t){var n;return vu=dc?pE(n=am).call(n):function(r){return r.__proto__||am(r)},vu(t)}var yE={exports:{}},mE={exports:{}};(function(t){var n=Uv,e=Y0;function r(i){"@babel/helpers - typeof";return t.exports=r=typeof n=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof n=="function"&&a.constructor===n&&a!==n.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,r(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(mE);var Q5=mE.exports,J5=E_,Z5=J5,e4=Z5,t4=e4,r4=t4,i4=r4,om=He,n4=Yv,a4=Vi,o4=Rt,s4=function(t,n,e){for(var r=n4(n),i=o4.f,a=a4.f,o=0;o<r.length;o++){var s=r[o];!om(t,s)&&!(e&&om(e,s))&&i(t,s,a(n,s))}},u4=st,l4=Dr,h4=function(t,n){u4(n)&&"cause"in n&&l4(t,"cause",n.cause)},d4=$e,bE=Error,c4=d4("".replace),f4=function(t){return String(bE(t).stack)}("zxcasd"),$E=/\n\s*at [^:]*:[^\n]*/,v4=$E.test(f4),p4=function(t,n){if(v4&&typeof t=="string"&&!bE.prepareStackTrace)for(;n--;)t=c4(t,$E,"");return t},g4=fe,y4=Ui,m4=!g4(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",y4(1,7)),t.stack!==7):!0}),b4=Dr,$4=p4,w4=m4,sm=Error.captureStackTrace,_4=function(t,n,e,r){w4&&(sm?sm(t,n):b4(t,"stack",$4(e,r)))},E4=ui,S4=Qe,O4=Dt,T4=Qn,k4=n_,P4=Wt,um=Ue,I4=Kv,C4=el,lm=i_,x4=TypeError,Us=function(t,n){this.stopped=t,this.result=n},hm=Us.prototype,Xi=function(t,n,e){var r=e&&e.that,i=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=E4(n,r),l,h,d,c,f,v,p,$=function(y){return l&&lm(l,"normal",y),new Us(!0,y)},g=function(y){return i?(O4(y),s?u(y[0],y[1],$):u(y[0],y[1])):s?u(y,$):u(y)};if(a)l=t.iterator;else if(o)l=t;else{if(h=C4(t),!h)throw x4(T4(t)+" is not iterable");if(k4(h)){for(d=0,c=P4(t);c>d;d++)if(f=g(t[d]),f&&um(hm,f))return f;return new Us(!1)}l=I4(t,h)}for(v=a?t.next:l.next;!(p=S4(v,l)).done;){try{f=g(p.value)}catch(y){lm(l,"throw",y)}if(typeof f=="object"&&f&&um(hm,f))return f}return new Us(!1)},A4=Gi,R4=function(t,n){return t===void 0?arguments.length<2?"":n:A4(t)},D4=X,M4=Ue,N4=Qu,pu=L0,F4=s4,wE=Ki,mh=Dr,bh=Ui,B4=h4,L4=_4,j4=Xi,z4=R4,H4=Ie,W4=H4("toStringTag"),gu=Error,V4=[].push,Bn=function(n,e){var r=M4($h,this),i;pu?i=pu(gu(),r?N4(this):$h):(i=r?this:wE($h),mh(i,W4,"Error")),e!==void 0&&mh(i,"message",z4(e)),L4(i,Bn,i.stack,1),arguments.length>2&&B4(i,arguments[2]);var a=[];return j4(n,V4,{that:a}),mh(i,"errors",a),i};pu?pu(Bn,gu):F4(Bn,gu,{name:!0});var $h=Bn.prototype=wE(gu.prototype,{constructor:bh(1,Bn),message:bh(1,""),name:bh(1,"AggregateError")});D4({global:!0,constructor:!0,arity:2},{AggregateError:Bn});var U4=gt,G4=Nv,K4=Ie,q4=Xe,dm=K4("species"),_E=function(t){var n=U4(t);q4&&n&&!n[dm]&&G4(n,dm,{configurable:!0,get:function(){return this}})},Y4=Ue,X4=TypeError,ap=function(t,n){if(Y4(n,t))return t;throw X4("Incorrect invocation")},cm=Dt,Q4=lE,J4=ao,Z4=Ie,eH=Z4("species"),EE=function(t,n){var e=cm(t).constructor,r;return e===void 0||J4(r=cm(e)[eH])?n:Q4(r)},tH=si,SE=/(?:ipad|iphone|ipod).*applewebkit/i.test(tH),xt=Ne,rH=qn,iH=ui,fm=Pe,nH=He,OE=fe,vm=o0,aH=po,pm=Cv,oH=I_,sH=SE,uH=yo,fc=xt.setImmediate,vc=xt.clearImmediate,lH=xt.process,wh=xt.Dispatch,hH=xt.Function,gm=xt.MessageChannel,dH=xt.String,_h=0,xa={},ym="onreadystatechange",qa,gi,Eh,Sh;OE(function(){qa=xt.location});var op=function(t){if(nH(xa,t)){var n=xa[t];delete xa[t],n()}},Oh=function(t){return function(){op(t)}},mm=function(t){op(t.data)},bm=function(t){xt.postMessage(dH(t),qa.protocol+"//"+qa.host)};(!fc||!vc)&&(fc=function(n){oH(arguments.length,1);var e=fm(n)?n:hH(n),r=aH(arguments,1);return xa[++_h]=function(){rH(e,void 0,r)},gi(_h),_h},vc=function(n){delete xa[n]},uH?gi=function(t){lH.nextTick(Oh(t))}:wh&&wh.now?gi=function(t){wh.now(Oh(t))}:gm&&!sH?(Eh=new gm,Sh=Eh.port2,Eh.port1.onmessage=mm,gi=iH(Sh.postMessage,Sh)):xt.addEventListener&&fm(xt.postMessage)&&!xt.importScripts&&qa&&qa.protocol!=="file:"&&!OE(bm)?(gi=bm,xt.addEventListener("message",mm,!1)):ym in pm("script")?gi=function(t){vm.appendChild(pm("script"))[ym]=function(){vm.removeChild(this),op(t)}}:gi=function(t){setTimeout(Oh(t),0)});var TE={set:fc,clear:vc},kE=function(){this.head=null,this.tail=null};kE.prototype={add:function(t){var n={item:t,next:null},e=this.tail;e?e.next=n:this.head=n,this.tail=n},get:function(){var t=this.head;if(t){var n=this.head=t.next;return n===null&&(this.tail=null),t.item}}};var PE=kE,cH=si,fH=/ipad|iphone|ipod/i.test(cH)&&typeof Pebble<"u",vH=si,pH=/web0s(?!.*chrome)/i.test(vH),Li=Ne,$m=ui,gH=Vi.f,Th=TE.set,yH=PE,mH=SE,bH=fH,$H=pH,kh=yo,wm=Li.MutationObserver||Li.WebKitMutationObserver,_m=Li.document,Em=Li.process,vs=Li.Promise,Sm=gH(Li,"queueMicrotask"),pc=Sm&&Sm.value,ln,Ph,Ih,ps,Om;if(!pc){var gs=new yH,ys=function(){var t,n;for(kh&&(t=Em.domain)&&t.exit();n=gs.get();)try{n()}catch(e){throw gs.head&&ln(),e}t&&t.enter()};!mH&&!kh&&!$H&&wm&&_m?(Ph=!0,Ih=_m.createTextNode(""),new wm(ys).observe(Ih,{characterData:!0}),ln=function(){Ih.data=Ph=!Ph}):!bH&&vs&&vs.resolve?(ps=vs.resolve(void 0),ps.constructor=vs,Om=$m(ps.then,ps),ln=function(){Om(ys)}):kh?ln=function(){Em.nextTick(ys)}:(Th=$m(Th,Li),ln=function(){Th(ys)}),pc=function(t){gs.head||ln(),gs.add(t)}}var wH=pc,_H=function(t,n){try{arguments.length==1?console.error(t):console.error(t,n)}catch{}},aa=function(t){try{return{error:!1,value:t()}}catch(n){return{error:!0,value:n}}},EH=Ne,oa=EH.Promise,IE=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",SH=IE,OH=yo,TH=!SH&&!OH&&typeof window=="object"&&typeof document=="object",kH=Ne,Aa=oa,PH=Pe,IH=Kw,CH=Zw,xH=Ie,AH=TH,RH=IE,Ch=Yn,Tm=Aa&&Aa.prototype,DH=xH("species"),gc=!1,CE=PH(kH.PromiseRejectionEvent),MH=IH("Promise",function(){var t=CH(Aa),n=t!==String(Aa);if(!n&&Ch===66||!(Tm.catch&&Tm.finally))return!0;if(!Ch||Ch<51||!/native code/.test(t)){var e=new Aa(function(a){a(1)}),r=function(a){a(function(){},function(){})},i=e.constructor={};if(i[DH]=r,gc=e.then(function(){})instanceof r,!gc)return!0}return!n&&(AH||RH)&&!CE}),So={CONSTRUCTOR:MH,REJECTION_EVENT:CE,SUBCLASSING:gc},Nr={},km=Pt,NH=TypeError,FH=function(t){var n,e;this.promise=new t(function(r,i){if(n!==void 0||e!==void 0)throw NH("Bad Promise constructor");n=r,e=i}),this.resolve=km(n),this.reject=km(e)};Nr.f=function(t){return new FH(t)};var BH=X,yu=yo,ti=Ne,Oo=Qe,LH=ea,jH=qi,zH=_E,HH=Pt,yc=Pe,WH=st,VH=ap,UH=EE,xE=TE.set,sp=wH,GH=_H,KH=aa,qH=PE,AE=ta,mc=oa,RE=So,DE=Nr,ol="Promise",ME=RE.CONSTRUCTOR,YH=RE.REJECTION_EVENT,xh=AE.getterFor(ol),XH=AE.set,QH=mc&&mc.prototype,En=mc,Ah=QH,NE=ti.TypeError,bc=ti.document,up=ti.process,$c=DE.f,JH=$c,ZH=!!(bc&&bc.createEvent&&ti.dispatchEvent),FE="unhandledrejection",eW="rejectionhandled",Pm=0,BE=1,tW=2,lp=1,LE=2,ms,Im,rW,jE=function(t){var n;return WH(t)&&yc(n=t.then)?n:!1},zE=function(t,n){var e=n.value,r=n.state==BE,i=r?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,u,l,h;try{i?(r||(n.rejection===LE&&nW(n),n.rejection=lp),i===!0?u=e:(s&&s.enter(),u=i(e),s&&(s.exit(),h=!0)),u===t.promise?o(NE("Promise-chain cycle")):(l=jE(u))?Oo(l,u,a,o):a(u)):o(e)}catch(d){s&&!h&&s.exit(),o(d)}},HE=function(t,n){t.notified||(t.notified=!0,sp(function(){for(var e=t.reactions,r;r=e.get();)zE(r,t);t.notified=!1,n&&!t.rejection&&iW(t)}))},WE=function(t,n,e){var r,i;ZH?(r=bc.createEvent("Event"),r.promise=n,r.reason=e,r.initEvent(t,!1,!0),ti.dispatchEvent(r)):r={promise:n,reason:e},!YH&&(i=ti["on"+t])?i(r):t===FE&&GH("Unhandled promise rejection",e)},iW=function(t){Oo(xE,ti,function(){var n=t.facade,e=t.value,r=Cm(t),i;if(r&&(i=KH(function(){yu?up.emit("unhandledRejection",e,n):WE(FE,n,e)}),t.rejection=yu||Cm(t)?LE:lp,i.error))throw i.value})},Cm=function(t){return t.rejection!==lp&&!t.parent},nW=function(t){Oo(xE,ti,function(){var n=t.facade;yu?up.emit("rejectionHandled",n):WE(eW,n,t.value)})},Sn=function(t,n,e){return function(r){t(n,r,e)}},In=function(t,n,e){t.done||(t.done=!0,e&&(t=e),t.value=n,t.state=tW,HE(t,!0))},wc=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw NE("Promise can't be resolved itself");var r=jE(n);r?sp(function(){var i={done:!1};try{Oo(r,n,Sn(wc,i,t),Sn(In,i,t))}catch(a){In(i,a,t)}}):(t.value=n,t.state=BE,HE(t,!1))}catch(i){In({done:!1},i,t)}}};ME&&(En=function(n){VH(this,Ah),HH(n),Oo(ms,this);var e=xh(this);try{n(Sn(wc,e),Sn(In,e))}catch(r){In(e,r)}},Ah=En.prototype,ms=function(n){XH(this,{type:ol,done:!1,notified:!1,parent:!1,reactions:new qH,rejection:!1,state:Pm,value:void 0})},ms.prototype=LH(Ah,"then",function(n,e){var r=xh(this),i=$c(UH(this,En));return r.parent=!0,i.ok=yc(n)?n:!0,i.fail=yc(e)&&e,i.domain=yu?up.domain:void 0,r.state==Pm?r.reactions.add(i):sp(function(){zE(i,r)}),i.promise}),Im=function(){var t=new ms,n=xh(t);this.promise=t,this.resolve=Sn(wc,n),this.reject=Sn(In,n)},DE.f=$c=function(t){return t===En||t===rW?new Im(t):JH(t)});BH({global:!0,constructor:!0,wrap:!0,forced:ME},{Promise:En});jH(En,ol,!1,!0);zH(ol);var aW=oa,oW=s_,sW=So.CONSTRUCTOR,sl=sW||!oW(function(t){aW.all(t).then(void 0,function(){})}),uW=X,lW=Qe,hW=Pt,dW=Nr,cW=aa,fW=Xi,vW=sl;uW({target:"Promise",stat:!0,forced:vW},{all:function(n){var e=this,r=dW.f(e),i=r.resolve,a=r.reject,o=cW(function(){var s=hW(e.resolve),u=[],l=0,h=1;fW(n,function(d){var c=l++,f=!1;h++,lW(s,e,d).then(function(v){f||(f=!0,u[c]=v,--h||i(u))},a)}),--h||i(u)});return o.error&&a(o.value),r.promise}});var pW=X,gW=So.CONSTRUCTOR,xm=oa;xm&&xm.prototype;pW({target:"Promise",proto:!0,forced:gW,real:!0},{catch:function(t){return this.then(void 0,t)}});var yW=X,mW=Qe,bW=Pt,$W=Nr,wW=aa,_W=Xi,EW=sl;yW({target:"Promise",stat:!0,forced:EW},{race:function(n){var e=this,r=$W.f(e),i=r.reject,a=wW(function(){var o=bW(e.resolve);_W(n,function(s){mW(o,e,s).then(r.resolve,i)})});return a.error&&i(a.value),r.promise}});var SW=X,OW=Qe,TW=Nr,kW=So.CONSTRUCTOR;SW({target:"Promise",stat:!0,forced:kW},{reject:function(n){var e=TW.f(this);return OW(e.reject,void 0,n),e.promise}});var PW=Dt,IW=st,CW=Nr,VE=function(t,n){if(PW(t),IW(n)&&n.constructor===t)return n;var e=CW.f(t),r=e.resolve;return r(n),e.promise},xW=X,AW=gt,RW=oI,DW=oa,MW=So.CONSTRUCTOR,NW=VE,FW=AW("Promise"),BW=!MW;xW({target:"Promise",stat:!0,forced:RW},{resolve:function(n){return NW(BW&&this===FW?DW:this,n)}});var LW=X,jW=Qe,zW=Pt,HW=Nr,WW=aa,VW=Xi,UW=sl;LW({target:"Promise",stat:!0,forced:UW},{allSettled:function(n){var e=this,r=HW.f(e),i=r.resolve,a=r.reject,o=WW(function(){var s=zW(e.resolve),u=[],l=0,h=1;VW(n,function(d){var c=l++,f=!1;h++,jW(s,e,d).then(function(v){f||(f=!0,u[c]={status:"fulfilled",value:v},--h||i(u))},function(v){f||(f=!0,u[c]={status:"rejected",reason:v},--h||i(u))})}),--h||i(u)});return o.error&&a(o.value),r.promise}});var GW=X,KW=Qe,qW=Pt,YW=gt,XW=Nr,QW=aa,JW=Xi,ZW=sl,Am="No one promise resolved";GW({target:"Promise",stat:!0,forced:ZW},{any:function(n){var e=this,r=YW("AggregateError"),i=XW.f(e),a=i.resolve,o=i.reject,s=QW(function(){var u=qW(e.resolve),l=[],h=0,d=1,c=!1;JW(n,function(f){var v=h++,p=!1;d++,KW(u,e,f).then(function($){p||c||(c=!0,a($))},function($){p||c||(p=!0,l[v]=$,--d||o(new r(l,Am)))})}),--d||o(new r(l,Am))});return s.error&&o(s.value),i.promise}});var e6=X,_c=oa,t6=fe,r6=gt,i6=Pe,n6=EE,Rm=VE,a6=_c&&_c.prototype,o6=!!_c&&t6(function(){a6.finally.call({then:function(){}},function(){})});e6({target:"Promise",proto:!0,real:!0,forced:o6},{finally:function(t){var n=n6(this,r6("Promise")),e=i6(t);return this.then(e?function(r){return Rm(n,t()).then(function(){return r})}:t,e?function(r){return Rm(n,t()).then(function(){throw r})}:t)}});var s6=_e,u6=s6.Promise,l6=u6,h6=l6,d6=h6,c6=d6,f6=X,v6=Nr,p6=aa;f6({target:"Promise",stat:!0,forced:!0},{try:function(t){var n=v6.f(this),e=p6(t);return(e.error?n.reject:n.resolve)(e.value),n.promise}});var g6=c6,y6=g6,m6=y6,b6=m6,$6=S_,w6=$6,_6=w6,E6=_6,S6=E6,O6=S6;(function(t){var n=Q5.default,e=Qw,r=Uv,i=fE,a=gE,o=i4,s=vE,u=b6,l=O6,h=b_;function d(){t.exports=d=function(){return c},t.exports.__esModule=!0,t.exports.default=t.exports;var c={},f=Object.prototype,v=f.hasOwnProperty,p=e||function(R,I,D){R[I]=D.value},$=typeof r=="function"?r:{},g=$.iterator||"@@iterator",y=$.asyncIterator||"@@asyncIterator",b=$.toStringTag||"@@toStringTag";function m(R,I,D){return e(R,I,{value:D,enumerable:!0,configurable:!0,writable:!0}),R[I]}try{m({},"")}catch{m=function(D,j,U){return D[j]=U}}function w(R,I,D,j){var U=I&&I.prototype instanceof O?I:O,q=i(U.prototype),Re=new rt(j||[]);return p(q,"_invoke",{value:le(R,D,Re)}),q}function E(R,I,D){try{return{type:"normal",arg:R.call(I,D)}}catch(j){return{type:"throw",arg:j}}}c.wrap=w;var T={};function O(){}function _(){}function S(){}var C={};m(C,g,function(){return this});var L=a,B=L&&L(L(we([])));B&&B!==f&&v.call(B,g)&&(C=B);var Q=S.prototype=O.prototype=i(C);function ne(R){var I;o(I=["next","throw","return"]).call(I,function(D){m(R,D,function(j){return this._invoke(D,j)})})}function ie(R,I){function D(U,q,Re,ht){var mt=E(R[U],R,q);if(mt.type!=="throw"){var vi=mt.arg,Lr=vi.value;return Lr&&n(Lr)=="object"&&v.call(Lr,"__await")?I.resolve(Lr.__await).then(function(pi){D("next",pi,Re,ht)},function(pi){D("throw",pi,Re,ht)}):I.resolve(Lr).then(function(pi){vi.value=pi,Re(vi)},function(pi){return D("throw",pi,Re,ht)})}ht(mt.arg)}var j;p(this,"_invoke",{value:function(q,Re){function ht(){return new I(function(mt,vi){D(q,Re,mt,vi)})}return j=j?j.then(ht,ht):ht()}})}function le(R,I,D){var j="suspendedStart";return function(U,q){if(j==="executing")throw new Error("Generator is already running");if(j==="completed"){if(U==="throw")throw q;return Ae()}for(D.method=U,D.arg=q;;){var Re=D.delegate;if(Re){var ht=be(Re,D);if(ht){if(ht===T)continue;return ht}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(j==="suspendedStart")throw j="completed",D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);j="executing";var mt=E(R,I,D);if(mt.type==="normal"){if(j=D.done?"completed":"suspendedYield",mt.arg===T)continue;return{value:mt.arg,done:D.done}}mt.type==="throw"&&(j="completed",D.method="throw",D.arg=mt.arg)}}}function be(R,I){var D=I.method,j=R.iterator[D];if(j===void 0)return I.delegate=null,D==="throw"&&R.iterator.return&&(I.method="return",I.arg=void 0,be(R,I),I.method==="throw")||D!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+D+"' method")),T;var U=E(j,R.iterator,I.arg);if(U.type==="throw")return I.method="throw",I.arg=U.arg,I.delegate=null,T;var q=U.arg;return q?q.done?(I[R.resultName]=q.value,I.next=R.nextLoc,I.method!=="return"&&(I.method="next",I.arg=void 0),I.delegate=null,T):q:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,T)}function Ee(R){var I={tryLoc:R[0]};1 in R&&(I.catchLoc=R[1]),2 in R&&(I.finallyLoc=R[2],I.afterLoc=R[3]),this.tryEntries.push(I)}function ar(R){var I=R.completion||{};I.type="normal",delete I.arg,R.completion=I}function rt(R){this.tryEntries=[{tryLoc:"root"}],o(R).call(R,Ee,this),this.reset(!0)}function we(R){if(R){var I=R[g];if(I)return I.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var D=-1,j=function U(){for(;++D<R.length;)if(v.call(R,D))return U.value=R[D],U.done=!1,U;return U.value=void 0,U.done=!0,U};return j.next=j}}return{next:Ae}}function Ae(){return{value:void 0,done:!0}}return _.prototype=S,p(Q,"constructor",{value:S,configurable:!0}),p(S,"constructor",{value:_,configurable:!0}),_.displayName=m(S,b,"GeneratorFunction"),c.isGeneratorFunction=function(R){var I=typeof R=="function"&&R.constructor;return!!I&&(I===_||(I.displayName||I.name)==="GeneratorFunction")},c.mark=function(R){return s?s(R,S):(R.__proto__=S,m(R,b,"GeneratorFunction")),R.prototype=i(Q),R},c.awrap=function(R){return{__await:R}},ne(ie.prototype),m(ie.prototype,y,function(){return this}),c.AsyncIterator=ie,c.async=function(R,I,D,j,U){U===void 0&&(U=u);var q=new ie(w(R,I,D,j),U);return c.isGeneratorFunction(I)?q:q.next().then(function(Re){return Re.done?Re.value:q.next()})},ne(Q),m(Q,b,"Generator"),m(Q,g,function(){return this}),m(Q,"toString",function(){return"[object Generator]"}),c.keys=function(R){var I=Object(R),D=[];for(var j in I)D.push(j);return l(D).call(D),function U(){for(;D.length;){var q=D.pop();if(q in I)return U.value=q,U.done=!1,U}return U.done=!0,U}},c.values=we,rt.prototype={constructor:rt,reset:function(I){var D;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,o(D=this.tryEntries).call(D,ar),!I)for(var j in this)j.charAt(0)==="t"&&v.call(this,j)&&!isNaN(+h(j).call(j,1))&&(this[j]=void 0)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var D=this;function j(vi,Lr){return Re.type="throw",Re.arg=I,D.next=vi,Lr&&(D.method="next",D.arg=void 0),!!Lr}for(var U=this.tryEntries.length-1;U>=0;--U){var q=this.tryEntries[U],Re=q.completion;if(q.tryLoc==="root")return j("end");if(q.tryLoc<=this.prev){var ht=v.call(q,"catchLoc"),mt=v.call(q,"finallyLoc");if(ht&&mt){if(this.prev<q.catchLoc)return j(q.catchLoc,!0);if(this.prev<q.finallyLoc)return j(q.finallyLoc)}else if(ht){if(this.prev<q.catchLoc)return j(q.catchLoc,!0)}else{if(!mt)throw new Error("try statement without catch or finally");if(this.prev<q.finallyLoc)return j(q.finallyLoc)}}}},abrupt:function(I,D){for(var j=this.tryEntries.length-1;j>=0;--j){var U=this.tryEntries[j];if(U.tryLoc<=this.prev&&v.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var q=U;break}}q&&(I==="break"||I==="continue")&&q.tryLoc<=D&&D<=q.finallyLoc&&(q=null);var Re=q?q.completion:{};return Re.type=I,Re.arg=D,q?(this.method="next",this.next=q.finallyLoc,T):this.complete(Re)},complete:function(I,D){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&D&&(this.next=D),T},finish:function(I){for(var D=this.tryEntries.length-1;D>=0;--D){var j=this.tryEntries[D];if(j.finallyLoc===I)return this.complete(j.completion,j.afterLoc),ar(j),T}},catch:function(I){for(var D=this.tryEntries.length-1;D>=0;--D){var j=this.tryEntries[D];if(j.tryLoc===I){var U=j.completion;if(U.type==="throw"){var q=U.arg;ar(j)}return q}}throw new Error("illegal catch attempt")},delegateYield:function(I,D,j){return this.delegate={iterator:we(I),resultName:D,nextLoc:j},this.method==="next"&&(this.arg=void 0),T}},c}t.exports=d,t.exports.__esModule=!0,t.exports.default=t.exports})(yE);var T6=yE.exports,Gs=T6(),k6=Gs;try{regeneratorRuntime=Gs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Gs:Function("r","regeneratorRuntime = r")(Gs)}var $t=J(k6),UE={exports:{}},P6=fe,I6=P6(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),C6=fe,x6=st,A6=oi,Dm=I6,Ks=Object.isExtensible,R6=C6(function(){Ks(1)}),D6=R6||Dm?function(n){return!x6(n)||Dm&&A6(n)=="ArrayBuffer"?!1:Ks?Ks(n):!0}:Ks,M6=fe,N6=!M6(function(){return Object.isExtensible(Object.preventExtensions({}))}),F6=X,B6=$e,L6=lo,j6=st,hp=He,z6=Rt.f,Mm=ho,H6=Mv,dp=D6,W6=Nu,V6=N6,GE=!1,xr=W6("meta"),U6=0,cp=function(t){z6(t,xr,{value:{objectID:"O"+U6++,weakData:{}}})},G6=function(t,n){if(!j6(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!hp(t,xr)){if(!dp(t))return"F";if(!n)return"E";cp(t)}return t[xr].objectID},K6=function(t,n){if(!hp(t,xr)){if(!dp(t))return!0;if(!n)return!1;cp(t)}return t[xr].weakData},q6=function(t){return V6&&GE&&dp(t)&&!hp(t,xr)&&cp(t),t},Y6=function(){X6.enable=function(){},GE=!0;var t=Mm.f,n=B6([].splice),e={};e[xr]=1,t(e).length&&(Mm.f=function(r){for(var i=t(r),a=0,o=i.length;a<o;a++)if(i[a]===xr){n(i,a,1);break}return i},F6({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:H6.f}))},X6=UE.exports={enable:Y6,fastKey:G6,getWeakData:K6,onFreeze:q6};L6[xr]=!0;var KE=UE.exports,Q6=X,J6=Ne,Z6=KE,eV=fe,tV=Dr,rV=Xi,iV=ap,nV=Pe,aV=st,oV=qi,sV=Rt.f,uV=ra.forEach,lV=Xe,qE=ta,hV=qE.set,dV=qE.getterFor,YE=function(t,n,e){var r=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,a=r?"set":"add",o=J6[t],s=o&&o.prototype,u={},l;if(!lV||!nV(o)||!(i||s.forEach&&!eV(function(){new o().entries().next()})))l=e.getConstructor(n,t,r,a),Z6.enable();else{l=n(function(c,f){hV(iV(c,h),{type:t,collection:new o}),f!=null&&rV(f,c[a],{that:c,AS_ENTRIES:r})});var h=l.prototype,d=dV(t);uV(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(c){var f=c=="add"||c=="set";c in s&&!(i&&c=="clear")&&tV(h,c,function(v,p){var $=d(this).collection;if(!f&&i&&!aV(v))return c=="get"?void 0:!1;var g=$[c](v===0?0:v,p);return f?this:g})}),i||sV(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return oV(l,t,!1,!0),u[t]=l,Q6({global:!0,forced:!0},u),i||e.setStrong(l,t,r),l},cV=ea,fV=function(t,n,e){for(var r in n)e&&e.unsafe&&t[r]?t[r]=n[r]:cV(t,r,n[r],e);return t},vV=Ki,pV=Nv,Nm=fV,gV=ui,yV=ap,mV=ao,bV=Xi,$V=Wv,bs=Vv,wV=_E,ba=Xe,Fm=KE.fastKey,XE=ta,Bm=XE.set,Rh=XE.getterFor,QE={getConstructor:function(t,n,e,r){var i=t(function(l,h){yV(l,a),Bm(l,{type:n,index:vV(null),first:void 0,last:void 0,size:0}),ba||(l.size=0),mV(h)||bV(h,l[r],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=Rh(n),s=function(l,h,d){var c=o(l),f=u(l,h),v,p;return f?f.value=d:(c.last=f={index:p=Fm(h,!0),key:h,value:d,previous:v=c.last,next:void 0,removed:!1},c.first||(c.first=f),v&&(v.next=f),ba?c.size++:l.size++,p!=="F"&&(c.index[p]=f)),l},u=function(l,h){var d=o(l),c=Fm(h),f;if(c!=="F")return d.index[c];for(f=d.first;f;f=f.next)if(f.key==h)return f};return Nm(a,{clear:function(){for(var h=this,d=o(h),c=d.index,f=d.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;d.first=d.last=void 0,ba?d.size=0:h.size=0},delete:function(l){var h=this,d=o(h),c=u(h,l);if(c){var f=c.next,v=c.previous;delete d.index[c.index],c.removed=!0,v&&(v.next=f),f&&(f.previous=v),d.first==c&&(d.first=f),d.last==c&&(d.last=v),ba?d.size--:h.size--}return!!c},forEach:function(h){for(var d=o(this),c=gV(h,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!u(this,h)}}),Nm(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),ba&&pV(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,n,e){var r=n+" Iterator",i=Rh(n),a=Rh(r);$V(t,n,function(o,s){Bm(this,{type:r,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,bs(void 0,!0)):s=="keys"?bs(u.key,!1):s=="values"?bs(u.value,!1):bs([u.key,u.value],!1)},e?"entries":"values",!e,!0),wV(n)}},_V=YE,EV=QE;_V("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},EV);var SV=_e,OV=SV.Map,TV=OV,kV=TV,PV=kV,JE=J(PV),IV=X,CV=ra.some,xV=Zu,AV=xV("some");IV({target:"Array",proto:!0,forced:!AV},{some:function(n){return CV(this,n,arguments.length>1?arguments[1]:void 0)}});var RV=yt,DV=RV("Array").some,MV=Ue,NV=DV,Dh=Array.prototype,FV=function(t){var n=t.some;return t===Dh||MV(Dh,t)&&n===Dh.some?NV:n},BV=FV,LV=BV,jV=LV,zV=J(jV),HV=yt,WV=HV("Array").keys,VV=WV,UV=VV,GV=Mr,KV=He,qV=Ue,YV=UV,Mh=Array.prototype,XV={DOMTokenList:!0,NodeList:!0},QV=function(t){var n=t.keys;return t===Mh||qV(Mh,t)&&n===Mh.keys||KV(XV,GV(t))?YV:n},JV=QV,hn=J(JV),Lm=l0,ZV=Math.floor,Ec=function(t,n){var e=t.length,r=ZV(e/2);return e<8?e8(t,n):t8(t,Ec(Lm(t,0,r),n),Ec(Lm(t,r),n),n)},e8=function(t,n){for(var e=t.length,r=1,i,a;r<e;){for(a=r,i=t[r];a&&n(t[a-1],i)>0;)t[a]=t[--a];a!==r++&&(t[a]=i)}return t},t8=function(t,n,e,r){for(var i=n.length,a=e.length,o=0,s=0;o<i||s<a;)t[o+s]=o<i&&s<a?r(n[o],e[s])<=0?n[o++]:e[s++]:o<i?n[o++]:e[s++];return t},r8=Ec,i8=si,jm=i8.match(/firefox\/(\d+)/i),n8=!!jm&&+jm[1],a8=si,o8=/MSIE|Trident/.test(a8),s8=si,zm=s8.match(/AppleWebKit\/(\d+)\./),u8=!!zm&&+zm[1],l8=X,ZE=$e,h8=Pt,d8=At,Hm=Wt,c8=O_,Wm=Gi,fp=fe,f8=r8,v8=Zu,Vm=n8,p8=o8,Um=Yn,Gm=u8,Kr=[],Km=ZE(Kr.sort),g8=ZE(Kr.push),y8=fp(function(){Kr.sort(void 0)}),m8=fp(function(){Kr.sort(null)}),b8=v8("sort"),eS=!fp(function(){if(Um)return Um<70;if(!(Vm&&Vm>3)){if(p8)return!0;if(Gm)return Gm<603;var t="",n,e,r,i;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)Kr.push({k:e+i,v:r})}for(Kr.sort(function(a,o){return o.v-a.v}),i=0;i<Kr.length;i++)e=Kr[i].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),$8=y8||!m8||!b8||!eS,w8=function(t){return function(n,e){return e===void 0?-1:n===void 0?1:t!==void 0?+t(n,e)||0:Wm(n)>Wm(e)?1:-1}};l8({target:"Array",proto:!0,forced:$8},{sort:function(n){n!==void 0&&h8(n);var e=d8(this);if(eS)return n===void 0?Km(e):Km(e,n);var r=[],i=Hm(e),a,o;for(o=0;o<i;o++)o in e&&g8(r,e[o]);for(f8(r,w8(n)),a=Hm(r),o=0;o<a;)e[o]=r[o++];for(;o<i;)c8(e,o++);return e}});var _8=yt,E8=_8("Array").sort,S8=Ue,O8=E8,Nh=Array.prototype,T8=function(t){var n=t.sort;return t===Nh||S8(Nh,t)&&n===Nh.sort?O8:n},k8=T8,P8=k8,I8=P8,Sc=J(I8),C8=yt,x8=C8("Array").values,A8=x8,R8=A8,D8=Mr,M8=He,N8=Ue,F8=R8,Fh=Array.prototype,B8={DOMTokenList:!0,NodeList:!0},L8=function(t){var n=t.values;return t===Fh||N8(Fh,t)&&n===Fh.values||M8(B8,D8(t))?F8:n},j8=L8,qm=J(j8),z8=q0,Cn=J(z8),H8=yt,W8=H8("Array").entries,V8=W8,U8=V8,G8=Mr,K8=He,q8=Ue,Y8=U8,Bh=Array.prototype,X8={DOMTokenList:!0,NodeList:!0},Q8=function(t){var n=t.entries;return t===Bh||q8(Bh,t)&&n===Bh.entries||K8(X8,G8(t))?Y8:n},J8=Q8,Z8=J(J8);let $s;const eU=new Uint8Array(16);function tU(){if(!$s&&($s=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$s))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $s(eU)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function rU(t,n=0){return it[t[n+0]]+it[t[n+1]]+it[t[n+2]]+it[t[n+3]]+"-"+it[t[n+4]]+it[t[n+5]]+"-"+it[t[n+6]]+it[t[n+7]]+"-"+it[t[n+8]]+it[t[n+9]]+"-"+it[t[n+10]]+it[t[n+11]]+it[t[n+12]]+it[t[n+13]]+it[t[n+14]]+it[t[n+15]]}const iU=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ym={randomUUID:iU};function nU(t,n,e){if(Ym.randomUUID&&!n&&!t)return Ym.randomUUID();t=t||{};const r=t.random||(t.rng||tU)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,n){e=e||0;for(let i=0;i<16;++i)n[e+i]=r[i];return n}return rU(r)}function Xm(t){return typeof t=="string"||typeof t=="number"}var aU=function(){function t(n){Ru(this,t),De(this,"delay",void 0),De(this,"max",void 0),De(this,"_queue",[]),De(this,"_timeout",null),De(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ju(t,[{key:"setOptions",value:function(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,r=this._extended.methods,i=0;i<r.length;i++){var a=r[i];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,r){var i=this,a=e[r];if(!a)throw new Error("Method "+r+" undefined");e[r]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];i.queue({args:s,fn:a,context:this})}}},{key:"queue",value:function(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=d3(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,r;Mi(e=T_(r=this._queue).call(r,0)).call(e,function(i){i.fn.apply(i.context||i.fn,i.args||[])})}}],[{key:"extend",value:function(e,r){var i=new t(r);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){i.flush()};var a=[{name:"flush",original:void 0}];if(r&&r.replace)for(var o=0;o<r.replace.length;o++){var s=r.replace[o];a.push({name:s,original:e[s]}),i.replace(e,s)}return i._extended={object:e,methods:a},i}}]),t}(),oU=function(){function t(){Ru(this,t),De(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),De(this,"subscribe",t.prototype.on),De(this,"unsubscribe",t.prototype.off)}return Ju(t,[{key:"_trigger",value:function(e,r,i){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Mi(a=rl(o=[]).call(o,Et(this._subscribers[e]),Et(this._subscribers["*"]))).call(a,function(s){s(e,r,i??null)})}},{key:"on",value:function(e,r){typeof r=="function"&&this._subscribers[e].push(r)}},{key:"off",value:function(e,r){var i;this._subscribers[e]=$n(i=this._subscribers[e]).call(i,function(a){return a!==r})}}]),t}(),sU=YE,uU=QE;sU("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},uU);var lU=_e,hU=lU.Set,dU=hU,cU=dU,fU=cU,Lh=J(fU),vU=Kv,pU=vU,gU=pU,yU=gU,mU=yU,bU=mU,$U=bU,wU=$U,_U=wU,EU=_U,jh=J(EU),tS;function sr(t,n){var e=typeof tl<"u"&&mo(t)||t["@@iterator"];if(!e){if(Ct(t)||(e=SU(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
36
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function SU(t,n){var e;if(t){if(typeof t=="string")return Qm(t,n);var r=il(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return qv(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qm(t,n)}}function Qm(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}tS=Cn;var Jm=function(){function t(n){Ru(this,t),De(this,"_pairs",void 0),this._pairs=n}return Ju(t,[{key:tS,value:$t.mark(function n(){var e,r,i,a,o;return $t.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=sr(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return i=bt(r.value,2),a=i[0],o=i[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"entries",value:$t.mark(function n(){var e,r,i,a,o;return $t.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=sr(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return i=bt(r.value,2),a=i[0],o=i[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"keys",value:$t.mark(function n(){var e,r,i,a;return $t.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=sr(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return i=bt(r.value,1),a=i[0],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"values",value:$t.mark(function n(){var e,r,i,a;return $t.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=sr(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return i=bt(r.value,2),a=i[1],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var e;return Yt(e=Et(this._pairs)).call(e,function(r){return r[0]})}},{key:"toItemArray",value:function(){var e;return Yt(e=Et(this._pairs)).call(e,function(r){return r[1]})}},{key:"toEntryArray",value:function(){return Et(this._pairs)}},{key:"toObjectMap",value:function(){var e=zz(null),r=sr(this._pairs),i;try{for(r.s();!(i=r.n()).done;){var a=bt(i.value,2),o=a[0],s=a[1];e[o]=s}}catch(u){r.e(u)}finally{r.f()}return e}},{key:"toMap",value:function(){return new JE(this._pairs)}},{key:"toIdSet",value:function(){return new Lh(this.toIdArray())}},{key:"toItemSet",value:function(){return new Lh(this.toItemArray())}},{key:"cache",value:function(){return new t(Et(this._pairs))}},{key:"distinct",value:function(e){var r=new Lh,i=sr(this._pairs),a;try{for(i.s();!(a=i.n()).done;){var o=bt(a.value,2),s=o[0],u=o[1];r.add(e(u,s))}}catch(l){i.e(l)}finally{i.f()}return r}},{key:"filter",value:function(e){var r=this._pairs;return new t(De({},Cn,$t.mark(function i(){var a,o,s,u,l;return $t.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:a=sr(r),d.prev=1,a.s();case 3:if((o=a.n()).done){d.next=10;break}if(s=bt(o.value,2),u=s[0],l=s[1],!e(l,u)){d.next=8;break}return d.next=8,[u,l];case 8:d.next=3;break;case 10:d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),a.e(d.t0);case 15:return d.prev=15,a.f(),d.finish(15);case 18:case"end":return d.stop()}},i,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(e){var r=sr(this._pairs),i;try{for(r.s();!(i=r.n()).done;){var a=bt(i.value,2),o=a[0],s=a[1];e(s,o)}}catch(u){r.e(u)}finally{r.f()}}},{key:"map",value:function(e){var r=this._pairs;return new t(De({},Cn,$t.mark(function i(){var a,o,s,u,l;return $t.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:a=sr(r),d.prev=1,a.s();case 3:if((o=a.n()).done){d.next=9;break}return s=bt(o.value,2),u=s[0],l=s[1],d.next=7,[u,e(l,u)];case 7:d.next=3;break;case 9:d.next=14;break;case 11:d.prev=11,d.t0=d.catch(1),a.e(d.t0);case 14:return d.prev=14,a.f(),d.finish(14);case 17:case"end":return d.stop()}},i,null,[[1,11,14,17]])})))}},{key:"max",value:function(e){var r=jh(this._pairs),i=r.next();if(i.done)return null;for(var a=i.value[1],o=e(i.value[1],i.value[0]);!(i=r.next()).done;){var s=bt(i.value,2),u=s[0],l=s[1],h=e(l,u);h>o&&(o=h,a=l)}return a}},{key:"min",value:function(e){var r=jh(this._pairs),i=r.next();if(i.done)return null;for(var a=i.value[1],o=e(i.value[1],i.value[0]);!(i=r.next()).done;){var s=bt(i.value,2),u=s[0],l=s[1],h=e(l,u);h<o&&(o=h,a=l)}return a}},{key:"reduce",value:function(e,r){var i=sr(this._pairs),a;try{for(i.s();!(a=i.n()).done;){var o=bt(a.value,2),s=o[0],u=o[1];r=e(r,u,s)}}catch(l){i.e(l)}finally{i.f()}return r}},{key:"sort",value:function(e){var r=this;return new t(De({},Cn,function(){var i;return jh(Sc(i=Et(r._pairs)).call(i,function(a,o){var s=bt(a,2),u=s[0],l=s[1],h=bt(o,2),d=h[0],c=h[1];return e(l,c,u,d)}))}))}}]),t}();function Zm(t,n){var e=Xv(t);if(xy){var r=xy(t);n&&(r=$n(r).call(r,function(i){return f_(t,i).enumerable})),e.push.apply(e,r)}return e}function eb(t){for(var n=1;n<arguments.length;n++){var e,r,i=arguments[n]!=null?arguments[n]:{};n%2?Mi(e=Zm(Object(i),!0)).call(e,function(a){De(t,a,i[a])}):Ay?FB(t,Ay(i)):Mi(r=Zm(Object(i))).call(r,function(a){LB(t,a,f_(i,a))})}return t}function zh(t,n){var e=typeof tl<"u"&&mo(t)||t["@@iterator"];if(!e){if(Ct(t)||(e=OU(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
37
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function OU(t,n){var e;if(t){if(typeof t=="string")return tb(t,n);var r=il(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return qv(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tb(t,n)}}function tb(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function TU(t){var n=kU();return function(){var r=vu(t),i;if(n){var a=vu(this).constructor;i=Vs(r,arguments,a)}else i=r.apply(this,arguments);return U5(this,i)}}function kU(){if(typeof Reflect>"u"||!Vs||Vs.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Vs(Boolean,[],function(){})),!0}catch{return!1}}function PU(t,n){return t[n]==null&&(t[n]=nU()),t}var mu=function(t){V5(e,t);var n=TU(e);function e(r,i){var a;return Ru(this,e),a=n.call(this),De(yi(a),"flush",void 0),De(yi(a),"length",void 0),De(yi(a),"_options",void 0),De(yi(a),"_data",void 0),De(yi(a),"_idProp",void 0),De(yi(a),"_queue",null),r&&!Ct(r)&&(i=r,r=[]),a._options=i||{},a._data=new JE,a.length=0,a._idProp=a._options.fieldId||"id",r&&r.length&&a.add(r),a.setOptions(i),a}return Ju(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(i){i&&i.queue!==void 0&&(i.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=aU.extend(this,{replace:["add","update","remove"]})),i.queue&&at(i.queue)==="object"&&this._queue.setOptions(i.queue)))}},{key:"add",value:function(i,a){var o=this,s=[],u;if(Ct(i)){var l=Yt(i).call(i,function(c){return c[o._idProp]});if(zV(l).call(l,function(c){return o._data.has(c)}))throw new Error("A duplicate id was found in the parameter array.");for(var h=0,d=i.length;h<d;h++)u=this._addItem(i[h]),s.push(u)}else if(i&&at(i)==="object")u=this._addItem(i),s.push(u);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(i,a){var o=this,s=[],u=[],l=[],h=[],d=this._idProp,c=function(g){var y=g[d];if(y!=null&&o._data.has(y)){var b=g,m=Ez({},o._data.get(y)),w=o._updateItem(b);u.push(w),h.push(b),l.push(m)}else{var E=o._addItem(g);s.push(E)}};if(Ct(i))for(var f=0,v=i.length;f<v;f++)i[f]&&at(i[f])==="object"?c(i[f]):console.warn("Ignoring input item, which is not an object at index "+f);else if(i&&at(i)==="object")c(i);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),u.length){var p={items:u,oldData:l,data:h};this._trigger("update",p,a)}return rl(s).call(s,u)}},{key:"updateOnly",value:function(i,a){var o,s=this;Ct(i)||(i=[i]);var u=Yt(o=Yt(i).call(i,function(h){var d=s._data.get(h[s._idProp]);if(d==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:d,update:h}})).call(o,function(h){var d=h.oldData,c=h.update,f=d[s._idProp],v=r5(d,c);return s._data.set(f,v),{id:f,oldData:d,updatedData:v}});if(u.length){var l={items:Yt(u).call(u,function(h){return h.id}),oldData:Yt(u).call(u,function(h){return h.oldData}),data:Yt(u).call(u,function(h){return h.updatedData})};return this._trigger("update",l,a),l.items}else return[]}},{key:"get",value:function(i,a){var o=void 0,s=void 0,u=void 0;Xm(i)?(o=i,u=a):Ct(i)?(s=i,u=a):u=i;var l=u&&u.returnType==="Object"?"Object":"Array",h=u&&$n(u),d=[],c=void 0,f=void 0,v=void 0;if(o!=null)c=this._data.get(o),c&&h&&!h(c)&&(c=void 0);else if(s!=null)for(var p=0,$=s.length;p<$;p++)c=this._data.get(s[p]),c!=null&&(!h||h(c))&&d.push(c);else{var g;f=Et(hn(g=this._data).call(g));for(var y=0,b=f.length;y<b;y++)v=f[y],c=this._data.get(v),c!=null&&(!h||h(c))&&d.push(c)}if(u&&u.order&&o==null&&this._sort(d,u.order),u&&u.fields){var m=u.fields;if(o!=null&&c!=null)c=this._filterFields(c,m);else for(var w=0,E=d.length;w<E;w++)d[w]=this._filterFields(d[w],m)}if(l=="Object"){for(var T={},O=0,_=d.length;O<_;O++){var S=d[O],C=S[this._idProp];T[C]=S}return T}else if(o!=null){var L;return(L=c)!==null&&L!==void 0?L:null}else return d}},{key:"getIds",value:function(i){var a=this._data,o=i&&$n(i),s=i&&i.order,u=Et(hn(a).call(a)),l=[];if(o)if(s){for(var h=[],d=0,c=u.length;d<c;d++){var f=u[d],v=this._data.get(f);v!=null&&o(v)&&h.push(v)}this._sort(h,s);for(var p=0,$=h.length;p<$;p++)l.push(h[p][this._idProp])}else for(var g=0,y=u.length;g<y;g++){var b=u[g],m=this._data.get(b);m!=null&&o(m)&&l.push(m[this._idProp])}else if(s){for(var w=[],E=0,T=u.length;E<T;E++){var O=u[E];w.push(a.get(O))}this._sort(w,s);for(var _=0,S=w.length;_<S;_++)l.push(w[_][this._idProp])}else for(var C=0,L=u.length;C<L;C++){var B=u[C],Q=a.get(B);Q!=null&&l.push(Q[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(i,a){var o=a&&$n(a),s=this._data,u=Et(hn(s).call(s));if(a&&a.order)for(var l=this.get(a),h=0,d=l.length;h<d;h++){var c=l[h],f=c[this._idProp];i(c,f)}else for(var v=0,p=u.length;v<p;v++){var $=u[v],g=this._data.get($);g!=null&&(!o||o(g))&&i(g,$)}}},{key:"map",value:function(i,a){for(var o=a&&$n(a),s=[],u=this._data,l=Et(hn(u).call(u)),h=0,d=l.length;h<d;h++){var c=l[h],f=this._data.get(c);f!=null&&(!o||o(f))&&s.push(i(f,c))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(i,a){var o;return i&&m2(o=Ct(a)?a:Xv(a)).call(o,function(s,u){return s[u]=i[u],s},{})}},{key:"_sort",value:function(i,a){if(typeof a=="string"){var o=a;Sc(i).call(i,function(s,u){var l=s[o],h=u[o];return l>h?1:l<h?-1:0})}else if(typeof a=="function")Sc(i).call(i,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(i,a){for(var o=[],s=[],u=Ct(i)?i:[i],l=0,h=u.length;l<h;l++){var d=this._remove(u[l]);if(d){var c=d[this._idProp];c!=null&&(o.push(c),s.push(d))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(i){var a;if(Xm(i)?a=i:i&&at(i)==="object"&&(a=i[this._idProp]),a!=null&&this._data.has(a)){var o=this._data.get(a)||null;return this._data.delete(a),--this.length,o}return null}},{key:"clear",value:function(i){for(var a,o=Et(hn(a=this._data).call(a)),s=[],u=0,l=o.length;u<l;u++)s.push(this._data.get(o[u]));return this._data.clear(),this.length=0,this._trigger("remove",{items:o,oldData:s},i),o}},{key:"max",value:function(i){var a,o=null,s=null,u=zh(qm(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[i];typeof d=="number"&&(s==null||d>s)&&(o=h,s=d)}}catch(c){u.e(c)}finally{u.f()}return o||null}},{key:"min",value:function(i){var a,o=null,s=null,u=zh(qm(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[i];typeof d=="number"&&(s==null||d<s)&&(o=h,s=d)}}catch(c){u.e(c)}finally{u.f()}return o||null}},{key:"distinct",value:function(i){for(var a=this._data,o=Et(hn(a).call(a)),s=[],u=0,l=0,h=o.length;l<h;l++){for(var d=o[l],c=a.get(d),f=c[i],v=!1,p=0;p<u;p++)if(s[p]==f){v=!0;break}!v&&f!==void 0&&(s[u]=f,u++)}return s}},{key:"_addItem",value:function(i){var a=PU(i,this._idProp),o=a[this._idProp];if(this._data.has(o))throw new Error("Cannot add item: item with id "+o+" already exists");return this._data.set(o,a),++this.length,o}},{key:"_updateItem",value:function(i){var a=i[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+Kz(i)+")");var o=this._data.get(a);if(!o)throw new Error("Cannot update item: no item with id "+a+" found");return this._data.set(a,eb(eb({},o),i)),a}},{key:"stream",value:function(i){if(i){var a=this._data;return new Jm(De({},Cn,$t.mark(function s(){var u,l,h,d;return $t.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:u=zh(i),f.prev=1,u.s();case 3:if((l=u.n()).done){f.next=11;break}if(h=l.value,d=a.get(h),d==null){f.next=9;break}return f.next=9,[h,d];case 9:f.next=3;break;case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(1),u.e(f.t0);case 16:return f.prev=16,u.f(),f.finish(16);case 19:case"end":return f.stop()}},s,null,[[1,13,16,19]])})))}else{var o;return new Jm(De({},Cn,t_(o=Z8(this._data)).call(o,this._data)))}}}]),e}(oU);function IU(t,n){return at(n)==="object"&&n!==null&&t===n.idProp&&typeof n.add=="function"&&typeof n.clear=="function"&&typeof n.distinct=="function"&&typeof Mi(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Yt(n)=="function"&&typeof n.max=="function"&&typeof n.min=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.remove=="function"&&typeof n.setOptions=="function"&&typeof n.stream=="function"&&typeof n.update=="function"&&typeof n.updateOnly=="function"}function rS(t,n){return at(n)==="object"&&n!==null&&t===n.idProp&&typeof Mi(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Yt(n)=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.stream=="function"&&IU(t,n.getDataSet())}/**
|
|
38
|
+
* vis-network
|
|
39
|
+
* https://visjs.github.io/vis-network/
|
|
40
|
+
*
|
|
41
|
+
* A dynamic, browser-based visualization library.
|
|
42
|
+
*
|
|
43
|
+
* @version 9.1.6
|
|
44
|
+
* @date 2023-03-23T21:31:19.223Z
|
|
45
|
+
*
|
|
46
|
+
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
47
|
+
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
48
|
+
*
|
|
49
|
+
* @license
|
|
50
|
+
* vis.js is dual licensed under both
|
|
51
|
+
*
|
|
52
|
+
* 1. The Apache 2.0 License
|
|
53
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
54
|
+
*
|
|
55
|
+
* and
|
|
56
|
+
*
|
|
57
|
+
* 2. The MIT License
|
|
58
|
+
* http://opensource.org/licenses/MIT
|
|
59
|
+
*
|
|
60
|
+
* vis.js may be distributed under either license.
|
|
61
|
+
*/var Oc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function V(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tc={},CU={get exports(){return Tc},set exports(t){Tc=t}},ws=function(t){return t&&t.Math==Math&&t},We=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof Oc=="object"&&Oc)||function(){return this}()||Function("return this")(),se=function(t){try{return!!t()}catch{return!0}},xU=se,To=!xU(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),AU=To,iS=Function.prototype,rb=iS.apply,ib=iS.call,ko=typeof Reflect=="object"&&Reflect.apply||(AU?ib.bind(rb):function(){return ib.apply(rb,arguments)}),nS=To,aS=Function.prototype,kc=aS.call,RU=nS&&aS.bind.bind(kc,kc),ue=nS?RU:function(t){return function(){return kc.apply(t,arguments)}},oS=ue,DU=oS({}.toString),MU=oS("".slice),Fr=function(t){return MU(DU(t),8,-1)},NU=Fr,FU=ue,vp=function(t){if(NU(t)==="Function")return FU(t)},Pc=typeof document=="object"&&document.all,BU=typeof Pc>"u"&&Pc!==void 0,sS={all:Pc,IS_HTMLDDA:BU},uS=sS,LU=uS.all,Je=uS.IS_HTMLDDA?function(t){return typeof t=="function"||t===LU}:function(t){return typeof t=="function"},sa={},jU=se,Ge=!jU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),zU=To,_s=Function.prototype.call,Mt=zU?_s.bind(_s):function(){return _s.apply(_s,arguments)},Po={},lS={}.propertyIsEnumerable,hS=Object.getOwnPropertyDescriptor,HU=hS&&!lS.call({1:2},1);Po.f=HU?function(n){var e=hS(this,n);return!!e&&e.enumerable}:lS;var Io=function(t,n){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:n}},WU=ue,VU=se,UU=Fr,Hh=Object,GU=WU("".split),ul=VU(function(){return!Hh("z").propertyIsEnumerable(0)})?function(t){return UU(t)=="String"?GU(t,""):Hh(t)}:Hh,Co=function(t){return t==null},KU=Co,qU=TypeError,xo=function(t){if(KU(t))throw qU("Can't call method on "+t);return t},YU=ul,XU=xo,ir=function(t){return YU(XU(t))},nb=Je,dS=sS,QU=dS.all,Ze=dS.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:nb(t)||t===QU}:function(t){return typeof t=="object"?t!==null:nb(t)},ae={},Wh=ae,Vh=We,JU=Je,ab=function(t){return JU(t)?t:void 0},Ut=function(t,n){return arguments.length<2?ab(Wh[t])||ab(Vh[t]):Wh[t]&&Wh[t][n]||Vh[t]&&Vh[t][n]},ZU=ue,Fe=ZU({}.isPrototypeOf),Ao=typeof navigator<"u"&&String(navigator.userAgent)||"",cS=We,Uh=Ao,ob=cS.process,sb=cS.Deno,ub=ob&&ob.versions||sb&&sb.version,lb=ub&&ub.v8,Xt,bu;lb&&(Xt=lb.split("."),bu=Xt[0]>0&&Xt[0]<4?1:+(Xt[0]+Xt[1]));!bu&&Uh&&(Xt=Uh.match(/Edge\/(\d+)/),(!Xt||Xt[1]>=74)&&(Xt=Uh.match(/Chrome\/(\d+)/),Xt&&(bu=+Xt[1])));var Ro=bu,hb=Ro,eG=se,ua=!!Object.getOwnPropertySymbols&&!eG(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&hb&&hb<41}),tG=ua,fS=tG&&!Symbol.sham&&typeof Symbol.iterator=="symbol",rG=Ut,iG=Je,nG=Fe,aG=fS,oG=Object,Do=aG?function(t){return typeof t=="symbol"}:function(t){var n=rG("Symbol");return iG(n)&&nG(n.prototype,oG(t))},sG=String,la=function(t){try{return sG(t)}catch{return"Object"}},uG=Je,lG=la,hG=TypeError,Qi=function(t){if(uG(t))return t;throw hG(lG(t)+" is not a function")},dG=Qi,cG=Co,pp=function(t,n){var e=t[n];return cG(e)?void 0:dG(e)},Gh=Mt,Kh=Je,qh=Ze,fG=TypeError,vG=function(t,n){var e,r;if(n==="string"&&Kh(e=t.toString)&&!qh(r=Gh(e,t))||Kh(e=t.valueOf)&&!qh(r=Gh(e,t))||n!=="string"&&Kh(e=t.toString)&&!qh(r=Gh(e,t)))return r;throw fG("Can't convert object to primitive value")},ri={},pG={get exports(){return ri},set exports(t){ri=t}},db=We,gG=Object.defineProperty,yG=function(t,n){try{gG(db,t,{value:n,configurable:!0,writable:!0})}catch{db[t]=n}return n},mG=We,bG=yG,cb="__core-js_shared__",$G=mG[cb]||bG(cb,{}),gp=$G,fb=gp;(pG.exports=function(t,n){return fb[t]||(fb[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var wG=xo,_G=Object,Nt=function(t){return _G(wG(t))},EG=ue,SG=Nt,OG=EG({}.hasOwnProperty),et=Object.hasOwn||function(n,e){return OG(SG(n),e)},TG=ue,kG=0,PG=Math.random(),IG=TG(1 .toString),ll=function(t){return"Symbol("+(t===void 0?"":t)+")_"+IG(++kG+PG,36)},CG=We,xG=ri,vb=et,AG=ll,RG=ua,DG=fS,On=CG.Symbol,Yh=xG("wks"),MG=DG?On.for||On:On&&On.withoutSetter||AG,Be=function(t){return vb(Yh,t)||(Yh[t]=RG&&vb(On,t)?On[t]:MG("Symbol."+t)),Yh[t]},NG=Mt,pb=Ze,gb=Do,FG=pp,BG=vG,LG=Be,jG=TypeError,zG=LG("toPrimitive"),HG=function(t,n){if(!pb(t)||gb(t))return t;var e=FG(t,zG),r;if(e){if(n===void 0&&(n="default"),r=NG(e,t,n),!pb(r)||gb(r))return r;throw jG("Can't convert object to primitive value")}return n===void 0&&(n="number"),BG(t,n)},WG=HG,VG=Do,hl=function(t){var n=WG(t,"string");return VG(n)?n:n+""},UG=We,yb=Ze,Ic=UG.document,GG=yb(Ic)&&yb(Ic.createElement),vS=function(t){return GG?Ic.createElement(t):{}},KG=Ge,qG=se,YG=vS,pS=!KG&&!qG(function(){return Object.defineProperty(YG("div"),"a",{get:function(){return 7}}).a!=7}),XG=Ge,QG=Mt,JG=Po,ZG=Io,e9=ir,t9=hl,r9=et,i9=pS,mb=Object.getOwnPropertyDescriptor;sa.f=XG?mb:function(n,e){if(n=e9(n),e=t9(e),i9)try{return mb(n,e)}catch{}if(r9(n,e))return ZG(!QG(JG.f,n,e),n[e])};var n9=se,a9=Je,o9=/#|\.prototype\./,Mo=function(t,n){var e=u9[s9(t)];return e==h9?!0:e==l9?!1:a9(n)?n9(n):!!n},s9=Mo.normalize=function(t){return String(t).replace(o9,".").toLowerCase()},u9=Mo.data={},l9=Mo.NATIVE="N",h9=Mo.POLYFILL="P",d9=Mo,bb=vp,c9=Qi,f9=To,v9=bb(bb.bind),No=function(t,n){return c9(t),n===void 0?t:f9?v9(t,n):function(){return t.apply(n,arguments)}},Gt={},p9=Ge,g9=se,gS=p9&&g9(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),y9=Ze,m9=String,b9=TypeError,Ft=function(t){if(y9(t))return t;throw b9(m9(t)+" is not an object")},$9=Ge,w9=pS,_9=gS,Es=Ft,$b=hl,E9=TypeError,Xh=Object.defineProperty,S9=Object.getOwnPropertyDescriptor,Qh="enumerable",Jh="configurable",Zh="writable";Gt.f=$9?_9?function(n,e,r){if(Es(n),e=$b(e),Es(r),typeof n=="function"&&e==="prototype"&&"value"in r&&Zh in r&&!r[Zh]){var i=S9(n,e);i&&i[Zh]&&(n[e]=r.value,r={configurable:Jh in r?r[Jh]:i[Jh],enumerable:Qh in r?r[Qh]:i[Qh],writable:!1})}return Xh(n,e,r)}:Xh:function(n,e,r){if(Es(n),e=$b(e),Es(r),w9)try{return Xh(n,e,r)}catch{}if("get"in r||"set"in r)throw E9("Accessors not supported");return"value"in r&&(n[e]=r.value),n};var O9=Ge,T9=Gt,k9=Io,ha=O9?function(t,n,e){return T9.f(t,n,k9(1,e))}:function(t,n,e){return t[n]=e,t},Ss=We,P9=ko,I9=vp,C9=Je,x9=sa.f,A9=d9,dn=ae,R9=No,cn=ha,wb=et,D9=function(t){var n=function(e,r,i){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,i)}return P9(t,this,arguments)};return n.prototype=t.prototype,n},K=function(t,n){var e=t.target,r=t.global,i=t.stat,a=t.proto,o=r?Ss:i?Ss[e]:(Ss[e]||{}).prototype,s=r?dn:dn[e]||cn(dn,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,$,g;for(c in n)l=A9(r?c:e+(i?".":"#")+c,t.forced),h=!l&&o&&wb(o,c),v=s[c],h&&(t.dontCallGetSet?(g=x9(o,c),p=g&&g.value):p=o[c]),f=h&&p?p:n[c],!(h&&typeof v==typeof f)&&(t.bind&&h?$=R9(f,Ss):t.wrap&&h?$=D9(f):a&&C9(f)?$=I9(f):$=f,(t.sham||f&&f.sham||v&&v.sham)&&cn($,"sham",!0),cn(s,c,$),a&&(d=e+"Prototype",wb(dn,d)||cn(dn,d,{}),cn(dn[d],c,f),t.real&&u&&(l||!u[c])&&cn(u,c,f)))},M9=Math.ceil,N9=Math.floor,F9=Math.trunc||function(n){var e=+n;return(e>0?N9:M9)(e)},B9=F9,dl=function(t){var n=+t;return n!==n||n===0?0:B9(n)},L9=dl,j9=Math.max,z9=Math.min,Fo=function(t,n){var e=L9(t);return e<0?j9(e+n,0):z9(e,n)},H9=dl,W9=Math.min,V9=function(t){return t>0?W9(H9(t),9007199254740991):0},U9=V9,nr=function(t){return U9(t.length)},G9=ir,K9=Fo,q9=nr,_b=function(t){return function(n,e,r){var i=G9(n),a=q9(i),o=K9(r,a),s;if(t&&e!=e){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((t||o in i)&&i[o]===e)return t||o||0;return!t&&-1}},yp={includes:_b(!0),indexOf:_b(!1)},Bo={},Y9=ue,ed=et,X9=ir,Q9=yp.indexOf,J9=Bo,Eb=Y9([].push),yS=function(t,n){var e=X9(t),r=0,i=[],a;for(a in e)!ed(J9,a)&&ed(e,a)&&Eb(i,a);for(;n.length>r;)ed(e,a=n[r++])&&(~Q9(i,a)||Eb(i,a));return i},mp=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Z9=yS,e7=mp,Lo=Object.keys||function(n){return Z9(n,e7)},jo={};jo.f=Object.getOwnPropertySymbols;var Sb=Ge,t7=ue,r7=Mt,i7=se,td=Lo,n7=jo,a7=Po,o7=Nt,s7=ul,fn=Object.assign,Ob=Object.defineProperty,u7=t7([].concat),l7=!fn||i7(function(){if(Sb&&fn({b:1},fn(Ob({},"a",{enumerable:!0,get:function(){Ob(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(i){n[i]=i}),fn({},t)[e]!=7||td(fn({},n)).join("")!=r})?function(n,e){for(var r=o7(n),i=arguments.length,a=1,o=n7.f,s=a7.f;i>a;)for(var u=s7(arguments[a++]),l=o?u7(td(u),o(u)):td(u),h=l.length,d=0,c;h>d;)c=l[d++],(!Sb||r7(s,u,c))&&(r[c]=u[c]);return r}:fn,h7=K,Tb=l7;h7({target:"Object",stat:!0,arity:2,forced:Object.assign!==Tb},{assign:Tb});var d7=ae,c7=d7.Object.assign,f7=c7,v7=f7;(function(t){t.exports=v7})(CU);var je=V(Tc),Cc={},p7={get exports(){return Cc},set exports(t){Cc=t}},g7=ue,cl=g7([].slice),mS=ue,y7=Qi,m7=Ze,b7=et,kb=cl,$7=To,bS=Function,w7=mS([].concat),_7=mS([].join),rd={},E7=function(t,n,e){if(!b7(rd,n)){for(var r=[],i=0;i<n;i++)r[i]="a["+i+"]";rd[n]=bS("C,a","return new C("+_7(r,",")+")")}return rd[n](t,e)},$S=$7?bS.bind:function(n){var e=y7(this),r=e.prototype,i=kb(arguments,1),a=function(){var s=w7(i,kb(arguments));return this instanceof a?E7(e,s.length,s):e.apply(n,s)};return m7(r)&&(a.prototype=r),a},S7=K,Pb=$S;S7({target:"Function",proto:!0,forced:Function.bind!==Pb},{bind:Pb});var O7=ae,tt=function(t){return O7[t+"Prototype"]},T7=tt,k7=T7("Function").bind,P7=Fe,I7=k7,id=Function.prototype,C7=function(t){var n=t.bind;return t===id||P7(id,t)&&n===id.bind?I7:n},x7=C7,wS=x7;(function(t){t.exports=wS})(p7);var A=V(Cc);function bp(t,n,e,r){t.beginPath(),t.arc(n,e,r,0,2*Math.PI,!1),t.closePath()}function A7(t,n,e,r){t.beginPath(),t.rect(n-r,e-r,r*2,r*2),t.closePath()}function R7(t,n,e,r){t.beginPath(),r*=1.15,e+=.275*r;var i=r*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);t.moveTo(n,e-(s-o)),t.lineTo(n+a,e+o),t.lineTo(n-a,e+o),t.lineTo(n,e-(s-o)),t.closePath()}function D7(t,n,e,r){t.beginPath(),r*=1.15,e-=.275*r;var i=r*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);t.moveTo(n,e+(s-o)),t.lineTo(n+a,e-o),t.lineTo(n-a,e-o),t.lineTo(n,e+(s-o)),t.closePath()}function M7(t,n,e,r){t.beginPath(),r*=.82,e+=.1*r;for(var i=0;i<10;i++){var a=i%2===0?r*1.3:r*.5;t.lineTo(n+a*Math.sin(i*2*Math.PI/10),e-a*Math.cos(i*2*Math.PI/10))}t.closePath()}function N7(t,n,e,r){t.beginPath(),t.lineTo(n,e+r),t.lineTo(n+r,e),t.lineTo(n,e-r),t.lineTo(n-r,e),t.closePath()}function _S(t,n,e,r,i,a){var o=Math.PI/180;r-2*a<0&&(a=r/2),i-2*a<0&&(a=i/2),t.beginPath(),t.moveTo(n+a,e),t.lineTo(n+r-a,e),t.arc(n+r-a,e+a,a,o*270,o*360,!1),t.lineTo(n+r,e+i-a),t.arc(n+r-a,e+i-a,a,0,o*90,!1),t.lineTo(n+a,e+i),t.arc(n+a,e+i-a,a,o*90,o*180,!1),t.lineTo(n,e+a),t.arc(n+a,e+a,a,o*180,o*270,!1),t.closePath()}function xc(t,n,e,r,i){var a=.5522848,o=r/2*a,s=i/2*a,u=n+r,l=e+i,h=n+r/2,d=e+i/2;t.beginPath(),t.moveTo(n,d),t.bezierCurveTo(n,d-s,h-o,e,h,e),t.bezierCurveTo(h+o,e,u,d-s,u,d),t.bezierCurveTo(u,d+s,h+o,l,h,l),t.bezierCurveTo(h-o,l,n,d+s,n,d),t.closePath()}function ES(t,n,e,r,i){var a=.3333333333333333,o=r,s=i*a,u=.5522848,l=o/2*u,h=s/2*u,d=n+o,c=e+s,f=n+o/2,v=e+s/2,p=e+(i-s/2),$=e+i;t.beginPath(),t.moveTo(d,v),t.bezierCurveTo(d,v+h,f+l,c,f,c),t.bezierCurveTo(f-l,c,n,v+h,n,v),t.bezierCurveTo(n,v-h,f-l,e,f,e),t.bezierCurveTo(f+l,e,d,v-h,d,v),t.lineTo(d,p),t.bezierCurveTo(d,p+h,f+l,$,f,$),t.bezierCurveTo(f-l,$,n,p+h,n,p),t.lineTo(n,v)}function SS(t,n,e,r,i,a){t.beginPath(),t.moveTo(n,e);for(var o=a.length,s=r-n,u=i-e,l=u/s,h=Math.sqrt(s*s+u*u),d=0,c=!0,f=0,v=+a[0];h>=.1;)v=+a[d++%o],v>h&&(v=h),f=Math.sqrt(v*v/(1+l*l)),f=s<0?-f:f,n+=f,e+=l*f,c===!0?t.lineTo(n,e):t.moveTo(n,e),h-=v,c=!c}function F7(t,n,e,r){t.beginPath();var i=6,a=Math.PI*2/i;t.moveTo(n+r,e);for(var o=1;o<i;o++)t.lineTo(n+r*Math.cos(a*o),e+r*Math.sin(a*o));t.closePath()}var Ib={circle:bp,dashedLine:SS,database:ES,diamond:N7,ellipse:xc,ellipse_vis:xc,hexagon:F7,roundRect:_S,square:A7,star:M7,triangle:R7,triangleDown:D7};function B7(t){return Object.prototype.hasOwnProperty.call(Ib,t)?Ib[t]:function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];CanvasRenderingContext2D.prototype[t].call(n,r)}}var Ac={},L7={get exports(){return Ac},set exports(t){Ac=t}};(function(t){t.exports=n;function n(r){if(r)return e(r)}function e(r){for(var i in n.prototype)r[i]=n.prototype[i];return r}n.prototype.on=n.prototype.addEventListener=function(r,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(i),this},n.prototype.once=function(r,i){function a(){this.off(r,a),i.apply(this,arguments)}return a.fn=i,this.on(r,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(r,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+r];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===i||o.fn===i){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+r],this},n.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+r],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},n.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},n.prototype.hasListeners=function(r){return!!this.listeners(r).length}})(L7);var OS=Ac,Rc={},j7={get exports(){return Rc},set exports(t){Rc=t}},z7=Be,H7=z7("toStringTag"),TS={};TS[H7]="z";var $p=String(TS)==="[object z]",W7=$p,V7=Je,qs=Fr,U7=Be,G7=U7("toStringTag"),K7=Object,q7=qs(function(){return arguments}())=="Arguments",Y7=function(t,n){try{return t[n]}catch{}},Ji=W7?qs:function(t){var n,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=Y7(n=K7(t),G7))=="string"?e:q7?qs(n):(r=qs(n))=="Object"&&V7(n.callee)?"Arguments":r},X7=Ji,Q7=String,br=function(t){if(X7(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Q7(t)},wp=ue,J7=dl,Z7=br,eK=xo,tK=wp("".charAt),Cb=wp("".charCodeAt),rK=wp("".slice),xb=function(t){return function(n,e){var r=Z7(eK(n)),i=J7(e),a=r.length,o,s;return i<0||i>=a?t?"":void 0:(o=Cb(r,i),o<55296||o>56319||i+1===a||(s=Cb(r,i+1))<56320||s>57343?t?tK(r,i):o:t?rK(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},iK={codeAt:xb(!1),charAt:xb(!0)},nK=We,aK=Je,Ab=nK.WeakMap,kS=aK(Ab)&&/native code/.test(String(Ab)),oK=ri,sK=ll,Rb=oK("keys"),fl=function(t){return Rb[t]||(Rb[t]=sK(t))},uK=kS,PS=We,lK=Ze,hK=ha,nd=et,ad=gp,dK=fl,cK=Bo,Db="Object already initialized",Dc=PS.TypeError,fK=PS.WeakMap,$u,Ya,wu,vK=function(t){return wu(t)?Ya(t):$u(t,{})},pK=function(t){return function(n){var e;if(!lK(n)||(e=Ya(n)).type!==t)throw Dc("Incompatible receiver, "+t+" required");return e}};if(uK||ad.state){var ur=ad.state||(ad.state=new fK);ur.get=ur.get,ur.has=ur.has,ur.set=ur.set,$u=function(t,n){if(ur.has(t))throw Dc(Db);return n.facade=t,ur.set(t,n),n},Ya=function(t){return ur.get(t)||{}},wu=function(t){return ur.has(t)}}else{var vn=dK("state");cK[vn]=!0,$u=function(t,n){if(nd(t,vn))throw Dc(Db);return n.facade=t,hK(t,vn,n),n},Ya=function(t){return nd(t,vn)?t[vn]:{}},wu=function(t){return nd(t,vn)}}var Zi={set:$u,get:Ya,has:wu,enforce:vK,getterFor:pK},Mc=Ge,gK=et,IS=Function.prototype,yK=Mc&&Object.getOwnPropertyDescriptor,_p=gK(IS,"name"),mK=_p&&function(){}.name==="something",bK=_p&&(!Mc||Mc&&yK(IS,"name").configurable),CS={EXISTS:_p,PROPER:mK,CONFIGURABLE:bK},vl={},$K=Ge,wK=gS,_K=Gt,EK=Ft,SK=ir,OK=Lo;vl.f=$K&&!wK?Object.defineProperties:function(n,e){EK(n);for(var r=SK(e),i=OK(e),a=i.length,o=0,s;a>o;)_K.f(n,s=i[o++],r[s]);return n};var TK=Ut,kK=TK("document","documentElement"),PK=Ft,IK=vl,Mb=mp,CK=Bo,xK=kK,AK=vS,RK=fl,Nb=">",Fb="<",Nc="prototype",Fc="script",xS=RK("IE_PROTO"),od=function(){},AS=function(t){return Fb+Fc+Nb+t+Fb+"/"+Fc+Nb},Bb=function(t){t.write(AS("")),t.close();var n=t.parentWindow.Object;return t=null,n},DK=function(){var t=AK("iframe"),n="java"+Fc+":",e;return t.style.display="none",xK.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(AS("document.F=Object")),e.close(),e.F},Os,Ys=function(){try{Os=new ActiveXObject("htmlfile")}catch{}Ys=typeof document<"u"?document.domain&&Os?Bb(Os):DK():Bb(Os);for(var t=Mb.length;t--;)delete Ys[Nc][Mb[t]];return Ys()};CK[xS]=!0;var da=Object.create||function(n,e){var r;return n!==null?(od[Nc]=PK(n),r=new od,od[Nc]=null,r[xS]=n):r=Ys(),e===void 0?r:IK.f(r,e)},MK=se,RS=!MK(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),NK=et,FK=Je,BK=Nt,LK=fl,jK=RS,Lb=LK("IE_PROTO"),Bc=Object,zK=Bc.prototype,pl=jK?Bc.getPrototypeOf:function(t){var n=BK(t);if(NK(n,Lb))return n[Lb];var e=n.constructor;return FK(e)&&n instanceof e?e.prototype:n instanceof Bc?zK:null},HK=ha,zo=function(t,n,e,r){return r&&r.enumerable?t[n]=e:HK(t,n,e),t},WK=se,VK=Je,UK=Ze,GK=da,jb=pl,KK=zo,qK=Be,Lc=qK("iterator"),DS=!1,Or,sd,ud;[].keys&&(ud=[].keys(),"next"in ud?(sd=jb(jb(ud)),sd!==Object.prototype&&(Or=sd)):DS=!0);var YK=!UK(Or)||WK(function(){var t={};return Or[Lc].call(t)!==t});YK?Or={}:Or=GK(Or);VK(Or[Lc])||KK(Or,Lc,function(){return this});var MS={IteratorPrototype:Or,BUGGY_SAFARI_ITERATORS:DS},XK=$p,QK=Ji,JK=XK?{}.toString:function(){return"[object "+QK(this)+"]"},ZK=$p,eq=Gt.f,tq=ha,rq=et,iq=JK,nq=Be,zb=nq("toStringTag"),ca=function(t,n,e,r){if(t){var i=e?t:t.prototype;rq(i,zb)||eq(i,zb,{configurable:!0,value:n}),r&&!ZK&&tq(i,"toString",iq)}},fa={},aq=MS.IteratorPrototype,oq=da,sq=Io,uq=ca,lq=fa,hq=function(){return this},dq=function(t,n,e,r){var i=n+" Iterator";return t.prototype=oq(aq,{next:sq(+!r,e)}),uq(t,i,!1,!0),lq[i]=hq,t},cq=ue,fq=Qi,vq=function(t,n,e){try{return cq(fq(Object.getOwnPropertyDescriptor(t,n)[e]))}catch{}},pq=Je,gq=String,yq=TypeError,mq=function(t){if(typeof t=="object"||pq(t))return t;throw yq("Can't set "+gq(t)+" as a prototype")},bq=vq,$q=Ft,wq=mq,_q=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,n={},e;try{e=bq(Object.prototype,"__proto__","set"),e(n,[]),t=n instanceof Array}catch{}return function(i,a){return $q(i),wq(a),t?e(i,a):i.__proto__=a,i}}():void 0),Eq=K,Sq=Mt,Oq=CS,Tq=dq,kq=pl,Pq=ca,Hb=zo,Iq=Be,Wb=fa,Cq=MS,xq=Oq.PROPER,Ts=Cq.BUGGY_SAFARI_ITERATORS,ld=Iq("iterator"),Vb="keys",ks="values",Ub="entries",Aq=function(){return this},Ep=function(t,n,e,r,i,a,o){Tq(e,n,r);var s=function(g){if(g===i&&c)return c;if(!Ts&&g in h)return h[g];switch(g){case Vb:return function(){return new e(this,g)};case ks:return function(){return new e(this,g)};case Ub:return function(){return new e(this,g)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,h=t.prototype,d=h[ld]||h["@@iterator"]||i&&h[i],c=!Ts&&d||s(i),f=n=="Array"&&h.entries||d,v,p,$;if(f&&(v=kq(f.call(new t)),v!==Object.prototype&&v.next&&(Pq(v,u,!0,!0),Wb[u]=Aq)),xq&&i==ks&&d&&d.name!==ks&&(l=!0,c=function(){return Sq(d,this)}),i)if(p={values:s(ks),keys:a?c:s(Vb),entries:s(Ub)},o)for($ in p)(Ts||l||!($ in h))&&Hb(h,$,p[$]);else Eq({target:n,proto:!0,forced:Ts||l},p);return o&&h[ld]!==c&&Hb(h,ld,c,{name:i}),Wb[n]=c,p},Sp=function(t,n){return{value:t,done:n}},Rq=iK.charAt,Dq=br,NS=Zi,Mq=Ep,Gb=Sp,FS="String Iterator",Nq=NS.set,Fq=NS.getterFor(FS);Mq(String,"String",function(t){Nq(this,{type:FS,string:Dq(t),index:0})},function(){var n=Fq(this),e=n.string,r=n.index,i;return r>=e.length?Gb(void 0,!0):(i=Rq(e,r),n.index+=i.length,Gb(i,!1))});var Bq=Mt,Kb=Ft,Lq=pp,BS=function(t,n,e){var r,i;Kb(t);try{if(r=Lq(t,"return"),!r){if(n==="throw")throw e;return e}r=Bq(r,t)}catch(a){i=!0,r=a}if(n==="throw")throw e;if(i)throw r;return Kb(r),e},jq=Ft,zq=BS,Hq=function(t,n,e,r){try{return r?n(jq(e)[0],e[1]):n(e)}catch(i){zq(t,"throw",i)}},Wq=Be,Vq=fa,Uq=Wq("iterator"),Gq=Array.prototype,LS=function(t){return t!==void 0&&(Vq.Array===t||Gq[Uq]===t)},Kq=ue,qq=Je,jc=gp,Yq=Kq(Function.toString);qq(jc.inspectSource)||(jc.inspectSource=function(t){return Yq(t)});var Xq=jc.inspectSource,Qq=ue,Jq=se,jS=Je,Zq=Ji,eY=Ut,tY=Xq,zS=function(){},rY=[],HS=eY("Reflect","construct"),Op=/^\s*(?:class|function)\b/,iY=Qq(Op.exec),nY=!Op.exec(zS),$a=function(n){if(!jS(n))return!1;try{return HS(zS,rY,n),!0}catch{return!1}},WS=function(n){if(!jS(n))return!1;switch(Zq(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return nY||!!iY(Op,tY(n))}catch{return!0}};WS.sham=!0;var gl=!HS||Jq(function(){var t;return $a($a.call)||!$a(Object)||!$a(function(){t=!0})||t})?WS:$a,aY=hl,oY=Gt,sY=Io,va=function(t,n,e){var r=aY(n);r in t?oY.f(t,r,sY(0,e)):t[r]=e},uY=Ji,qb=pp,lY=Co,hY=fa,dY=Be,cY=dY("iterator"),yl=function(t){if(!lY(t))return qb(t,cY)||qb(t,"@@iterator")||hY[uY(t)]},fY=Mt,vY=Qi,pY=Ft,gY=la,yY=yl,mY=TypeError,VS=function(t,n){var e=arguments.length<2?yY(t):n;if(vY(e))return pY(fY(e,t));throw mY(gY(t)+" is not iterable")},bY=No,$Y=Mt,wY=Nt,_Y=Hq,EY=LS,SY=gl,OY=nr,Yb=va,TY=VS,kY=yl,Xb=Array,PY=function(n){var e=wY(n),r=SY(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=bY(a,i>2?arguments[2]:void 0));var s=kY(e),u=0,l,h,d,c,f,v;if(s&&!(this===Xb&&EY(s)))for(c=TY(e,s),f=c.next,h=r?new this:[];!(d=$Y(f,c)).done;u++)v=o?_Y(c,a,[d.value,u],!0):d.value,Yb(h,u,v);else for(l=OY(e),h=r?new this(l):Xb(l);l>u;u++)v=o?a(e[u],u):e[u],Yb(h,u,v);return h.length=u,h},IY=Be,US=IY("iterator"),GS=!1;try{var CY=0,Qb={next:function(){return{done:!!CY++}},return:function(){GS=!0}};Qb[US]=function(){return this},Array.from(Qb,function(){throw 2})}catch{}var xY=function(t,n){if(!n&&!GS)return!1;var e=!1;try{var r={};r[US]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},AY=K,RY=PY,DY=xY,MY=!DY(function(t){Array.from(t)});AY({target:"Array",stat:!0,forced:MY},{from:RY});var NY=ae,FY=NY.Array.from,BY=FY,KS=BY;(function(t){t.exports=KS})(j7);var en=V(Rc),zc={},LY={get exports(){return zc},set exports(t){zc=t}},Hc={},jY={get exports(){return Hc},set exports(t){Hc=t}},zY=ir,Jb=fa,qS=Zi;Gt.f;var HY=Ep,Ps=Sp,YS="Array Iterator",WY=qS.set,VY=qS.getterFor(YS);HY(Array,"Array",function(t,n){WY(this,{type:YS,target:zY(t),index:0,kind:n})},function(){var t=VY(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=void 0,Ps(void 0,!0)):e=="keys"?Ps(r,!1):e=="values"?Ps(n[r],!1):Ps([r,n[r]],!1)},"values");Jb.Arguments=Jb.Array;var UY=yl,GY=UY,KY={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},qY=KY,YY=We,XY=Ji,QY=ha,Zb=fa,JY=Be,e$=JY("toStringTag");for(var hd in qY){var t$=YY[hd],dd=t$&&t$.prototype;dd&&XY(dd)!==e$&&QY(dd,e$,hd),Zb[hd]=Zb.Array}var ZY=GY,eX=ZY,tX=eX,rX=tX,iX=rX,nX=iX;(function(t){t.exports=nX})(jY);(function(t){t.exports=Hc})(LY);var Br=V(zc),Wc={},aX={get exports(){return Wc},set exports(t){Wc=t}},Ho={},oX=yS,sX=mp,uX=sX.concat("length","prototype");Ho.f=Object.getOwnPropertyNames||function(n){return oX(n,uX)};var ml={},r$=Fo,lX=nr,hX=va,dX=Array,cX=Math.max,XS=function(t,n,e){for(var r=lX(t),i=r$(n,r),a=r$(e===void 0?r:e,r),o=dX(cX(a-i,0)),s=0;i<a;i++,s++)hX(o,s,t[i]);return o.length=s,o},fX=Fr,vX=ir,QS=Ho.f,pX=XS,JS=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],gX=function(t){try{return QS(t)}catch{return pX(JS)}};ml.f=function(n){return JS&&fX(n)=="Window"?gX(n):QS(vX(n))};var yX=Gt,Tp=function(t,n,e){return yX.f(t,n,e)},Wo={},mX=Be;Wo.f=mX;var i$=ae,bX=et,$X=Wo,wX=Gt.f,xe=function(t){var n=i$.Symbol||(i$.Symbol={});bX(n,t)||wX(n,t,{value:$X.f(t)})},_X=Mt,EX=Ut,SX=Be,OX=zo,ZS=function(){var t=EX("Symbol"),n=t&&t.prototype,e=n&&n.valueOf,r=SX("toPrimitive");n&&!n[r]&&OX(n,r,function(i){return _X(e,this)},{arity:1})},TX=Fr,tn=Array.isArray||function(n){return TX(n)=="Array"},n$=tn,kX=gl,PX=Ze,IX=Be,CX=IX("species"),a$=Array,xX=function(t){var n;return n$(t)&&(n=t.constructor,kX(n)&&(n===a$||n$(n.prototype))?n=void 0:PX(n)&&(n=n[CX],n===null&&(n=void 0))),n===void 0?a$:n},AX=xX,kp=function(t,n){return new(AX(t))(n===0?0:n)},RX=No,DX=ue,MX=ul,NX=Nt,FX=nr,BX=kp,o$=DX([].push),zr=function(t){var n=t==1,e=t==2,r=t==3,i=t==4,a=t==6,o=t==7,s=t==5||a;return function(u,l,h,d){for(var c=NX(u),f=MX(c),v=RX(l,h),p=FX(f),$=0,g=d||BX,y=n?g(u,p):e||o?g(u,0):void 0,b,m;p>$;$++)if((s||$ in f)&&(b=f[$],m=v(b,$,c),t))if(n)y[$]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return $;case 2:o$(y,b)}else switch(t){case 4:return!1;case 7:o$(y,b)}return a?-1:r||i?i:y}},hi={forEach:zr(0),map:zr(1),filter:zr(2),some:zr(3),every:zr(4),find:zr(5),findIndex:zr(6),filterReject:zr(7)},bl=K,Pp=We,Ip=Mt,LX=ue,Ln=Ge,jn=ua,jX=se,Ye=et,zX=Fe,Vc=Ft,$l=ir,Cp=hl,HX=br,Uc=Io,Xa=da,eO=Lo,WX=Ho,tO=ml,VX=jo,rO=sa,iO=Gt,UX=vl,nO=Po,s$=zo,GX=Tp,xp=ri,KX=fl,aO=Bo,u$=ll,qX=Be,YX=Wo,XX=xe,QX=ZS,JX=ca,oO=Zi,wl=hi.forEach,St=KX("hidden"),_l="Symbol",Qa="prototype",ZX=oO.set,l$=oO.getterFor(_l),er=Object[Qa],Ci=Pp.Symbol,Ta=Ci&&Ci[Qa],eQ=Pp.TypeError,cd=Pp.QObject,sO=rO.f,_i=iO.f,uO=tO.f,tQ=nO.f,lO=LX([].push),Ar=xp("symbols"),Vo=xp("op-symbols"),rQ=xp("wks"),Gc=!cd||!cd[Qa]||!cd[Qa].findChild,Kc=Ln&&jX(function(){return Xa(_i({},"a",{get:function(){return _i(this,"a",{value:7}).a}})).a!=7})?function(t,n,e){var r=sO(er,n);r&&delete er[n],_i(t,n,e),r&&t!==er&&_i(er,n,r)}:_i,fd=function(t,n){var e=Ar[t]=Xa(Ta);return ZX(e,{type:_l,tag:t,description:n}),Ln||(e.description=n),e},El=function(n,e,r){n===er&&El(Vo,e,r),Vc(n);var i=Cp(e);return Vc(r),Ye(Ar,i)?(r.enumerable?(Ye(n,St)&&n[St][i]&&(n[St][i]=!1),r=Xa(r,{enumerable:Uc(0,!1)})):(Ye(n,St)||_i(n,St,Uc(1,{})),n[St][i]=!0),Kc(n,i,r)):_i(n,i,r)},Ap=function(n,e){Vc(n);var r=$l(e),i=eO(r).concat(fO(r));return wl(i,function(a){(!Ln||Ip(hO,r,a))&&El(n,a,r[a])}),n},iQ=function(n,e){return e===void 0?Xa(n):Ap(Xa(n),e)},hO=function(n){var e=Cp(n),r=Ip(tQ,this,e);return this===er&&Ye(Ar,e)&&!Ye(Vo,e)?!1:r||!Ye(this,e)||!Ye(Ar,e)||Ye(this,St)&&this[St][e]?r:!0},dO=function(n,e){var r=$l(n),i=Cp(e);if(!(r===er&&Ye(Ar,i)&&!Ye(Vo,i))){var a=sO(r,i);return a&&Ye(Ar,i)&&!(Ye(r,St)&&r[St][i])&&(a.enumerable=!0),a}},cO=function(n){var e=uO($l(n)),r=[];return wl(e,function(i){!Ye(Ar,i)&&!Ye(aO,i)&&lO(r,i)}),r},fO=function(t){var n=t===er,e=uO(n?Vo:$l(t)),r=[];return wl(e,function(i){Ye(Ar,i)&&(!n||Ye(er,i))&&lO(r,Ar[i])}),r};jn||(Ci=function(){if(zX(Ta,this))throw eQ("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:HX(arguments[0]),e=u$(n),r=function(i){this===er&&Ip(r,Vo,i),Ye(this,St)&&Ye(this[St],e)&&(this[St][e]=!1),Kc(this,e,Uc(1,i))};return Ln&&Gc&&Kc(er,e,{configurable:!0,set:r}),fd(e,n)},Ta=Ci[Qa],s$(Ta,"toString",function(){return l$(this).tag}),s$(Ci,"withoutSetter",function(t){return fd(u$(t),t)}),nO.f=hO,iO.f=El,UX.f=Ap,rO.f=dO,WX.f=tO.f=cO,VX.f=fO,YX.f=function(t){return fd(qX(t),t)},Ln&&GX(Ta,"description",{configurable:!0,get:function(){return l$(this).description}}));bl({global:!0,constructor:!0,wrap:!0,forced:!jn,sham:!jn},{Symbol:Ci});wl(eO(rQ),function(t){XX(t)});bl({target:_l,stat:!0,forced:!jn},{useSetter:function(){Gc=!0},useSimple:function(){Gc=!1}});bl({target:"Object",stat:!0,forced:!jn,sham:!Ln},{create:iQ,defineProperty:El,defineProperties:Ap,getOwnPropertyDescriptor:dO});bl({target:"Object",stat:!0,forced:!jn},{getOwnPropertyNames:cO});QX();JX(Ci,_l);aO[St]=!0;var nQ=ua,vO=nQ&&!!Symbol.for&&!!Symbol.keyFor,aQ=K,oQ=Ut,sQ=et,uQ=br,pO=ri,lQ=vO,vd=pO("string-to-symbol-registry"),hQ=pO("symbol-to-string-registry");aQ({target:"Symbol",stat:!0,forced:!lQ},{for:function(t){var n=uQ(t);if(sQ(vd,n))return vd[n];var e=oQ("Symbol")(n);return vd[n]=e,hQ[e]=n,e}});var dQ=K,cQ=et,fQ=Do,vQ=la,pQ=ri,gQ=vO,h$=pQ("symbol-to-string-registry");dQ({target:"Symbol",stat:!0,forced:!gQ},{keyFor:function(n){if(!fQ(n))throw TypeError(vQ(n)+" is not a symbol");if(cQ(h$,n))return h$[n]}});var yQ=ue,d$=tn,mQ=Je,c$=Fr,bQ=br,f$=yQ([].push),$Q=function(t){if(mQ(t))return t;if(d$(t)){for(var n=t.length,e=[],r=0;r<n;r++){var i=t[r];typeof i=="string"?f$(e,i):(typeof i=="number"||c$(i)=="Number"||c$(i)=="String")&&f$(e,bQ(i))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(d$(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},wQ=K,gO=Ut,yO=ko,_Q=Mt,Uo=ue,mO=se,v$=Je,p$=Do,bO=cl,EQ=$Q,SQ=ua,OQ=String,Jr=gO("JSON","stringify"),Is=Uo(/./.exec),g$=Uo("".charAt),TQ=Uo("".charCodeAt),kQ=Uo("".replace),PQ=Uo(1 .toString),IQ=/[\uD800-\uDFFF]/g,y$=/^[\uD800-\uDBFF]$/,m$=/^[\uDC00-\uDFFF]$/,b$=!SQ||mO(function(){var t=gO("Symbol")();return Jr([t])!="[null]"||Jr({a:t})!="{}"||Jr(Object(t))!="{}"}),$$=mO(function(){return Jr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Jr("\uDEAD")!=='"\\udead"'}),CQ=function(t,n){var e=bO(arguments),r=EQ(n);if(!(!v$(r)&&(t===void 0||p$(t))))return e[1]=function(i,a){if(v$(r)&&(a=_Q(r,this,OQ(i),a)),!p$(a))return a},yO(Jr,null,e)},xQ=function(t,n,e){var r=g$(e,n-1),i=g$(e,n+1);return Is(y$,t)&&!Is(m$,i)||Is(m$,t)&&!Is(y$,r)?"\\u"+PQ(TQ(t,0),16):t};Jr&&wQ({target:"JSON",stat:!0,arity:3,forced:b$||$$},{stringify:function(n,e,r){var i=bO(arguments),a=yO(b$?CQ:Jr,null,i);return $$&&typeof a=="string"?kQ(a,IQ,xQ):a}});var AQ=K,RQ=ua,DQ=se,$O=jo,MQ=Nt,NQ=!RQ||DQ(function(){$O.f(1)});AQ({target:"Object",stat:!0,forced:NQ},{getOwnPropertySymbols:function(n){var e=$O.f;return e?e(MQ(n)):[]}});var FQ=ae,BQ=FQ.Object.getOwnPropertySymbols,LQ=BQ,jQ=LQ;(function(t){t.exports=jQ})(aX);var ii=V(Wc),qc={},zQ={get exports(){return qc},set exports(t){qc=t}},Yc={},HQ={get exports(){return Yc},set exports(t){Yc=t}},WQ=K,VQ=se,UQ=ir,wO=sa.f,_O=Ge,GQ=!_O||VQ(function(){wO(1)});WQ({target:"Object",stat:!0,forced:GQ,sham:!_O},{getOwnPropertyDescriptor:function(n,e){return wO(UQ(n),e)}});var KQ=ae,EO=KQ.Object,qQ=HQ.exports=function(n,e){return EO.getOwnPropertyDescriptor(n,e)};EO.getOwnPropertyDescriptor.sham&&(qQ.sham=!0);var YQ=Yc,SO=YQ;(function(t){t.exports=SO})(zQ);var di=V(qc),Xc={},XQ={get exports(){return Xc},set exports(t){Xc=t}},QQ=Ut,JQ=ue,ZQ=Ho,eJ=jo,tJ=Ft,rJ=JQ([].concat),OO=QQ("Reflect","ownKeys")||function(n){var e=ZQ.f(tJ(n)),r=eJ.f;return r?rJ(e,r(n)):e},iJ=K,nJ=Ge,aJ=OO,oJ=ir,sJ=sa,uJ=va;iJ({target:"Object",stat:!0,sham:!nJ},{getOwnPropertyDescriptors:function(n){for(var e=oJ(n),r=sJ.f,i=aJ(e),a={},o=0,s,u;i.length>o;)u=r(e,s=i[o++]),u!==void 0&&uJ(a,s,u);return a}});var lJ=ae,hJ=lJ.Object.getOwnPropertyDescriptors,dJ=hJ,cJ=dJ;(function(t){t.exports=cJ})(XQ);var ni=V(Xc),Qc={},fJ={get exports(){return Qc},set exports(t){Qc=t}},Jc={},vJ={get exports(){return Jc},set exports(t){Jc=t}},pJ=K,gJ=Ge,w$=vl.f;pJ({target:"Object",stat:!0,forced:Object.defineProperties!==w$,sham:!gJ},{defineProperties:w$});var yJ=ae,TO=yJ.Object,mJ=vJ.exports=function(n,e){return TO.defineProperties(n,e)};TO.defineProperties.sham&&(mJ.sham=!0);var bJ=Jc,$J=bJ;(function(t){t.exports=$J})(fJ);var Sl=V(Qc),Zc={},wJ={get exports(){return Zc},set exports(t){Zc=t}},ef={},_J={get exports(){return ef},set exports(t){ef=t}},EJ=K,SJ=Ge,_$=Gt.f;EJ({target:"Object",stat:!0,forced:Object.defineProperty!==_$,sham:!SJ},{defineProperty:_$});var OJ=ae,kO=OJ.Object,TJ=_J.exports=function(n,e,r){return kO.defineProperty(n,e,r)};kO.defineProperty.sham&&(TJ.sham=!0);var kJ=ef,PO=kJ;(function(t){t.exports=PO})(wJ);var Ol=V(Zc);function N(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var tf={},PJ={get exports(){return tf},set exports(t){tf=t}},rf={},IJ={get exports(){return rf},set exports(t){rf=t}},CJ=PO,xJ=CJ,AJ=xJ,RJ=AJ;(function(t){t.exports=RJ})(IJ);(function(t){t.exports=rf})(PJ);var Tl=V(tf),nf={},DJ={get exports(){return nf},set exports(t){nf=t}},af={},MJ={get exports(){return af},set exports(t){af=t}},NJ=TypeError,FJ=9007199254740991,IO=function(t){if(t>FJ)throw NJ("Maximum allowed index exceeded");return t},BJ=se,LJ=Be,jJ=Ro,zJ=LJ("species"),Go=function(t){return jJ>=51||!BJ(function(){var n=[],e=n.constructor={};return e[zJ]=function(){return{foo:1}},n[t](Boolean).foo!==1})},HJ=K,WJ=se,VJ=tn,UJ=Ze,GJ=Nt,KJ=nr,E$=IO,S$=va,qJ=kp,YJ=Go,XJ=Be,QJ=Ro,CO=XJ("isConcatSpreadable"),JJ=QJ>=51||!WJ(function(){var t=[];return t[CO]=!1,t.concat()[0]!==t}),ZJ=function(t){if(!UJ(t))return!1;var n=t[CO];return n!==void 0?!!n:VJ(t)},eZ=!JJ||!YJ("concat");HJ({target:"Array",proto:!0,arity:1,forced:eZ},{concat:function(n){var e=GJ(this),r=qJ(e,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],ZJ(l))for(u=KJ(l),E$(i+u),o=0;o<u;o++,i++)o in l&&S$(r,i,l[o]);else E$(i+1),S$(r,i++,l);return r.length=i,r}});var tZ=xe;tZ("asyncIterator");var rZ=xe;rZ("hasInstance");var iZ=xe;iZ("isConcatSpreadable");var nZ=xe;nZ("iterator");var aZ=xe;aZ("match");var oZ=xe;oZ("matchAll");var sZ=xe;sZ("replace");var uZ=xe;uZ("search");var lZ=xe;lZ("species");var hZ=xe;hZ("split");var dZ=xe,cZ=ZS;dZ("toPrimitive");cZ();var fZ=Ut,vZ=xe,pZ=ca;vZ("toStringTag");pZ(fZ("Symbol"),"Symbol");var gZ=xe;gZ("unscopables");var yZ=We,mZ=ca;mZ(yZ.JSON,"JSON",!0);var bZ=ae,$Z=bZ.Symbol,wZ=$Z,xO=wZ,_Z=xe;_Z("dispose");var EZ=xO,SZ=EZ,OZ=xe;OZ("asyncDispose");var TZ=K,kZ=Ut,PZ=ue,AO=kZ("Symbol"),IZ=AO.keyFor,CZ=PZ(AO.prototype.valueOf);TZ({target:"Symbol",stat:!0},{isRegistered:function(n){try{return IZ(CZ(n))!==void 0}catch{return!1}}});var xZ=K,AZ=ri,RO=Ut,RZ=ue,DZ=Do,MZ=Be,_u=RO("Symbol"),O$=_u.isWellKnown,DO=RO("Object","getOwnPropertyNames"),NZ=RZ(_u.prototype.valueOf),T$=AZ("wks");for(var pd=0,k$=DO(_u),FZ=k$.length;pd<FZ;pd++)try{var P$=k$[pd];DZ(_u[P$])&&MZ(P$)}catch{}xZ({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(n){if(O$&&O$(n))return!0;try{for(var e=NZ(n),r=0,i=DO(T$),a=i.length;r<a;r++)if(T$[i[r]]==e)return!0}catch{}return!1}});var BZ=xe;BZ("matcher");var LZ=xe;LZ("metadataKey");var jZ=xe;jZ("observable");var zZ=xe;zZ("metadata");var HZ=xe;HZ("patternMatch");var WZ=xe;WZ("replaceAll");var VZ=SZ,UZ=VZ;(function(t){t.exports=UZ})(MJ);(function(t){t.exports=af})(DJ);var Tn=V(nf),of={},GZ={get exports(){return of},set exports(t){of=t}},sf={},KZ={get exports(){return sf},set exports(t){sf=t}},qZ=Wo,YZ=qZ.f("iterator"),XZ=YZ,QZ=XZ,JZ=QZ,ZZ=JZ,eee=ZZ,tee=eee;(function(t){t.exports=tee})(KZ);(function(t){t.exports=sf})(GZ);var ree=V(of);function de(t){"@babel/helpers - typeof";return de=typeof Tn=="function"&&typeof ree=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Tn=="function"&&n.constructor===Tn&&n!==Tn.prototype?"symbol":typeof n},de(t)}var uf={},iee={get exports(){return uf},set exports(t){uf=t}},lf={},nee={get exports(){return lf},set exports(t){lf=t}},aee=Wo,oee=aee.f("toPrimitive"),see=oee,uee=see,lee=uee,hee=lee,dee=hee,cee=dee;(function(t){t.exports=cee})(nee);(function(t){t.exports=lf})(iee);var fee=V(uf);function vee(t,n){if(de(t)!=="object"||t===null)return t;var e=t[fee];if(e!==void 0){var r=e.call(t,n||"default");if(de(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}function MO(t){var n=vee(t,"string");return de(n)==="symbol"?n:String(n)}function I$(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Tl(t,MO(r.key),r)}}function F(t,n,e){return n&&I$(t.prototype,n),e&&I$(t,e),Tl(t,"prototype",{writable:!1}),t}function kl(t,n,e){return n=MO(n),n in t?Tl(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var hf={},pee={get exports(){return hf},set exports(t){hf=t}},df={},gee={get exports(){return df},set exports(t){df=t}},yee=K,mee=tn;yee({target:"Array",stat:!0},{isArray:mee});var bee=ae,$ee=bee.Array.isArray,wee=$ee,NO=wee,_ee=NO,Eee=_ee,See=Eee,Oee=See;(function(t){t.exports=Oee})(gee);(function(t){t.exports=df})(pee);var FO=V(hf);function Tee(t){if(FO(t))return t}function kee(t,n){var e=t==null?null:typeof Tn<"u"&&Br(t)||t["@@iterator"];if(e!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;u=!1}else for(;!(u=(r=a.call(e)).done)&&(s.push(r.value),s.length!==n);u=!0);}catch(h){l=!0,i=h}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var cf={},Pee={get exports(){return cf},set exports(t){cf=t}},ff={},Iee={get exports(){return ff},set exports(t){ff=t}},Cee=K,C$=tn,xee=gl,Aee=Ze,x$=Fo,Ree=nr,Dee=ir,Mee=va,Nee=Be,Fee=Go,Bee=cl,Lee=Fee("slice"),jee=Nee("species"),gd=Array,zee=Math.max;Cee({target:"Array",proto:!0,forced:!Lee},{slice:function(n,e){var r=Dee(this),i=Ree(r),a=x$(n,i),o=x$(e===void 0?i:e,i),s,u,l;if(C$(r)&&(s=r.constructor,xee(s)&&(s===gd||C$(s.prototype))?s=void 0:Aee(s)&&(s=s[jee],s===null&&(s=void 0)),s===gd||s===void 0))return Bee(r,a,o);for(u=new(s===void 0?gd:s)(zee(o-a,0)),l=0;a<o;a++,l++)a in r&&Mee(u,l,r[a]);return u.length=l,u}});var Hee=tt,Wee=Hee("Array").slice,Vee=Fe,Uee=Wee,yd=Array.prototype,Gee=function(t){var n=t.slice;return t===yd||Vee(yd,t)&&n===yd.slice?Uee:n},Kee=Gee,BO=Kee,qee=BO,Yee=qee,Xee=Yee,Qee=Xee;(function(t){t.exports=Qee})(Iee);(function(t){t.exports=ff})(Pee);var Jee=V(cf),vf={},Zee={get exports(){return vf},set exports(t){vf=t}},pf={},ete={get exports(){return pf},set exports(t){pf=t}},tte=KS,rte=tte,ite=rte,nte=ite;(function(t){t.exports=nte})(ete);(function(t){t.exports=pf})(Zee);var LO=V(vf);function gf(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function jO(t,n){var e;if(t){if(typeof t=="string")return gf(t,n);var r=Jee(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return LO(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gf(t,n)}}function ate(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ke(t,n){return Tee(t)||kee(t,n)||jO(t,n)||ate()}function ote(t){if(FO(t))return gf(t)}function ste(t){if(typeof Tn<"u"&&Br(t)!=null||t["@@iterator"]!=null)return LO(t)}function ute(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hr(t){return ote(t)||ste(t)||jO(t)||ute()}var yf={},lte={get exports(){return yf},set exports(t){yf=t}};(function(t){t.exports=xO})(lte);var ci=V(yf),mf={},hte={get exports(){return mf},set exports(t){mf=t}},dte=tt,cte=dte("Array").concat,fte=Fe,vte=cte,md=Array.prototype,pte=function(t){var n=t.concat;return t===md||fte(md,t)&&n===md.concat?vte:n},gte=pte,yte=gte;(function(t){t.exports=yte})(hte);var Rp=V(mf),bf={},mte={get exports(){return bf},set exports(t){bf=t}};(function(t){t.exports=BO})(mte);var ot=V(bf),A$={},bte={get exports(){return A$},set exports(t){A$=t}},$te=K,wte=OO;$te({target:"Reflect",stat:!0},{ownKeys:wte});var _te=ae,Ete=_te.Reflect.ownKeys,Ste=Ete,Ote=Ste;(function(t){t.exports=Ote})(bte);var $f={},Tte={get exports(){return $f},set exports(t){$f=t}};(function(t){t.exports=NO})(Tte);var ce=V($f),wf={},kte={get exports(){return wf},set exports(t){wf=t}},Pte=K,Ite=hi.map,Cte=Go,xte=Cte("map");Pte({target:"Array",proto:!0,forced:!xte},{map:function(n){return Ite(this,n,arguments.length>1?arguments[1]:void 0)}});var Ate=tt,Rte=Ate("Array").map,Dte=Fe,Mte=Rte,bd=Array.prototype,Nte=function(t){var n=t.map;return t===bd||Dte(bd,t)&&n===bd.map?Mte:n},Fte=Nte,Bte=Fte;(function(t){t.exports=Bte})(kte);var zn=V(wf),_f={},Lte={get exports(){return _f},set exports(t){_f=t}},jte=K,zte=Nt,zO=Lo,Hte=se,Wte=Hte(function(){zO(1)});jte({target:"Object",stat:!0,forced:Wte},{keys:function(n){return zO(zte(n))}});var Vte=ae,Ute=Vte.Object.keys,Gte=Ute,Kte=Gte;(function(t){t.exports=Kte})(Lte);var Oe=V(_f),Ef={},qte={get exports(){return Ef},set exports(t){Ef=t}},Yte=K,Xte=ue,HO=Date,Qte=Xte(HO.prototype.getTime);Yte({target:"Date",stat:!0},{now:function(){return Qte(new HO)}});var Jte=ae,Zte=Jte.Date.now,ere=Zte,tre=ere;(function(t){t.exports=tre})(qte);var Eu=V(Ef),Sf={},rre={get exports(){return Sf},set exports(t){Sf=t}},ire=se,pa=function(t,n){var e=[][t];return!!e&&ire(function(){e.call(null,n||function(){return 1},1)})},nre=hi.forEach,are=pa,ore=are("forEach"),sre=ore?[].forEach:function(n){return nre(this,n,arguments.length>1?arguments[1]:void 0)},ure=K,R$=sre;ure({target:"Array",proto:!0,forced:[].forEach!=R$},{forEach:R$});var lre=tt,hre=lre("Array").forEach,dre=hre,cre=dre,fre=Ji,vre=et,pre=Fe,gre=cre,$d=Array.prototype,yre={DOMTokenList:!0,NodeList:!0},mre=function(t){var n=t.forEach;return t===$d||pre($d,t)&&n===$d.forEach||vre(yre,fre(t))?gre:n};(function(t){t.exports=mre})(rre);var pe=V(Sf),Of={},bre={get exports(){return Of},set exports(t){Of=t}},$re=K,wre=ue,_re=tn,Ere=wre([].reverse),D$=[1,2];$re({target:"Array",proto:!0,forced:String(D$)===String(D$.reverse())},{reverse:function(){return _re(this)&&(this.length=this.length),Ere(this)}});var Sre=tt,Ore=Sre("Array").reverse,Tre=Fe,kre=Ore,wd=Array.prototype,Pre=function(t){var n=t.reverse;return t===wd||Tre(wd,t)&&n===wd.reverse?kre:n},Ire=Pre,Cre=Ire;(function(t){t.exports=Cre})(bre);var xi=V(Of),Tf={},xre={get exports(){return Tf},set exports(t){Tf=t}},Are=Ge,Rre=tn,Dre=TypeError,Mre=Object.getOwnPropertyDescriptor,Nre=Are&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Fre=Nre?function(t,n){if(Rre(t)&&!Mre(t,"length").writable)throw Dre("Cannot set read only .length");return t.length=n}:function(t,n){return t.length=n},M$=la,Bre=TypeError,WO=function(t,n){if(!delete t[n])throw Bre("Cannot delete property "+M$(n)+" of "+M$(t))},Lre=K,jre=Nt,zre=Fo,Hre=dl,Wre=nr,Vre=Fre,Ure=IO,Gre=kp,Kre=va,_d=WO,qre=Go,Yre=qre("splice"),Xre=Math.max,Qre=Math.min;Lre({target:"Array",proto:!0,forced:!Yre},{splice:function(n,e){var r=jre(this),i=Wre(r),a=zre(n,i),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=Qre(Xre(Hre(e),0),i-a)),Ure(i+s-u),l=Gre(r,u),h=0;h<u;h++)d=a+h,d in r&&Kre(l,h,r[d]);if(l.length=u,s<u){for(h=a;h<i-u;h++)d=h+u,c=h+s,d in r?r[c]=r[d]:_d(r,c);for(h=i;h>i-u+s;h--)_d(r,h-1)}else if(s>u)for(h=i-u;h>a;h--)d=h+u-1,c=h+s-1,d in r?r[c]=r[d]:_d(r,c);for(h=0;h<s;h++)r[h+a]=arguments[h+2];return Vre(r,i-u+s),l}});var Jre=tt,Zre=Jre("Array").splice,eie=Fe,tie=Zre,Ed=Array.prototype,rie=function(t){var n=t.splice;return t===Ed||eie(Ed,t)&&n===Ed.splice?tie:n},iie=rie,nie=iie;(function(t){t.exports=nie})(xre);var Tr=V(Tf),kf={},aie={get exports(){return kf},set exports(t){kf=t}},oie=K,sie=yp.includes,uie=se,lie=uie(function(){return!Array(1).includes()});oie({target:"Array",proto:!0,forced:lie},{includes:function(n){return sie(this,n,arguments.length>1?arguments[1]:void 0)}});var hie=tt,die=hie("Array").includes,cie=Ze,fie=Fr,vie=Be,pie=vie("match"),gie=function(t){var n;return cie(t)&&((n=t[pie])!==void 0?!!n:fie(t)=="RegExp")},yie=gie,mie=TypeError,bie=function(t){if(yie(t))throw mie("The method doesn't accept regular expressions");return t},$ie=Be,wie=$ie("match"),_ie=function(t){var n=/./;try{"/./"[t](n)}catch{try{return n[wie]=!1,"/./"[t](n)}catch{}}return!1},Eie=K,Sie=ue,Oie=bie,Tie=xo,N$=br,kie=_ie,Pie=Sie("".indexOf);Eie({target:"String",proto:!0,forced:!kie("includes")},{includes:function(n){return!!~Pie(N$(Tie(this)),N$(Oie(n)),arguments.length>1?arguments[1]:void 0)}});var Iie=tt,Cie=Iie("String").includes,F$=Fe,xie=die,Aie=Cie,Sd=Array.prototype,Od=String.prototype,Rie=function(t){var n=t.includes;return t===Sd||F$(Sd,t)&&n===Sd.includes?xie:typeof t=="string"||t===Od||F$(Od,t)&&n===Od.includes?Aie:n},Die=Rie,Mie=Die;(function(t){t.exports=Mie})(aie);var pr=V(kf),Pf={},Nie={get exports(){return Pf},set exports(t){Pf=t}},Fie=K,Bie=se,Lie=Nt,VO=pl,jie=RS,zie=Bie(function(){VO(1)});Fie({target:"Object",stat:!0,forced:zie,sham:!jie},{getPrototypeOf:function(n){return VO(Lie(n))}});var Hie=ae,Wie=Hie.Object.getPrototypeOf,Vie=Wie,UO=Vie;(function(t){t.exports=UO})(Nie);var B$=V(Pf),If={},Uie={get exports(){return If},set exports(t){If=t}},Gie=K,Kie=hi.filter,qie=Go,Yie=qie("filter");Gie({target:"Array",proto:!0,forced:!Yie},{filter:function(n){return Kie(this,n,arguments.length>1?arguments[1]:void 0)}});var Xie=tt,Qie=Xie("Array").filter,Jie=Fe,Zie=Qie,Td=Array.prototype,ene=function(t){var n=t.filter;return t===Td||Jie(Td,t)&&n===Td.filter?Zie:n},tne=ene,rne=tne;(function(t){t.exports=rne})(Uie);var Ot=V(If),L$={},ine={get exports(){return L$},set exports(t){L$=t}},nne=Ge,GO=ue,ane=Lo,one=ir,sne=Po.f,une=GO(sne),lne=GO([].push),j$=function(t){return function(n){for(var e=one(n),r=ane(e),i=r.length,a=0,o=[],s;i>a;)s=r[a++],(!nne||une(e,s))&&lne(o,t?[s,e[s]]:e[s]);return o}},hne={entries:j$(!0),values:j$(!1)},dne=K,cne=hne.values;dne({target:"Object",stat:!0},{values:function(n){return cne(n)}});var fne=ae,vne=fne.Object.values,pne=vne,gne=pne;(function(t){t.exports=gne})(ine);var Cf={},yne={get exports(){return Cf},set exports(t){Cf=t}},Pl=`
|
|
64
|
+
\v\f\r \u2028\u2029\uFEFF`,mne=ue,bne=xo,$ne=br,xf=Pl,z$=mne("".replace),wne=RegExp("^["+xf+"]+"),_ne=RegExp("(^|[^"+xf+"])["+xf+"]+$"),kd=function(t){return function(n){var e=$ne(bne(n));return t&1&&(e=z$(e,wne,"")),t&2&&(e=z$(e,_ne,"$1")),e}},Dp={start:kd(1),end:kd(2),trim:kd(3)},KO=We,Ene=se,Sne=ue,One=br,Tne=Dp.trim,H$=Pl,Ra=KO.parseInt,W$=KO.Symbol,V$=W$&&W$.iterator,qO=/^[+-]?0x/i,kne=Sne(qO.exec),Pne=Ra(H$+"08")!==8||Ra(H$+"0x16")!==22||V$&&!Ene(function(){Ra(Object(V$))}),Ine=Pne?function(n,e){var r=Tne(One(n));return Ra(r,e>>>0||(kne(qO,r)?16:10))}:Ra,Cne=K,U$=Ine;Cne({global:!0,forced:parseInt!=U$},{parseInt:U$});var xne=ae,Ane=xne.parseInt,Rne=Ane,Dne=Rne;(function(t){t.exports=Dne})(yne);var Qt=V(Cf),Af={},Mne={get exports(){return Af},set exports(t){Af=t}},Nne=K,Fne=vp,Bne=yp.indexOf,Lne=pa,Rf=Fne([].indexOf),YO=!!Rf&&1/Rf([1],1,-0)<0,jne=YO||!Lne("indexOf");Nne({target:"Array",proto:!0,forced:jne},{indexOf:function(n){var e=arguments.length>1?arguments[1]:void 0;return YO?Rf(this,n,e)||0:Bne(this,n,e)}});var zne=tt,Hne=zne("Array").indexOf,Wne=Fe,Vne=Hne,Pd=Array.prototype,Une=function(t){var n=t.indexOf;return t===Pd||Wne(Pd,t)&&n===Pd.indexOf?Vne:n},Gne=Une,Kne=Gne;(function(t){t.exports=Kne})(Mne);var oe=V(Af),G$={},qne={get exports(){return G$},set exports(t){G$=t}},Yne=CS.PROPER,Xne=se,K$=Pl,q$="
",Qne=function(t){return Xne(function(){return!!K$[t]()||q$[t]()!==q$||Yne&&K$[t].name!==t})},Jne=K,Zne=Dp.trim,eae=Qne;Jne({target:"String",proto:!0,forced:eae("trim")},{trim:function(){return Zne(this)}});var tae=tt,rae=tae("String").trim,iae=Fe,nae=rae,Id=String.prototype,aae=function(t){var n=t.trim;return typeof t=="string"||t===Id||iae(Id,t)&&n===Id.trim?nae:n},oae=aae,sae=oae;(function(t){t.exports=sae})(qne);var Df={},uae={get exports(){return Df},set exports(t){Df=t}},lae=K,hae=Ge,dae=da;lae({target:"Object",stat:!0,sham:!hae},{create:dae});var cae=ae,fae=cae.Object,vae=function(n,e){return fae.create(n,e)},pae=vae,XO=pae;(function(t){t.exports=XO})(uae);var Ai=V(Df),Mf={},gae={get exports(){return Mf},set exports(t){Mf=t}},Nf=ae,yae=ko;Nf.JSON||(Nf.JSON={stringify:JSON.stringify});var mae=function(n,e,r){return yae(Nf.JSON.stringify,null,arguments)},bae=mae,$ae=bae;(function(t){t.exports=$ae})(gae);var Ko=V(Mf),Ff={},wae={get exports(){return Ff},set exports(t){Ff=t}},_ae=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Eae=TypeError,Sae=function(t,n){if(t<n)throw Eae("Not enough arguments");return t},QO=We,Oae=ko,Tae=Je,kae=_ae,Pae=Ao,Iae=cl,Cae=Sae,xae=QO.Function,Aae=/MSIE .\./.test(Pae)||kae&&function(){var t=QO.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),JO=function(t,n){var e=n?2:1;return Aae?function(r,i){var a=Cae(arguments.length,1)>e,o=Tae(r)?r:xae(r),s=a?Iae(arguments,e):[],u=a?function(){Oae(o,this,s)}:o;return n?t(u,i):t(u)}:t},Rae=K,ZO=We,Dae=JO,Y$=Dae(ZO.setInterval,!0);Rae({global:!0,bind:!0,forced:ZO.setInterval!==Y$},{setInterval:Y$});var Mae=K,eT=We,Nae=JO,X$=Nae(eT.setTimeout,!0);Mae({global:!0,bind:!0,forced:eT.setTimeout!==X$},{setTimeout:X$});var Fae=ae,Bae=Fae.setTimeout;(function(t){t.exports=Bae})(wae);var gr=V(Ff),Bf={},Lae={get exports(){return Bf},set exports(t){Bf=t}},jae=Nt,Q$=Fo,zae=nr,Hae=function(n){for(var e=jae(this),r=zae(e),i=arguments.length,a=Q$(i>1?arguments[1]:void 0,r),o=i>2?arguments[2]:void 0,s=o===void 0?r:Q$(o,r);s>a;)e[a++]=n;return e},Wae=K,Vae=Hae;Wae({target:"Array",proto:!0},{fill:Vae});var Uae=tt,Gae=Uae("Array").fill,Kae=Fe,qae=Gae,Cd=Array.prototype,Yae=function(t){var n=t.fill;return t===Cd||Kae(Cd,t)&&n===Cd.fill?qae:n},Xae=Yae,Qae=Xae;(function(t){t.exports=Qae})(Lae);var qo=V(Bf);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
65
|
+
* http://naver.github.io/egjs
|
|
66
|
+
*
|
|
67
|
+
* Forked By Naver egjs
|
|
68
|
+
* Copyright (c) hammerjs
|
|
69
|
+
* Licensed under the MIT license */function rr(){return rr=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},rr.apply(this,arguments)}function Kt(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}function Cs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Lf;typeof Object.assign!="function"?Lf=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}:Lf=Object.assign;var ji=Lf,J$=["","webkit","Moz","MS","ms","o"],Jae=typeof document>"u"?{style:{}}:document.createElement("div"),Zae="function",kn=Math.round,zi=Math.abs,Mp=Date.now;function Il(t,n){for(var e,r,i=n[0].toUpperCase()+n.slice(1),a=0;a<J$.length;){if(e=J$[a],r=e?e+i:n,r in t)return r;a++}}var kr;typeof window>"u"?kr={}:kr=window;var tT=Il(Jae.style,"touchAction"),rT=tT!==void 0;function eoe(){if(!rT)return!1;var t={},n=kr.CSS&&kr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=n?kr.CSS.supports("touch-action",e):!0}),t}var iT="compute",nT="auto",jf="manipulation",Ri="none",Ja="pan-x",Za="pan-y",xs=eoe(),toe=/mobile|tablet|ip(ad|hone|od)|android/i,aT="ontouchstart"in kr,roe=Il(kr,"PointerEvent")!==void 0,ioe=aT&&toe.test(navigator.userAgent),Yo="touch",noe="pen",Np="mouse",aoe="kinect",ooe=25,pt=1,rn=2,ze=4,kt=8,Su=1,Xo=2,Qo=4,Jo=8,Hn=16,yr=Xo|Qo,Di=Jo|Hn,oT=yr|Di,sT=["x","y"],Ou=["clientX","clientY"];function Pr(t,n,e){var r;if(t)if(t.forEach)t.forEach(n,e);else if(t.length!==void 0)for(r=0;r<t.length;)n.call(e,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&n.call(e,t[r],r,t)}function Cl(t,n){return typeof t===Zae?t.apply(n&&n[0]||void 0,n):t}function Oi(t,n){return t.indexOf(n)>-1}function soe(t){if(Oi(t,Ri))return Ri;var n=Oi(t,Ja),e=Oi(t,Za);return n&&e?Ri:n||e?n?Ja:Za:Oi(t,jf)?jf:nT}var uT=function(){function t(e,r){this.manager=e,this.set(r)}var n=t.prototype;return n.set=function(r){r===iT&&(r=this.compute()),rT&&this.manager.element.style&&xs[r]&&(this.manager.element.style[tT]=r),this.actions=r.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var r=[];return Pr(this.manager.recognizers,function(i){Cl(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),soe(r.join(" "))},n.preventDefaults=function(r){var i=r.srcEvent,a=r.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=Oi(o,Ri)&&!xs[Ri],u=Oi(o,Za)&&!xs[Za],l=Oi(o,Ja)&&!xs[Ja];if(s){var h=r.pointers.length===1,d=r.distance<2,c=r.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&yr||l&&a&Di))return this.preventSrc(i)},n.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},t}();function Fp(t,n){for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function lT(t){var n=t.length;if(n===1)return{x:kn(t[0].clientX),y:kn(t[0].clientY)};for(var e=0,r=0,i=0;i<n;)e+=t[i].clientX,r+=t[i].clientY,i++;return{x:kn(e/n),y:kn(r/n)}}function Z$(t){for(var n=[],e=0;e<t.pointers.length;)n[e]={clientX:kn(t.pointers[e].clientX),clientY:kn(t.pointers[e].clientY)},e++;return{timeStamp:Mp(),pointers:n,center:lT(n),deltaX:t.deltaX,deltaY:t.deltaY}}function Tu(t,n,e){e||(e=sT);var r=n[e[0]]-t[e[0]],i=n[e[1]]-t[e[1]];return Math.sqrt(r*r+i*i)}function zf(t,n,e){e||(e=sT);var r=n[e[0]]-t[e[0]],i=n[e[1]]-t[e[1]];return Math.atan2(i,r)*180/Math.PI}function hT(t,n){return t===n?Su:zi(t)>=zi(n)?t<0?Xo:Qo:n<0?Jo:Hn}function uoe(t,n){var e=n.center,r=t.offsetDelta||{},i=t.prevDelta||{},a=t.prevInput||{};(n.eventType===pt||a.eventType===ze)&&(i=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=t.offsetDelta={x:e.x,y:e.y}),n.deltaX=i.x+(e.x-r.x),n.deltaY=i.y+(e.y-r.y)}function dT(t,n,e){return{x:n/t||0,y:e/t||0}}function loe(t,n){return Tu(n[0],n[1],Ou)/Tu(t[0],t[1],Ou)}function hoe(t,n){return zf(n[1],n[0],Ou)+zf(t[1],t[0],Ou)}function doe(t,n){var e=t.lastInterval||n,r=n.timeStamp-e.timeStamp,i,a,o,s;if(n.eventType!==kt&&(r>ooe||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,h=dT(r,u,l);a=h.x,o=h.y,i=zi(h.x)>zi(h.y)?h.x:h.y,s=hT(u,l),t.lastInterval=n}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=i,n.velocityX=a,n.velocityY=o,n.direction=s}function coe(t,n){var e=t.session,r=n.pointers,i=r.length;e.firstInput||(e.firstInput=Z$(n)),i>1&&!e.firstMultiple?e.firstMultiple=Z$(n):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=lT(r);n.timeStamp=Mp(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=zf(s,u),n.distance=Tu(s,u),uoe(e,n),n.offsetDirection=hT(n.deltaX,n.deltaY);var l=dT(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=zi(l.x)>zi(l.y)?l.x:l.y,n.scale=o?loe(o.pointers,r):1,n.rotation=o?hoe(o.pointers,r):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,doe(e,n);var h=t.element,d=n.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,Fp(c,h)&&(h=c),n.target=h}function foe(t,n,e){var r=e.pointers.length,i=e.changedPointers.length,a=n&pt&&r-i===0,o=n&(ze|kt)&&r-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=n,coe(t,e),t.emit("hammer.input",e),t.recognize(e),t.session.prevInput=e}function eo(t){return t.trim().split(/\s+/g)}function Da(t,n,e){Pr(eo(n),function(r){t.addEventListener(r,e,!1)})}function Ma(t,n,e){Pr(eo(n),function(r){t.removeEventListener(r,e,!1)})}function e1(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||window}var ga=function(){function t(e,r){var i=this;this.manager=e,this.callback=r,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Cl(e.options.enable,[e])&&i.handler(a)},this.init()}var n=t.prototype;return n.handler=function(){},n.init=function(){this.evEl&&Da(this.element,this.evEl,this.domHandler),this.evTarget&&Da(this.target,this.evTarget,this.domHandler),this.evWin&&Da(e1(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&Ma(this.element,this.evEl,this.domHandler),this.evTarget&&Ma(this.target,this.evTarget,this.domHandler),this.evWin&&Ma(e1(this.element),this.evWin,this.domHandler)},t}();function Hi(t,n,e){if(t.indexOf&&!e)return t.indexOf(n);for(var r=0;r<t.length;){if(e&&t[r][e]==n||!e&&t[r]===n)return r;r++}return-1}var voe={pointerdown:pt,pointermove:rn,pointerup:ze,pointercancel:kt,pointerout:kt},poe={2:Yo,3:noe,4:Np,5:aoe},cT="pointerdown",fT="pointermove pointerup pointercancel";kr.MSPointerEvent&&!kr.PointerEvent&&(cT="MSPointerDown",fT="MSPointerMove MSPointerUp MSPointerCancel");var vT=function(t){Kt(n,t);function n(){var r,i=n.prototype;return i.evEl=cT,i.evWin=fT,r=t.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var e=n.prototype;return e.handler=function(i){var a=this.store,o=!1,s=i.type.toLowerCase().replace("ms",""),u=voe[s],l=poe[i.pointerType]||i.pointerType,h=l===Yo,d=Hi(a,i.pointerId,"pointerId");u&pt&&(i.button===0||h)?d<0&&(a.push(i),d=a.length-1):u&(ze|kt)&&(o=!0),!(d<0)&&(a[d]=i,this.callback(this.manager,u,{pointers:a,changedPointers:[i],pointerType:l,srcEvent:i}),o&&a.splice(d,1))},n}(ga);function to(t){return Array.prototype.slice.call(t,0)}function Bp(t,n,e){for(var r=[],i=[],a=0;a<t.length;){var o=n?t[a][n]:t[a];Hi(i,o)<0&&r.push(t[a]),i[a]=o,a++}return e&&(n?r=r.sort(function(s,u){return s[n]>u[n]}):r=r.sort()),r}var goe={touchstart:pt,touchmove:rn,touchend:ze,touchcancel:kt},yoe="touchstart touchmove touchend touchcancel",Lp=function(t){Kt(n,t);function n(){var r;return n.prototype.evTarget=yoe,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=n.prototype;return e.handler=function(i){var a=goe[i.type],o=moe.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Yo,srcEvent:i})},n}(ga);function moe(t,n){var e=to(t.touches),r=this.targetIds;if(n&(pt|rn)&&e.length===1)return r[e[0].identifier]=!0,[e,e];var i,a,o=to(t.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Fp(l.target,u)}),n===pt)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),n&(ze|kt)&&delete r[o[i].identifier],i++;if(s.length)return[Bp(a.concat(s),"identifier",!0),s]}var boe={mousedown:pt,mousemove:rn,mouseup:ze},$oe="mousedown",woe="mousemove mouseup",jp=function(t){Kt(n,t);function n(){var r,i=n.prototype;return i.evEl=$oe,i.evWin=woe,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=n.prototype;return e.handler=function(i){var a=boe[i.type];a&pt&&i.button===0&&(this.pressed=!0),a&rn&&i.which!==1&&(a=ze),this.pressed&&(a&ze&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:Np,srcEvent:i}))},n}(ga),_oe=2500,t1=25;function r1(t){var n=t.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(r);var a=function(){var s=i.indexOf(r);s>-1&&i.splice(s,1)};setTimeout(a,_oe)}}function Eoe(t,n){t&pt?(this.primaryTouch=n.changedPointers[0].identifier,r1.call(this,n)):t&(ze|kt)&&r1.call(this,n)}function Soe(t){for(var n=t.srcEvent.clientX,e=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(n-i.x),o=Math.abs(e-i.y);if(a<=t1&&o<=t1)return!0}return!1}var pT=function(){var t=function(n){Kt(e,n);function e(i,a){var o;return o=n.call(this,i,a)||this,o.handler=function(s,u,l){var h=l.pointerType===Yo,d=l.pointerType===Np;if(!(d&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(h)Eoe.call(Cs(Cs(o)),u,l);else if(d&&Soe.call(Cs(Cs(o)),l))return;o.callback(s,u,l)}},o.touch=new Lp(o.manager,o.handler),o.mouse=new jp(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var r=e.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(ga);return t}();function Ooe(t){var n,e=t.options.inputClass;return e?n=e:roe?n=vT:ioe?n=Lp:aT?n=pT:n=jp,new n(t,foe)}function Pn(t,n,e){return Array.isArray(t)?(Pr(t,e[n],e),!0):!1}var Xs=1,Ht=2,Wn=4,Zr=8,Ir=Zr,ro=16,cr=32,Toe=1;function koe(){return Toe++}function As(t,n){var e=n.manager;return e?e.get(t):t}function i1(t){return t&ro?"cancel":t&Zr?"end":t&Wn?"move":t&Ht?"start":""}var Zo=function(){function t(e){e===void 0&&(e={}),this.options=rr({enable:!0},e),this.id=koe(),this.manager=null,this.state=Xs,this.simultaneous={},this.requireFail=[]}var n=t.prototype;return n.set=function(r){return ji(this.options,r),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(r){if(Pn(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=As(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},n.dropRecognizeWith=function(r){return Pn(r,"dropRecognizeWith",this)?this:(r=As(r,this),delete this.simultaneous[r.id],this)},n.requireFailure=function(r){if(Pn(r,"requireFailure",this))return this;var i=this.requireFail;return r=As(r,this),Hi(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},n.dropRequireFailure=function(r){if(Pn(r,"dropRequireFailure",this))return this;r=As(r,this);var i=Hi(this.requireFail,r);return i>-1&&this.requireFail.splice(i,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},n.emit=function(r){var i=this,a=this.state;function o(s){i.manager.emit(s,r)}a<Zr&&o(i.options.event+i1(a)),o(i.options.event),r.additionalEvent&&o(r.additionalEvent),a>=Zr&&o(i.options.event+i1(a))},n.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=cr},n.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(cr|Xs)))return!1;r++}return!0},n.recognize=function(r){var i=ji({},r);if(!Cl(this.options.enable,[this,i])){this.reset(),this.state=cr;return}this.state&(Ir|ro|cr)&&(this.state=Xs),this.state=this.process(i),this.state&(Ht|Wn|Zr|ro)&&this.tryEmit(i)},n.process=function(r){},n.getTouchAction=function(){},n.reset=function(){},t}(),Hf=function(t){Kt(n,t);function n(r){var i;return r===void 0&&(r={}),i=t.call(this,rr({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var e=n.prototype;return e.getTouchAction=function(){return[jf]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&pt&&this.count===0)return this.failTimeout();if(u&&l&&s){if(i.eventType!==ze)return this.failTimeout();var h=this.pTime?i.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||Tu(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!d||!h?this.count=1:this.count+=1,this._input=i;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Ir,a.tryEmit()},o.interval),Ht):Ir}return cr},e.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=cr},this.options.interval),cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Ir&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},n}(Zo),Vn=function(t){Kt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,rr({pointers:1},r))||this}var e=n.prototype;return e.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},e.process=function(i){var a=this.state,o=i.eventType,s=a&(Ht|Wn),u=this.attrTest(i);return s&&(o&kt||!u)?a|ro:s||u?o&ze?a|Zr:a&Ht?a|Wn:Ht:cr},n}(Zo);function gT(t){return t===Hn?"down":t===Jo?"up":t===Xo?"left":t===Qo?"right":""}var zp=function(t){Kt(n,t);function n(r){var i;return r===void 0&&(r={}),i=t.call(this,rr({event:"pan",threshold:10,pointers:1,direction:oT},r))||this,i.pX=null,i.pY=null,i}var e=n.prototype;return e.getTouchAction=function(){var i=this.options.direction,a=[];return i&yr&&a.push(Za),i&Di&&a.push(Ja),a},e.directionTest=function(i){var a=this.options,o=!0,s=i.distance,u=i.direction,l=i.deltaX,h=i.deltaY;return u&a.direction||(a.direction&yr?(u=l===0?Su:l<0?Xo:Qo,o=l!==this.pX,s=Math.abs(i.deltaX)):(u=h===0?Su:h<0?Jo:Hn,o=h!==this.pY,s=Math.abs(i.deltaY))),i.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(i){return Vn.prototype.attrTest.call(this,i)&&(this.state&Ht||!(this.state&Ht)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=gT(i.direction);a&&(i.additionalEvent=this.options.event+a),t.prototype.emit.call(this,i)},n}(Vn),yT=function(t){Kt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,rr({event:"swipe",threshold:10,velocity:.3,direction:yr|Di,pointers:1},r))||this}var e=n.prototype;return e.getTouchAction=function(){return zp.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(yr|Di)?o=i.overallVelocity:a&yr?o=i.overallVelocityX:a&Di&&(o=i.overallVelocityY),t.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&zi(o)>this.options.velocity&&i.eventType&ze},e.emit=function(i){var a=gT(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},n}(Vn),mT=function(t){Kt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,rr({event:"pinch",threshold:0,pointers:2},r))||this}var e=n.prototype;return e.getTouchAction=function(){return[Ri]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Ht)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}t.prototype.emit.call(this,i)},n}(Vn),bT=function(t){Kt(n,t);function n(r){return r===void 0&&(r={}),t.call(this,rr({event:"rotate",threshold:0,pointers:2},r))||this}var e=n.prototype;return e.getTouchAction=function(){return[Ri]},e.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Ht)},n}(Vn),$T=function(t){Kt(n,t);function n(r){var i;return r===void 0&&(r={}),i=t.call(this,rr({event:"press",pointers:1,time:251,threshold:9},r))||this,i._timer=null,i._input=null,i}var e=n.prototype;return e.getTouchAction=function(){return[nT]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!s||i.eventType&(ze|kt)&&!l)this.reset();else if(i.eventType&pt)this.reset(),this._timer=setTimeout(function(){a.state=Ir,a.tryEmit()},o.time);else if(i.eventType&ze)return Ir;return cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===Ir&&(i&&i.eventType&ze?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=Mp(),this.manager.emit(this.options.event,this._input)))},n}(Zo),wT={domEvents:!1,touchAction:iT,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},n1=[[bT,{enable:!1}],[mT,{enable:!1},["rotate"]],[yT,{direction:yr}],[zp,{direction:yr},["swipe"]],[Hf],[Hf,{event:"doubletap",taps:2},["tap"]],[$T]],Poe=1,a1=2;function o1(t,n){var e=t.element;if(e.style){var r;Pr(t.options.cssProps,function(i,a){r=Il(e.style,a),n?(t.oldCssProps[r]=e.style[r],e.style[r]=i):e.style[r]=t.oldCssProps[r]||""}),n||(t.oldCssProps={})}}function Ioe(t,n){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var s1=function(){function t(e,r){var i=this;this.options=ji({},wT,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Ooe(this),this.touchAction=new uT(this,this.options.touchAction),o1(this,!0),Pr(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=t.prototype;return n.set=function(r){return ji(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},n.stop=function(r){this.session.stopped=r?a1:Poe},n.recognize=function(r){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(r);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&Ir)&&(i.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],i.stopped!==a1&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(Ht|Wn|Zr)&&(i.curRecognizer=a,s=a),u++}},n.get=function(r){if(r instanceof Zo)return r;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===r)return i[a];return null},n.add=function(r){if(Pn(r,"add",this))return this;var i=this.get(r.options.event);return i&&this.remove(i),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},n.remove=function(r){if(Pn(r,"remove",this))return this;var i=this.get(r);if(r){var a=this.recognizers,o=Hi(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(r,i){if(r===void 0||i===void 0)return this;var a=this.handlers;return Pr(eo(r),function(o){a[o]=a[o]||[],a[o].push(i)}),this},n.off=function(r,i){if(r===void 0)return this;var a=this.handlers;return Pr(eo(r),function(o){i?a[o]&&a[o].splice(Hi(a[o],i),1):delete a[o]}),this},n.emit=function(r,i){this.options.domEvents&&Ioe(r,i);var a=this.handlers[r]&&this.handlers[r].slice();if(!(!a||!a.length)){i.type=r,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},n.destroy=function(){this.element&&o1(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Coe={touchstart:pt,touchmove:rn,touchend:ze,touchcancel:kt},xoe="touchstart",Aoe="touchstart touchmove touchend touchcancel",Roe=function(t){Kt(n,t);function n(){var r,i=n.prototype;return i.evTarget=xoe,i.evWin=Aoe,r=t.apply(this,arguments)||this,r.started=!1,r}var e=n.prototype;return e.handler=function(i){var a=Coe[i.type];if(a===pt&&(this.started=!0),!!this.started){var o=Doe.call(this,i,a);a&(ze|kt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Yo,srcEvent:i})}},n}(ga);function Doe(t,n){var e=to(t.touches),r=to(t.changedTouches);return n&(ze|kt)&&(e=Bp(e.concat(r),"identifier",!0)),[e,r]}function _T(t,n,e){var r="DEPRECATED METHOD: "+n+`
|
|
70
|
+
`+e+` AT
|
|
71
|
+
`;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,r,a),t.apply(this,arguments)}}var ET=_T(function(t,n,e){for(var r=Object.keys(n),i=0;i<r.length;)(!e||e&&t[r[i]]===void 0)&&(t[r[i]]=n[r[i]]),i++;return t},"extend","Use `assign`."),Moe=_T(function(t,n){return ET(t,n,!0)},"merge","Use `assign`.");function Noe(t,n,e){var r=n.prototype,i;i=t.prototype=Object.create(r),i.constructor=t,i._super=r,e&&ji(i,e)}function u1(t,n){return function(){return t.apply(n,arguments)}}var ST=function(){var t=function(e,r){return r===void 0&&(r={}),new s1(e,rr({recognizers:n1.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=oT,t.DIRECTION_DOWN=Hn,t.DIRECTION_LEFT=Xo,t.DIRECTION_RIGHT=Qo,t.DIRECTION_UP=Jo,t.DIRECTION_HORIZONTAL=yr,t.DIRECTION_VERTICAL=Di,t.DIRECTION_NONE=Su,t.DIRECTION_DOWN=Hn,t.INPUT_START=pt,t.INPUT_MOVE=rn,t.INPUT_END=ze,t.INPUT_CANCEL=kt,t.STATE_POSSIBLE=Xs,t.STATE_BEGAN=Ht,t.STATE_CHANGED=Wn,t.STATE_ENDED=Zr,t.STATE_RECOGNIZED=Ir,t.STATE_CANCELLED=ro,t.STATE_FAILED=cr,t.Manager=s1,t.Input=ga,t.TouchAction=uT,t.TouchInput=Lp,t.MouseInput=jp,t.PointerEventInput=vT,t.TouchMouseInput=pT,t.SingleTouchInput=Roe,t.Recognizer=Zo,t.AttrRecognizer=Vn,t.Tap=Hf,t.Pan=zp,t.Swipe=yT,t.Pinch=mT,t.Rotate=bT,t.Press=$T,t.on=Da,t.off=Ma,t.each=Pr,t.merge=Moe,t.extend=ET,t.bindFn=u1,t.assign=ji,t.inherit=Noe,t.bindFn=u1,t.prefixed=Il,t.toArray=to,t.inArray=Hi,t.uniqueArray=Bp,t.splitStr=eo,t.boolOrFn=Cl,t.hasParent=Fp,t.addEventListeners=Da,t.removeEventListeners=Ma,t.defaults=ji({},wT,{preset:n1}),t}();ST.defaults;var Foe=ST;function OT(t,n){var e=typeof ci<"u"&&Br(t)||t["@@iterator"];if(!e){if(ce(t)||(e=Boe(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
72
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Boe(t,n){var e;if(t){if(typeof t=="string")return l1(t,n);var r=ot(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return en(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l1(t,n)}}function l1(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}ci("DELETE");function xl(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return Loe(n.length?n:[Eu()])}function Loe(t){var n=joe(t),e=ke(n,3),r=e[0],i=e[1],a=e[2],o=1,s=function(){var l=2091639*r+o*23283064365386963e-26;return r=i,i=a,a=l-(o=l|0)};return s.uint32=function(){return s()*4294967296},s.fract53=function(){return s()+(s()*2097152|0)*11102230246251565e-32},s.algorithm="Alea",s.seed=t,s.version="0.9",s}function joe(){for(var t=zoe(),n=t(" "),e=t(" "),r=t(" "),i=0;i<arguments.length;i++)n-=t(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),e-=t(i<0||arguments.length<=i?void 0:arguments[i]),e<0&&(e+=1),r-=t(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1);return[n,e,r]}function zoe(){var t=4022871197;return function(n){for(var e=n.toString(),r=0;r<e.length;r++){t+=e.charCodeAt(r);var i=.02519603282416938*t;t=i>>>0,i-=t,i*=t,t=i>>>0,i-=t,t+=i*4294967296}return(t>>>0)*23283064365386963e-26}}function Hoe(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var Hp=typeof window<"u"?window.Hammer||Foe:function(){return Hoe()};function fr(t){var n=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var r=Hp(this._dom.overlay);r.on("tap",A(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){r.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];pe(i).call(i,function(a){r.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){Woe(a.target,t)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}OS(fr.prototype);fr.current=null;fr.prototype.destroy=function(){var t,n;this.deactivate();var e=OT(xi(t=Tr(n=this._cleanupQueue).call(n,0)).call(t)),r;try{for(e.s();!(r=e.n()).done;){var i=r.value;i()}}catch(a){e.e(a)}finally{e.f()}};fr.prototype.activate=function(){fr.current&&fr.current.deactivate(),fr.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)};fr.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")};fr.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function Woe(t,n){for(;t;){if(t===n)return!0;t=t.parentNode}return!1}var Voe=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Uoe=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Goe=/^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,Koe=/^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 Vr(t){if(t)for(;t.hasChildNodes()===!0;){var n=t.firstChild;n&&(Vr(n),t.removeChild(n))}}function Gr(t){return t instanceof String||typeof t=="string"}function h1(t){return de(t)==="object"&&t!==null}function Wi(t,n,e,r){var i=!1;r===!0&&(i=n[e]===null&&t[e]!==void 0),i?delete t[e]:t[e]=n[e]}function TT(t,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var r in t)if(n[r]!==void 0)if(n[r]===null||de(n[r])!=="object")Wi(t,n,r,e);else{var i=t[r],a=n[r];h1(i)&&h1(a)&&TT(i,a,e)}}function ya(t,n,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ce(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i<t.length;i++){var a=t[i];if(Object.prototype.hasOwnProperty.call(e,a))if(e[a]&&e[a].constructor===Object)n[a]===void 0&&(n[a]={}),n[a].constructor===Object?ye(n[a],e[a],!1,r):Wi(n,e,a,r);else{if(ce(e[a]))throw new TypeError("Arrays are not supported by deepExtend");Wi(n,e,a,r)}}return n}function ku(t,n,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ce(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&!pr(t).call(t,i))if(e[i]&&e[i].constructor===Object)n[i]===void 0&&(n[i]={}),n[i].constructor===Object?ye(n[i],e[i]):Wi(n,e,i,r);else if(ce(e[i])){n[i]=[];for(var a=0;a<e[i].length;a++)n[i].push(e[i][a])}else Wi(n,e,i,r);return n}function ye(t,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)||e===!0)if(de(n[i])==="object"&&n[i]!==null&&B$(n[i])===Object.prototype)t[i]===void 0?t[i]=ye({},n[i],e):de(t[i])==="object"&&t[i]!==null&&B$(t[i])===Object.prototype?ye(t[i],n[i],e):Wi(t,n,i,r);else if(ce(n[i])){var a;t[i]=ot(a=n[i]).call(a)}else Wi(t,n,i,r);return t}function Pu(t,n){var e;return Rp(e=[]).call(e,hr(t),[n])}function qoe(t){return ot(t).call(t)}function Yoe(t){return t.getBoundingClientRect().left}function Xoe(t){return t.getBoundingClientRect().top}function re(t,n){if(ce(t))for(var e=t.length,r=0;r<e;r++)n(t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n(t[i],i,t)}function Qoe(t,n,e,r){if(t.addEventListener){var i;r===void 0&&(r=!1),n==="mousewheel"&&pr(i=navigator.userAgent).call(i,"Firefox")&&(n="DOMMouseScroll"),t.addEventListener(n,e,r)}else t.attachEvent("on"+n,e)}function Joe(t,n,e,r){if(t.removeEventListener){var i;r===void 0&&(r=!1),n==="mousewheel"&&pr(i=navigator.userAgent).call(i,"Firefox")&&(n="DOMMouseScroll"),t.removeEventListener(n,e,r)}else t.detachEvent("on"+n,e)}function Wp(t){var n;switch(t.length){case 3:case 4:return n=Uoe.exec(t),n?{r:Qt(n[1]+n[1],16),g:Qt(n[2]+n[2],16),b:Qt(n[3]+n[3],16)}:null;case 6:case 7:return n=Voe.exec(t),n?{r:Qt(n[1],16),g:Qt(n[2],16),b:Qt(n[3],16)}:null;default:return null}}function jt(t,n){if(pr(t).call(t,"rgba"))return t;if(pr(t).call(t,"rgb")){var e=t.substr(oe(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+n+")"}else{var r=Wp(t);return r==null?t:"rgba("+r.r+","+r.g+","+r.b+","+n+")"}}function kT(t,n,e){var r;return"#"+ot(r=((1<<24)+(t<<16)+(n<<8)+e).toString(16)).call(r,1)}function Wf(t,n){if(Gr(t)){var e=t;if(IT(e)){var r,i=zn(r=e.substr(4).substr(0,e.length-5).split(",")).call(r,function(c){return Qt(c)});e=kT(i[0],i[1],i[2])}if(PT(e)===!0){var a=Zoe(e),o={h:a.h,s:a.s*.8,v:Math.min(1,a.v*1.02)},s={h:a.h,s:Math.min(1,a.s*1.25),v:a.v*.8},u=Vf(s.h,s.s,s.v),l=Vf(o.h,o.s,o.v);return{background:e,border:u,highlight:{background:l,border:u},hover:{background:l,border:u}}}else return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else if(n){var h={background:t.background||n.background,border:t.border||n.border,highlight:Gr(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||n.highlight.background,border:t.highlight&&t.highlight.border||n.highlight.border},hover:Gr(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||n.hover.border,background:t.hover&&t.hover.background||n.hover.background}};return h}else{var d={background:t.background||void 0,border:t.border||void 0,highlight:Gr(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:Gr(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}};return d}}function ka(t,n,e){t=t/255,n=n/255,e=e/255;var r=Math.min(t,Math.min(n,e)),i=Math.max(t,Math.max(n,e));if(r===i)return{h:0,s:0,v:r};var a=t===r?n-e:e===r?t-n:e-t,o=t===r?3:e===r?1:5,s=60*(o-a/(i-r))/360,u=(i-r)/i,l=i;return{h:s,s:u,v:l}}function Qs(t,n,e){var r,i,a,o=Math.floor(t*6),s=t*6-o,u=e*(1-n),l=e*(1-s*n),h=e*(1-(1-s)*n);switch(o%6){case 0:r=e,i=h,a=u;break;case 1:r=l,i=e,a=u;break;case 2:r=u,i=e,a=h;break;case 3:r=u,i=l,a=e;break;case 4:r=h,i=u,a=e;break;case 5:r=e,i=u,a=l;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function Vf(t,n,e){var r=Qs(t,n,e);return kT(r.r,r.g,r.b)}function Zoe(t){var n=Wp(t);if(!n)throw new TypeError("'".concat(t,"' is not a valid color."));return ka(n.r,n.g,n.b)}function PT(t){var n=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return n}function IT(t){return Goe.test(t)}function ese(t){return Koe.test(t)}function ei(t){if(t===null||de(t)!=="object")return null;if(t instanceof Element)return t;var n=Ai(t);for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&de(t[e])=="object"&&(n[e]=ei(t[e]));return n}function Lt(t,n,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(v){return v!=null},a=function(v){return v!==null&&de(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(t))throw new Error("Parameter mergeTarget must be an object");if(!a(n))throw new Error("Parameter options must be an object");if(!i(e))throw new Error("Parameter option must have a value");if(!a(r))throw new Error("Parameter globalOptions must be an object");var s=function(v,p,$){a(v[$])||(v[$]={});var g=p[$],y=v[$];for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(y[b]=g[b])},u=n[e],l=a(r)&&!o(r),h=l?r[e]:void 0,d=h?h.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(t[e])||(t[e]={}),t[e].enabled=u;return}if(u===null&&!a(t[e]))if(i(h))t[e]=Ai(h);else return;if(a(u)){var c=!0;u.enabled!==void 0?c=u.enabled:d!==void 0&&(c=h.enabled),s(t,n,e),t[e].enabled=c}}}var tse={linear:function(n){return n},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return n*(2-n)},easeInOutQuad:function(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return--n*n*n+1},easeInOutCubic:function(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1- --n*n*n*n},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1+--n*n*n*n*n},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};function Ur(t,n){var e;ce(n)||(n=[n]);var r=OT(t),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(a){e=a[n[0]];for(var o=1;o<n.length;o++)e&&(e=e[n[o]]);if(typeof e<"u")break}}}catch(s){r.e(s)}finally{r.f()}return e}var rse={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},ise=function(){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;N(this,t),this.pixelRatio=n,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=function(){},this.closeCallback=function(){},this._create()}return F(t,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return rse[e]}},{key:"setColor",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var i,a=this._isColorString(e);if(a!==void 0&&(e=a),Gr(e)===!0){if(IT(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(ese(e)===!0){var 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(PT(e)===!0){var u=Wp(e);i={r:u.r,g:u.g,b:u.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var l=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:l}}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: "+Ko(e));this._setColor(i,r)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;r===!0&&(this.previousColor=je({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",gr(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r===!0&&(this.initialColor=je({},e)),this.color=e;var i=ka(e.r,e.g,e.b),a=2*Math.PI,o=this.r*i.s,s=this.centerCoordinates.x+o*Math.sin(a*i.h),u=this.centerCoordinates.y+o*Math.cos(a*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var r=ka(this.color.r,this.color.g,this.color.b);r.v=e/100;var i=Qs(r.h,r.s,r.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,r=ka(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);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,a,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-r.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),qo(i).call(i),this.brightnessRange.value=100*r.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+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,r,i,a;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){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var 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);var u=this;this.opacityRange.onchange=function(){u._setOpacity(this.value)},this.opacityRange.oninput=function(){u._setOpacity(this.value)},this.brightnessRange.onchange=function(){u._setBrightness(this.value)},this.brightnessRange.oninput=function(){u._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=A(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=A(r=this._apply).call(r,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=A(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=A(a=this._loadLast).call(a,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)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new Hp(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(r){r.isFirst&&e._moveSelector(r)}),this.hammer.on("tap",function(r){e._moveSelector(r)}),this.hammer.on("panstart",function(r){e._moveSelector(r)}),this.hammer.on("panmove",function(r){e._moveSelector(r)}),this.hammer.on("panend",function(r){e._moveSelector(r)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var 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);var r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,r,i);var a,o,s,u;this.centerCoordinates={x:r*.5,y:i*.5},this.r=.49*r;var l=2*Math.PI/360,h=1/360,d=1/this.r,c;for(s=0;s<360;s++)for(u=0;u<this.r;u++)a=this.centerCoordinates.x+u*Math.sin(l*s),o=this.centerCoordinates.y+u*Math.cos(l*s),c=Qs(s*h,u*d,1),e.fillStyle="rgb("+c.r+","+c.g+","+c.b+")",e.fillRect(a-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,r,i)}this.generated=!0}},{key:"_moveSelector",value:function(e){var r=this.colorPickerDiv.getBoundingClientRect(),i=e.center.x-r.left,a=e.center.y-r.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,u=i-s,l=a-o,h=Math.atan2(u,l),d=.98*Math.min(Math.sqrt(u*u+l*l),s),c=Math.cos(h)*d+o,f=Math.sin(h)*d+s;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=f-.5*this.colorPickerSelector.clientWidth+"px";var v=h/(2*Math.PI);v=v<0?v+1:v;var p=d/this.r,$=ka(this.color.r,this.color.g,this.color.b);$.h=v,$.s=p;var g=Qs($.h,$.s,$.v);g.a=this.color.a,this.color=g,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+")"}}]),t}();function Uf(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];if(n.length<1)throw new TypeError("Invalid arguments.");if(n.length===1)return document.createTextNode(n[0]);var r=document.createElement(n[0]);return r.appendChild(Uf.apply(void 0,hr(ot(n).call(n,1)))),r}var nse=function(){function t(n,e,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};N(this,t),this.parent=n,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},je(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ise(i),this.wrapper=void 0}return F(t,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var r=!0;if(typeof e=="string")this.options.filter=e;else if(ce(e))this.options.filter=e.join();else if(de(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Ot(e)!==void 0&&(this.options.filter=Ot(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(r=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,r=e):typeof e=="function"&&(this.options.filter=e,r=!0);Ot(this.options)===!1&&(r=!1),this.options.enabled=r}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=Ot(this.options),r=0,i=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(a,[]),i=i||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||oe(e).call(e,a)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,r>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),r++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(e){for(var r=this.moduleOptions,i=0;i<e.length;i++)if(r[e[i]]!==void 0)r=r[e[i]];else{r=void 0;break}return r}},{key:"_makeItem",value:function(e){if(this.allowCreation===!0){var r=document.createElement("div");r.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return pe(a).call(a,function(s){r.appendChild(s)}),this.domElements.push(r),this.domElements.length}return 0}},{key:"_makeHeader",value:function(e){var r=document.createElement("div");r.className="vis-configuration vis-config-header",r.innerText=e,this._makeItem([],r)}},{key:"_makeLabel",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+r.length,i===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(Uf("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,r,i){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;r!==void 0&&oe(e).call(e,r)!==-1&&(o=oe(e).call(e,r));for(var s=0;s<e.length;s++){var u=document.createElement("option");u.value=e[s],s===o&&(u.selected="selected"),u.innerText=e[s],a.appendChild(u)}var l=this;a.onchange=function(){l._update(this.value,i)};var h=this._makeLabel(i[i.length-1],i);this._makeItem(i,h,a)}},{key:"_makeRange",value:function(e,r,i){var a=e[0],o=e[1],s=e[2],u=e[3],l=document.createElement("input");l.className="vis-configuration vis-config-range";try{l.type="range",l.min=o,l.max=s}catch{}l.step=u;var h="",d=0;if(r!==void 0){var c=1.2;r<0&&r*c<o?(l.min=Math.ceil(r*c),d=l.min,h="range increased"):r/c<o&&(l.min=Math.ceil(r/c),d=l.min,h="range increased"),r*c>s&&s!==1&&(l.max=Math.ceil(r*c),d=l.max,h="range increased"),l.value=r}else l.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=l.value;var v=this;l.onchange=function(){f.value=this.value,v._update(Number(this.value),i)},l.oninput=function(){f.value=this.value};var p=this._makeLabel(i[i.length-1],i),$=this._makeItem(i,p,l,f);h!==""&&this.popupHistory[$]!==d&&(this.popupHistory[$]=d,this._setupPopup(h,$))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var r=document.createElement("div");r.className="vis-configuration vis-config-button",r.innerText="generate options",r.onclick=function(){e._printOptions()},r.onmouseover=function(){r.className="vis-configuration vis-config-button hover"},r.onmouseout=function(){r.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(r)}}},{key:"_setupPopup",value:function(e,r){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var a=document.createElement("div");a.id="vis-configuration-popup",a.className="vis-configuration-popup",a.innerText=e,a.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:a,index:r}}}},{key:"_removePopup",value:function(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var e=this;if(this.popupDiv.html!==void 0){var r=this.domElements[this.popupDiv.index],i=r.getBoundingClientRect();this.popupDiv.html.style.left=i.left+"px",this.popupDiv.html.style.top=i.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=gr(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=gr(function(){e._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(e,r,i){var a=document.createElement("input");a.type="checkbox",a.className="vis-configuration vis-config-checkbox",a.checked=e,r!==void 0&&(a.checked=r,r!==e&&(de(e)==="object"?r!==e.enabled&&this.changedOptions.push({path:i,value:r}):this.changedOptions.push({path:i,value:r})));var o=this;a.onchange=function(){o._update(this.checked,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,a)}},{key:"_makeTextInput",value:function(e,r,i){var a=document.createElement("input");a.type="text",a.className="vis-configuration vis-config-text",a.value=r,r!==e&&this.changedOptions.push({path:i,value:r});var o=this;a.onchange=function(){o._update(this.value,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,a)}},{key:"_makeColorField",value:function(e,r,i){var a=this,o=e[1],s=document.createElement("div");r=r===void 0?o:r,r!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=r):s.className="vis-configuration vis-config-colorBlock none",r=r===void 0?o:r,s.onclick=function(){a._showColorPicker(r,s,i)};var u=this._makeLabel(i[i.length-1],i);this._makeItem(i,u,s)}},{key:"_showColorPicker",value:function(e,r,i){var a=this;r.onclick=function(){},this.colorPicker.insertTo(r),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(o){var s="rgba("+o.r+","+o.g+","+o.b+","+o.a+")";r.style.backgroundColor=s,a._update(s,i)}),this.colorPicker.setCloseCallback(function(){r.onclick=function(){a._showColorPicker(e,r,i)}})}},{key:"_handleObject",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=Ot(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],h=Pu(r,u);if(typeof o=="function"&&(a=o(u,r),a===!1&&!ce(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,a=this._handleObject(l,h,!0),this.allowCreation=i===!1)),a!==!1){s=!0;var d=this._getValue(h);if(ce(l))this._handleArray(l,d,h);else if(typeof l=="string")this._makeTextInput(l,d,h);else if(typeof l=="boolean")this._makeCheckbox(l,d,h);else if(l instanceof Object){if(!this.hideOption(r,u,this.moduleOptions))if(l.enabled!==void 0){var c=Pu(h,"enabled"),f=this._getValue(c);if(f===!0){var v=this._makeLabel(u,h,!0);this._makeItem(h,v),s=this._handleObject(l,h)||s}else this._makeCheckbox(l,f,h)}else{var p=this._makeLabel(u,h,!0);this._makeItem(h,p),s=this._handleObject(l,h)||s}}else console.error("dont know how to handle",l,u,h)}}return s}},{key:"_handleArray",value:function(e,r,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,r,i),e[1]!==r&&this.changedOptions.push({path:i,value:r})):typeof e[0]=="string"?(this._makeDropdown(e,r,i),e[0]!==r&&this.changedOptions.push({path:i,value:r})):typeof e[0]=="number"&&(this._makeRange(e,r,i),e[0]!==r&&this.changedOptions.push({path:i,value:Number(r)}))}},{key:"_update",value:function(e,r){var i=this._constructOptions(e,r);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)}},{key:"_constructOptions",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;o<r.length;o++)r[o]!=="global"&&(a[r[o]]===void 0&&(a[r[o]]={}),o!==r.length-1?a=a[r[o]]:a[r[o]]=e);return i}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Uf("pre","const options = "+Ko(e,null,2)))}},{key:"getOptions",value:function(){for(var e={},r=0;r<this.changedOptions.length;r++)this._constructOptions(this.changedOptions[r].value,this.changedOptions[r].path,e);return e}}]),t}(),ase=function(){function t(n,e){N(this,t),this.container=n,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return F(t,[{key:"setPosition",value:function(e,r){this.x=Qt(e),this.y=Qt(r)}},{key:"setText",value:function(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}},{key:"show",value:function(e){if(e===void 0&&(e=!0),e===!0){var r=this.frame.clientHeight,i=this.frame.clientWidth,a=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,u=0;if(this.overflowMethod=="flip"){var l=!1,h=!0;this.y-r<this.padding&&(h=!1),this.x+i>o-this.padding&&(l=!0),l?s=this.x-i:s=this.x,h?u=this.y-r:u=this.y}else u=this.y-r,u+r+this.padding>a&&(u=a-r-this.padding),u<this.padding&&(u=this.padding),s=this.x,s+i+this.padding>o&&(s=o-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=u+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),t}(),wa=!1,d1,Gf="background: #FFeeee; color: #dd0000",ose=function(){function t(){N(this,t)}return F(t,null,[{key:"validate",value:function(e,r,i){wa=!1,d1=r;var a=r;return i!==void 0&&(a=r[i]),t.parse(e,a,[]),wa}},{key:"parse",value:function(e,r,i){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.check(a,e,r,i)}},{key:"check",value:function(e,r,i,a){if(i[e]===void 0&&i.__any__===void 0){t.getSuggestion(e,i,a);return}var o=e,s=!0;i[e]===void 0&&i.__any__!==void 0&&(o="__any__",s=t.getType(r[e])==="object");var u=i[o];s&&u.__type__!==void 0&&(u=u.__type__),t.checkFields(e,r,i,o,u,a)}},{key:"checkFields",value:function(e,r,i,a,o,s){var u=function(c){console.error("%c"+c+t.printLocation(s,e),Gf)},l=t.getType(r[e]),h=o[l];h!==void 0?t.getType(h)==="array"&&oe(h).call(h,r[e])===-1?(u('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+r[e]+'". '),wa=!0):l==="object"&&a!=="__any__"&&(s=Pu(s,e),t.parse(r[e],i[a],s)):o.any===void 0&&(u('Invalid type received for "'+e+'". Expected: '+t.print(Oe(o))+". Received ["+l+'] "'+r[e]+'"'),wa=!0)}},{key:"getType",value:function(e){var r=de(e);return r==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":ce(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":r==="number"?"number":r==="boolean"?"boolean":r==="string"?"string":r===void 0?"undefined":r}},{key:"getSuggestion",value:function(e,r,i){var a=t.findInOptions(e,r,i,!1),o=t.findInOptions(e,d1,[],!0),s=8,u=4,l;a.indexMatch!==void 0?l=" in "+t.printLocation(a.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?
|
|
73
|
+
|
|
74
|
+
`:o.distance<=u&&a.distance>o.distance?l=" in "+t.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(o.path,o.closestMatch,""):a.distance<=s?l='. Did you mean "'+a.closestMatch+'"?'+t.printLocation(a.path,e):l=". Did you mean one of these: "+t.print(Oe(r))+t.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+l,Gf),wa=!0}},{key:"findInOptions",value:function(e,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",u=[],l=e.toLowerCase(),h=void 0;for(var d in r){var c=void 0;if(r[d].__type__!==void 0&&a===!0){var f=t.findInOptions(e,r[d],Pu(i,d));o>f.distance&&(s=f.closestMatch,u=f.path,o=f.distance,h=f.indexMatch)}else{var v;oe(v=d.toLowerCase()).call(v,l)!==-1&&(h=d),c=t.levenshteinDistance(e,d),o>c&&(s=d,u=qoe(i),o=c)}}return{closestMatch:s,path:u,distance:o,indexMatch:h}}},{key:"printLocation",value:function(e,r){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
|
|
75
|
+
`,a=`
|
|
76
|
+
|
|
77
|
+
`+i+`options = {
|
|
78
|
+
`,o=0;o<e.length;o++){for(var s=0;s<o+1;s++)a+=" ";a+=e[o]+`: {
|
|
79
|
+
`}for(var u=0;u<e.length+1;u++)a+=" ";a+=r+`
|
|
80
|
+
`;for(var l=0;l<e.length+1;l++){for(var h=0;h<e.length-l;h++)a+=" ";a+=`}
|
|
81
|
+
`}return a+`
|
|
82
|
+
|
|
83
|
+
`}},{key:"print",value:function(e){return Ko(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(e,r){if(e.length===0)return r.length;if(r.length===0)return e.length;var i=[],a;for(a=0;a<=r.length;a++)i[a]=[a];var o;for(o=0;o<=e.length;o++)i[0][o]=o;for(a=1;a<=r.length;a++)for(o=1;o<=e.length;o++)r.charAt(a-1)==e.charAt(o-1)?i[a][o]=i[a-1][o-1]:i[a][o]=Math.min(i[a-1][o-1]+1,Math.min(i[a][o-1]+1,i[a-1][o]+1));return i[r.length][e.length]}}]),t}(),sse=fr,use=nse,xn=Hp,lse=ase,CT=Gf,hse=ose;function dse(t){return qr=t,pse()}var xT={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Vp=Ai(xT);Vp.color="color.color";Vp.style="dashes";var dt={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},c1={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},qr="",Un=0,ee="",G="",wt=dt.NULL;function cse(){Un=0,ee=qr.charAt(0)}function Ke(){Un++,ee=qr.charAt(Un)}function pn(){return qr.charAt(Un+1)}function f1(t){var n=t.charCodeAt(0);return n<47?n===35||n===46:n<59?n>47:n<91?n>64:n<96?n===95:n<123?n>96:!1}function ai(t,n){if(t||(t={}),n)for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function fse(t,n,e){for(var r=n.split("."),i=t;r.length;){var a=r.shift();r.length?(i[a]||(i[a]={}),i=i[a]):i[a]=e}}function AT(t,n){for(var e,r,i=null,a=[t],o=t;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,r=o.nodes.length;e<r;e++)if(n.id===o.nodes[e].id){i=o.nodes[e];break}}for(i||(i={id:n.id},t.node&&(i.attr=ai(i.attr,t.node))),e=a.length-1;e>=0;e--){var s,u=a[e];u.nodes||(u.nodes=[]),oe(s=u.nodes).call(s,i)===-1&&u.nodes.push(i)}n.attr&&(i.attr=ai(i.attr,n.attr))}function vse(t,n){if(t.edges||(t.edges=[]),t.edges.push(n),t.edge){var e=ai({},t.edge);n.attr=ai(e,n.attr)}}function RT(t,n,e,r,i){var a={from:n,to:e,type:r};return t.edge&&(a.attr=ai({},t.edge)),a.attr=ai(a.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function me(){for(wt=dt.NULL,G="";ee===" "||ee===" "||ee===`
|
|
84
|
+
`||ee==="\r";)Ke();do{var t=!1;if(ee==="#"){for(var n=Un-1;qr.charAt(n)===" "||qr.charAt(n)===" ";)n--;if(qr.charAt(n)===`
|
|
85
|
+
`||qr.charAt(n)===""){for(;ee!=""&&ee!=`
|
|
86
|
+
`;)Ke();t=!0}}if(ee==="/"&&pn()==="/"){for(;ee!=""&&ee!=`
|
|
87
|
+
`;)Ke();t=!0}if(ee==="/"&&pn()==="*"){for(;ee!="";)if(ee==="*"&&pn()==="/"){Ke(),Ke();break}else Ke();t=!0}for(;ee===" "||ee===" "||ee===`
|
|
88
|
+
`||ee==="\r";)Ke()}while(t);if(ee===""){wt=dt.DELIMITER;return}var e=ee+pn();if(c1[e]){wt=dt.DELIMITER,G=e,Ke(),Ke();return}if(c1[ee]){wt=dt.DELIMITER,G=ee,Ke();return}if(f1(ee)||ee==="-"){for(G+=ee,Ke();f1(ee);)G+=ee,Ke();G==="false"?G=!1:G==="true"?G=!0:isNaN(Number(G))||(G=Number(G)),wt=dt.IDENTIFIER;return}if(ee==='"'){for(Ke();ee!=""&&(ee!='"'||ee==='"'&&pn()==='"');)ee==='"'?(G+=ee,Ke()):ee==="\\"&&pn()==="n"?(G+=`
|
|
89
|
+
`,Ke()):G+=ee,Ke();if(ee!='"')throw ct('End of string " expected');Ke(),wt=dt.IDENTIFIER;return}for(wt=dt.UNKNOWN;ee!="";)G+=ee,Ke();throw new SyntaxError('Syntax error in part "'+FT(G,30)+'"')}function pse(){var t={};if(cse(),me(),G==="strict"&&(t.strict=!0,me()),(G==="graph"||G==="digraph")&&(t.type=G,me()),wt===dt.IDENTIFIER&&(t.id=G,me()),G!="{")throw ct("Angle bracket { expected");if(me(),DT(t),G!="}")throw ct("Angle bracket } expected");if(me(),G!=="")throw ct("End of file expected");return me(),delete t.node,delete t.edge,delete t.graph,t}function DT(t){for(;G!==""&&G!="}";)gse(t),G===";"&&me()}function gse(t){var n=MT(t);if(n){NT(t,n);return}var e=yse(t);if(!e){if(wt!=dt.IDENTIFIER)throw ct("Identifier expected");var r=G;if(me(),G==="="){if(me(),wt!=dt.IDENTIFIER)throw ct("Identifier expected");t[r]=G,me()}else mse(t,r)}}function MT(t){var n=null;if(G==="subgraph"&&(n={},n.type="subgraph",me(),wt===dt.IDENTIFIER&&(n.id=G,me())),G==="{"){if(me(),n||(n={}),n.parent=t,n.node=t.node,n.edge=t.edge,n.graph=t.graph,DT(n),G!="}")throw ct("Angle bracket } expected");me(),delete n.node,delete n.edge,delete n.graph,delete n.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(n)}return n}function yse(t){return G==="node"?(me(),t.node=Na(),"node"):G==="edge"?(me(),t.edge=Na(),"edge"):G==="graph"?(me(),t.graph=Na(),"graph"):null}function mse(t,n){var e={id:n},r=Na();r&&(e.attr=r),AT(t,e),NT(t,n)}function NT(t,n){for(;G==="->"||G==="--";){var e,r=G;me();var i=MT(t);if(i)e=i;else{if(wt!=dt.IDENTIFIER)throw ct("Identifier or subgraph expected");e=G,AT(t,{id:e}),me()}var a=Na(),o=RT(t,n,e,r,a);vse(t,o),n=e}}function Na(){for(var t,n=null,e={dashed:!0,solid:!1,dotted:[1,5]},r={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,a=new Array;G==="[";){for(me(),n={};G!==""&&G!="]";){if(wt!=dt.IDENTIFIER)throw ct("Attribute name expected");var o=G;if(me(),G!="=")throw ct("Equal sign = expected");if(me(),wt!=dt.IDENTIFIER)throw ct("Attribute value expected");var s=G;o==="style"&&(s=e[s]);var u;o==="arrowhead"&&(u=r[s],o="arrows",s={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=r[s],o="arrows",s={from:{enabled:!0,type:u}}),i.push({attr:n,name:o,value:s}),a.push(o),me(),G==","&&me()}if(G!="]")throw ct("Bracket ] expected");me()}if(pr(a).call(a,"dir")){var l={};for(l.arrows={},t=0;t<i.length;t++)if(i[t].name==="arrows")if(i[t].value.to!=null)l.arrows.to=t;else if(i[t].value.from!=null)l.arrows.from=t;else throw ct("Invalid value of arrows");else i[t].name==="dir"&&(l.dir=t);var h=i[l.dir].value;if(!pr(a).call(a,"arrows"))if(h==="both")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1,i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(h==="forward")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1;else if(h==="back")i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(h==="none")i.push({attr:i[l.dir].attr,name:"arrows",value:""}),l.arrows.to=i.length-1;else throw ct('Invalid dir type "'+h+'"');var d,c;if(h==="both")l.arrows.to&&l.arrows.from?(c=i[l.arrows.to].value.to.type,d=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}},Tr(i).call(i,l.arrows.from,1)):l.arrows.to?(c=i[l.arrows.to].value.to.type,d="arrow",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):l.arrows.from&&(c="arrow",d=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}});else if(h==="back")l.arrows.to&&l.arrows.from?(c="",d=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):l.arrows.to?(c="",d="arrow",l.arrows.from=l.arrows.to,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):l.arrows.from&&(c="",d=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}),i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{from:{enabled:!0,type:i[l.arrows.from].value.from.type}}};else if(h==="none"){var f;l.arrows.to?f=l.arrows.to:f=l.arrows.from,i[f]={attr:i[f].attr,name:i[f].name,value:""}}else if(h==="forward")l.arrows.to&&l.arrows.from?(c=i[l.arrows.to].value.to.type,d="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):l.arrows.to?(c=i[l.arrows.to].value.to.type,d="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}):l.arrows.from&&(c="arrow",d="",l.arrows.to=l.arrows.from,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:d}}}),i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:i[l.arrows.to].value.to.type}}};else throw ct('Invalid dir type "'+h+'"');Tr(i).call(i,l.dir,1)}var v;if(pr(a).call(a,"penwidth")){var p=[];for(v=i.length,t=0;t<v;t++)i[t].name!=="width"&&(i[t].name==="penwidth"&&(i[t].name="width"),p.push(i[t]));i=p}for(v=i.length,t=0;t<v;t++)fse(i[t].attr,i[t].name,i[t].value);return n}function ct(t){return new SyntaxError(t+', got "'+FT(G,30)+'" (char '+Un+")")}function FT(t,n){return t.length<=n?t:t.substr(0,27)+"..."}function bse(t,n,e){ce(t)?pe(t).call(t,function(r){ce(n)?pe(n).call(n,function(i){e(r,i)}):e(r,n)}):ce(n)?pe(n).call(n,function(r){e(t,r)}):e(t,n)}function xd(t,n,e){for(var r=n.split("."),i=r.pop(),a=t,o=0;o<r.length;o++){var s=r[o];s in a||(a[s]={}),a=a[s]}return a[i]=e,t}function v1(t,n){var e={};for(var r in t)if(t.hasOwnProperty(r)){var i=n[r];ce(i)?pe(i).call(i,function(a){xd(e,a,t[r])}):typeof i=="string"?xd(e,i,t[r]):xd(e,r,t[r])}return e}function $se(t){var n=dse(t),e={nodes:[],edges:[],options:{}};if(n.nodes){var r;pe(r=n.nodes).call(r,function(o){var s={id:o.id,label:String(o.label||o.id)};ai(s,v1(o.attr,xT)),s.image&&(s.shape="image"),e.nodes.push(s)})}if(n.edges){var i,a=function(s){var u={from:s.from,to:s.to};return ai(u,v1(s.attr,Vp)),u.arrows==null&&s.type==="->"&&(u.arrows="to"),u};pe(i=n.edges).call(i,function(o){var s,u;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;pe(l=o.from.edges).call(l,function(d){var c=a(d);e.edges.push(c)})}if(bse(s,u,function(d,c){var f=RT(e,d.id,c.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var h;pe(h=o.to.edges).call(h,function(d){var c=a(d);e.edges.push(c)})}})}return n.attr&&(e.options=n.attr),e}function wse(t,n){var e,r={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};n!=null&&(n.fixed!=null&&(r.nodes.fixed=n.fixed),n.parseColor!=null&&(r.nodes.parseColor=n.parseColor),n.inheritColor!=null&&(r.edges.inheritColor=n.inheritColor));var i=t.edges,a=zn(i).call(i,function(s){var u={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.type==="Directed"&&(u.arrows="to"),s.color&&r.edges.inheritColor===!1&&(u.color=s.color),u}),o=zn(e=t.nodes).call(e,function(s){var u={id:s.id,fixed:r.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.size!=null&&(u.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.title!=null&&(u.title=s.title),s.x!=null&&(u.x=s.x),s.y!=null&&(u.y=s.y),s.color!=null&&(r.nodes.parseColor===!0?u.color=s.color:u.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),u});return{nodes:o,edges:a}}var _se={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"},Ese={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"},Sse={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"},Ose={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"},Tse={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"},kse={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ó"},Pse={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},Ise={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},Cse={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},xse={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"},Ase={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"},Rse=Object.freeze({__proto__:null,cn:Ise,cs:Ase,de:Ese,en:_se,es:Sse,fr:xse,it:Ose,nl:Tse,pt:kse,ru:Pse,uk:Cse});function Dse(t,n){try{var e=n.split(/[-_ /]/,2),r=ke(e,2),i=r[0],a=r[1],o=i!=null?i.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var u=o+"-"+s;if(Object.prototype.hasOwnProperty.call(t,u))return u;var l;console.warn(Rp(l="Unknown variant ".concat(s," of language ")).call(l,o,"."))}if(o){var h=o;if(Object.prototype.hasOwnProperty.call(t,h))return h;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(n,", falling back to English.")),"en"}catch(d){return console.error(d),console.warn("Unexpected error while normalizing locale ".concat(n,", falling back to English.")),"en"}}var Mse=function(){function t(){N(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return F(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,r=this.image.height;this.width=e,this.height=r;var i=Math.floor(r/2),a=Math.floor(r/4),o=Math.floor(r/8),s=Math.floor(r/16),u=Math.floor(e/2),l=Math.floor(e/4),h=Math.floor(e/8),d=Math.floor(e/16);this.canvas.width=3*l,this.canvas.height=i,this.coordinates=[[0,0,u,i],[u,0,l,a],[u,a,h,o],[5*h,a,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),r=this.coordinates[0];e.drawImage(this.image,r[0],r[1],r[2],r[3]);for(var i=1;i<this.NUM_ITERATIONS;i++){var a=this.coordinates[i-1],o=this.coordinates[i];e.drawImage(this.canvas,a[0],a[1],a[2],a[3],o[0],o[1],o[2],o[3])}}},{key:"drawImageAtPosition",value:function(e,r,i,a,o,s){if(this.initialized())if(r>2){r*=.5;for(var u=0;r>2&&u<this.NUM_ITERATIONS;)r*=.5,u+=1;u>=this.NUM_ITERATIONS&&(u=this.NUM_ITERATIONS-1);var l=this.coordinates[u];e.drawImage(this.canvas,l[0],l[1],l[2],l[3],i,a,o,s)}else e.drawImage(this.image,i,a,o,s)}}]),t}(),Nse=function(){function t(n){N(this,t),this.images={},this.imageBroken={},this.callback=n}return F(t,[{key:"_tryloadBrokenUrl",value:function(e,r,i){if(!(e===void 0||i===void 0)){if(r===void 0){console.warn("No broken url image defined");return}i.image.onerror=function(){console.error("Could not load brokenImage:",r)},i.image.src=r}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,r){var i=this,a=this.images[e];if(a)return a;var o=new Mse;return this.images[e]=o,o.image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),i._tryloadBrokenUrl(e,r,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),t}(),Kf={},Fse={get exports(){return Kf},set exports(t){Kf=t}},Gn={},Bse={get exports(){return Gn},set exports(t){Gn=t}},Lse=se,jse=Lse(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),zse=se,Hse=Ze,Wse=Fr,p1=jse,Js=Object.isExtensible,Vse=zse(function(){Js(1)}),Use=Vse||p1?function(n){return!Hse(n)||p1&&Wse(n)=="ArrayBuffer"?!1:Js?Js(n):!0}:Js,Gse=se,BT=!Gse(function(){return Object.isExtensible(Object.preventExtensions({}))}),Kse=K,qse=ue,Yse=Bo,Xse=Ze,Up=et,Qse=Gt.f,g1=Ho,Jse=ml,Gp=Use,Zse=ll,eue=BT,LT=!1,Rr=Zse("meta"),tue=0,Kp=function(t){Qse(t,Rr,{value:{objectID:"O"+tue++,weakData:{}}})},rue=function(t,n){if(!Xse(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!Up(t,Rr)){if(!Gp(t))return"F";if(!n)return"E";Kp(t)}return t[Rr].objectID},iue=function(t,n){if(!Up(t,Rr)){if(!Gp(t))return!0;if(!n)return!1;Kp(t)}return t[Rr].weakData},nue=function(t){return eue&<&&Gp(t)&&!Up(t,Rr)&&Kp(t),t},aue=function(){oue.enable=function(){},LT=!0;var t=g1.f,n=qse([].splice),e={};e[Rr]=1,t(e).length&&(g1.f=function(r){for(var i=t(r),a=0,o=i.length;a<o;a++)if(i[a]===Rr){n(i,a,1);break}return i},Kse({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Jse.f}))},oue=Bse.exports={enable:aue,fastKey:rue,getWeakData:iue,onFreeze:nue};Yse[Rr]=!0;var sue=No,uue=Mt,lue=Ft,hue=la,due=LS,cue=nr,y1=Fe,fue=VS,vue=yl,m1=BS,pue=TypeError,Zs=function(t,n){this.stopped=t,this.result=n},b1=Zs.prototype,qp=function(t,n,e){var r=e&&e.that,i=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=sue(n,r),l,h,d,c,f,v,p,$=function(y){return l&&m1(l,"normal",y),new Zs(!0,y)},g=function(y){return i?(lue(y),s?u(y[0],y[1],$):u(y[0],y[1])):s?u(y,$):u(y)};if(a)l=t.iterator;else if(o)l=t;else{if(h=vue(t),!h)throw pue(hue(t)+" is not iterable");if(due(h)){for(d=0,c=cue(t);c>d;d++)if(f=g(t[d]),f&&y1(b1,f))return f;return new Zs(!1)}l=fue(t,h)}for(v=a?t.next:l.next;!(p=uue(v,l)).done;){try{f=g(p.value)}catch(y){m1(l,"throw",y)}if(typeof f=="object"&&f&&y1(b1,f))return f}return new Zs(!1)},gue=Fe,yue=TypeError,Yp=function(t,n){if(gue(n,t))return t;throw yue("Incorrect invocation")},mue=K,bue=We,$ue=Gn,wue=se,_ue=ha,Eue=qp,Sue=Yp,Oue=Je,Tue=Ze,kue=ca,Pue=Gt.f,Iue=hi.forEach,Cue=Ge,jT=Zi,xue=jT.set,Aue=jT.getterFor,Xp=function(t,n,e){var r=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,a=r?"set":"add",o=bue[t],s=o&&o.prototype,u={},l;if(!Cue||!Oue(o)||!(i||s.forEach&&!wue(function(){new o().entries().next()})))l=e.getConstructor(n,t,r,a),$ue.enable();else{l=n(function(c,f){xue(Sue(c,h),{type:t,collection:new o}),f!=null&&Eue(f,c[a],{that:c,AS_ENTRIES:r})});var h=l.prototype,d=Aue(t);Iue(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(c){var f=c=="add"||c=="set";c in s&&!(i&&c=="clear")&&_ue(h,c,function(v,p){var $=d(this).collection;if(!f&&i&&!Tue(v))return c=="get"?void 0:!1;var g=$[c](v===0?0:v,p);return f?this:g})}),i||Pue(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return kue(l,t,!1,!0),u[t]=l,mue({global:!0,forced:!0},u),i||e.setStrong(l,t,r),l},Rue=zo,Qp=function(t,n,e){for(var r in n)e&&e.unsafe&&t[r]?t[r]=n[r]:Rue(t,r,n[r],e);return t},Due=Ut,Mue=Tp,Nue=Be,Fue=Ge,$1=Nue("species"),Bue=function(t){var n=Due(t);Fue&&n&&!n[$1]&&Mue(n,$1,{configurable:!0,get:function(){return this}})},Lue=da,jue=Tp,w1=Qp,zue=No,Hue=Yp,Wue=Co,Vue=qp,Uue=Ep,Rs=Sp,Gue=Bue,_a=Ge,_1=Gn.fastKey,zT=Zi,E1=zT.set,Ad=zT.getterFor,HT={getConstructor:function(t,n,e,r){var i=t(function(l,h){Hue(l,a),E1(l,{type:n,index:Lue(null),first:void 0,last:void 0,size:0}),_a||(l.size=0),Wue(h)||Vue(h,l[r],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=Ad(n),s=function(l,h,d){var c=o(l),f=u(l,h),v,p;return f?f.value=d:(c.last=f={index:p=_1(h,!0),key:h,value:d,previous:v=c.last,next:void 0,removed:!1},c.first||(c.first=f),v&&(v.next=f),_a?c.size++:l.size++,p!=="F"&&(c.index[p]=f)),l},u=function(l,h){var d=o(l),c=_1(h),f;if(c!=="F")return d.index[c];for(f=d.first;f;f=f.next)if(f.key==h)return f};return w1(a,{clear:function(){for(var h=this,d=o(h),c=d.index,f=d.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;d.first=d.last=void 0,_a?d.size=0:h.size=0},delete:function(l){var h=this,d=o(h),c=u(h,l);if(c){var f=c.next,v=c.previous;delete d.index[c.index],c.removed=!0,v&&(v.next=f),f&&(f.previous=v),d.first==c&&(d.first=f),d.last==c&&(d.last=v),_a?d.size--:h.size--}return!!c},forEach:function(h){for(var d=o(this),c=zue(h,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!u(this,h)}}),w1(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),_a&&jue(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(t,n,e){var r=n+" Iterator",i=Ad(n),a=Ad(r);Uue(t,n,function(o,s){E1(this,{type:r,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,Rs(void 0,!0)):s=="keys"?Rs(u.key,!1):s=="values"?Rs(u.value,!1):Rs([u.key,u.value],!1)},e?"entries":"values",!e,!0),Gue(n)}},Kue=Xp,que=HT;Kue("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},que);var Yue=ae,Xue=Yue.Map,Que=Xue,Jue=Que;(function(t){t.exports=Jue})(Fse);var WT=V(Kf),Zue=function(){function t(){N(this,t),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},je(this.options,this.defaultOptions)}return F(t,[{key:"setOptions",value:function(e){var r=["useDefaultGroups"];if(e!==void 0){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&oe(r).call(r,i)===-1){var a=e[i];this.add(i,a)}}}},{key:"clear",value:function(){this._groups=new WT,this._groupNames=[]}},{key:"get",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&r)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[a]),this._groups.set(e,i)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[o],this._groups.set(e,i)}return i}},{key:"add",value:function(e,r){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,r),r}}]),t}(),qf={},ele={get exports(){return qf},set exports(t){qf=t}},tle=K;tle({target:"Number",stat:!0},{isNaN:function(n){return n!=n}});var rle=ae,ile=rle.Number.isNaN,nle=ile,ale=nle;(function(t){t.exports=ale})(ele);var Yf=V(qf),Xf={},ole={get exports(){return Xf},set exports(t){Xf=t}},sle=We,ule=sle.isFinite,lle=Number.isFinite||function(n){return typeof n=="number"&&ule(n)},hle=K,dle=lle;hle({target:"Number",stat:!0},{isFinite:dle});var cle=ae,fle=cle.Number.isFinite,vle=fle,ple=vle;(function(t){t.exports=ple})(ole);var Ti=V(Xf),Qf={},gle={get exports(){return Qf},set exports(t){Qf=t}},yle=K,mle=hi.some,ble=pa,$le=ble("some");yle({target:"Array",proto:!0,forced:!$le},{some:function(n){return mle(this,n,arguments.length>1?arguments[1]:void 0)}});var wle=tt,_le=wle("Array").some,Ele=Fe,Sle=_le,Rd=Array.prototype,Ole=function(t){var n=t.some;return t===Rd||Ele(Rd,t)&&n===Rd.some?Sle:n},Tle=Ole,kle=Tle;(function(t){t.exports=kle})(gle);var Ple=V(Qf),Jf={},Ile={get exports(){return Jf},set exports(t){Jf=t}},VT=We,Cle=se,xle=ue,Ale=br,Rle=Dp.trim,Dle=Pl,Mle=xle("".charAt),Iu=VT.parseFloat,S1=VT.Symbol,O1=S1&&S1.iterator,Nle=1/Iu(Dle+"-0")!==-1/0||O1&&!Cle(function(){Iu(Object(O1))}),Fle=Nle?function(n){var e=Rle(Ale(n)),r=Iu(e);return r===0&&Mle(e,0)=="-"?-0:r}:Iu,Ble=K,T1=Fle;Ble({global:!0,forced:parseFloat!=T1},{parseFloat:T1});var Lle=ae,jle=Lle.parseFloat,zle=jle,Hle=zle;(function(t){t.exports=Hle})(Ile);var UT=V(Jf),Zf={},Wle={get exports(){return Zf},set exports(t){Zf=t}},Vle=K,Ule=se,Gle=ml.f,Kle=Ule(function(){return!Object.getOwnPropertyNames(1)});Vle({target:"Object",stat:!0,forced:Kle},{getOwnPropertyNames:Gle});var qle=ae,Yle=qle.Object,Xle=function(n){return Yle.getOwnPropertyNames(n)},Qle=Xle,Jle=Qle;(function(t){t.exports=Jle})(Wle);var Zle=V(Zf);function Jp(t,n){var e=["node","edge","label"],r=!0,i=Ur(n,"chosen");if(typeof i=="boolean")r=i;else if(de(i)==="object"){if(oe(e).call(e,t)===-1)throw new Error("choosify: subOption '"+t+"' should be one of '"+e.join("', '")+"'");var a=Ur(n,["chosen",t]);(typeof a=="boolean"||typeof a=="function")&&(r=a)}return r}function ev(t,n,e){if(t.width<=0||t.height<=0)return!1;if(e!==void 0){var r={x:n.x-e.x,y:n.y-e.y};if(e.angle!==0){var i=-e.angle,a={x:Math.cos(i)*r.x-Math.sin(i)*r.y,y:Math.sin(i)*r.x+Math.cos(i)*r.y};n=a}else n=r}var o=t.x+t.width,s=t.y+t.width;return t.left<n.x&&o>n.x&&t.top<n.y&&s>n.y}function Cu(t){return typeof t=="string"&&t!==""}function GT(t,n,e,r){var i=r.x,a=r.y;if(typeof r.distanceToBorder=="function"){var o=r.distanceToBorder(t,n),s=Math.sin(n)*o,u=Math.cos(n)*o;u===o?(i+=o,a=r.y):s===o?(i=r.x,a-=o):(i+=u,a-=s)}else r.shape.width>r.shape.height?(i=r.x+r.shape.width*.5,a=r.y-e):(i=r.x+e,a=r.y-r.shape.height*.5);return{x:i,y:a}}var tv={},ehe={get exports(){return tv},set exports(t){tv=t}},the=tt,rhe=the("Array").values,ihe=rhe,nhe=ihe,ahe=Ji,ohe=et,she=Fe,uhe=nhe,Dd=Array.prototype,lhe={DOMTokenList:!0,NodeList:!0},hhe=function(t){var n=t.values;return t===Dd||she(Dd,t)&&n===Dd.values||ohe(lhe,ahe(t))?uhe:n};(function(t){t.exports=hhe})(ehe);var KT=V(tv),dhe=function(){function t(n){N(this,t),this.measureText=n,this.current=0,this.width=0,this.height=0,this.lines=[]}return F(t,[{key:"_add",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=r;(r===void 0||r==="")&&(a=" ");var o=this.measureText(a,i),s=je({},KT(o));s.text=r,s.width=o.width,s.mod=i,(r===void 0||r==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return e===void 0?0:e.width}},{key:"append",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,r)}},{key:"newLine",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,r),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;e<this.lines.length;e++){var r=this.lines[e],i=0;if(r.blocks!==void 0)for(var a=0;a<r.blocks.length;a++){var o=r.blocks[a];i<o.height&&(i=o.height)}r.height=i}}},{key:"determineLabelSize",value:function(){for(var e=0,r=0,i=0;i<this.lines.length;i++){var a=this.lines[i];a.width>e&&(e=a.width),r+=a.height}this.width=e,this.height=r}},{key:"removeEmptyBlocks",value:function(){for(var e=[],r=0;r<this.lines.length;r++){var i=this.lines[r];if(i.blocks.length!==0&&!(r===this.lines.length-1&&i.width===0)){var a={};je(a,i),a.blocks=[];for(var o=void 0,s=[],u=0;u<i.blocks.length;u++){var l=i.blocks[u];l.width!==0?s.push(l):o===void 0&&(o=l)}s.length===0&&o!==void 0&&s.push(o),a.blocks=s,e.push(a)}}return e}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}]),t}(),che={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},k1=function(){function t(n){N(this,t),this.text=n,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return F(t,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){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"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,r){return!this.mono&&!this[e]&&this.match(r)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this.prepareRegExp(e),a=ke(i,2),o=a[0],s=a[1],u=o.test(this.text.substr(this.position,s));return u&&r&&(this.position+=s-1),u}},{key:"parseEndTag",value:function(e,r,i){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(r)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,r){return this.match(e)?(this.add(r),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var r,i;if(e instanceof RegExp)i=e,r=1;else{var a=che[e];a!==void 0?i=a:i=new RegExp(e),r=e.length}return[i,r]}}]),t}(),fhe=function(){function t(n,e,r,i){var a=this;N(this,t),this.ctx=n,this.parent=e,this.selected=r,this.hover=i;var o=function(u,l){if(u===void 0)return 0;var h=a.parent.getFormattingValues(n,r,i,l),d=0;if(u!==""){var c=a.ctx.measureText(u);d=c.width}return{width:d,values:h}};this.lines=new dhe(o)}return F(t,[{key:"process",value:function(e){if(!Cu(e))return this.lines.finalize();var r=this.parent.fontOptions;e=e.replace(/\r\n/g,`
|
|
90
|
+
`),e=e.replace(/\r/g,`
|
|
91
|
+
`);var i=String(e).split(`
|
|
92
|
+
`),a=i.length;if(r.multi)for(var o=0;o<a;o++){var s=this.splitBlocks(i[o],r.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(r.maxWdt>0)for(var u=0;u<s.length;u++){var l=s[u].mod,h=s[u].text;this.splitStringIntoLines(h,l,!0)}else for(var d=0;d<s.length;d++){var c=s[d].mod,f=s[d].text;this.lines.append(f,c)}this.lines.newLine()}}else if(r.maxWdt>0)for(var v=0;v<a;v++)this.splitStringIntoLines(i[v]);else for(var p=0;p<a;p++)this.lines.newLine(i[p]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var r="none";return e==="markdown"||e==="md"?r="markdown":(e===!0||e==="html")&&(r="html"),r}},{key:"splitHtmlBlocks",value:function(e){for(var r=new k1(e),i=function(u){if(/&/.test(u)){var l=r.replace(r.text,"<","<")||r.replace(r.text,"&","&");return l||r.add("&"),!0}return!1};r.position<r.text.length;){var a=r.text.charAt(r.position),o=r.parseWS(a)||/</.test(a)&&(r.parseStartTag("bold","<b>")||r.parseStartTag("ital","<i>")||r.parseStartTag("mono","<code>")||r.parseEndTag("bold","</b>")||r.parseEndTag("ital","</i>")||r.parseEndTag("mono","</code>"))||i(a);o||r.add(a),r.position++}return r.emitBlock(),r.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var r=this,i=new k1(e),a=!0,o=function(h){return/\\/.test(h)?(i.position<r.text.length+1&&(i.position++,h=r.text.charAt(i.position),/ \t/.test(h)?i.spacing=!0:(i.add(h),a=!1)),!0):!1};i.position<i.text.length;){var s=i.text.charAt(i.position),u=i.parseWS(s)||o(s)||(a||i.spacing)&&(i.parseStartTag("bold","*")||i.parseStartTag("ital","_")||i.parseStartTag("mono","`"))||i.parseEndTag("bold","*","afterBold")||i.parseEndTag("ital","_","afterItal")||i.parseEndTag("mono","`","afterMono");u||(i.add(s),a=!1),i.position++}return i.emitBlock(),i.blocks}},{key:"splitBlocks",value:function(e,r){var i=this.decodeMarkupSystem(r);if(i==="none")return[{text:e,mod:"normal"}];if(i==="markdown")return this.splitMarkdownBlocks(e);if(i==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var r=this.ctx.measureText(e).width;return this.lines.curWidth()+r>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var r="",i=0;i<e.length;){var a=r===""?"":" ",o=r+a+e[i];if(this.overMaxWidth(o))break;r=o,i++}return i}},{key:"getLongestFitWord",value:function(e){for(var r=0;r<e.length&&!this.overMaxWidth(ot(e).call(e,0,r));)r++;return r}},{key:"splitStringIntoLines",value:function(e){var r=arguments.length>1&&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,r),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],u=this.getLongestFitWord(s);this.lines.newLine(ot(s).call(s,0,u),r),a[0]=ot(s).call(s,u)}else{var l=o;a[o-1]===" "?o--:a[l]===" "&&l++;var h=ot(a).call(a,0,o).join("");o==a.length&&i?this.lines.append(h,r):this.lines.newLine(h,r),a=ot(a).call(a,l)}}}}]),t}(),Ea=["bold","ital","boldital","mono"],qT=function(){function t(n,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;N(this,t),this.body=n,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=r}return F(t,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Cu(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(de(e.font)==="object"){var r=e.font.size;r!==void 0&&(this.baseSize=r)}}}},{key:"initFontOptions",value:function(e){var r=this;if(re(Ea,function(i){r.fontOptions[i]={}}),t.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}re(e,function(i,a){i!=null&&de(i)!=="object"&&(r.fontOptions[a]=i)})}},{key:"constrain",value:function(e){var r={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=Ur(e,"widthConstraint");if(typeof i=="number")r.maxWdt=Number(i),r.minWdt=Number(i);else if(de(i)==="object"){var a=Ur(e,["widthConstraint","maximum"]);typeof a=="number"&&(r.maxWdt=Number(a));var o=Ur(e,["widthConstraint","minimum"]);typeof o=="number"&&(r.minWdt=Number(o))}var s=Ur(e,"heightConstraint");if(typeof s=="number")r.minHgt=Number(s);else if(de(s)==="object"){var u=Ur(e,["heightConstraint","minimum"]);typeof u=="number"&&(r.minHgt=Number(u));var l=Ur(e,["heightConstraint","valign"]);typeof l=="string"&&(l==="top"||l==="bottom")&&(r.valign=l)}return r}},{key:"update",value:function(e,r){this.setOptions(e,!0),this.propagateFonts(r),ye(this.fontOptions,this.constrain(r)),this.fontOptions.chooser=Jp("label",r)}},{key:"adjustSizes",value:function(e){var r=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=r,this.fontOptions.minWdt-=r);var i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(e,r){for(var i=0;i<r.length;++i)this.addFontToPile(e,r[i])}},{key:"addFontToPile",value:function(e,r){if(r!==void 0&&!(r.font===void 0||r.font===null)){var i=r.font;e.push(i)}}},{key:"getBasicOptions",value:function(e){for(var r={},i=0;i<e.length;++i){var a=e[i],o={};t.parseFontString(o,a)&&(a=o),re(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(r,u)||(oe(Ea).call(Ea,u)!==-1?r[u]={}:r[u]=s))})}return r}},{key:"getFontOption",value:function(e,r,i){for(var a,o=0;o<e.length;++o){var s=e[o];if(Object.prototype.hasOwnProperty.call(s,r)){if(a=s[r],a==null)continue;var u={};if(t.parseFontString(u,a)&&(a=u),Object.prototype.hasOwnProperty.call(a,i))return a[i]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,i))return this.fontOptions[i];throw new Error("Did not find value for multi-font for property: '"+i+"'")}},{key:"getFontOptions",value:function(e,r){for(var i={},a=["color","size","face","mod","vadjust"],o=0;o<a.length;++o){var s=a[o];i[s]=this.getFontOption(e,r,s)}return i}},{key:"propagateFonts",value:function(e){var r=this,i=[];this.addFontOptionsToPile(i,e),this.fontOptions=this.getBasicOptions(i);for(var a=function(){var u=Ea[o],l=r.fontOptions[u],h=r.getFontOptions(i,u);re(h,function(d,c){l[c]=d}),l.size=Number(l.size),l.vadjust=Number(l.vadjust)},o=0;o<Ea.length;++o)a()}},{key:"draw",value:function(e,r,i,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var u=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&u<this.elementOptions.scaling.label.drawThreshold-1||(u>=this.elementOptions.scaling.label.maxVisible&&(u=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,r,i,s),this._drawBackground(e),this._drawText(e,r,this.size.yLine,s,u))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var r=this.getSize();e.fillRect(r.left,r.top,r.width,r.height)}}},{key:"_drawText",value:function(e,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,r,i,a),u=ke(s,2);r=u[0],i=u[1],e.textAlign="left",r=r-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(var l=0;l<this.lineCount;l++){var h=this.lines[l];if(h&&h.blocks){var d=0;this.isEdgeLabel||this.fontOptions.align==="center"?d+=(this.size.width-h.width)/2:this.fontOptions.align==="right"&&(d+=this.size.width-h.width);for(var c=0;c<h.blocks.length;c++){var f=h.blocks[c];e.font=f.font;var v=this._getColor(f.color,o,f.strokeColor),p=ke(v,2),$=p[0],g=p[1];f.strokeWidth>0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=g,e.lineJoin="round"),e.fillStyle=$,f.strokeWidth>0&&e.strokeText(f.text,r+d,i+f.vadjust),e.fillText(f.text,r+d,i+f.vadjust),d+=f.width}i+=h.height}}}},{key:"_setAlignment",value:function(e,r,i,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){r=0,i=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[r,i]}},{key:"_getColor",value:function(e,r,i){var a=e||"#000000",o=i||"#ffffff";if(r<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-r)));a=jt(a,s),o=jt(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var r=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,r,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,r=this.size.left,i=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":r=a,i=-this.size.height*.5;break;case"top":r=a,i=-(this.size.height+e);break;case"bottom":r=a,i=e;break}}var o={left:r,top:i,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,r,i),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,r,i,a){var o=function(h,d,c){return d==="normal"?c==="mod"?"":h[c]:h[d][c]!==void 0?h[d][c]:h[c]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(r||i)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,r,i));var u="";return s.mod!==void 0&&s.mod!==""&&(u+=s.mod+" "),u+=s.size+"px "+s.face,e.font=u.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,r){return e!==this.selectedState||r!==this.hoverState}},{key:"_processLabelText",value:function(e,r,i,a){var o=new fhe(e,this,r,i);return o.process(a)}},{key:"_processLabel",value:function(e,r,i){if(!(this.labelDirty===!1&&!this.differentState(r,i))){var a=this._processLabelText(e,r,i,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width<this.fontOptions.minWdt&&(a.width=this.fontOptions.minWdt),this.size.labelHeight=a.height,this.fontOptions.minHgt>0&&a.height<this.fontOptions.minHgt&&(a.height=this.fontOptions.minHgt),this.lines=a.lines,this.lineCount=a.lines.length,this.size.width=a.width,this.size.height=a.height,this.selectedState=r,this.hoverState=i,this.labelDirty=!1}}},{key:"visible",value:function(){if(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0)return!1;var e=this.fontOptions.size*this.body.view.scale;return!(e<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(e,r){if(!r||typeof r!="string")return!1;var i=r.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}}]),t}(),rv={},vhe={get exports(){return rv},set exports(t){rv=t}},phe=gl,ghe=la,yhe=TypeError,mhe=function(t){if(phe(t))return t;throw yhe(ghe(t)+" is not a constructor")},bhe=K,$he=Ut,Md=ko,whe=$S,P1=mhe,_he=Ft,I1=Ze,Ehe=da,YT=se,Zp=$he("Reflect","construct"),She=Object.prototype,Ohe=[].push,XT=YT(function(){function t(){}return!(Zp(function(){},[],t)instanceof t)}),QT=!YT(function(){Zp(function(){})}),C1=XT||QT;bhe({target:"Reflect",stat:!0,forced:C1,sham:C1},{construct:function(n,e){P1(n),_he(e);var r=arguments.length<3?n:P1(arguments[2]);if(QT&&!XT)return Zp(n,e,r);if(n==r){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var i=[null];return Md(Ohe,i,e),new(Md(whe,n,i))}var a=r.prototype,o=Ehe(I1(a)?a:She),s=Md(n,o,e);return I1(s)?s:o}});var The=ae,khe=The.Reflect.construct,Phe=khe,Ihe=Phe;(function(t){t.exports=Ihe})(vhe);var P=V(rv),iv={},Che={get exports(){return iv},set exports(t){iv=t}},nv={},xhe={get exports(){return nv},set exports(t){nv=t}},Ahe=XO,Rhe=Ahe,Dhe=Rhe,Mhe=Dhe;(function(t){t.exports=Mhe})(xhe);(function(t){t.exports=nv})(Che);var Nhe=V(iv),av={},Fhe={get exports(){return av},set exports(t){av=t}},ov={},Bhe={get exports(){return ov},set exports(t){ov=t}},Lhe=K,jhe=_q;Lhe({target:"Object",stat:!0},{setPrototypeOf:jhe});var zhe=ae,Hhe=zhe.Object.setPrototypeOf,Whe=Hhe,Vhe=Whe,Uhe=Vhe,Ghe=Uhe,Khe=Ghe,qhe=Khe;(function(t){t.exports=qhe})(Bhe);(function(t){t.exports=ov})(Fhe);var sv=V(av),uv={},Yhe={get exports(){return uv},set exports(t){uv=t}},lv={},Xhe={get exports(){return lv},set exports(t){lv=t}},Qhe=wS,Jhe=Qhe,Zhe=Jhe,ede=Zhe;(function(t){t.exports=ede})(Xhe);(function(t){t.exports=lv})(Yhe);var eg=V(uv);function hv(t,n){var e;return hv=sv?eg(e=sv).call(e):function(i,a){return i.__proto__=a,i},hv(t,n)}function he(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Nhe(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Tl(t,"prototype",{writable:!1}),n&&hv(t,n)}function tde(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ve(t,n){if(n&&(de(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tde(t)}var dv={},rde={get exports(){return dv},set exports(t){dv=t}},cv={},ide={get exports(){return cv},set exports(t){cv=t}},nde=UO,ade=nde,ode=ade,sde=ode;(function(t){t.exports=sde})(ide);(function(t){t.exports=cv})(rde);var x1=V(dv);function z(t){var n;return z=sv?eg(n=x1).call(n):function(r){return r.__proto__||x1(r)},z(t)}var nn=function(){function t(n,e,r){N(this,t),this.body=e,this.labelModule=r,this.setOptions(n),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&(de(this.options.margin)=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(e,r){var i=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(r)),Math.abs(this.height/2/Math.sin(r)))+i}},{key:"enableShadow",value:function(e,r){r.shadow&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}},{key:"disableShadow",value:function(e,r){r.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(e,r){if(r.borderDashes!==!1)if(e.setLineDash!==void 0){var i=r.borderDashes;i===!0&&(i=[5,15]),e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,r.borderDashes=!1}},{key:"disableBorderDashes",value:function(e,r){r.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,r.borderDashes=!1))}},{key:"needsRefresh",value:function(e,r){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,r)}},{key:"initContextForDraw",value:function(e,r){var i=r.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,i),e.strokeStyle=r.borderColor,e.fillStyle=r.color}},{key:"performStroke",value:function(e,r){var i=r.borderWidth/this.body.view.scale;e.save(),i>0&&(this.enableBorderDashes(e,r),e.stroke(),this.disableBorderDashes(e,r)),e.restore()}},{key:"performFill",value:function(e,r){e.save(),e.fillStyle=r.color,this.enableShadow(e,r),qo(e).call(e),this.disableShadow(e,r),e.restore(),this.performStroke(e,r)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,r,i,a,o){i!==void 0&&this.resize(i,a,o),this.left=e-this.width/2,this.top=r-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}},{key:"updateBoundingBox",value:function(e,r,i,a,o){this._updateBoundingBox(e,r,i,a,o)}},{key:"getDimensionsFromLabel",value:function(e,r,i){this.textSize=this.labelModule.getTextSize(e,r,i);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),t}();function ude(t){var n=lde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function lde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var hde=function(t){he(e,t);var n=ude(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,l),_S(i,this.left,this.top,this.width,this.height,l.borderRadius),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"updateBoundingBox",value:function(i,a,o,s,u){this._updateBoundingBox(i,a,o,s,u);var l=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(l)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(nn);function dde(t){var n=cde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function cde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var tg=function(t){he(e,t);var n=dde(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o.labelOffset=0,o.selected=!1,o}return F(e,[{key:"setOptions",value:function(i,a,o){this.options=i,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(i,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=i):(this.imageObj=i,this.imageObjAlt=a)}},{key:"switchImages",value:function(i){var a=i&&!this.selected||!i&&this.selected;if(this.selected=i,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var i={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;de(a)=="object"?(i.top=a.top,i.right=a.right,i.bottom=a.bottom,i.left=a.left):(i.top=a,i.right=a,i.bottom=a,i.left=a)}return i}},{key:"_resizeImage",value:function(){var i,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),i=this.options.size*2*o,a=this.options.size*2*s}else{var u=this._getImagePadding();i=this.imageObj.width+u.left+u.right,a=this.imageObj.height+u.top+u.bottom}this.width=i,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(i,a,o,s){this.initContextForDraw(i,s),bp(i,a,o,s.size),this.performFill(i,s)}},{key:"_drawImageAtPosition",value:function(i,a){if(this.imageObj.width!=0){i.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(i,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),u=this.left+s.left,l=this.top+s.top,h=this.width-s.left-s.right,d=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(i,o,u,l,h,d),this.disableShadow(i,a)}}},{key:"_drawImageLabel",value:function(i,a,o,s,u){var l=0;if(this.height!==void 0){l=this.height*.5;var h=this.labelModule.getTextSize(i,s,u);h.lineCount>=1&&(l+=h.height/2)}var d=o+l;this.options.label&&(this.labelOffset=l),this.labelModule.draw(i,a,d,s,u,"hanging")}}]),e}(nn);function fde(t){var n=vde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function vde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var pde=function(t){he(e,t);var n=fde(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),u=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=u/2,this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(i,a,o,l),this.updateBoundingBox(a,o),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,o,s,u)}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(tg);function gde(t){var n=yde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function yde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var mde=function(t){he(e,t);var n=gde(e);function e(r,i,a,o,s){var u;return N(this,e),u=n.call(this,r,i,a),u.setImages(o,s),u}return F(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,u,l){this.switchImages(s),this.resize();var h=a,d=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(i,h,d,l),i.save(),i.clip(),this._drawImageAtPosition(i,l),i.restore(),this._drawImageLabel(i,h,d,s,u),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(i,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=i,this.boundingBox.right=i+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+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)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(tg);function bde(t){var n=$de();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function $de(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var fi=function(t){he(e,t);var n=bde(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var u,l;this.labelModule.getTextSize(i,a,o);var h=2*s.size;this.width=(u=this.customSizeWidth)!==null&&u!==void 0?u:h,this.height=(l=this.customSizeHeight)!==null&&l!==void 0?l:h,this.radius=.5*this.width}}},{key:"_drawShape",value:function(i,a,o,s,u,l,h,d){var c=this;return this.resize(i,l,h,d),this.left=s-this.width/2,this.top=u-this.height/2,this.initContextForDraw(i,d),B7(a)(i,s,u,d.size),this.performFill(i,d),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(i.font=(l?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",i.fillText(this.options.icon.code,s,u)),{drawExternalLabel:function(){if(c.options.label!==void 0){c.labelModule.calculateLabelSize(i,l,h,s,u,"hanging");var v=u+.5*c.height+.5*c.labelModule.size.height;c.labelModule.draw(i,s,v,l,h,"hanging")}c.updateBoundingBox(s,u)}}}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+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))}}]),e}(nn);function A1(t,n){var e=Oe(t);if(ii){var r=ii(t);n&&(r=Ot(r).call(r,function(i){return di(t,i).enumerable})),e.push.apply(e,r)}return e}function wde(t){for(var n=1;n<arguments.length;n++){var e,r,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=A1(Object(i),!0)).call(e,function(a){kl(t,a,i[a])}):ni?Sl(t,ni(i)):pe(r=A1(Object(i))).call(r,function(a){Ol(t,a,di(i,a))})}return t}function _de(t){var n=Ede();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Ede(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Sde=function(t){he(e,t);var n=_de(e);function e(r,i,a,o){var s;return N(this,e),s=n.call(this,r,i,a,o),s.ctxRenderer=o,s}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u,l),this.left=a-this.width/2,this.top=o-this.height/2,i.save();var h=this.ctxRenderer({ctx:i,id:this.options.id,x:a,y:o,state:{selected:s,hover:u},style:wde({},l),label:this.options.label});if(h.drawNode!=null&&h.drawNode(),i.restore(),h.drawExternalLabel){var d=h.drawExternalLabel;h.drawExternalLabel=function(){i.save(),d(),i.restore()}}return h.nodeDimensions&&(this.customSizeWidth=h.nodeDimensions.width,this.customSizeHeight=h.nodeDimensions.height),h}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fi);function Ode(t){var n=Tde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Tde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var kde=function(t){he(e,t);var n=Ode(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(i,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),u=s.width+this.margin.right+this.margin.left;this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,l),ES(i,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(nn);function Pde(t){var n=Ide();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Ide(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Cde=function(t){he(e,t);var n=Pde(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fi);function xde(t){var n=Ade();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Ade(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Rde=function(t){he(e,t);var n=xde(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"circle",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.options.size}}]),e}(fi);function Dde(t){var n=Mde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Mde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var R1=function(t){he(e,t);var n=Dde(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(i,l),xc(i,this.left,this.top,this.width,this.height),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,a,o,s,u)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.width*.5,s=this.height*.5,u=Math.sin(a)*o,l=Math.cos(a)*s;return o*s/Math.sqrt(u*u+l*l)}}]),e}(nn);function Nde(t){var n=Fde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Fde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Bde=function(t){he(e,t);var n=Nde(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(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)}},{key:"draw",value:function(i,a,o,s,u,l){var h=this;return this.resize(i,s,u),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(i,a,o,s,u,l),{drawExternalLabel:function(){if(h.options.label!==void 0){var c=5;h.labelModule.draw(i,h.left+h.iconSize.width/2+h.margin.left,o+h.height/2+c,s)}h.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(i,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=i-this.options.icon.size*.5,this.boundingBox.right=i+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;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+o)}}},{key:"_icon",value:function(i,a,o,s,u,l){var h=Number(this.options.icon.size);this.options.icon.code!==void 0?(i.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+h+"px",this.options.icon.face].join(" "),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",this.enableShadow(i,l),i.fillText(this.options.icon.code,a,o),this.disableShadow(i,l)):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.")}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(nn);function Lde(t){var n=jde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function jde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var zde=function(t){he(e,t);var n=Lde(e);function e(r,i,a,o,s){var u;return N(this,e),u=n.call(this,r,i,a),u.setImages(o,s),u}return F(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,u,l){i.save(),this.switchImages(s),this.resize();var h=a,d=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var c=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:c)/this.body.view.scale;i.lineWidth=Math.min(this.width,v),i.beginPath();var p=s?this.options.color.highlight.border:u?this.options.color.hover.border:this.options.color.border,$=s?this.options.color.highlight.background:u?this.options.color.hover.background:this.options.color.background;l.opacity!==void 0&&(p=jt(p,l.opacity),$=jt($,l.opacity)),i.strokeStyle=p,i.fillStyle=$,i.rect(this.left-.5*i.lineWidth,this.top-.5*i.lineWidth,this.width+i.lineWidth,this.height+i.lineWidth),qo(i).call(i),this.performStroke(i,l),i.closePath()}this._drawImageAtPosition(i,l),this._drawImageLabel(i,h,d,s,u),this.updateBoundingBox(a,o),i.restore()}},{key:"updateBoundingBox",value:function(i,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=i,this.top=a):(this.left=i-this.width/2,this.top=a-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))}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(tg);function Hde(t){var n=Wde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Wde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Vde=function(t){he(e,t);var n=Hde(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"square",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fi);function Ude(t){var n=Gde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Gde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Kde=function(t){he(e,t);var n=Ude(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"hexagon",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fi);function qde(t){var n=Yde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Yde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Xde=function(t){he(e,t);var n=qde(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"star",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fi);function Qde(t){var n=Jde();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Jde(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Zde=function(t){he(e,t);var n=Qde(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(i,a,o),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)}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(i,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u),this.disableShadow(i,l),this.updateBoundingBox(a,o,i,s,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(nn);function ece(t){var n=tce();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function tce(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var rce=function(t){he(e,t);var n=ece(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"triangle",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fi);function ice(t){var n=nce();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function nce(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var ace=function(t){he(e,t);var n=ice(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"triangleDown",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fi);function D1(t,n){var e=Oe(t);if(ii){var r=ii(t);n&&(r=Ot(r).call(r,function(i){return di(t,i).enumerable})),e.push.apply(e,r)}return e}function M1(t){for(var n=1;n<arguments.length;n++){var e,r,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=D1(Object(i),!0)).call(e,function(a){kl(t,a,i[a])}):ni?Sl(t,ni(i)):pe(r=D1(Object(i))).call(r,function(a){Ol(t,a,di(i,a))})}return t}var It=function(){function t(n,e,r,i,a,o){N(this,t),this.options=ei(a),this.globalOptions=a,this.defaultOptions=o,this.body=e,this.edges=[],this.id=void 0,this.imagelist=r,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new qT(this.body,this.options,!1),this.setOptions(n)}return F(t,[{key:"attachEdge",value:function(e){var r;oe(r=this.edges).call(r,e)===-1&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var r,i=oe(r=this.edges).call(r,e);if(i!=-1){var a;Tr(a=this.edges).call(a,i,1)}}},{key:"setOptions",value:function(e){var r=this.options.shape;if(e){if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");t.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=Qt(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Qt(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=UT(e.value)),t.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var i=[e,this.options,this.defaultOptions];return this.chooser=Jp("node",i),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&t.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(r),e.hidden!==void 0||e.physics!==void 0}}},{key:"_load_images",value:function(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var 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){var r=this.options.opacity;e.borderColor=jt(e.borderColor,r),e.color=jt(e.color,r),e.shadowColor=jt(e.shadowColor,r)}return e}},{key:"updateLabelModule",value:function(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),t.updateGroupOptions(this.options,M1(M1({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var r=this.grouplist.get(this.options.group,!1),i=[e,this.options,r,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(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 hde(this.options,this.body,this.labelModule);break;case"circle":this.shape=new pde(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new mde(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Sde(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new kde(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Cde(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Rde(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new R1(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Bde(this.options,this.body,this.labelModule);break;case"image":this.shape=new zde(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Vde(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Kde(this.options,this.body,this.labelModule);break;case"star":this.shape=new Xde(this.options,this.body,this.labelModule);break;case"text":this.shape=new Zde(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new rce(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new ace(this.options,this.body,this.labelModule);break;default:this.shape=new R1(this.options,this.body,this.labelModule);break}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(e,r){return this.shape.distanceToBorder(e,r)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(e,r,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,r,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.size=this.options.scaling.min+a*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(e){var r=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,r)||{}}},{key:"updateBoundingBox",value:function(e){this.shape.updateBoundingBox(this.x,this.y,e)}},{key:"resize",value:function(e){var r=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,r)}},{key:"getItemsOnPoint",value:function(e){var r=[];return this.labelModule.visible()&&ev(this.labelModule.getSize(),e)&&r.push({nodeId:this.id,labelId:0}),ev(this.shape.boundingBox,e)&&r.push({nodeId:this.id}),r}},{key:"isOverlappingWith",value:function(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return e===void 0||e==="center"||e==="top-left"}},{key:"updateGroupOptions",value:function(e,r,i){var a;if(i!==void 0){var o=e.group;if(r!==void 0&&r.group!==void 0&&o!==r.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var u=i.get(o);u.opacity!==void 0&&r.opacity===void 0&&(t.checkOpacity(u.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+u.opacity),u.opacity=void 0));var l=Ot(a=Zle(r)).call(a,function(h){return r[h]!=null});l.push("font"),ku(l,e,u),e.color=Wf(e.color)}}}},{key:"parseOptions",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(ku(s,e,r,i),t.checkMass(r),e.opacity!==void 0&&(t.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),r.opacity!==void 0&&(t.checkOpacity(r.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+r.opacity),r.opacity=void 0)),r.shapeProperties&&!t.checkCoordinateOrigin(r.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+r.shapeProperties.coordinateOrigin),Lt(e,r,"shadow",a),r.color!==void 0&&r.color!==null){var u=Wf(r.color);TT(e.color,u)}else i===!0&&r.color===null&&(e.color=ei(a.color));r.fixed!==void 0&&r.fixed!==null&&(typeof r.fixed=="boolean"?(e.fixed.x=r.fixed,e.fixed.y=r.fixed):(r.fixed.x!==void 0&&typeof r.fixed.x=="boolean"&&(e.fixed.x=r.fixed.x),r.fixed.y!==void 0&&typeof r.fixed.y=="boolean"&&(e.fixed.y=r.fixed.y))),i===!0&&r.font===null&&(e.font=ei(a.font)),t.updateGroupOptions(e,r,o),r.scaling!==void 0&&Lt(e.scaling,r.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,r){if(e.mass!==void 0&&e.mass<=0){var i="";r!==void 0&&(i=" in node id: "+r),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",CT),e.mass=1}}}]),t}();function oce(t,n){var e=typeof ci<"u"&&Br(t)||t["@@iterator"];if(!e){if(ce(t)||(e=sce(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
93
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function sce(t,n){var e;if(t){if(typeof t=="string")return N1(t,n);var r=ot(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return en(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N1(t,n)}}function N1(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var uce=function(){function t(n,e,r,i){var a,o=this;if(N(this,t),this.body=n,this.images=e,this.groups=r,this.layoutEngine=i,this.body.functions.createNode=A(a=this.create).call(a,this),this.nodesListeners={add:function(u,l){o.add(l.items)},update:function(u,l){o.update(l.items,l.data,l.oldData)},remove:function(u,l){o.remove(l.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(u,l,h,d){if(l===u)return .5;var c=1/(l-u);return Math.max(0,(d-u)*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=ei(this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e,r,i=this;this.body.emitter.on("refreshNodes",A(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",A(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",function(){re(i.nodesListeners,function(a,o){i.body.data.nodes&&i.body.data.nodes.off(o,a)}),delete i.body.functions.createNode,delete i.nodesListeners.add,delete i.nodesListeners.update,delete i.nodesListeners.remove,delete i.nodesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){if(It.parseOptions(this.options,e),e.opacity!==void 0&&(Yf(e.opacity)||!Ti(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(var r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.body.nodes[r].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var i=0,a=Oe(this.body.nodes);i<a.length;i++){var o=a[i];this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh()}if(e.size!==void 0)for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.body.nodes[s].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.data.nodes;if(rS("id",e))this.body.data.nodes=e;else if(ce(e))this.body.data.nodes=new mu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new mu;else throw new TypeError("Array or DataSet expected");if(i&&re(this.nodesListeners,function(s,u){i.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;re(this.nodesListeners,function(s,u){a.body.data.nodes.on(u,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}r===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i,a=[],o=0;o<e.length;o++){i=e[o];var s=this.body.data.nodes.get(i),u=this.create(s);a.push(u),this.body.nodes[i]=u}this.layoutEngine.positionInitially(a),r===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,r,i){for(var a=this.body.nodes,o=!1,s=0;s<e.length;s++){var u=e[s],l=a[u],h=r[s];l!==void 0?l.setOptions(h)&&(o=!0):(o=!0,l=this.create(h),a[u]=l)}!o&&i!==void 0&&(o=Ple(r).call(r,function(d,c){var f=i[c];return f&&f.level!==d.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var r=this.body.nodes,i=0;i<e.length;i++){var a=e[i];delete r[a]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It;return new r(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;re(this.body.nodes,function(i,a){var o=e.body.data.nodes.get(a);o!==void 0&&(r===!0&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(o))})}},{key:"getPositions",value:function(e){var r={};if(e!==void 0){if(ce(e)===!0){for(var i=0;i<e.length;i++)if(this.body.nodes[e[i]]!==void 0){var a=this.body.nodes[e[i]];r[e[i]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){var o=this.body.nodes[e];r[e]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var s=0;s<this.body.nodeIndices.length;s++){var u=this.body.nodes[this.body.nodeIndices[s]];r[this.body.nodeIndices[s]]={x:Math.round(u.x),y:Math.round(u.y)}}return r}},{key:"getPosition",value:function(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}},{key:"storePositions",value:function(){var e=[],r=this.body.data.nodes.getDataSet(),i=oce(r.get()),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o.id,u=this.body.nodes[s],l=Math.round(u.x),h=Math.round(u.y);(o.x!==l||o.y!==h)&&e.push({id:s,x:l,y:h})}}catch(d){i.e(d)}finally{i.f()}r.update(e)}},{key:"getBoundingBox",value:function(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}},{key:"getConnectedNodes",value:function(e,r){var i=[];if(this.body.nodes[e]!==void 0)for(var a=this.body.nodes[e],o={},s=0;s<a.edges.length;s++){var u=a.edges[s];r!=="to"&&u.toId==a.id?o[u.fromId]===void 0&&(i.push(u.fromId),o[u.fromId]=!0):r!=="from"&&u.fromId==a.id&&o[u.toId]===void 0&&(i.push(u.toId),o[u.toId]=!0)}return i}},{key:"getConnectedEdges",value:function(e){var r=[];if(this.body.nodes[e]!==void 0)for(var i=this.body.nodes[e],a=0;a<i.edges.length;a++)r.push(i.edges[a].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return r}},{key:"moveNode",value:function(e,r,i){var a=this;this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(r),this.body.nodes[e].y=Number(i),gr(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),t}(),fv={},lce={get exports(){return fv},set exports(t){fv=t}},vv={},hce={get exports(){return vv},set exports(t){vv=t}},F1=et,dce=function(t){return t!==void 0&&(F1(t,"value")||F1(t,"writable"))},cce=K,fce=Mt,vce=Ze,pce=Ft,gce=dce,yce=sa,mce=pl;function JT(t,n){var e=arguments.length<3?t:arguments[2],r,i;if(pce(t)===e)return t[n];if(r=yce.f(t,n),r)return gce(r)?r.value:r.get===void 0?void 0:fce(r.get,e);if(vce(i=mce(t)))return JT(i,n,e)}cce({target:"Reflect",stat:!0},{get:JT});var bce=ae,$ce=bce.Reflect.get,wce=$ce,_ce=wce,Ece=_ce,Sce=Ece,Oce=Sce,Tce=Oce;(function(t){t.exports=Tce})(hce);(function(t){t.exports=vv})(lce);var B1=V(fv),pv={},kce={get exports(){return pv},set exports(t){pv=t}},gv={},Pce={get exports(){return gv},set exports(t){gv=t}},Ice=SO,Cce=Ice,xce=Cce,Ace=xce;(function(t){t.exports=Ace})(Pce);(function(t){t.exports=gv})(kce);var Rce=V(pv);function Dce(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&(t=z(t),t!==null););return t}function eu(){if(typeof Reflect<"u"&&B1){var t;eu=eg(t=B1).call(t)}else eu=function(e,r,i){var a=Dce(e,r);if(a){var o=Rce(a,r);return o.get?o.get.call(arguments.length<3?e:i):o.value}};return eu.apply(this,arguments)}var yv={},Mce={get exports(){return yv},set exports(t){yv=t}},Nce=K,L1=Math.hypot,Fce=Math.abs,Bce=Math.sqrt,Lce=!!L1&&L1(1/0,NaN)!==1/0;Nce({target:"Math",stat:!0,arity:2,forced:Lce},{hypot:function(n,e){for(var r=0,i=0,a=arguments.length,o=0,s,u;i<a;)s=Fce(arguments[i++]),o<s?(u=o/s,r=r*u*u+1,o=s):s>0?(u=s/o,r+=u*u):r+=s;return o===1/0?1/0:o*Bce(r)}});var jce=ae,zce=jce.Math.hypot,Hce=zce,Wce=Hce;(function(t){t.exports=Wce})(Mce);var Vce=V(yv);function ZT(t){var n=Uce();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Uce(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Me=function(){function t(){N(this,t)}return F(t,null,[{key:"transform",value:function(e,r){ce(e)||(e=[e]);for(var i=r.point.x,a=r.point.y,o=r.angle,s=r.length,u=0;u<e.length;++u){var l=e[u],h=l.x*Math.cos(o)-l.y*Math.sin(o),d=l.x*Math.sin(o)+l.y*Math.cos(o);l.x=i+s*h,l.y=a+s*d}}},{key:"drawPath",value:function(e,r){e.beginPath(),e.moveTo(r[0].x,r[0].y);for(var i=1;i<r.length;++i)e.lineTo(r[i].x,r[i].y);e.closePath()}}]),t}(),Gce=function(t){he(e,t);var n=ZT(e);function e(){return N(this,e),n.apply(this,arguments)}return F(e,null,[{key:"draw",value:function(i,a){if(a.image){i.save(),i.translate(a.point.x,a.point.y),i.rotate(Math.PI/2+a.angle);var o=a.imageWidth!=null?a.imageWidth:a.image.width,s=a.imageHeight!=null?a.imageHeight:a.image.height;a.image.drawImageAtPosition(i,1,-o/2,0,o,s),i.restore()}return!1}}]),e}(Me),Kce=function(t){he(e,t);var n=ZT(e);function e(){return N(this,e),n.apply(this,arguments)}return F(e,null,[{key:"draw",value:function(i,a){var o=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Me.transform(o,a),Me.drawPath(i,o),!0}}]),e}(Me),qce=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Me.transform(i,r),Me.drawPath(e,i),!0}}]),t}(),Yce=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i={x:-.4,y:0};Me.transform(i,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=r.angle-a/2,s=r.angle+a/2;return e.beginPath(),e.arc(i.x,i.y,r.length*.4,o,s,!1),e.stroke(),!0}}]),t}(),Xce=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i={x:-.3,y:0};Me.transform(i,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=r.angle+a/2,s=r.angle+3*a/2;return e.beginPath(),e.arc(i.x,i.y,r.length*.4,o,s,!1),e.stroke(),!0}}]),t}(),Qce=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Me.transform(i,r),Me.drawPath(e,i),!0}}]),t}(),Jce=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Me.transform(i,r),Me.drawPath(e,i),!0}}]),t}(),Zce=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i={x:-.4,y:0};return Me.transform(i,r),bp(e,i.x,i.y,r.length*.4),!0}}]),t}(),efe=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Me.transform(i,r),Me.drawPath(e,i),!0}}]),t}(),tfe=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Me.transform(i,r),Me.drawPath(e,i),!0}}]),t}(),rfe=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Me.transform(i,r),Me.drawPath(e,i),!0}}]),t}(),ife=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Me.transform(i,r),Me.drawPath(e,i),!0}}]),t}(),ek=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var i;switch(r.type&&(i=r.type.toLowerCase()),i){case"image":return Gce.draw(e,r);case"circle":return Zce.draw(e,r);case"box":return tfe.draw(e,r);case"crow":return qce.draw(e,r);case"curve":return Yce.draw(e,r);case"diamond":return rfe.draw(e,r);case"inv_curve":return Xce.draw(e,r);case"triangle":return Qce.draw(e,r);case"inv_triangle":return Jce.draw(e,r);case"bar":return efe.draw(e,r);case"vee":return ife.draw(e,r);case"arrow":default:return Kce.draw(e,r)}}}]),t}();function j1(t,n){var e=Oe(t);if(ii){var r=ii(t);n&&(r=Ot(r).call(r,function(i){return di(t,i).enumerable})),e.push.apply(e,r)}return e}function z1(t){for(var n=1;n<arguments.length;n++){var e,r,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=j1(Object(i),!0)).call(e,function(a){kl(t,a,i[a])}):ni?Sl(t,ni(i)):pe(r=j1(Object(i))).call(r,function(a){Ol(t,a,di(i,a))})}return t}var tk=function(){function t(n,e,r){N(this,t),this._body=e,this._labelModule=r,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(n),this.fromPoint=this.from,this.toPoint=this.to}return F(t,[{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(e,r,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,r),e.lineWidth=r.width,r.dashes!==!1?this._drawDashedLine(e,r,o):this._drawLine(e,r,o)}},{key:"_drawLine",value:function(e,r,i,a,o){if(this.from!=this.to)this._line(e,r,i,a,o);else{var s=this._getCircleData(e),u=ke(s,3),l=u[0],h=u[1],d=u[2];this._circle(e,r,l,h,d)}}},{key:"_drawDashedLine",value:function(e,r,i,a,o){e.lineCap="round";var s=ce(r.dashes)?r.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,r,i);else{var u=this._getCircleData(e),l=ke(u,3),h=l[0],d=l[1],c=l[2];this._circle(e,r,h,d,c)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)SS(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=ke(f,3),p=v[0],$=v[1],g=v[2];this._circle(e,r,p,$,g)}this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}}},{key:"findBorderPosition",value:function(e,r,i){return this.from!=this.to?this._findBorderPosition(e,r,i):this._findBorderPositionCircle(e,r,i)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var r,i=ot(r=this._getCircleData(e)).call(r,0,2),a=ke(i,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var r=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var i=GT(e,this.options.selfReference.angle,r,this.from);return[i.x,i.y,r]}},{key:"_pointOnCircle",value:function(e,r,i,a){var o=a*2*Math.PI;return{x:e+i*Math.cos(o),y:r-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,r,i){var a=i.x,o=i.y,s=i.low,u=i.high,l=i.direction,h=10,d=this.options.selfReference.size,c=.05,f,v=(s+u)*.5,p=0;this.options.arrowStrikethrough===!0&&(l===-1?p=this.options.endPointOffset.from:l===1&&(p=this.options.endPointOffset.to));var $=0;do{v=(s+u)*.5,f=this._pointOnCircle(a,o,d,v);var g=Math.atan2(e.y-f.y,e.x-f.x),y=e.distanceToBorder(r,g)+p,b=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),m=y-b;if(Math.abs(m)<c)break;m>0?l>0?s=v:u=v:l>0?u=v:s=v,++$}while(s<=u&&$<h);return z1(z1({},f),{},{t:v})}},{key:"getLineWidth",value:function(e,r){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):r===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(e,r){if(r.inheritsColor!==!1){if(r.inheritsColor==="both"&&this.from.id!==this.to.id){var i=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),a=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(a=jt(this.from.options.color.border,r.opacity),o=jt(this.to.options.color.border,r.opacity)):this.from.selected===!0&&this.to.selected===!1?o=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(a=this.from.options.color.border),i.addColorStop(0,a),i.addColorStop(1,o),i}return r.inheritsColor==="to"?jt(this.to.options.color.border,r.opacity):jt(this.from.options.color.border,r.opacity)}else return jt(r.color,r.opacity)}},{key:"_circle",value:function(e,r,i,a,o){this.enableShadow(e,r);var s=0,u=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){var l=this.options.selfReference.angle,h=this.options.selfReference.angle+Math.PI,d=this._findBorderPositionCircle(this.from,e,{x:i,y:a,low:l,high:h,direction:-1}),c=this._findBorderPositionCircle(this.from,e,{x:i,y:a,low:l,high:h,direction:1});s=Math.atan2(d.y-a,d.x-i),u=Math.atan2(c.y-a,c.x-i)}e.beginPath(),e.arc(i,a,o,s,u,!1),e.stroke(),this.disableShadow(e,r)}},{key:"getDistanceToEdge",value:function(e,r,i,a,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,r,i,a,o,s);var u=this._getCircleData(void 0),l=ke(u,3),h=l[0],d=l[1],c=l[2],f=h-o,v=d-s;return Math.abs(Math.sqrt(f*f+v*v)-c)}},{key:"_getDistanceToLine",value:function(e,r,i,a,o,s){var u=i-e,l=a-r,h=u*u+l*l,d=((o-e)*u+(s-r)*l)/h;d>1?d=1:d<0&&(d=0);var c=e+d*u,f=r+d*l,v=c-o,p=f-s;return Math.sqrt(v*v+p*p)}},{key:"getArrowData",value:function(e,r,i,a,o,s){var u,l,h,d,c,f,v,p=s.width;r==="from"?(h=this.from,d=this.to,c=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):r==="to"?(h=this.to,d=this.from,c=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(h=this.to,d=this.from,c=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var $=15*f+3*p;if(h!=d){var g=Vce(h.x-d.x,h.y-d.y),y=$/g;if(r!=="middle")if(this.options.smooth.enabled===!0){var b=this._findBorderPosition(h,e,{via:i}),m=this.getPoint(b.t+y*(r==="from"?1:-1),i);u=Math.atan2(b.y-m.y,b.x-m.x),l=b}else u=Math.atan2(h.y-d.y,h.x-d.x),l=this._findBorderPosition(h,e);else{var w=(c?-y:y)/2,E=this.getPoint(.5+w,i),T=this.getPoint(.5-w,i);u=Math.atan2(E.y-T.y,E.x-T.x),l=this.getPoint(.5,i)}}else{var O=this._getCircleData(e),_=ke(O,3),S=_[0],C=_[1],L=_[2];if(r==="from"){var B=this.options.selfReference.angle,Q=this.options.selfReference.angle+Math.PI,ne=this._findBorderPositionCircle(this.from,e,{x:S,y:C,low:B,high:Q,direction:-1});u=ne.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=ne}else if(r==="to"){var ie=this.options.selfReference.angle,le=this.options.selfReference.angle+Math.PI,be=this._findBorderPositionCircle(this.from,e,{x:S,y:C,low:ie,high:le,direction:1});u=be.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,l=be}else{var Ee=this.options.selfReference.angle/(2*Math.PI);l=this._pointOnCircle(S,C,L,Ee),u=Ee*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var ar=l.x-$*.9*Math.cos(u),rt=l.y-$*.9*Math.sin(u),we={x:ar,y:rt};return{point:l,core:we,angle:u,length:$,type:v}}},{key:"drawArrowHead",value:function(e,r,i,a,o){e.strokeStyle=this.getColor(e,r),e.fillStyle=e.strokeStyle,e.lineWidth=r.width;var s=ek.draw(e,o);s&&(this.enableShadow(e,r),qo(e).call(e),this.disableShadow(e,r))}},{key:"enableShadow",value:function(e,r){r.shadow===!0&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}},{key:"disableShadow",value:function(e,r){r.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,r){if(r.background!==!1){var i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=r.backgroundColor,e.lineWidth=r.backgroundSize,this.setStrokeDashed(e,r.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,r.dashes)}}},{key:"setStrokeDashed",value:function(e,r){if(r!==!1)if(e.setLineDash!==void 0){var i=ce(r)?r:[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.")}}]),t}();function H1(t,n){var e=Oe(t);if(ii){var r=ii(t);n&&(r=Ot(r).call(r,function(i){return di(t,i).enumerable})),e.push.apply(e,r)}return e}function W1(t){for(var n=1;n<arguments.length;n++){var e,r,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=H1(Object(i),!0)).call(e,function(a){kl(t,a,i[a])}):ni?Sl(t,ni(i)):pe(r=H1(Object(i))).call(r,function(a){Ol(t,a,di(i,a))})}return t}function nfe(t){var n=afe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function afe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var rg=function(t){he(e,t);var n=nfe(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"_findBorderPositionBezier",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,u=.2,l=!1,h=1,d=0,c=this.to,f,v,p=this.options.endPointOffset?this.options.endPointOffset.to:0;i.id===this.from.id&&(c=this.from,l=!0,p=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(p=0);var $=0;do{v=(d+h)*.5,f=this.getPoint(v,o);var g=Math.atan2(c.y-f.y,c.x-f.x),y=c.distanceToBorder(a,g)+p,b=Math.sqrt(Math.pow(f.x-c.x,2)+Math.pow(f.y-c.y,2)),m=y-b;if(Math.abs(m)<u)break;m<0?l===!1?d=v:h=v:l===!1?h=v:d=v,++$}while(d<=h&&$<s);return W1(W1({},f),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(i,a,o,s,u,l,h){var d=1e9,c,f,v,p,$,g=i,y=a;for(f=1;f<10;f++)v=.1*f,p=Math.pow(1-v,2)*i+2*v*(1-v)*h.x+Math.pow(v,2)*o,$=Math.pow(1-v,2)*a+2*v*(1-v)*h.y+Math.pow(v,2)*s,f>0&&(c=this._getDistanceToLine(g,y,p,$,u,l),d=c<d?c:d),g=p,y=$;return d}},{key:"_bezierCurve",value:function(i,a,o,s){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),o!=null&&o.x!=null?s!=null&&s.x!=null?i.bezierCurveTo(o.x,o.y,s.x,s.y,this.toPoint.x,this.toPoint.y):i.quadraticCurveTo(o.x,o.y,this.toPoint.x,this.toPoint.y):i.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(i,a),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(tk);function ofe(t){var n=sfe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function sfe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var V1=function(t){he(e,t);var n=ofe(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return F(e,[{key:"setOptions",value:function(i){eu(z(e.prototype),"setOptions",this).call(this,i);var a=!1;this.options.physics!==i.physics&&(a=!0),this.options=i,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(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){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})}},{key:"cleanup",value:function(){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}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var i="edgeId:"+this.id,a=this._body.functions.createNode({id:i,shape:"circle",physics:!0,hidden:!0});this._body.nodes[i]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){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)}},{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=ke(o,3),u=s[0],l=s[1],h=s[2],d=2*Math.PI*(1-i);return{x:u+h*Math.sin(d),y:l+h-h*(1-Math.cos(d))}}else return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*a.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*a.y+Math.pow(i,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a,this.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){return this._getDistanceToBezierEdge(i,a,o,s,u,l,this.via)}}]),e}(rg);function ufe(t){var n=lfe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function lfe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var U1=function(t){he(e,t);var n=ufe(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var i=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var u,l;o<=s?u=l=i*s:u=l=i*o,this.from.x>this.to.x&&(u=-u),this.from.y>=this.to.y&&(l=-l);var h=this.from.x+u,d=this.from.y+l;return a==="discrete"&&(o<=s?h=o<i*s?this.from.x:h:d=s<i*o?this.from.y:d),{x:h,y:d}}else if(a==="straightCross"){var c=(1-i)*o,f=(1-i)*s;return o<=s?(c=0,this.from.y<this.to.y&&(f=-f)):(this.from.x<this.to.x&&(c=-c),f=0),{x:this.to.x+c,y:this.to.y+f}}else if(a==="horizontal"){var v=(1-i)*o;return this.from.x<this.to.x&&(v=-v),{x:this.to.x+v,y:this.from.y}}else if(a==="vertical"){var p=(1-i)*s;return this.from.y<this.to.y&&(p=-p),{x:this.from.x,y:this.to.y+p}}else if(a==="curvedCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var $=Math.sqrt(o*o+s*s),g=Math.PI,y=Math.atan2(s,o),b=(y+(i*.5+.5)*g)%(2*g);return{x:this.from.x+(i*.5+.5)*$*Math.sin(b),y:this.from.y+(i*.5+.5)*$*Math.cos(b)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var m=Math.sqrt(o*o+s*s),w=Math.PI,E=Math.atan2(s,o),T=(E+(-i*.5+.5)*w)%(2*w);return{x:this.from.x+(i*.5+.5)*m*Math.sin(T),y:this.from.y+(i*.5+.5)*m*Math.cos(T)}}else{var O,_;o<=s?O=_=i*s:O=_=i*o,this.from.x>this.to.x&&(O=-O),this.from.y>=this.to.y&&(_=-_);var S=this.from.x+O,C=this.from.y+_;return o<=s?this.from.x<=this.to.x?S=this.to.x<S?this.to.x:S:S=this.to.x>S?this.to.x:S:this.from.y>=this.to.y?C=this.to.y>C?this.to.y:C:C=this.to.y<C?this.to.y:C,{x:S,y:C}}}},{key:"_findBorderPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(i,a,o.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(i,a,o,s,u,l,h)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=i,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,u=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:u}}}]),e}(rg);function hfe(t){var n=dfe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function dfe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var cfe=function(t){he(e,t);var n=hfe(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"_getDistanceToBezierEdge2",value:function(i,a,o,s,u,l,h,d){for(var c=1e9,f=i,v=a,p=[0,0,0,0],$=1;$<10;$++){var g=.1*$;p[0]=Math.pow(1-g,3),p[1]=3*g*Math.pow(1-g,2),p[2]=3*Math.pow(g,2)*(1-g),p[3]=Math.pow(g,3);var y=p[0]*i+p[1]*h.x+p[2]*d.x+p[3]*o,b=p[0]*a+p[1]*h.y+p[2]*d.y+p[3]*s;if($>0){var m=this._getDistanceToLine(f,v,y,b,u,l);c=m<c?m:c}f=y,v=b}return c}}]),e}(rg);function ffe(t){var n=vfe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function vfe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var G1=function(t){he(e,t);var n=ffe(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"_line",value:function(i,a,o){var s=o[0],u=o[1];this._bezierCurve(i,a,s,u)}},{key:"_getViaCoordinates",value:function(){var i=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,u,l,h=this.options.smooth.roundness;return(Math.abs(i)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,l=this.to.y,o=this.from.x-h*i,u=this.to.x+h*i):(s=this.from.y-h*a,l=this.to.y+h*a,o=this.from.x,u=this.to.x),[{x:o,y:s},{x:u,y:l}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),d=ke(h,2),c=d[0],f=d[1];return this._getDistanceToBezierEdge2(i,a,o,s,u,l,c,f)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=ke(a,2),s=o[0],u=o[1],l=i,h=[Math.pow(1-l,3),3*l*Math.pow(1-l,2),3*Math.pow(l,2)*(1-l),Math.pow(l,3)],d=h[0]*this.fromPoint.x+h[1]*s.x+h[2]*u.x+h[3]*this.toPoint.x,c=h[0]*this.fromPoint.y+h[1]*s.y+h[2]*u.y+h[3]*this.toPoint.y;return{x:d,y:c}}}]),e}(cfe);function pfe(t){var n=gfe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function gfe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var K1=function(t){he(e,t);var n=pfe(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"_line",value:function(i,a){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),i.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(i){return{x:(1-i)*this.fromPoint.x+i*this.toPoint.x,y:(1-i)*this.fromPoint.y+i*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){var o=this.to,s=this.from;i.id===this.from.id&&(o=this.from,s=this.to);var u=Math.atan2(o.y-s.y,o.x-s.x),l=o.x-s.x,h=o.y-s.y,d=Math.sqrt(l*l+h*h),c=i.distanceToBorder(a,u),f=(d-c)/d;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){return this._getDistanceToLine(i,a,o,s,u,l)}}]),e}(tk),An=function(){function t(n,e,r,i,a){if(N(this,t),e===void 0)throw new Error("No body provided");this.options=ei(i),this.globalOptions=i,this.defaultOptions=a,this.body=e,this.imagelist=r,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 qT(this.body,this.options,!0),this.setOptions(n)}return F(t,[{key:"setOptions",value:function(e){if(e){var r=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;t.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=UT(e.value));var i=[e,this.options,this.defaultOptions];return this.chooser=Jp("edge",i),this.updateLabelModule(e),r=this.updateEdgeType()||r,this._setInteractionWidths(),this.connect(),r}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,r=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={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:r,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:a?void 0:this.options.color.color,inheritsColor:a,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){var s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var u=this.options.hoverWidth;typeof u=="function"?o.width=u(o.width):typeof u=="number"&&(o.width+=u),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var r=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,r=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof V1&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof G1&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof U1&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof K1&&e.type.enabled===!1)&&(i=!1),i===!0&&(r=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(r=!0,this.edgeType=new V1(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new G1(this.options,this.body,this.labelModule):this.edgeType=new U1(this.options,this.body,this.labelModule):this.edgeType=new K1(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),r}},{key:"connect",value:function(){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()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,r,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,r,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){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}},{key:"draw",value:function(e){var r=this.getFormattingValues();if(!r.hidden){var i=this.edgeType.getViaNode();this.edgeType.drawLine(e,r,this.selected,this.hover,i),this.drawLabel(e,i)}}},{key:"drawArrows",value:function(e){var r=this.getFormattingValues();if(!r.hidden){var i=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,r.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),r.fromArrowSrc&&(a.from.image=this.imagelist.load(r.fromArrowSrc)),r.fromArrowImageWidth&&(a.from.imageWidth=r.fromArrowImageWidth),r.fromArrowImageHeight&&(a.from.imageHeight=r.fromArrowImageHeight)),r.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),r.toArrowSrc&&(a.to.image=this.imagelist.load(r.toArrowSrc)),r.toArrowImageWidth&&(a.to.imageWidth=r.toArrowImageWidth),r.toArrowImageHeight&&(a.to.imageHeight=r.toArrowImageHeight)),r.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,r),r.middleArrowSrc&&(a.middle.image=this.imagelist.load(r.middleArrowSrc)),r.middleArrowImageWidth&&(a.middle.imageWidth=r.middleArrowImageWidth),r.middleArrowImageHeight&&(a.middle.imageHeight=r.middleArrowImageHeight)),r.fromArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.from),r.middleArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.middle),r.toArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,r){if(this.options.label!==void 0){var i=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(i.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,r),e.save();var s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var u=GT(e,this.options.selfReference.angle,this.options.selfReference.size,i);o=this._pointOnCircle(u.x,u.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var r=[];if(this.labelModule.visible()){var i=this._getRotation();ev(this.labelModule.getSize(),e,i)&&r.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&r.push({edgeId:this.id}),r}},{key:"isOverlappingWith",value:function(e){if(this.connected){var r=10,i=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,u=e.left,l=e.top,h=this.edgeType.getDistanceToEdge(i,a,o,s,u,l);return h<r}else return!1}},{key:"_getRotation",value:function(e){var r=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,r);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);var a={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return a;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,u=Math.atan2(o,s);return(u<-1&&s<0||u>0&&s<0)&&(u+=Math.PI),a.angle=u,a}},{key:"_pointOnCircle",value:function(e,r,i,a){return{x:e+i*Math.cos(a),y:r-i*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(ya(s,e,r,i),r.endPointOffset!==void 0&&r.endPointOffset.from!==void 0&&(Ti(r.endPointOffset.from)?e.endPointOffset.from=r.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),r.endPointOffset!==void 0&&r.endPointOffset.to!==void 0&&(Ti(r.endPointOffset.to)?e.endPointOffset.to=r.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Cu(r.label)?e.label=r.label:Cu(e.label)||(e.label=void 0),Lt(e,r,"smooth",a),Lt(e,r,"shadow",a),Lt(e,r,"background",a),r.dashes!==void 0&&r.dashes!==null?e.dashes=r.dashes:i===!0&&r.dashes===null&&(e.dashes=Ai(a.dashes)),r.scaling!==void 0&&r.scaling!==null?(r.scaling.min!==void 0&&(e.scaling.min=r.scaling.min),r.scaling.max!==void 0&&(e.scaling.max=r.scaling.max),Lt(e.scaling,r.scaling,"label",a.scaling)):i===!0&&r.scaling===null&&(e.scaling=Ai(a.scaling)),r.arrows!==void 0&&r.arrows!==null)if(typeof r.arrows=="string"){var u=r.arrows.toLowerCase();e.arrows.to.enabled=oe(u).call(u,"to")!=-1,e.arrows.middle.enabled=oe(u).call(u,"middle")!=-1,e.arrows.from.enabled=oe(u).call(u,"from")!=-1}else if(de(r.arrows)==="object")Lt(e.arrows,r.arrows,"to",a.arrows),Lt(e.arrows,r.arrows,"middle",a.arrows),Lt(e.arrows,r.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+Ko(r.arrows));else i===!0&&r.arrows===null&&(e.arrows=Ai(a.arrows));if(r.color!==void 0&&r.color!==null){var l=Gr(r.color)?{color:r.color,highlight:r.color,hover:r.color,inherit:!1,opacity:1}:r.color,h=e.color;if(o)ye(h,a.color,!1,i);else for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&delete h[d];if(Gr(h))h.color=h,h.highlight=h,h.hover=h,h.inherit=!1,l.opacity===void 0&&(h.opacity=1);else{var c=!1;l.color!==void 0&&(h.color=l.color,c=!0),l.highlight!==void 0&&(h.highlight=l.highlight,c=!0),l.hover!==void 0&&(h.hover=l.hover,c=!0),l.inherit!==void 0&&(h.inherit=l.inherit),l.opacity!==void 0&&(h.opacity=Math.min(1,Math.max(0,l.opacity))),c===!0?h.inherit=!1:h.inherit===void 0&&(h.inherit="from")}}else i===!0&&r.color===null&&(e.color=ei(a.color));i===!0&&r.font===null&&(e.font=ei(a.font)),Object.prototype.hasOwnProperty.call(r,"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=r.selfReferenceSize)}}]),t}(),yfe=function(){function t(n,e,r){var i,a=this;N(this,t),this.body=n,this.images=e,this.groups=r,this.body.functions.createEdge=A(i=this.create).call(i,this),this.edgesListeners={add:function(s,u){a.add(u.items)},update:function(s,u){a.update(u.items)},remove:function(s,u){a.remove(u.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,u,l,h){if(u===s)return .5;var d=1/(u-s);return Math.max(0,(h-s)*d)}},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},ye(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this,r,i;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var u in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,u)){var l=e.body.edges[u],h=e.body.data.edges.get(u);if(h!=null){var d=h.smooth;d!==void 0&&d.enabled===!0&&d.type==="dynamic"&&(a===void 0?l.setOptions({smooth:!1}):l.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",A(r=this.refresh).call(r,this)),this.body.emitter.on("refresh",A(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",function(){re(e.edgesListeners,function(a,o){e.body.data.edges&&e.body.data.edges.off(o,a)}),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){An.parseOptions(this.options,e,!0,this.defaultOptions,!0);var r=!1;if(e.smooth!==void 0)for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(r=this.body.edges[i].updateEdgeType()||r);if(e.font!==void 0)for(var a in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,a)&&this.body.edges[a].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||r===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(rS("id",e))this.body.data.edges=e;else if(ce(e))this.body.data.edges=new mu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new mu;else throw new TypeError("Array or DataSet expected");if(a&&re(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){re(this.edgesListeners,function(s,u){r.body.data.edges.on(u,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.edges,a=this.body.data.edges,o=0;o<e.length;o++){var s=e[o],u=i[s];u&&u.disconnect();var l=a.get(s,{showInternalIds:!0});i[s]=this.create(l)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),r===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var r=this.body.edges,i=this.body.data.edges,a=!1,o=0;o<e.length;o++){var s=e[o],u=i.get(s),l=r[s];l!==void 0?(l.disconnect(),a=l.setOptions(u)||a,l.connect()):(this.body.edges[s]=this.create(u),a=!0)}a===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var i=this.body.edges;re(e,function(a){var o=i[a];o!==void 0&&o.remove()}),r&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;re(this.body.edges,function(r,i){var a=e.body.data.edges.get(i);a!==void 0&&r.setOptions(a)})}},{key:"create",value:function(e){return new An(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,r=this.body.nodes,i=this.body.edges;for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){var a=i[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var r=[];if(this.body.edges[e]!==void 0){var i=this.body.edges[e];i.fromId!==void 0&&r.push(i.fromId),i.toId!==void 0&&r.push(i.toId)}return r}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,r=[];re(this.body.edges,function(i,a){var o=e.body.nodes[i.toId],s=e.body.nodes[i.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&r.push(a)}),this.remove(r,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var r=this.body.edges,i=[];pe(e).call(e,function(a,o){var s=r[o];s===void 0&&i.push(o)}),this.add(i,!0)}}}]),t}(),rk=function(){function t(n,e,r){N(this,t),this.body=n,this.physicsBody=e,this.barnesHutTree,this.setOptions(r),this._rng=xl("BARNES HUT SOLVER")}return F(t,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var e,r=this.body.nodes,i=this.physicsBody.physicsNodeIndices,a=i.length,o=this._formBarnesHutTree(r,i);this.barnesHutTree=o;for(var s=0;s<a;s++)e=r[i[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,r){this._getForceContribution(e.children.NW,r),this._getForceContribution(e.children.NE,r),this._getForceContribution(e.children.SW,r),this._getForceContribution(e.children.SE,r)}},{key:"_getForceContribution",value:function(e,r){if(e.childrenCount>0){var i=e.centerOfMass.x-r.x,a=e.centerOfMass.y-r.y,o=Math.sqrt(i*i+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,i,a,r,e):e.childrenCount===4?this._getForceContributions(e,r):e.children.data.id!=r.id&&this._calculateForces(o,i,a,r,e)}}},{key:"_calculateForces",value:function(e,r,i,a,o){e===0&&(e=.1,r=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=this.options.gravitationalConstant*o.mass*a.options.mass/Math.pow(e,3),u=r*s,l=i*s;this.physicsBody.forces[a.id].x+=u,this.physicsBody.forces[a.id].y+=l}},{key:"_formBarnesHutTree",value:function(e,r){for(var i,a=r.length,o=e[r[0]].x,s=e[r[0]].y,u=e[r[0]].x,l=e[r[0]].y,h=1;h<a;h++){var d=e[r[h]],c=d.x,f=d.y;d.options.mass>0&&(c<o&&(o=c),c>u&&(u=c),f<s&&(s=f),f>l&&(l=f))}var v=Math.abs(u-o)-Math.abs(l-s);v>0?(s-=.5*v,l+=.5*v):(o+=.5*v,u-=.5*v);var p=1e-5,$=Math.max(p,Math.abs(u-o)),g=.5*$,y=.5*(o+u),b=.5*(s+l),m={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:y-g,maxX:y+g,minY:b-g,maxY:b+g},size:$,calcSize:1/$,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(m.root);for(var w=0;w<a;w++)i=e[r[w]],i.options.mass>0&&this._placeInTree(m.root,i);return m}},{key:"_updateBranchMass",value:function(e,r){var i=e.centerOfMass,a=e.mass+r.options.mass,o=1/a;i.x=i.x*e.mass+r.x*r.options.mass,i.x*=o,i.y=i.y*e.mass+r.y*r.options.mass,i.y*=o,e.mass=a;var s=Math.max(Math.max(r.height,r.radius),r.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}},{key:"_placeInTree",value:function(e,r,i){(i!=!0||i===void 0)&&this._updateBranchMass(e,r);var a=e.children.NW.range,o;a.maxX>r.x?a.maxY>r.y?o="NW":o="SW":a.maxY>r.y?o="NE":o="SE",this._placeInRegion(e,r,o)}},{key:"_placeInRegion",value:function(e,r,i){var a=e.children[i];switch(a.childrenCount){case 0:a.children.data=r,a.childrenCount=1,this._updateBranchMass(a,r);break;case 1:a.children.data.x===r.x&&a.children.data.y===r.y?(r.x+=this._rng(),r.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,r));break;case 4:this._placeInTree(a,r);break}}},{key:"_splitBranch",value:function(e){var r=null;e.childrenCount===1&&(r=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"),r!=null&&this._placeInTree(e,r)}},{key:"_insertRegion",value:function(e,r){var i,a,o,s,u=.5*e.size;switch(r){case"NW":i=e.range.minX,a=e.range.minX+u,o=e.range.minY,s=e.range.minY+u;break;case"NE":i=e.range.minX+u,a=e.range.maxX,o=e.range.minY,s=e.range.minY+u;break;case"SW":i=e.range.minX,a=e.range.minX+u,o=e.range.minY+u,s=e.range.maxY;break;case"SE":i=e.range.minX+u,a=e.range.maxX,o=e.range.minY+u,s=e.range.maxY;break}e.children[r]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,r){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,r))}},{key:"_drawBranch",value:function(e,r,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,r),this._drawBranch(e.children.NE,r),this._drawBranch(e.children.SE,r),this._drawBranch(e.children.SW,r)),r.strokeStyle=i,r.beginPath(),r.moveTo(e.range.minX,e.range.minY),r.lineTo(e.range.maxX,e.range.minY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.minY),r.lineTo(e.range.maxX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.maxY),r.lineTo(e.range.minX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.minX,e.range.maxY),r.lineTo(e.range.minX,e.range.minY),r.stroke()}}]),t}(),mfe=function(){function t(n,e,r){N(this,t),this._rng=xl("REPULSION SOLVER"),this.body=n,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,i,a,o,s,u,l,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,c=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,p=4/3,$=0;$<d.length-1;$++){u=h[d[$]];for(var g=$+1;g<d.length;g++)l=h[d[g]],e=l.x-u.x,r=l.y-u.y,i=Math.sqrt(e*e+r*r),i===0&&(i=.1*this._rng(),e=i),i<2*f&&(i<.5*f?s=1:s=v*i+p,s=s/i,a=e*s,o=r*s,c[u.id].x-=a,c[u.id].y-=o,c[l.id].x+=a,c[l.id].y+=o)}}}]),t}(),bfe=function(){function t(n,e,r){N(this,t),this.body=n,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}},{key:"solve",value:function(){for(var e=this.body.nodes,r=this.physicsBody.physicsNodeIndices,i=this.physicsBody.forces,a=this.options.nodeDistance,o=0;o<r.length-1;o++)for(var s=e[r[o]],u=o+1;u<r.length;u++){var l=e[r[u]];if(s.level===l.level){var h=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(l.shape.radius||0)/2),d=l.x-s.x,c=l.y-s.y,f=Math.sqrt(d*d+c*c),v=.05,p=void 0;f<h?p=-Math.pow(v*f,2)+Math.pow(v*h,2):p=0,f!==0&&(p=p/f);var $=d*p,g=c*p;i[s.id].x-=$,i[s.id].y-=g,i[l.id].x+=$,i[l.id].y+=g}}}}]),t}(),Nd=function(){function t(n,e,r){N(this,t),this.body=n,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,i=this.physicsBody.physicsEdgeIndices,a=this.body.edges,o,s,u,l=0;l<i.length;l++)r=a[i[l]],r.connected===!0&&r.toId!==r.fromId&&this.body.nodes[r.toId]!==void 0&&this.body.nodes[r.fromId]!==void 0&&(r.edgeType.via!==void 0?(e=r.options.length===void 0?this.options.springLength:r.options.length,o=r.to,s=r.edgeType.via,u=r.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,u,.5*e)):(e=r.options.length===void 0?this.options.springLength*1.5:r.options.length,this._calculateSpringForce(r.from,r.to,e)))}},{key:"_calculateSpringForce",value:function(e,r,i){var a=e.x-r.x,o=e.y-r.y,s=Math.max(Math.sqrt(a*a+o*o),.01),u=this.options.springConstant*(i-s)/s,l=a*u,h=o*u;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=l,this.physicsBody.forces[e.id].y+=h),this.physicsBody.forces[r.id]!==void 0&&(this.physicsBody.forces[r.id].x-=l,this.physicsBody.forces[r.id].y-=h)}}]),t}(),$fe=function(){function t(n,e,r){N(this,t),this.body=n,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,i,a,o,s,u,l,h=this.body.edges,d=.5,c=this.physicsBody.physicsEdgeIndices,f=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces,p=0;p<f.length;p++){var $=f[p];v[$].springFx=0,v[$].springFy=0}for(var g=0;g<c.length;g++)r=h[c[g]],r.connected===!0&&(e=r.options.length===void 0?this.options.springLength:r.options.length,i=r.from.x-r.to.x,a=r.from.y-r.to.y,l=Math.sqrt(i*i+a*a),l=l===0?.01:l,u=this.options.springConstant*(e-l)/l,o=i*u,s=a*u,r.to.level!=r.from.level?(v[r.toId]!==void 0&&(v[r.toId].springFx-=o,v[r.toId].springFy-=s),v[r.fromId]!==void 0&&(v[r.fromId].springFx+=o,v[r.fromId].springFy+=s)):(v[r.toId]!==void 0&&(v[r.toId].x-=d*o,v[r.toId].y-=d*s),v[r.fromId]!==void 0&&(v[r.fromId].x+=d*o,v[r.fromId].y+=d*s)));u=1;for(var y,b,m=0;m<f.length;m++){var w=f[m];y=Math.min(u,Math.max(-u,v[w].springFx)),b=Math.min(u,Math.max(-u,v[w].springFy)),v[w].x+=y,v[w].y+=b}for(var E=0,T=0,O=0;O<f.length;O++){var _=f[O];E+=v[_].x,T+=v[_].y}for(var S=E/f.length,C=T/f.length,L=0;L<f.length;L++){var B=f[L];v[B].x-=S,v[B].y-=C}}}]),t}(),tu=function(){function t(n,e,r){N(this,t),this.body=n,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,i,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,l=0;l<s.length;l++){var h=s[l];a=o[h],e=-a.x,r=-a.y,i=Math.sqrt(e*e+r*r),this._calculateForces(i,e,r,u,a)}}},{key:"_calculateForces",value:function(e,r,i,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=r*s,a[o.id].y=i*s}}]),t}();function wfe(t){var n=_fe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function _fe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Efe=function(t){he(e,t);var n=wfe(e);function e(r,i,a){var o;return N(this,e),o=n.call(this,r,i,a),o._rng=xl("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return F(e,[{key:"_calculateForces",value:function(i,a,o,s,u){i===0&&(i=.1*this._rng(),a=i),this.overlapAvoidanceFactor<1&&s.shape.radius&&(i=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,i-s.shape.radius));var l=s.edges.length+1,h=this.options.gravitationalConstant*u.mass*s.options.mass*l/Math.pow(i,2),d=a*h,c=o*h;this.physicsBody.forces[s.id].x+=d,this.physicsBody.forces[s.id].y+=c}}]),e}(rk);function Sfe(t){var n=Ofe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Ofe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Tfe=function(t){he(e,t);var n=Sfe(e);function e(r,i,a){return N(this,e),n.call(this,r,i,a)}return F(e,[{key:"_calculateForces",value:function(i,a,o,s,u){if(i>0){var l=u.edges.length+1,h=this.options.centralGravity*l*u.options.mass;s[u.id].x=a*h,s[u.id].y=o*h}}}]),e}(tu),kfe=function(){function t(n){N(this,t),this.body=n,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}},je(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("initPhysics",function(){e.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){e.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){e.stopSimulation(),e.ready=!1}),this.body.emitter.on("disablePhysics",function(){e.physicsEnabled=!1,e.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){e.setOptions(e.options),e.ready===!0&&e.startSimulation()}),this.body.emitter.on("startSimulation",function(){e.ready===!0&&e.startSimulation()}),this.body.emitter.on("stopSimulation",function(){e.stopSimulation()}),this.body.emitter.on("destroy",function(){e.stopSimulation(!1),e.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){e.updatePhysicsData()})}},{key:"setOptions",value:function(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,ku(["stabilization"],this.options,e),Lt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var r=this.options.wind;r&&((typeof r.x!="number"||Yf(r.x))&&(r.x=0),(typeof r.y!="number"||Yf(r.y))&&(r.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Efe(this.body,this.physicsBody,e),this.edgesSolver=new Nd(this.body,this.physicsBody,e),this.gravitySolver=new Tfe(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new mfe(this.body,this.physicsBody,e),this.edgesSolver=new Nd(this.body,this.physicsBody,e),this.gravitySolver=new tu(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new bfe(this.body,this.physicsBody,e),this.edgesSolver=new $fe(this.body,this.physicsBody,e),this.gravitySolver=new tu(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new rk(this.body,this.physicsBody,e),this.edgesSolver=new Nd(this.body,this.physicsBody,e),this.gravitySolver=new tu(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){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"))}},{key:"startSimulation",value:function(){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=A(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var 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"))}},{key:"simulationStep",value:function(){var e=Eu();this.physicsTick();var r=Eu()-e;(r<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&gr(function(){e.body.emitter.emit("stabilized",{iterations:r}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/e<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/e))}},{key:"physicsTick",value:function(){if(this._startStabilizing(),this.stabilized!==!0){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var e=this.adaptiveCounter%this.adaptiveInterval===0;e?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1}else this.timestep=this.options.timestep,this.physicsStep();this.stabilized===!0&&this.revert(),this.stabilizationIterations++}}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var e=this.body.nodes,r=this.body.edges;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&e[i].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[i].id);for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&r[a].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(r[a].id);for(var o=0;o<this.physicsBody.physicsNodeIndices.length;o++){var s=this.physicsBody.physicsNodeIndices[o];this.physicsBody.forces[s]={x:0,y:0},this.physicsBody.velocities[s]===void 0&&(this.physicsBody.velocities[s]={x:0,y:0})}for(var u in this.physicsBody.velocities)e[u]===void 0&&delete this.physicsBody.velocities[u]}},{key:"revert",value:function(){var e=Oe(this.previousStates),r=this.body.nodes,i=this.physicsBody.velocities;this.referenceState={};for(var a=0;a<e.length;a++){var o=e[a];r[o]!==void 0?r[o].options.physics===!0&&(this.referenceState[o]={positions:{x:r[o].x,y:r[o].y}},i[o].x=this.previousStates[o].vx,i[o].y=this.previousStates[o].vy,r[o].x=this.previousStates[o].x,r[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var e,r,i,a=this.body.nodes,o=this.referenceState,s=.3;for(var u in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,u)&&a[u]!==void 0&&(e=a[u].x-o[u].positions.x,r=a[u].y-o[u].positions.y,i=Math.sqrt(Math.pow(e,2)+Math.pow(r,2)),i>s))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,r=0,i=0,a=5,o=0;o<e.length;o++){var s=e[o],u=this._performStep(s);r=Math.max(r,u),i+=u}this.adaptiveTimestepEnabled=i/e.length<a,this.stabilized=r<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,r,i){var a=this.modelOptions.damping*e,o=(r-a)/i;e+=o*this.timestep;var s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var r=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:r.x,y:r.y,vx:a.x,vy:a.y},r.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,i.x,r.options.mass),r.x+=a.x*this.timestep):(i.x=0,a.x=0),r.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,i.y,r.options.mass),r.y+=a.y*this.timestep):(i.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r].x&&e[r].y){var i=e[r].options.fixed;this.freezeCache[r]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.freezeCache[r]!==void 0&&(e[r].options.fixed.x=this.freezeCache[r].x,e[r].options.fixed.y=this.freezeCache[r].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof r!="number"&&(r=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",r)),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=r,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,gr(function(){return e._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var e=this,r=function(){return e.stabilized===!1&&e.stabilizationIterations<e.targetIterations},i=function(){e.body.emitter.emit("stabilizationProgress",{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&i();for(var a=0;r()&&a<this.options.stabilization.updateInterval;)this.physicsTick(),a++;if(i(),r()){var o;gr(A(o=this._stabilizationBatch).call(o,this),0)}else this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(e){for(var r=0;r<this.physicsBody.physicsNodeIndices.length;r++){var i=this.physicsBody.physicsNodeIndices[r],a=this.body.nodes[i],o=this.physicsBody.forces[i],s=20,u=.03,l=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),h=Math.min(Math.max(5,l),15),d=3*h,c=Vf((180-Math.min(1,Math.max(0,u*l))*180)/360,1,1),f={x:a.x+s*o.x,y:a.y+s*o.y};e.lineWidth=h,e.strokeStyle=c,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(f.x,f.y),e.stroke();var v=Math.atan2(o.y,o.x);e.fillStyle=c,ek.draw(e,{type:"arrow",point:f,angle:v,length:d}),qo(e).call(e)}}}]),t}();let Ds;const Pfe=new Uint8Array(16);function Ife(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(Pfe)}const nt=[];for(let t=0;t<256;++t)nt.push((t+256).toString(16).slice(1));function Cfe(t,n=0){return(nt[t[n+0]]+nt[t[n+1]]+nt[t[n+2]]+nt[t[n+3]]+"-"+nt[t[n+4]]+nt[t[n+5]]+"-"+nt[t[n+6]]+nt[t[n+7]]+"-"+nt[t[n+8]]+nt[t[n+9]]+"-"+nt[t[n+10]]+nt[t[n+11]]+nt[t[n+12]]+nt[t[n+13]]+nt[t[n+14]]+nt[t[n+15]]).toLowerCase()}const xfe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var q1={randomUUID:xfe};function Fa(t,n,e){if(q1.randomUUID&&!n&&!t)return q1.randomUUID();t=t||{};const r=t.random||(t.rng||Ife)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,n){e=e||0;for(let i=0;i<16;++i)n[e+i]=r[i];return n}return Cfe(r)}var ft=function(){function t(){N(this,t)}return F(t,null,[{key:"getRange",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,u;if(r.length>0)for(var l=0;l<r.length;l++)u=e[r[l]],o>u.shape.boundingBox.left&&(o=u.shape.boundingBox.left),s<u.shape.boundingBox.right&&(s=u.shape.boundingBox.right),i>u.shape.boundingBox.top&&(i=u.shape.boundingBox.top),a<u.shape.boundingBox.bottom&&(a=u.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&i===1e9&&a===-1e9&&(i=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:i,maxY:a}}},{key:"getRangeCore",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,u;if(r.length>0)for(var l=0;l<r.length;l++)u=e[r[l]],o>u.x&&(o=u.x),s<u.x&&(s=u.x),i>u.y&&(i=u.y),a<u.y&&(a=u.y);return o===1e9&&s===-1e9&&i===1e9&&a===-1e9&&(i=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:i,maxY:a}}},{key:"findCenter",value:function(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}},{key:"cloneOptions",value:function(e,r){var i={};return r===void 0||r==="node"?(ye(i,e.options,!0),i.x=e.x,i.y=e.y,i.amountOfConnections=e.edges.length):ye(i,e.options,!0),i}}]),t}();function Afe(t){var n=Rfe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Rfe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Dfe=function(t){he(e,t);var n=Afe(e);function e(r,i,a,o,s,u){var l;return N(this,e),l=n.call(this,r,i,a,o,s,u),l.isCluster=!0,l.containedNodes={},l.containedEdges={},l}return F(e,[{key:"_openChildCluster",value:function(i){var a=this,o=this.body.nodes[i];if(this.containedNodes[i]===void 0)throw new Error("node with id: "+i+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+i+" is not a cluster");delete this.containedNodes[i],re(o.edges,function(s){delete a.containedEdges[s.id]}),re(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},re(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},re(o.edges,function(s){re(a.edges,function(u){var l,h,d=oe(l=u.clusteringEdgeReplacingIds).call(l,s.id);d!==-1&&(re(s.clusteringEdgeReplacingIds,function(c){u.clusteringEdgeReplacingIds.push(c),a.body.edges[c].edgeReplacedById=u.id}),Tr(h=u.clusteringEdgeReplacingIds).call(h,d,1))})}),o.edges=[]}}]),e}(It),Mfe=function(){function t(n){var e=this;N(this,t),this.body=n,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},je(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return F(t,[{key:"clusterByHubsize",value:function(e,r){e===void 0?e=this._getHubSize():de(e)==="object"&&(r=this._checkOptions(e),e=this._getHubSize());for(var i=[],a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];o.edges.length>=e&&i.push(o.id)}for(var s=0;s<i.length;s++)this.clusterByConnection(i[s],r,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(r.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");r=this._checkOptions(r);var a={},o={};re(this.body.nodes,function(s,u){s.options&&r.joinCondition(s.options)===!0&&(a[u]=s,re(s.edges,function(l){e.clusteredEdges[l.id]===void 0&&(o[l.id]=l)}))}),this._cluster(a,o,r,i)}},{key:"clusterByEdgeCount",value:function(e,r){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r=this._checkOptions(r);for(var o=[],s={},u,l,h,d=function(){var p={},$={},g=i.body.nodeIndices[c],y=i.body.nodes[g];if(s[g]===void 0){h=0,l=[];for(var b=0;b<y.edges.length;b++)u=y.edges[b],i.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&h++,l.push(u));if(h===e){for(var m=function(B){if(r.joinCondition===void 0||r.joinCondition===null)return!0;var Q=ft.cloneOptions(B);return r.joinCondition(Q)},w=!0,E=0;E<l.length;E++){u=l[E];var T=i._getConnectedId(u,g);if(m(y))$[u.id]=u,p[g]=y,p[T]=i.body.nodes[T],s[g]=!0;else{w=!1;break}}if(Oe(p).length>0&&Oe($).length>0&&w===!0){var O=function(){for(var B=0;B<o.length;++B)for(var Q in p)if(o[B].nodes[Q]!==void 0)return o[B]},_=O();if(_!==void 0){for(var S in p)_.nodes[S]===void 0&&(_.nodes[S]=p[S]);for(var C in $)_.edges[C]===void 0&&(_.edges[C]=$[C])}else o.push({nodes:p,edges:$})}}}},c=0;c<this.body.nodeIndices.length;c++)d();for(var f=0;f<o.length;f++)this._cluster(o[f].nodes,o[f].edges,r,!1);a===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,r)}},{key:"clusterBridges",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,r)}},{key:"clusterByConnection",value:function(e,r){var i,a=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!");var o=this.body.nodes[e];r=this._checkOptions(r,o),r.clusterNodeProperties.x===void 0&&(r.clusterNodeProperties.x=o.x),r.clusterNodeProperties.y===void 0&&(r.clusterNodeProperties.y=o.y),r.clusterNodeProperties.fixed===void 0&&(r.clusterNodeProperties.fixed={},r.clusterNodeProperties.fixed.x=o.options.fixed.x,r.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},u={},l=o.id,h=ft.cloneOptions(o);s[l]=o;for(var d=0;d<o.edges.length;d++){var c=o.edges[d];if(this.clusteredEdges[c.id]===void 0){var f=this._getConnectedId(c,l);if(this.clusteredNodes[f]===void 0)if(f!==l)if(r.joinCondition===void 0)u[c.id]=c,s[f]=this.body.nodes[f];else{var v=ft.cloneOptions(this.body.nodes[f]);r.joinCondition(h,v)===!0&&(u[c.id]=c,s[f]=this.body.nodes[f])}else u[c.id]=c}}var p=zn(i=Oe(s)).call(i,function(m){return s[m].id});for(var $ in s)if(Object.prototype.hasOwnProperty.call(s,$))for(var g=s[$],y=0;y<g.edges.length;y++){var b=g.edges[y];oe(p).call(p,this._getConnectedId(b,g.id))>-1&&(u[b.id]=b)}this._cluster(s,u,r,a)}},{key:"_createClusterEdges",value:function(e,r,i,a){for(var o,s,u,l,h,d,c=Oe(e),f=[],v=0;v<c.length;v++){s=c[v],u=e[s];for(var p=0;p<u.edges.length;p++)o=u.edges[p],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?r[o.id]=o:o.toId==s?(l=i.id,h=o.fromId,d=h):(l=o.toId,h=i.id,d=l),e[d]===void 0&&f.push({edge:o,fromId:h,toId:l}))}for(var $=[],g=function(T){for(var O=0;O<$.length;O++){var _=$[O],S=T.fromId===_.fromId&&T.toId===_.toId,C=T.fromId===_.toId&&T.toId===_.fromId;if(S||C)return _}return null},y=0;y<f.length;y++){var b=f[y],m=b.edge,w=g(b);w===null?(w=this._createClusteredEdge(b.fromId,b.toId,m,a),$.push(w)):w.clusteringEdgeReplacingIds.push(m.id),this.body.edges[m.id].edgeReplacedById=w.id,this._backupEdgeOptions(m),m.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var u=0;u<o.length;++u)delete e[o[u]];if(Oe(e).length!=0&&!(Oe(e).length==1&&i.clusterNodeProperties.allowSingleNodeCluster!=!0)){var l=ye({},i.clusterNodeProperties);if(i.processProperties!==void 0){var h=[];for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)){var c=ft.cloneOptions(e[d]);h.push(c)}var f=[];for(var v in r)if(Object.prototype.hasOwnProperty.call(r,v)&&v.substr(0,12)!=="clusterEdge:"){var p=ft.cloneOptions(r[v],"edge");f.push(p)}if(l=i.processProperties(l,h,f),!l)throw new Error("The processProperties function does not return properties!")}l.id===void 0&&(l.id="cluster:"+Fa());var $=l.id;l.label===void 0&&(l.label="cluster");var g=void 0;l.x===void 0&&(g=this._getClusterPosition(e),l.x=g.x),l.y===void 0&&(g===void 0&&(g=this._getClusterPosition(e)),l.y=g.y),l.id=$;var y=this.body.functions.createNode(l,Dfe);y.containedNodes=e,y.containedEdges=r,y.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[l.id]=y,this._clusterEdges(e,r,l,i.clusterEdgeProperties),l.id=void 0,a===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}},{key:"_restoreEdge",value:function(e){var r=this.clusteredEdges[e.id];r!==void 0&&(e.setOptions({physics:r.physics}),delete this.clusteredEdges[e.id])}},{key:"isCluster",value:function(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(e){for(var r=Oe(e),i=e[r[0]].x,a=e[r[0]].x,o=e[r[0]].y,s=e[r[0]].y,u,l=1;l<r.length;l++)u=e[r[l]],i=u.x<i?u.x:i,a=u.x>a?u.x:a,o=u.y<o?u.y:o,s=u.y>s?u.y:s;return{x:.5*(i+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=oe(o).call(o,e)-1;if(s>=0){var u=o[s],l=this.body.nodes[u];l._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}var h=a.containedNodes,d=a.containedEdges;if(r!==void 0&&r.releaseFunction!==void 0&&typeof r.releaseFunction=="function"){var c={},f={x:a.x,y:a.y};for(var v in h)if(Object.prototype.hasOwnProperty.call(h,v)){var p=this.body.nodes[v];c[v]={x:p.x,y:p.y}}var $=r.releaseFunction(f,c);for(var g in h)if(Object.prototype.hasOwnProperty.call(h,g)){var y=this.body.nodes[g];$[g]!==void 0&&(y.x=$[g].x===void 0?a.x:$[g].x,y.y=$[g].y===void 0?a.y:$[g].y)}}else re(h,function(be){be.options.fixed.x===!1&&(be.x=a.x),be.options.fixed.y===!1&&(be.y=a.y)});for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var m=this.body.nodes[b];m.vx=a.vx,m.vy=a.vy,m.setOptions({physics:!0}),delete this.clusteredNodes[b]}for(var w=[],E=0;E<a.edges.length;E++)w.push(a.edges[E]);for(var T=0;T<w.length;T++){for(var O=w[T],_=this._getConnectedId(O,e),S=this.clusteredNodes[_],C=0;C<O.clusteringEdgeReplacingIds.length;C++){var L=O.clusteringEdgeReplacingIds[C],B=this.body.edges[L];if(B!==void 0)if(S!==void 0){var Q=this.body.nodes[S.clusterId];Q.containedEdges[B.id]=B,delete d[B.id];var ne=B.fromId,ie=B.toId;B.toId==_?ie=S.clusterId:ne=S.clusterId,this._createClusteredEdge(ne,ie,B,Q.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(B)}O.remove()}for(var le in d)Object.prototype.hasOwnProperty.call(d,le)&&this._restoreEdge(d[le]);delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var r=[];if(this.isCluster(e)===!0){var i=this.body.nodes[e].containedNodes;for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&r.push(this.body.nodes[a].id)}return r}},{key:"findNode",value:function(e){for(var r=[],i=100,a=0,o;this.clusteredNodes[e]!==void 0&&a<i;){if(o=this.body.nodes[e],o===void 0)return[];r.push(o.id),e=this.clusteredNodes[e].clusterId,a++}return o=this.body.nodes[e],o===void 0?[]:(r.push(o.id),xi(r).call(r),r)}},{key:"updateClusteredNode",value:function(e,r){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(r===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(r),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(e,r){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(r===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var i=this.getClusteredEdges(e),a=0;a<i.length;a++){var o=this.body.edges[i[a]];o.setOptions(r)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var r=[],i=100,a=0;e!==void 0&&this.body.edges[e]!==void 0&&a<i;)r.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return xi(r).call(r),r}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var r=[e],i=[],a=[],o=100,s=0;r.length>0&&s<o;){var u=r.pop();if(u!==void 0){var l=this.body.edges[u];if(l!==void 0){s++;var h=l.clusteringEdgeReplacingIds;if(h===void 0)a.push(u);else for(var d=0;d<h.length;++d){var c=h[d];oe(r).call(r,h)!==-1||oe(i).call(i,h)!==-1||r.push(c)}i.push(u)}}}return a}},{key:"_getConnectedId",value:function(e,r){return e.toId!=r?e.toId:(e.fromId!=r,e.fromId)}},{key:"_getHubSize",value:function(){for(var e=0,r=0,i=0,a=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodes[this.body.nodeIndices[o]];s.edges.length>a&&(a=s.edges.length),e+=s.edges.length,r+=Math.pow(s.edges.length,2),i+=1}e=e/i,r=r/i;var u=r-Math.pow(e,2),l=Math.sqrt(u),h=Math.floor(e+2*l);return h>a&&(h=a),h}},{key:"_createClusteredEdge",value:function(e,r,i,a,o){var s=ft.cloneOptions(i,"edge");ye(s,a),s.from=e,s.to=r,s.id="clusterEdge:"+Fa(),o!==void 0&&ye(s,o);var u=this.body.functions.createEdge(s);return u.clusteringEdgeReplacingIds=[i.id],u.connect(),this.body.edges[u.id]=u,u}},{key:"_clusterEdges",value:function(e,r,i,a){if(r instanceof An){var o=r,s={};s[o.id]=o,r=s}if(e instanceof It){var u=e,l={};l[u.id]=u,e=l}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=i.clusterEdgeProperties),this._createClusterEdges(e,r,i,a);for(var h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&this.body.edges[h]!==void 0){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&(this.clusteredNodes[c]={clusterId:i.id,node:this.body.nodes[c]},this.body.nodes[c].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var r=this.clusteredNodes[e];if(r!==void 0){var i=r.clusterId;if(i!==void 0)return this.body.nodes[i]}}}},{key:"_filter",value:function(e,r){var i=[];return re(e,function(a){r(a)&&i.push(a)}),i}},{key:"_updateState",value:function(){var e=this,r,i=[],a={},o=function(v){re(e.body.nodes,function(p){p.isCluster===!0&&v(p)})};for(r in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,r)){var s=this.body.nodes[r];s===void 0&&i.push(r)}o(function(f){for(var v=0;v<i.length;v++)delete f.containedNodes[i[v]]});for(var u=0;u<i.length;u++)delete this.clusteredNodes[i[u]];re(this.clusteredEdges,function(f){var v=e.body.edges[f];(v===void 0||!v.endPointsValid())&&(a[f]=f)}),o(function(f){re(f.containedEdges,function(v,p){!v.endPointsValid()&&!a[p]&&(a[p]=p)})}),re(this.body.edges,function(f,v){var p=!0,$=f.clusteringEdgeReplacingIds;if($!==void 0){var g=0;re($,function(y){var b=e.body.edges[y];b!==void 0&&b.endPointsValid()&&(g+=1)}),p=g>0}(!f.endPointsValid()||!p)&&(a[v]=v)}),o(function(f){re(a,function(v){delete f.containedEdges[v],re(f.edges,function(p,$){if(p.id===v){f.edges[$]=null;return}p.clusteringEdgeReplacingIds=e._filter(p.clusteringEdgeReplacingIds,function(g){return!a[g]})}),f.edges=e._filter(f.edges,function(p){return p!==null})})}),re(a,function(f){delete e.clusteredEdges[f]}),re(a,function(f){delete e.body.edges[f]});var l=Oe(this.body.edges);re(l,function(f){var v=e.body.edges[f],p=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(p!==e._isClusteredEdge(v.id))if(p){var $=e._getClusterNodeForNode(v.fromId);$!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,$);var g=e._getClusterNodeForNode(v.toId);g!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,g)}else delete e._clusterEdges[f],e._restoreEdge(v)});for(var h=!1,d=!0,c=function(){var v=[];o(function($){var g=Oe($.containedNodes).length,y=$.options.allowSingleNodeCluster===!0;(y&&g<1||!y&&g<2)&&v.push($.id)});for(var p=0;p<v.length;++p)e.openCluster(v[p],{},!1);d=v.length>0,h=h||d};d;)c();h&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),t}();function Nfe(){var t;window!==void 0&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),t===void 0?window.requestAnimationFrame=function(n){n()}:window.requestAnimationFrame=t}var Ffe=function(){function t(n,e){N(this,t),Nfe(),this.body=n,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!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},je(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this,r;this.body.emitter.on("dragStart",function(){e.dragging=!0}),this.body.emitter.on("dragEnd",function(){e.dragging=!1}),this.body.emitter.on("zoom",function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=gr(function(){var i;e.zooming=!1,A(i=e._requestRedraw).call(i,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",A(r=this._requestRedraw).call(r,this)),this.body.emitter.on("_startRendering",function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()}),this.body.emitter.on("_stopRendering",function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(e!==void 0){var r=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];ya(r,this.options,e)}}},{key:"_requestNextFrame",value:function(e,r){if(!(typeof window>"u")){var i,a=window;return this.requiresTimeout===!0?i=gr(e,r):a.requestAnimationFrame&&(i=a.requestAnimationFrame(e)),i}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(A(e=this._renderStep).call(e,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var r={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var i=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,a,o),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){var s=this._drawNodes(i,e),u=s.drawExternalLabels;r.drawExternalLabels=u}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),r.drawExternalLabels!=null&&r.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,a,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var 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);var r=this.body.nodes,i;for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i=r[a],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.nodes,a=this.body.nodeIndices,o,s=[],u=[],l=20,h=this.canvas.DOMtoCanvas({x:-l,y:-l}),d=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+l,y:this.canvas.frame.canvas.clientHeight+l}),c={top:h.y,left:h.x,bottom:d.y,right:d.x},f=[],v=0;v<a.length;v++)if(o=i[a[v]],o.hover)u.push(a[v]);else if(o.isSelected())s.push(a[v]);else if(r===!0){var p=o.draw(e);p.drawExternalLabel!=null&&f.push(p.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(c)===!0){var $=o.draw(e);$.drawExternalLabel!=null&&f.push($.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);var g,y=s.length,b=u.length;for(g=0;g<y;g++){o=i[s[g]];var m=o.draw(e);m.drawExternalLabel!=null&&f.push(m.drawExternalLabel)}for(g=0;g<b;g++){o=i[u[g]];var w=o.draw(e);w.drawExternalLabel!=null&&f.push(w.drawExternalLabel)}return{drawExternalLabels:function(){for(var T=0,O=f;T<O.length;T++){var _=O[T];_()}}}}},{key:"_drawEdges",value:function(e){for(var r=this.body.edges,i=this.body.edgeIndices,a=0;a<i.length;a++){var o=r[i[a]];o.connected===!0&&o.draw(e)}}},{key:"_drawArrows",value:function(e){for(var r=this.body.edges,i=this.body.edgeIndices,a=0;a<i.length;a++){var o=r[i[a]];o.connected===!0&&o.drawArrows(e)}}},{key:"_determineBrowserMethod",value:function(){if(typeof window<"u"){var e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,oe(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:oe(e).call(e,"safari")!=-1&&oe(e).call(e,"chrome")<=-1&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}},{key:"_drawSelectionBox",value:function(e){if(this.body.selectionBox.show){e.beginPath();var r=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,i=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,r,i),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,r,i),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}]),t}(),mv={},Bfe={get exports(){return mv},set exports(t){mv=t}},Lfe=ae,jfe=Lfe.setInterval;(function(t){t.exports=jfe})(Bfe);var zfe=V(mv);function xu(t,n){n.inputHandler=function(e){e.isFirst&&n(e)},t.on("hammer.input",n.inputHandler)}function ik(t,n){return n.inputHandler=function(e){e.isFinal&&n(e)},t.on("hammer.input",n.inputHandler)}var Hfe=function(){function t(n){N(this,t),this.body=n,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},je(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this,r;this.body.emitter.once("resize",function(i){i.width!==0&&(e.body.view.translation.x=i.width*.5),i.height!==0&&(e.body.view.translation.y=i.height*.5)}),this.body.emitter.on("setSize",A(r=this.setSize).call(r,this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var r=this;if(e!==void 0){var i=["width","height","autoResize"];ya(i,this.options,e)}if(this._cleanUp(),this.options.autoResize===!0){var a;if(window.ResizeObserver){var o=new ResizeObserver(function(){var h=r.setSize();h===!0&&r.body.emitter.emit("_requestRedraw")}),s=this.frame;o.observe(s),this._cleanupCallbacks.push(function(){o.unobserve(s)})}else{var u=zfe(function(){var h=r.setSize();h===!0&&r.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(u)})}var l=A(a=this._onResize).call(a,this);Qoe(window,"resize",l),this._cleanupCallbacks.push(function(){Joe(window,"resize",l)})}}},{key:"_cleanUp",value:function(){var e,r,i;pe(e=xi(r=Tr(i=this._cleanupCallbacks).call(i,0)).call(r)).call(e,function(a){try{a()}catch(o){console.error(o)}})}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var 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}))}},{key:"_setCameraState",value:function(){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){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,r=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;e!=1&&r!=1?i=this.cameraState.scale*.5*(e+r):e!=1?i=this.cameraState.scale*e:r!=1&&(i=this.cameraState.scale*r),this.body.view.scale=i;var a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(oe(e).call(e,"%")!==-1||oe(e).call(e,"px")!==-1)return e;if(oe(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){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{var 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()}},{key:"_bindHammer",value:function(){var e=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new xn(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:xn.DIRECTION_ALL}),xu(this.hammer,function(r){e.body.eventListeners.onTouch(r)}),this.hammer.on("tap",function(r){e.body.eventListeners.onTap(r)}),this.hammer.on("doubletap",function(r){e.body.eventListeners.onDoubleTap(r)}),this.hammer.on("press",function(r){e.body.eventListeners.onHold(r)}),this.hammer.on("panstart",function(r){e.body.eventListeners.onDragStart(r)}),this.hammer.on("panmove",function(r){e.body.eventListeners.onDrag(r)}),this.hammer.on("panend",function(r){e.body.eventListeners.onDragEnd(r)}),this.hammer.on("pinch",function(r){e.body.eventListeners.onPinch(r)}),this.frame.canvas.addEventListener("wheel",function(r){e.body.eventListeners.onMouseWheel(r)}),this.frame.canvas.addEventListener("mousemove",function(r){e.body.eventListeners.onMouseMove(r)}),this.frame.canvas.addEventListener("contextmenu",function(r){e.body.eventListeners.onContext(r)}),this.hammerFrame=new xn(this.frame),ik(this.hammerFrame,function(r){e.body.eventListeners.onRelease(r)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),r=this._prepareValue(r);var i=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||r!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=r)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=r,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=r,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var u=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),l=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==u||this.frame.canvas.height!==l)&&this._getCameraState(s),this.frame.canvas.width!==u&&(this.frame.canvas.width=u,i=!0),this.frame.canvas.height!==l&&(this.frame.canvas.height=l,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(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var r=1;typeof window<"u"&&(r=window.devicePixelRatio||1);var i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return r/i}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var 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)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),t}();function Wfe(t,n){var e=je({nodes:n,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},t??{});if(!ce(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=n),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var Vfe=function(){function t(n,e){var r,i=this,a;N(this,t),this.body=n,this.canvas=e,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",A(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",function(){i.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",A(a=this.releaseNode).call(a,this))}return F(t,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Wfe(e,this.body.nodeIndices);var i=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(i===0||a===0)s=1,o=ft.getRange(this.body.nodes,e.nodes);else if(r===!0){var u=0;for(var l in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,l)){var h=this.body.nodes[l];h.predefinedPosition===!0&&(u+=1)}if(u>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=ft.getRange(this.body.nodes,e.nodes);var d=this.body.nodeIndices.length;s=12.662/(d+7.4147)+.0964822;var c=Math.min(i/600,a/600);s*=c}else{this.body.emitter.emit("_resizeNodes"),o=ft.getRange(this.body.nodes,e.nodes);var f=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,p=i/f,$=a/v;s=p<=$?p:$}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var g=ft.findCenter(o),y={position:g,scale:s,animation:e.animation};this.moveTo(y)}},{key:"focus",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};r.position=i,r.lockedOnNode=e,this.moveTo(r)}else console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!Ti(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,!Ti(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,!Ti(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,!Ti(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)}},{key:"animateView",value:function(e){if(e!==void 0){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;var r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:r.x-e.position.x,y:r.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 a;this.viewFunction=A(a=this._lockedRedraw).call(a,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 o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=A(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:r.x-e.x,y:r.y-e.y},a=this.body.view.translation,o={x:a.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var r=tse[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*r,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*r,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*r},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=A(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();function Y1(t){var n=t&&t.preventDefault||!1,e=t&&t.container||window,r={},i={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(h){l(h,"keydown")},u=function(h){l(h,"keyup")},l=function(h,d){if(i[d][h.keyCode]!==void 0){for(var c=i[d][h.keyCode],f=0;f<c.length;f++)(c[f].shift===void 0||c[f].shift==!0&&h.shiftKey==!0||c[f].shift==!1&&h.shiftKey==!1)&&c[f].fn(h);n==!0&&h.preventDefault()}};return r.bind=function(h,d,c){if(c===void 0&&(c="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);i[c][a[h].code]===void 0&&(i[c][a[h].code]=[]),i[c][a[h].code].push({fn:d,shift:a[h].shift})},r.bindAll=function(h,d){d===void 0&&(d="keydown");for(var c in a)a.hasOwnProperty(c)&&r.bind(c,h,d)},r.getKey=function(h){for(var d in a)if(a.hasOwnProperty(d)){if(h.shiftKey==!0&&a[d].shift==!0&&h.keyCode==a[d].code)return d;if(h.shiftKey==!1&&a[d].shift==!1&&h.keyCode==a[d].code)return d;if(h.keyCode==a[d].code&&d=="shift")return d}return"unknown key, currently not supported"},r.unbind=function(h,d,c){if(c===void 0&&(c="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);if(d!==void 0){var f=[],v=i[c][a[h].code];if(v!==void 0)for(var p=0;p<v.length;p++)v[p].fn==d&&v[p].shift==a[h].shift||f.push(i[c][a[h].code][p]);i[c][a[h].code]=f}else i[c][a[h].code]=[]},r.reset=function(){i={keydown:{},keyup:{}}},r.destroy=function(){i={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",u,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",u,!0),r}var Ufe=function(){function t(n,e){var r=this;N(this,t),this.body=n,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){r.activated=!0,r.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){r.activated=!1,r.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){r.keycharm!==void 0&&r.keycharm.destroy()}),this.options={}}return F(t,[{key:"setOptions",value:function(e){e!==void 0&&(this.options=e,this.create())}},{key:"create",value:function(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(this.navigationHammers.length!=0){for(var e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var e=this;this.cleanNavigation(),this.navigationDOM={};var r=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],i=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var a=0;a<r.length;a++){this.navigationDOM[r[a]]=document.createElement("div"),this.navigationDOM[r[a]].className="vis-button vis-"+r[a],this.navigationDOM.wrapper.appendChild(this.navigationDOM[r[a]]);var o=new xn(this.navigationDOM[r[a]]);if(i[a]==="_fit"){var s;xu(o,A(s=this._fit).call(s,this))}else{var u;xu(o,A(u=this.bindToRedraw).call(u,this,i[a]))}this.navigationHammers.push(o)}var l=new xn(this.canvas.frame);ik(l,function(){e._stopMovement()}),this.navigationHammers.push(l),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){if(this.boundFunctions[e]===void 0){var r;this.boundFunctions[e]=A(r=this[e]).call(r,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}},{key:"unbindFromRedraw",value:function(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}},{key:"_fit",value:function(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var 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={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,r=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=r/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=r,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,r=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=r/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=r,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=Y1({container:window,preventDefault:!0}):this.keycharm=Y1({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var r,i,a,o,s,u,l,h,d,c,f,v,p,$,g,y,b,m,w,E,T,O,_,S;A(r=this.keycharm).call(r,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),A(i=this.keycharm).call(i,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),A(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),A(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),A(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(h=this.keycharm).call(h,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(d=this.keycharm).call(d,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(c=this.keycharm).call(c,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(p=this.keycharm).call(p,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),A($=this.keycharm).call($,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),A(g=this.keycharm).call(g,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),A(y=this.keycharm).call(y,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),A(b=this.keycharm).call(b,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(m=this.keycharm).call(m,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(w=this.keycharm).call(w,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(E=this.keycharm).call(E,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(T=this.keycharm).call(T,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(O=this.keycharm).call(O,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(_=this.keycharm).call(_,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(S=this.keycharm).call(S,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function Gfe(t,n){var e=typeof ci<"u"&&Br(t)||t["@@iterator"];if(!e){if(ce(t)||(e=Kfe(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Kfe(t,n){var e;if(t){if(typeof t=="string")return X1(t,n);var r=ot(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return en(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X1(t,n)}}function X1(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var qfe=function(){function t(n,e,r){var i,a,o,s,u,l,h,d,c,f,v,p,$;N(this,t),this.body=n,this.canvas=e,this.selectionHandler=r,this.navigationHandler=new Ufe(n,e),this.body.eventListeners.onTap=A(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=A(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=A(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=A(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=A(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=A(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=A(h=this.onDragEnd).call(h,this),this.body.eventListeners.onMouseWheel=A(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=A(c=this.onPinch).call(c,this),this.body.eventListeners.onMouseMove=A(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=A(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=A(p=this.onContext).call(p,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=A($=this.getPointer).call($,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},je(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("destroy",function(){clearTimeout(e.popupTimer),delete e.body.functions.getPointer})}},{key:"setOptions",value:function(e){if(e!==void 0){var r=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];ku(r,this.options,e),Lt(this.options,e,"keyboard"),e.tooltip&&(je(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=Wf(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-Yoe(this.canvas.frame.canvas),y:e.y-Xoe(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(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())}},{key:"onTap",value:function(e){var r=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(r,i),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r)}},{key:"onDoubleTap",value:function(e){var r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,r)}},{key:"onHold",value:function(e){var r=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(r,i),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r),this.selectionHandler.generateClickEvent("hold",e,r)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,r),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var r=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,r)}},{key:"checkSelectionChanges",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,r){var i=function(o,s){for(var u=[],l=0;l<o.length;l++){var h=o[l];oe(s).call(s,h)===-1&&u.push(h)}return u};return{nodes:i(e.nodes,r.nodes),edges:i(e.edges,r.edges)}}},{key:"onDragStart",value:function(e){if(!this.drag.dragging){this.drag.pointer===void 0&&this.onTouch(e);var r=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=je({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;var i=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)}}else if(r!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=r.id,r.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[r.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);var a=Gfe(this.selectionHandler.getSelectedNodes()),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,u={id:s.id,node:s,x:s.x,y:s.y,xFixed:s.options.fixed.x,yFixed:s.options.fixed.y};s.options.fixed.x=!0,s.options.fixed.y=!0,this.drag.selection.push(u)}}catch(l){a.e(l)}finally{a.f()}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(e){var r=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var i=this.getPointer(e.center),a=this.drag.selection;if(a&&a.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,i);var o=i.x-this.drag.pointer.x,s=i.y-this.drag.pointer.y;pe(a).call(a,function(h){var d=h.node;h.xFixed===!1&&(d.x=r.canvas._XconvertDOMtoCanvas(r.canvas._XconvertCanvasToDOM(h.x)+o)),h.yFixed===!1&&(d.y=r.canvas._YconvertDOMtoCanvas(r.canvas._YconvertCanvasToDOM(h.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,i,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,i,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}var u=i.x-this.drag.pointer.x,l=i.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+u,y:this.drag.translation.y+l},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(e){var r=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var i;this.body.selectionBox.show=!1;var a=this.body.selectionBox.position,o={minX:Math.min(a.start.x,a.end.x),minY:Math.min(a.start.y,a.end.y),maxX:Math.max(a.start.x,a.end.x),maxY:Math.max(a.start.y,a.end.y)},s=Ot(i=this.body.nodeIndices).call(i,function(h){var d=r.body.nodes[h];return d.x>=o.minX&&d.x<=o.maxX&&d.y>=o.minY&&d.y<=o.maxY});pe(s).call(s,function(h){return r.selectionHandler.selectObject(r.body.nodes[h])});var u=this.getPointer(e.center);this.selectionHandler.commitAndEmit(u,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var l=this.drag.selection;l&&l.length?(pe(l).call(l,function(h){h.node.options.fixed.x=h.xFixed,h.node.options.fixed.y=h.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"))}}},{key:"onPinch",value:function(e){var r=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var i=this.pinch.scale*e.scale;this.zoom(i,r)}},{key:"zoom",value:function(e,r){if(this.options.zoomView===!0){var i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/i,u=(1-s)*r.x+o.x*s,l=(1-s)*r.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:u,y:l},a!=null){var h=this.canvas.canvasToDOM(a);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:r}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:r})}}},{key:"onMouseWheel",value:function(e){if(this.options.zoomView===!0){if(e.deltaY!==0){var r=this.body.view.scale;r*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);var i=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(r,i)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var r=this,i=this.getPointer({x:e.clientX,y:e.clientY}),a=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(a=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),a===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=gr(function(){return r._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,i)}},{key:"_checkShowPopup",value:function(e){var r=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),a={left:r,top:i,right:r,bottom:i},o=this.popupObj===void 0?void 0:this.popupObj.id,s=!1,u="node";if(this.popupObj===void 0){for(var l=this.body.nodeIndices,h=this.body.nodes,d,c=[],f=0;f<l.length;f++)d=h[l[f]],d.isOverlappingWith(a)===!0&&(s=!0,d.getTitle()!==void 0&&c.push(l[f]));c.length>0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,p=this.body.edges,$,g=[],y=0;y<v.length;y++)$=p[v[y]],$.isOverlappingWith(a)===!0&&$.connected===!0&&$.getTitle()!==void 0&&g.push(v[y]);g.length>0&&(this.popupObj=p[g[g.length-1]],u="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new lse(this.canvas.frame)),this.popup.popupTargetType=u,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"))}},{key:"_checkHidePopup",value:function(e){var r=this.selectionHandler._pointerToPositionObject(e),i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(r),i===!0)){var a=this.selectionHandler.getNodeAt(e);i=a===void 0?!1:a.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(r));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}(),bv={},Yfe={get exports(){return bv},set exports(t){bv=t}},Xfe=Xp,Qfe=HT;Xfe("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Qfe);var Jfe=ae,Zfe=Jfe.Set,eve=Zfe,tve=eve;(function(t){t.exports=tve})(Yfe);var Ei=V(bv),$v={},rve={get exports(){return $v},set exports(t){$v=t}},ive=ue,Q1=Qp,Ms=Gn.getWeakData,nve=Yp,ave=Ft,ove=Co,Fd=Ze,sve=qp,nk=hi,J1=et,ak=Zi,uve=ak.set,lve=ak.getterFor,hve=nk.find,dve=nk.findIndex,cve=ive([].splice),fve=0,Ns=function(t){return t.frozen||(t.frozen=new ok)},ok=function(){this.entries=[]},Bd=function(t,n){return hve(t.entries,function(e){return e[0]===n})};ok.prototype={get:function(t){var n=Bd(this,t);if(n)return n[1]},has:function(t){return!!Bd(this,t)},set:function(t,n){var e=Bd(this,t);e?e[1]=n:this.entries.push([t,n])},delete:function(t){var n=dve(this.entries,function(e){return e[0]===t});return~n&&cve(this.entries,n,1),!!~n}};var vve={getConstructor:function(t,n,e,r){var i=t(function(u,l){nve(u,a),uve(u,{type:n,id:fve++,frozen:void 0}),ove(l)||sve(l,u[r],{that:u,AS_ENTRIES:e})}),a=i.prototype,o=lve(n),s=function(u,l,h){var d=o(u),c=Ms(ave(l),!0);return c===!0?Ns(d).set(l,h):c[d.id]=h,u};return Q1(a,{delete:function(u){var l=o(this);if(!Fd(u))return!1;var h=Ms(u);return h===!0?Ns(l).delete(u):h&&J1(h,l.id)&&delete h[l.id]},has:function(l){var h=o(this);if(!Fd(l))return!1;var d=Ms(l);return d===!0?Ns(h).has(l):d&&J1(d,h.id)}}),Q1(a,e?{get:function(l){var h=o(this);if(Fd(l)){var d=Ms(l);return d===!0?Ns(h).get(l):d?d[h.id]:void 0}},set:function(l,h){return s(this,l,h)}}:{add:function(l){return s(this,l,!0)}}),i}},pve=BT,Z1=We,ru=ue,ew=Qp,gve=Gn,yve=Xp,sk=vve,Fs=Ze,Bs=Zi.enforce,mve=se,bve=kS,es=Object,$ve=Array.isArray,Ls=es.isExtensible,uk=es.isFrozen,wve=es.isSealed,lk=es.freeze,_ve=es.seal,tw={},rw={},Eve=!Z1.ActiveXObject&&"ActiveXObject"in Z1,Sa,hk=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},dk=yve("WeakMap",hk,sk),gn=dk.prototype,iu=ru(gn.set),Sve=function(){return pve&&mve(function(){var t=lk([]);return iu(new dk,t,1),!uk(t)})};if(bve)if(Eve){Sa=sk.getConstructor(hk,"WeakMap",!0),gve.enable();var iw=ru(gn.delete),js=ru(gn.has),nw=ru(gn.get);ew(gn,{delete:function(t){if(Fs(t)&&!Ls(t)){var n=Bs(this);return n.frozen||(n.frozen=new Sa),iw(this,t)||n.frozen.delete(t)}return iw(this,t)},has:function(n){if(Fs(n)&&!Ls(n)){var e=Bs(this);return e.frozen||(e.frozen=new Sa),js(this,n)||e.frozen.has(n)}return js(this,n)},get:function(n){if(Fs(n)&&!Ls(n)){var e=Bs(this);return e.frozen||(e.frozen=new Sa),js(this,n)?nw(this,n):e.frozen.get(n)}return nw(this,n)},set:function(n,e){if(Fs(n)&&!Ls(n)){var r=Bs(this);r.frozen||(r.frozen=new Sa),js(this,n)?iu(this,n,e):r.frozen.set(n,e)}else iu(this,n,e);return this}})}else Sve()&&ew(gn,{set:function(n,e){var r;return $ve(n)&&(uk(n)?r=tw:wve(n)&&(r=rw)),iu(this,n,e),r==tw&&lk(n),r==rw&&_ve(n),this}});var Ove=ae,Tve=Ove.WeakMap,kve=Tve,Pve=kve;(function(t){t.exports=Pve})(rve);var Ba=V($v);function ge(t,n,e,r){if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(t):r?r.value:n.get(t)}function wv(t,n,e,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?t!==n||!i:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,e):i?i.value=e:n.set(t,e),e}function _v(t,n){var e=typeof ci<"u"&&Br(t)||t["@@iterator"];if(!e){if(ce(t)||(e=Ive(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Ive(t,n){var e;if(t){if(typeof t=="string")return aw(t,n);var r=ot(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return en(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aw(t,n)}}function aw(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var mi,Bt,Hr,Wr,nu;function ow(t,n){var e=new Ei,r=_v(n),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;t.has(a)||e.add(a)}}catch(o){r.e(o)}finally{r.f()}return e}var sw=function(){function t(){N(this,t),mi.set(this,new Ei),Bt.set(this,new Ei)}return F(t,[{key:"size",get:function(){return ge(this,Bt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var s=o[a];ge(this,Bt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var s=o[a];ge(this,Bt,"f").delete(s)}}},{key:"clear",value:function(){ge(this,Bt,"f").clear()}},{key:"getSelection",value:function(){return hr(ge(this,Bt,"f"))}},{key:"getChanges",value:function(){return{added:hr(ow(ge(this,mi,"f"),ge(this,Bt,"f"))),deleted:hr(ow(ge(this,Bt,"f"),ge(this,mi,"f"))),previous:hr(new Ei(ge(this,mi,"f"))),current:hr(new Ei(ge(this,Bt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();wv(this,mi,ge(this,Bt,"f"),"f"),wv(this,Bt,new Ei(ge(this,mi,"f")),"f");var r=_v(e.added),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;a.select()}}catch(l){r.e(l)}finally{r.f()}var o=_v(e.deleted),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;u.unselect()}}catch(l){o.e(l)}finally{o.f()}return e}}]),t}();mi=new Ba,Bt=new Ba;var Cve=function(){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};N(this,t),Hr.set(this,new sw),Wr.set(this,new sw),nu.set(this,void 0),wv(this,nu,n,"f")}return F(t,[{key:"sizeNodes",get:function(){return ge(this,Hr,"f").size}},{key:"sizeEdges",get:function(){return ge(this,Wr,"f").size}},{key:"getNodes",value:function(){return ge(this,Hr,"f").getSelection()}},{key:"getEdges",value:function(){return ge(this,Wr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=ge(this,Hr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=ge(this,Wr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){ge(this,Hr,"f").delete(e)}},{key:"deleteEdges",value:function(e){ge(this,Wr,"f").delete(e)}},{key:"clear",value:function(){ge(this,Hr,"f").clear(),ge(this,Wr,"f").clear()}},{key:"commit",value:function(){for(var e,r,i={nodes:ge(this,Hr,"f").commit(),edges:ge(this,Wr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=ge(this,nu,"f")).call.apply(e,Rp(r=[this,i]).call(r,o)),i}}]),t}();Hr=new Ba,Wr=new Ba,nu=new Ba;function uw(t,n){var e=typeof ci<"u"&&Br(t)||t["@@iterator"];if(!e){if(ce(t)||(e=xve(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function xve(t,n){var e;if(t){if(typeof t=="string")return lw(t,n);var r=ot(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return en(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lw(t,n)}}function lw(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var Ave=function(){function t(n,e){var r=this;N(this,t),this.body=n,this.canvas=e,this._selectionAccumulator=new Cve,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},je(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){r.updateSelection()})}return F(t,[{key:"setOptions",value:function(e){if(e!==void 0){var r=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];ya(r,this.options,e)}}},{key:"selectOnPoint",value:function(e){var r=!1;if(this.options.selectable===!0){var i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(r=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return r}},{key:"selectAdditionalOnPoint",value:function(e){var r=!1;if(this.options.selectable===!0){var i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(r=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return r}},{key:"_initBaseEvent",value:function(e,r){var i={};return i.pointer={DOM:{x:r.x,y:r.y},canvas:this.canvas.DOMtoCanvas(r)},i.event=e,i}},{key:"generateClickEvent",value:function(e,r,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(r,i);if(o===!0)s.nodes=[],s.edges=[];else{var u=this.getSelection();s.nodes=u.nodes,s.edges=u.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(i)),r.controlEdge!==void 0&&(s.controlEdge=r.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof It){if(r===!0){var i;(i=this._selectionAccumulator).addEdges.apply(i,hr(e.edges))}this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var r=[],i=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];i[o].isOverlappingWith(e)&&r.push(o)}return r}},{key:"_pointerToPositionObject",value:function(e){var r=this.canvas.DOMtoCanvas(e);return{left:r.x-1,top:r.y+1,right:r.x+1,bottom:r.y-1}}},{key:"getNodeAt",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(i);if(a.length>0)return r===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,r){for(var i=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];i[o].isOverlappingWith(e)&&r.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var r=[];return this._getEdgesOverlappingWith(e,r),r}},{key:"getEdgeAt",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,u=0;u<this.body.edgeIndices.length;u++){var l=this.body.edgeIndices[u],h=s[l];if(h.connected){var d=h.from.x,c=h.from.y,f=h.to.x,v=h.to.y,p=h.edgeType.getDistanceToEdge(d,c,f,v,i.x,i.y);p<a&&(o=l,a=p)}}if(o!==null)return r===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof It?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof It){var r;this._selectionAccumulator.deleteNodes(e),(r=this._selectionAccumulator).deleteEdges.apply(r,hr(e.edges))}else this._selectionAccumulator.deleteEdges(e)}},{key:"unselectAll",value:function(){this._selectionAccumulator.clear()}},{key:"getSelectedNodeCount",value:function(){return this._selectionAccumulator.sizeNodes}},{key:"getSelectedEdgeCount",value:function(){return this._selectionAccumulator.sizeEdges}},{key:"_hoverConnectedEdges",value:function(e){for(var r=0;r<e.edges.length;r++){var i=e.edges[r];i.hover=!0,this._addToHover(i)}}},{key:"emitBlurEvent",value:function(e,r,i){var a=this._initBaseEvent(e,r);i.hover===!0&&(i.hover=!1,i instanceof It?(a.node=i.id,this.body.emitter.emit("blurNode",a)):(a.edge=i.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,r,i){var a=this._initBaseEvent(e,r),o=!1;return i.hover===!1&&(i.hover=!0,this._addToHover(i),o=!0,i instanceof It?(a.node=i.id,this.body.emitter.emit("hoverNode",a)):(a.edge=i.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,r){var i=this.getNodeAt(r);i===void 0&&(i=this.getEdgeAt(r));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(i===void 0||i instanceof It&&i.id!=o||i instanceof An)&&(this.emitBlurEvent(e,r,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],a=!0);for(var s in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,s)&&(a===!0?(this.hoverObj.edges[s].hover=!1,delete this.hoverObj.edges[s]):(i===void 0||i instanceof An&&i.id!=s||i instanceof It&&!i.hover)&&(this.emitBlurEvent(e,r,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(i!==void 0){var u=Oe(this.hoverObj.edges).length,l=Oe(this.hoverObj.nodes).length,h=i instanceof An&&u===0&&l===0,d=i instanceof It&&u===0&&l===0;(a||h||d)&&(a=this.emitHoverEvent(e,r,i)),i instanceof It&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(i)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,r){var i=!1,a=this._selectionAccumulator.commit(),o={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",r,e,o),i=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",r,e,o),i=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",r,e),i=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",r,e),i=!0),i===!0&&this.generateClickEvent("select",r,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return zn(e=this._selectionAccumulator.getNodes()).call(e,function(r){return r.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return zn(e=this._selectionAccumulator.getEdges()).call(e,function(r){return r.id})}},{key:"setSelection",value:function(e){var r=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((r.unselectAll||r.unselectAll===void 0)&&this.unselectAll(),e.nodes){var i=uw(e.nodes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,r.highlightEdges)}}catch(c){i.e(c)}finally{i.f()}}if(e.edges){var u=uw(e.edges),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=this.body.edges[h];if(!d)throw new RangeError('Edge with id "'+h+'" not found');this.selectObject(d)}}catch(c){u.e(c)}finally{u.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var r=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:r})}},{key:"selectEdges",value:function(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var r in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,r.id)||this._selectionAccumulator.deleteEdges(r)}},{key:"getClickedItems",value:function(e){for(var r=this.canvas.DOMtoCanvas(e),i=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var u=o[a[s]],l=u.getItemsOnPoint(r);i.push.apply(i,l)}for(var h=this.body.edgeIndices,d=this.body.edges,c=h.length-1;c>=0;c--){var f=d[h[c]],v=f.getItemsOnPoint(r);i.push.apply(i,v)}return i}}]),t}(),Ev={},Rve={get exports(){return Ev},set exports(t){Ev=t}},hw=XS,Dve=Math.floor,Sv=function(t,n){var e=t.length,r=Dve(e/2);return e<8?Mve(t,n):Nve(t,Sv(hw(t,0,r),n),Sv(hw(t,r),n),n)},Mve=function(t,n){for(var e=t.length,r=1,i,a;r<e;){for(a=r,i=t[r];a&&n(t[a-1],i)>0;)t[a]=t[--a];a!==r++&&(t[a]=i)}return t},Nve=function(t,n,e,r){for(var i=n.length,a=e.length,o=0,s=0;o<i||s<a;)t[o+s]=o<i&&s<a?r(n[o],e[s])<=0?n[o++]:e[s++]:o<i?n[o++]:e[s++];return t},Fve=Sv,Bve=Ao,dw=Bve.match(/firefox\/(\d+)/i),Lve=!!dw&&+dw[1],jve=Ao,zve=/MSIE|Trident/.test(jve),Hve=Ao,cw=Hve.match(/AppleWebKit\/(\d+)\./),Wve=!!cw&&+cw[1],Vve=K,ck=ue,Uve=Qi,Gve=Nt,fw=nr,Kve=WO,vw=br,ig=se,qve=Fve,Yve=pa,pw=Lve,Xve=zve,gw=Ro,yw=Wve,Yr=[],mw=ck(Yr.sort),Qve=ck(Yr.push),Jve=ig(function(){Yr.sort(void 0)}),Zve=ig(function(){Yr.sort(null)}),epe=Yve("sort"),fk=!ig(function(){if(gw)return gw<70;if(!(pw&&pw>3)){if(Xve)return!0;if(yw)return yw<603;var t="",n,e,r,i;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)Yr.push({k:e+i,v:r})}for(Yr.sort(function(a,o){return o.v-a.v}),i=0;i<Yr.length;i++)e=Yr[i].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),tpe=Jve||!Zve||!epe||!fk,rpe=function(t){return function(n,e){return e===void 0?-1:n===void 0?1:t!==void 0?+t(n,e)||0:vw(n)>vw(e)?1:-1}};Vve({target:"Array",proto:!0,forced:tpe},{sort:function(n){n!==void 0&&Uve(n);var e=Gve(this);if(fk)return n===void 0?mw(e):mw(e,n);var r=[],i=fw(e),a,o;for(o=0;o<i;o++)o in e&&Qve(r,e[o]);for(qve(r,rpe(n)),a=fw(r),o=0;o<a;)e[o]=r[o++];for(;o<i;)Kve(e,o++);return e}});var ipe=tt,npe=ipe("Array").sort,ape=Fe,ope=npe,Ld=Array.prototype,spe=function(t){var n=t.sort;return t===Ld||ape(Ld,t)&&n===Ld.sort?ope:n},upe=spe,lpe=upe;(function(t){t.exports=lpe})(Rve);var jd=V(Ev),Ov={},hpe={get exports(){return Ov},set exports(t){Ov=t}},dpe=Qi,cpe=Nt,fpe=ul,vpe=nr,ppe=TypeError,bw=function(t){return function(n,e,r,i){dpe(e);var a=cpe(n),o=fpe(a),s=vpe(a),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw ppe("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in o&&(i=e(i,o[u],u,a));return i}},gpe={left:bw(!1),right:bw(!0)},ype=Fr,mpe=typeof process<"u"&&ype(process)=="process",bpe=K,$pe=gpe.left,wpe=pa,$w=Ro,_pe=mpe,Epe=!_pe&&$w>79&&$w<83,Spe=Epe||!wpe("reduce");bpe({target:"Array",proto:!0,forced:Spe},{reduce:function(n){var e=arguments.length;return $pe(this,n,e,e>1?arguments[1]:void 0)}});var Ope=tt,Tpe=Ope("Array").reduce,kpe=Fe,Ppe=Tpe,zd=Array.prototype,Ipe=function(t){var n=t.reduce;return t===zd||kpe(zd,t)&&n===zd.reduce?Ppe:n},Cpe=Ipe,xpe=Cpe;(function(t){t.exports=xpe})(hpe);var vk=V(Ov),io={},Ape={get exports(){return io},set exports(t){io=t}},pk={};(function(t){(function(n,e){e(t)})(Oc,function(n){n.__esModule=!0,n.sort=$;function e(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}var r=32,i=7,a=256,o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function s(g){return g<1e5?g<100?g<10?0:1:g<1e4?g<1e3?2:3:4:g<1e7?g<1e6?5:6:g<1e9?g<1e8?7:8:9}function u(g,y){if(g===y)return 0;if(~~g===g&&~~y===y){if(g===0||y===0)return g<y?-1:1;if(g<0||y<0){if(y>=0)return-1;if(g>=0)return 1;g=-g,y=-y}var b=s(g),m=s(y),w=0;return b<m?(g*=o[m-b-1],y/=10,w=-1):b>m&&(y*=o[b-m-1],g/=10,w=1),g===y?w:g<y?-1:1}var E=String(g),T=String(y);return E===T?0:E<T?-1:1}function l(g){for(var y=0;g>=r;)y|=g&1,g>>=1;return g+y}function h(g,y,b,m){var w=y+1;if(w===b)return 1;if(m(g[w++],g[y])<0){for(;w<b&&m(g[w],g[w-1])<0;)w++;d(g,y,w)}else for(;w<b&&m(g[w],g[w-1])>=0;)w++;return w-y}function d(g,y,b){for(b--;y<b;){var m=g[y];g[y++]=g[b],g[b--]=m}}function c(g,y,b,m,w){for(m===y&&m++;m<b;m++){for(var E=g[m],T=y,O=m;T<O;){var _=T+O>>>1;w(E,g[_])<0?O=_:T=_+1}var S=m-T;switch(S){case 3:g[T+3]=g[T+2];case 2:g[T+2]=g[T+1];case 1:g[T+1]=g[T];break;default:for(;S>0;)g[T+S]=g[T+S-1],S--}g[T]=E}}function f(g,y,b,m,w,E){var T=0,O=0,_=1;if(E(g,y[b+w])>0){for(O=m-w;_<O&&E(g,y[b+w+_])>0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}else{for(O=w+1;_<O&&E(g,y[b+w-_])<=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var S=T;T=w-_,_=w-S}for(T++;T<_;){var C=T+(_-T>>>1);E(g,y[b+C])>0?T=C+1:_=C}return _}function v(g,y,b,m,w,E){var T=0,O=0,_=1;if(E(g,y[b+w])<0){for(O=w+1;_<O&&E(g,y[b+w-_])<0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var S=T;T=w-_,_=w-S}else{for(O=m-w;_<O&&E(g,y[b+w+_])>=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}for(T++;T<_;){var C=T+(_-T>>>1);E(g,y[b+C])<0?_=C:T=C+1}return _}var p=function(){function g(y,b){e(this,g),this.array=null,this.compare=null,this.minGallop=i,this.length=0,this.tmpStorageLength=a,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=y,this.compare=b,this.length=y.length,this.length<2*a&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return g.prototype.pushRun=function(b,m){this.runStart[this.stackSize]=b,this.runLength[this.stackSize]=m,this.stackSize+=1},g.prototype.mergeRuns=function(){for(;this.stackSize>1;){var b=this.stackSize-2;if(b>=1&&this.runLength[b-1]<=this.runLength[b]+this.runLength[b+1]||b>=2&&this.runLength[b-2]<=this.runLength[b]+this.runLength[b-1])this.runLength[b-1]<this.runLength[b+1]&&b--;else if(this.runLength[b]>this.runLength[b+1])break;this.mergeAt(b)}},g.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var b=this.stackSize-2;b>0&&this.runLength[b-1]<this.runLength[b+1]&&b--,this.mergeAt(b)}},g.prototype.mergeAt=function(b){var m=this.compare,w=this.array,E=this.runStart[b],T=this.runLength[b],O=this.runStart[b+1],_=this.runLength[b+1];this.runLength[b]=T+_,b===this.stackSize-3&&(this.runStart[b+1]=this.runStart[b+2],this.runLength[b+1]=this.runLength[b+2]),this.stackSize--;var S=v(w[O],w,E,T,0,m);E+=S,T-=S,T!==0&&(_=f(w[E+T-1],w,O,_,_-1,m),_!==0&&(T<=_?this.mergeLow(E,T,O,_):this.mergeHigh(E,T,O,_)))},g.prototype.mergeLow=function(b,m,w,E){var T=this.compare,O=this.array,_=this.tmp,S=0;for(S=0;S<m;S++)_[S]=O[b+S];var C=0,L=w,B=b;if(O[B++]=O[L++],--E===0){for(S=0;S<m;S++)O[B+S]=_[C+S];return}if(m===1){for(S=0;S<E;S++)O[B+S]=O[L+S];O[B+E]=_[C];return}for(var Q=this.minGallop;;){var ne=0,ie=0,le=!1;do if(T(O[L],_[C])<0){if(O[B++]=O[L++],ie++,ne=0,--E===0){le=!0;break}}else if(O[B++]=_[C++],ne++,ie=0,--m===1){le=!0;break}while((ne|ie)<Q);if(le)break;do{if(ne=v(O[L],_,C,m,0,T),ne!==0){for(S=0;S<ne;S++)O[B+S]=_[C+S];if(B+=ne,C+=ne,m-=ne,m<=1){le=!0;break}}if(O[B++]=O[L++],--E===0){le=!0;break}if(ie=f(_[C],O,L,E,0,T),ie!==0){for(S=0;S<ie;S++)O[B+S]=O[L+S];if(B+=ie,L+=ie,E-=ie,E===0){le=!0;break}}if(O[B++]=_[C++],--m===1){le=!0;break}Q--}while(ne>=i||ie>=i);if(le)break;Q<0&&(Q=0),Q+=2}if(this.minGallop=Q,Q<1&&(this.minGallop=1),m===1){for(S=0;S<E;S++)O[B+S]=O[L+S];O[B+E]=_[C]}else{if(m===0)throw new Error("mergeLow preconditions were not respected");for(S=0;S<m;S++)O[B+S]=_[C+S]}},g.prototype.mergeHigh=function(b,m,w,E){var T=this.compare,O=this.array,_=this.tmp,S=0;for(S=0;S<E;S++)_[S]=O[w+S];var C=b+m-1,L=E-1,B=w+E-1,Q=0,ne=0;if(O[B--]=O[C--],--m===0){for(Q=B-(E-1),S=0;S<E;S++)O[Q+S]=_[S];return}if(E===1){for(B-=m,C-=m,ne=B+1,Q=C+1,S=m-1;S>=0;S--)O[ne+S]=O[Q+S];O[B]=_[L];return}for(var ie=this.minGallop;;){var le=0,be=0,Ee=!1;do if(T(_[L],O[C])<0){if(O[B--]=O[C--],le++,be=0,--m===0){Ee=!0;break}}else if(O[B--]=_[L--],be++,le=0,--E===1){Ee=!0;break}while((le|be)<ie);if(Ee)break;do{if(le=m-v(_[L],O,b,m,m-1,T),le!==0){for(B-=le,C-=le,m-=le,ne=B+1,Q=C+1,S=le-1;S>=0;S--)O[ne+S]=O[Q+S];if(m===0){Ee=!0;break}}if(O[B--]=_[L--],--E===1){Ee=!0;break}if(be=E-f(O[C],_,0,E,E-1,T),be!==0){for(B-=be,L-=be,E-=be,ne=B+1,Q=L+1,S=0;S<be;S++)O[ne+S]=_[Q+S];if(E<=1){Ee=!0;break}}if(O[B--]=O[C--],--m===0){Ee=!0;break}ie--}while(le>=i||be>=i);if(Ee)break;ie<0&&(ie=0),ie+=2}if(this.minGallop=ie,ie<1&&(this.minGallop=1),E===1){for(B-=m,C-=m,ne=B+1,Q=C+1,S=m-1;S>=0;S--)O[ne+S]=O[Q+S];O[B]=_[L]}else{if(E===0)throw new Error("mergeHigh preconditions were not respected");for(Q=B-(E-1),S=0;S<E;S++)O[Q+S]=_[S]}},g}();function $(g,y,b,m){if(!Array.isArray(g))throw new TypeError("Can only sort arrays");y?typeof y!="function"&&(m=b,b=y,y=u):y=u,b||(b=0),m||(m=g.length);var w=m-b;if(!(w<2)){var E=0;if(w<r){E=h(g,b,m,y),c(g,b,m,b+E,y);return}var T=new p(g,y),O=l(w);do{if(E=h(g,b,m,y),E<O){var _=w;_>O&&(_=O),c(g,b,b+_,b+E,y),E=_}T.pushRun(b,E),T.mergeRuns(),w-=E,b+=E}while(w!==0);T.forceMergeRuns()}}})})(pk);(function(t){t.exports=pk})(Ape);var ww=V(io);function gk(t){var n=Rpe();return function(){var r=z(t),i;if(n){var a=z(this).constructor;i=P(r,arguments,a)}else i=r.apply(this,arguments);return ve(this,i)}}function Rpe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var yk=function(){function t(){N(this,t)}return F(t,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,r,i),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,r){this.fake_use(e,r),this.abstract()}},{key:"shift",value:function(e,r){this.fake_use(e,r),this.abstract()}}]),t}(),Dpe=function(t){he(e,t);var n=gk(e);function e(r){var i;return N(this,e),i=n.call(this),i.layout=r,i}return F(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(i){return i.x}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.x=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(i){io.sort(i,function(a,o){return a.x-o.x})}},{key:"fix",value:function(i,a){i.y=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.y=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].x+=a}}]),e}(yk),Mpe=function(t){he(e,t);var n=gk(e);function e(r){var i;return N(this,e),i=n.call(this),i.layout=r,i}return F(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(i){return i.y}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.y=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(i){io.sort(i,function(a,o){return a.y-o.y})}},{key:"fix",value:function(i,a){i.x=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.x=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].y+=a}}]),e}(yk),Tv={},Npe={get exports(){return Tv},set exports(t){Tv=t}},Fpe=K,Bpe=hi.every,Lpe=pa,jpe=Lpe("every");Fpe({target:"Array",proto:!0,forced:!jpe},{every:function(n){return Bpe(this,n,arguments.length>1?arguments[1]:void 0)}});var zpe=tt,Hpe=zpe("Array").every,Wpe=Fe,Vpe=Hpe,Hd=Array.prototype,Upe=function(t){var n=t.every;return t===Hd||Wpe(Hd,t)&&n===Hd.every?Vpe:n},Gpe=Upe,Kpe=Gpe;(function(t){t.exports=Kpe})(Npe);var mk=V(Tv);function qpe(t,n){var e=typeof ci<"u"&&Br(t)||t["@@iterator"];if(!e){if(ce(t)||(e=Ype(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
97
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Ype(t,n){var e;if(t){if(typeof t=="string")return _w(t,n);var r=ot(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return en(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _w(t,n)}}function _w(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Xpe(t,n){var e=new Ei;return pe(t).call(t,function(r){var i;pe(i=r.edges).call(i,function(a){a.connected&&e.add(a)})}),pe(e).call(e,function(r){var i=r.from.id,a=r.to.id;n[i]==null&&(n[i]=0),(n[a]==null||n[i]>=n[a])&&(n[a]=n[i]+1)}),n}function Qpe(t){return bk(function(n){var e,r;return mk(e=Ot(r=n.edges).call(r,function(i){return t.has(i.toId)})).call(e,function(i){return i.to===n})},function(n,e){return e>n},"from",t)}function Jpe(t){return bk(function(n){var e,r;return mk(e=Ot(r=n.edges).call(r,function(i){return t.has(i.toId)})).call(e,function(i){return i.from===n})},function(n,e){return e<n},"to",t)}function bk(t,n,e,r){var i,a=Ai(null),o=vk(i=hr(KT(r).call(r))).call(i,function(f,v){return f+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=qpe(r),h;try{var d=function(){var v=ke(h.value,2),p=v[0],$=v[1];if(!r.has(p)||!t($))return"continue";a[p]=0;for(var g=[$],y=0,b,m=function(){var T,O;if(!r.has(p))return"continue";var _=a[b.id]+u;if(pe(T=Ot(O=b.edges).call(O,function(S){return S.connected&&S.to!==S.from&&S[e]!==b&&r.has(S.toId)&&r.has(S.fromId)})).call(T,function(S){var C=S[s],L=a[C];(L==null||n(_,L))&&(a[C]=_,g.push(S[e]))}),y>o)return{v:{v:Xpe(r,a)}};++y};b=g.pop();){var w=m();if(w!=="continue"&&de(w)==="object")return w.v}};for(l.s();!(h=l.n()).done;){var c=d();if(c!=="continue"&&de(c)==="object")return c.v}}catch(f){l.e(f)}finally{l.f()}return a}var Zpe=function(){function t(){N(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return F(t,[{key:"addRelation",value:function(e,r){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(r),this.parentReference[r]===void 0&&(this.parentReference[r]=[]),this.parentReference[r].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,r){r!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=r,this.treeIndex=Math.max(r,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var r=this,i={},a=function o(s){if(i[s]!==void 0)return i[s];var u=r.levels[s];if(r.childrenReference[s]){var l=r.childrenReference[s];if(l.length>0)for(var h=0;h<l.length;h++)u=Math.max(u,o(l[h]))}return i[s]=u,u};return a(e)}},{key:"levelDownstream",value:function(e,r){this.levels[r.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[r.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var r=1e9;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&this.levels[i]!==void 0&&(r=Math.min(this.levels[i],r));for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(this.levels[a]-=r)}},{key:"getTreeSize",value:function(e,r){var i=1e9,a=-1e9,o=1e9,s=-1e9;for(var u in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,u)&&this.trees[u]===r){var l=e[u];i=Math.min(l.x,i),a=Math.max(l.x,a),o=Math.min(l.y,o),s=Math.max(l.y,s)}return{min_x:i,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,r){var i=this.parentReference[e.id],a=this.parentReference[r.id];if(i===void 0||a===void 0)return!1;for(var o=0;o<i.length;o++)for(var s=0;s<a.length;s++)if(i[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,r){return this.trees[e.id]===this.trees[r.id]}},{key:"getLevels",value:function(){return Oe(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,r){this.distributionOrdering[r]===void 0&&(this.distributionOrdering[r]=[]);var i=!1,a=this.distributionOrdering[r];for(var o in a)if(a[o]===e){i=!0;break}i||(this.distributionOrdering[r].push(e),this.distributionIndex[e.id]=this.distributionOrdering[r].length-1)}}]),t}(),ege=function(){function t(n){N(this,t),this.body=n,this._resetRNG(Math.random()+":"+Eu()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},je(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){e.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(e.options.hierarchical.enabled===!0){var r=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",r,!1)}})}},{key:"setOptions",value:function(e,r){if(e!==void 0){var i=this.options.hierarchical,a=i.enabled;if(ya(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Lt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return a===!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(r);if(a===!0)return this.body.emitter.emit("refresh"),ye(r,this.optionsBackup)}return r}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=xl(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var r=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:r.enabled===void 0?!0:r.enabled,solver:"hierarchicalRepulsion"},r.enabled=r.enabled===void 0?!0:r.enabled,r.solver=r.solver||"barnesHut"):de(e.physics)==="object"?(r.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,r.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(r.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var 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{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(i=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:i,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var r=e.length+50,i=0;i<e.length;i++){var a=e[i],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=r*Math.cos(o)),a.y===void 0&&(a.y=r*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,r=0,i=0;i<e.length;i++){var a=this.body.nodes[e[i]];a.predefinedPosition===!0&&(r+=1)}if(r<.5*e.length){var o=10,s=0,u=this.options.clusterThreshold,l={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>u){for(var h=e.length;e.length>u&&s<=o;){s+=1;var d=e.length;s%3===0?this.body.modules.clustering.clusterBridges(l):this.body.modules.clustering.clusterOutliers(l);var c=e.length;if(d==c&&s%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*h)})}s>o&&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();for(var f=70,v=0;v<e.length;v++){var p=this.body.nodes[e[v]];p.predefinedPosition===!1&&(p.x+=(.5-this._rng())*f,p.y+=(.5-this._rng())*f)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=ft.getRangeCore(this.body.nodes,this.body.nodeIndices),r=ft.findCenter(e),i=0;i<this.body.nodeIndices.length;i++){var a=this.body.nodes[this.body.nodeIndices[i]];a.x-=r.x,a.y-=r.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var r=0;r<this.body.nodeIndices.length;r++)this.body.nodes[this.body.nodeIndices[r]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[r],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){var e,r,i=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new Zpe;for(r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&(e=this.body.nodes[r],e.options.level!==void 0?(i=!0,this.hierarchical.levels[r]=e.options.level):a=!0);if(a===!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(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var u=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(u),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,r=!1,i={},a=function(){for(var b=s(),m=0,w=0;w<b.length-1;w++){var E=b[w].max-b[w+1].min;m+=E+e.options.hierarchical.treeSpacing,o(w+1,m)}},o=function(b,m){var w=e.hierarchical.trees;for(var E in w)Object.prototype.hasOwnProperty.call(w,E)&&w[E]===b&&e.direction.shift(E,m)},s=function(){for(var b=[],m=0;m<e.hierarchical.numTrees();m++)b.push(e.direction.getTreeSize(m));return b},u=function y(b,m){if(!m[b.id]&&(m[b.id]=!0,e.hierarchical.childrenReference[b.id])){var w=e.hierarchical.childrenReference[b.id];if(w.length>0)for(var E=0;E<w.length;E++)y(e.body.nodes[w[E]],m)}},l=function(b){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,w=1e9,E=1e9,T=1e9,O=-1e9;for(var _ in b)if(Object.prototype.hasOwnProperty.call(b,_)){var S=e.body.nodes[_],C=e.hierarchical.levels[S.id],L=e.direction.getPosition(S),B=e._getSpaceAroundNode(S,b),Q=ke(B,2),ne=Q[0],ie=Q[1];w=Math.min(ne,w),E=Math.min(ie,E),C<=m&&(T=Math.min(L,T),O=Math.max(L,O))}return[T,O,w,E]},h=function(b,m){var w=e.hierarchical.getMaxLevel(b.id),E=e.hierarchical.getMaxLevel(m.id);return Math.min(w,E)},d=function(b,m,w){for(var E=e.hierarchical,T=0;T<m.length;T++){var O=m[T],_=E.distributionOrdering[O];if(_.length>1)for(var S=0;S<_.length-1;S++){var C=_[S],L=_[S+1];E.hasSameParent(C,L)&&E.inSameSubNetwork(C,L)&&b(C,L,w)}}},c=function(b,m){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,E=e.direction.getPosition(b),T=e.direction.getPosition(m),O=Math.abs(T-E),_=e.options.hierarchical.nodeSpacing;if(O>_){var S={},C={};u(b,S),u(m,C);var L=h(b,m),B=l(S,L),Q=l(C,L),ne=B[1],ie=Q[0],le=Q[2],be=Math.abs(ne-ie);if(be>_){var Ee=ne-ie+_;Ee<-le+_&&(Ee=-le+_),Ee<0&&(e._shiftBlock(m.id,Ee),r=!0,w===!0&&e._centerParent(m))}}},f=function(b,m){for(var w=m.id,E=m.edges,T=e.hierarchical.levels[m.id],O=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,_={},S=[],C=0;C<E.length;C++){var L=E[C];if(L.toId!=L.fromId){var B=L.toId==w?L.from:L.to;_[E[C].id]=B,e.hierarchical.levels[B.id]<T&&S.push(L)}}var Q=function(rt,we){for(var Ae=0,R=0;R<we.length;R++)if(_[we[R].id]!==void 0){var I=e.direction.getPosition(_[we[R].id])-rt;Ae+=I/Math.sqrt(I*I+O)}return Ae},ne=function(rt,we){for(var Ae=0,R=0;R<we.length;R++)if(_[we[R].id]!==void 0){var I=e.direction.getPosition(_[we[R].id])-rt;Ae-=O*Math.pow(I*I+O,-1.5)}return Ae},ie=function(rt,we){for(var Ae=e.direction.getPosition(m),R={},I=0;I<rt;I++){var D=Q(Ae,we),j=ne(Ae,we),U=40,q=Math.max(-U,Math.min(U,Math.round(D/j)));if(Ae=Ae-q,R[Ae]!==void 0)break;R[Ae]=I}return Ae},le=function(rt){var we=e.direction.getPosition(m);if(i[m.id]===void 0){var Ae={};u(m,Ae),i[m.id]=Ae}var R=l(i[m.id]),I=R[2],D=R[3],j=rt-we,U=0;j>0?U=Math.min(j,D-e.options.hierarchical.nodeSpacing):j<0&&(U=-Math.min(-j,I-e.options.hierarchical.nodeSpacing)),U!=0&&(e._shiftBlock(m.id,U),r=!0)},be=function(rt){var we=e.direction.getPosition(m),Ae=e._getSpaceAroundNode(m),R=ke(Ae,2),I=R[0],D=R[1],j=rt-we,U=we;j>0?U=Math.min(we+(D-e.options.hierarchical.nodeSpacing),rt):j<0&&(U=Math.max(we-(I-e.options.hierarchical.nodeSpacing),rt)),U!==we&&(e.direction.setPosition(m,U),r=!0)},Ee=ie(b,S);le(Ee),Ee=ie(b,E),be(Ee)},v=function(b){var m=e.hierarchical.getLevels();m=xi(m).call(m);for(var w=0;w<b;w++){r=!1;for(var E=0;E<m.length;E++)for(var T=m[E],O=e.hierarchical.distributionOrdering[T],_=0;_<O.length;_++)f(1e3,O[_]);if(r!==!0)break}},p=function(b){var m=e.hierarchical.getLevels();m=xi(m).call(m);for(var w=0;w<b&&(r=!1,d(c,m,!0),r===!0);w++);},$=function(){for(var b in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,b)&&e._centerParent(e.body.nodes[b])},g=function(){var b=e.hierarchical.getLevels();b=xi(b).call(b);for(var m=0;m<b.length;m++)for(var w=b[m],E=e.hierarchical.distributionOrdering[w],T=0;T<E.length;T++)e._centerParent(E[T])};this.options.hierarchical.blockShifting===!0&&(p(5),$()),this.options.hierarchical.edgeMinimization===!0&&v(20),this.options.hierarchical.parentCentralization===!0&&g(),a()}},{key:"_getSpaceAroundNode",value:function(e,r){var i=!0;r===void 0&&(i=!1);var a=this.hierarchical.levels[e.id];if(a!==void 0){var o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),u=this.hierarchical.distributionOrdering[a],l=1e9,h=1e9;if(o!==0){var d=u[o-1];if(i===!0&&r[d.id]===void 0||i===!1){var c=this.direction.getPosition(d);l=s-c}}if(o!=u.length-1){var f=u[o+1];if(i===!0&&r[f.id]===void 0||i===!1){var v=this.direction.getPosition(f);h=Math.min(h,v-s)}}return[l,h]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var r=this.hierarchical.parentReference[e.id],i=0;i<r.length;i++){var a=r[i],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var u=this._getCenterPosition(s),l=this.direction.getPosition(o),h=this._getSpaceAroundNode(o),d=ke(h,2),c=d[0],f=d[1],v=l-u;(v<0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<c-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,u)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i,a=Oe(e[r]);a=this._indexArrayToNodes(a),jd(i=this.direction).call(i,a);for(var o=0,s=0;s<a.length;s++){var u=a[s];if(this.positionedNodes[u.id]===void 0){var l=this.options.hierarchical.nodeSpacing,h=l*o;o>0&&(h=this.direction.getPosition(a[s-1])+l),this.direction.setPosition(u,h,r),this._validatePositionAndContinue(u,r,h),o++}}}}},{key:"_placeBranchNodes",value:function(e,r){var i,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;s<a.length;s++)o.push(this.body.nodes[a[s]]);jd(i=this.direction).call(i,o);for(var u=0;u<o.length;u++){var l=o[u],h=this.hierarchical.levels[l.id];if(h>r&&this.positionedNodes[l.id]===void 0){var d=this.options.hierarchical.nodeSpacing,c=void 0;u===0?c=this.direction.getPosition(this.body.nodes[e]):c=this.direction.getPosition(o[u-1])+d,this.direction.setPosition(l,c,h),this._validatePositionAndContinue(l,h,c)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,r)}}},{key:"_validatePositionAndContinue",value:function(e,r,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[r]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[r]]);if(i-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-i,s=this._findCommonParent(this.lastNodeOnLevel[r],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[r]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,r)}}},{key:"_indexArrayToNodes",value:function(e){for(var r=[],i=0;i<e.length;i++)r.push(this.body.nodes[e[i]]);return r}},{key:"_getDistribution",value:function(){var e={},r,i;for(r in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,r)){i=this.body.nodes[r];var a=this.hierarchical.levels[r]===void 0?0:this.hierarchical.levels[r];this.direction.fix(i,a),e[a]===void 0&&(e[a]={}),e[a][r]=i}return e}},{key:"_getActiveEdges",value:function(e){var r=this,i=[];return re(e.edges,function(a){var o;oe(o=r.body.edgeIndices).call(o,a.id)!==-1&&i.push(a)}),i}},{key:"_getHubSizes",value:function(){var e=this,r={},i=this.body.nodeIndices;re(i,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;r[u]=!0});var a=[];return re(r,function(o){a.push(Number(o))}),jd(ww).call(ww,a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,r=function(l,h){e.hierarchical.levelDownstream(l,h)},i=this._getHubSizes(),a=function(){var l=i[o];if(l===0)return"break";re(e.body.nodeIndices,function(h){var d=e.body.nodes[h];l===e._getActiveEdges(d).length&&e._crawlNetwork(r,h)})},o=0;o<i.length;++o){var s=a();if(s==="break")break}}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,r=1e5,i=function(s,u,l){},a=function(s,u,l){var h=e.hierarchical.levels[s.id];h===void 0&&(h=e.hierarchical.levels[s.id]=r);var d=i(ft.cloneOptions(s,"node"),ft.cloneOptions(u,"node"),ft.cloneOptions(l,"edge"));e.hierarchical.levels[u.id]=h+d};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,r=this,i=vk(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,r.body.nodes[o]),a},new WT);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Jpe(i):this.hierarchical.levels=Qpe(i),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,r=function(a,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(r),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0,a={},o=function c(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var p,$=e._getActiveEdges(f),g=0;g<$.length;g++){var y=$[g];y.connected===!0&&(y.toId==f.id?p=y.from:p=y.to,f.id!=p.id&&(r(f,p,y),c(p,v)))}}};if(i===void 0)for(var s=0,u=0;u<this.body.nodeIndices.length;u++){var l=this.body.nodeIndices[u];if(a[l]===void 0){var h=this.body.nodes[l];o(h,s),s+=1}}else{var d=this.body.nodes[i];if(d===void 0){console.error("Node not found:",i);return}o(d)}}},{key:"_shiftBlock",value:function(e,r){var i=this,a={},o=function s(u){if(!a[u]){a[u]=!0,i.direction.shift(u,r);var l=i.hierarchical.childrenReference[u];if(l!==void 0)for(var h=0;h<l.length;h++)s(l[h])}};o(e)}},{key:"_findCommonParent",value:function(e,r){var i=this,a={},o=function u(l,h){var d=i.hierarchical.parentReference[h];if(d!==void 0)for(var c=0;c<d.length;c++){var f=d[c];l[f]=!0,u(l,f)}},s=function u(l,h){var d=i.hierarchical.parentReference[h];if(d!==void 0)for(var c=0;c<d.length;c++){var f=d[c];if(l[f]!==void 0)return{foundParent:f,withChild:h};var v=u(l,f);if(v.foundParent!==null)return v}return{foundParent:null,withChild:h}};return o(a,e),s(a,r)}},{key:"setDirectionStrategy",value:function(){var e=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";e?this.direction=new Dpe(this):this.direction=new Mpe(this)}},{key:"_getCenterPosition",value:function(e){for(var r=1e9,i=-1e9,a=0;a<e.length;a++){var o=void 0;if(e[a].id!==void 0)o=e[a];else{var s=e[a];o=this.body.nodes[s]}var u=this.direction.getPosition(o);r=Math.min(r,u),i=Math.max(i,u)}return .5*(r+i)}}]),t}();function tge(t,n){var e=typeof ci<"u"&&Br(t)||t["@@iterator"];if(!e){if(ce(t)||(e=rge(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function rge(t,n){var e;if(t){if(typeof t=="string")return Ew(t,n);var r=ot(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return en(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ew(t,n)}}function Ew(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var ige=function(){function t(n,e,r,i){var a=this,o,s;N(this,t),this.body=n,this.canvas=e,this.selectionHandler=r,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},je(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",A(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",A(s=this._restore).call(s,this))}return F(t,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,r,i){r!==void 0&&(r.locale!==void 0?this.options.locale=r.locale:this.options.locale=i.locale,r.locales!==void 0?this.options.locales=r.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,ye(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){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())}},{key:"disableEditMode",value:function(){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())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,r;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var i=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=i+a,s=this.options.locales[this.options.locale],u=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),u=!0),this.options.addEdge!==!1&&(u===!0?this._createSeperator(1):u=!0,this._createAddEdgeButton(s)),i===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(s)):a===1&&i===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(s)),o!==0&&(i>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):i===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,A(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",A(r=this.showManipulatorToolbar).call(r,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var r,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,A(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",A(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var r=this.selectionHandler.getSelectedNodes()[0];if(r!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(r.isCluster!==!0){var i=ye({},r.options,!1);if(i.x=r.x,i.y=r.y,this.options.editNode.length===2)this.options.editNode(i,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.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()}},{key:"addEdgeMode",value:function(){var e,r,i,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,u=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(u),this._createSeperator(),this._createDescription(u.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,A(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",A(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",A(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",A(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",A(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",A(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",de(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var r,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,A(r=this.toggleEditMode).call(r,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],h=this._getNewTargetNode(l.from.x,l.from.y),d=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(h.id),this.temporaryIds.nodes.push(d.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this._temporaryBindUI("onTouch",A(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",A(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",A(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",A(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(c){var f=l.edgeType.findBorderPositions(c);h.selected===!1&&(h.x=f.from.x,h.y=f.from.y),d.selected===!1&&(d.x=f.to.x,d.y=f.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var r=this.selectionHandler.getSelectedNodeIds(),i=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(r.length>0){for(var o=0;o<r.length;o++)if(this.body.nodes[r[o]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(a=this.options.deleteNode)}else i.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:r,edges:i};if(a.length===2)a(s,function(u){u!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(u.edges),e.body.data.nodes.getDataSet().remove(u.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(r),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){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,r;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(r=this.options.locales[this.options.locale])===null||r===void 0?void 0:r.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)}}},{key:"_getNewTargetNode",value:function(e,r){var i=ye({},this.options.controlNodeStyle);i.id="targetNode"+Fa(),i.hidden=!1,i.physics=!1,i.x=e,i.y=r;var a=this.body.functions.createNode(i);return a.shape.boundingBox={left:e,right:e,top:r,bottom:r},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Vr(this.editModeDiv);var r=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",r.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,A(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Vr(this.editModeDiv),Vr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,r=tge(Tr(e=this._domEventListenerCleanupQueue).call(e,0)),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;a()}}catch(o){r.e(o)}finally{r.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Vr(this.manipulationDiv),Vr(this.editModeDiv),Vr(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}},{key:"_createSeperator",value:function(){var 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])}},{key:"_createAddNodeButton",value:function(e){var r,i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(r=this.addNodeMode).call(r,this))}},{key:"_createAddEdgeButton",value:function(e){var r,i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(r=this.addEdgeMode).call(r,this))}},{key:"_createEditNodeButton",value:function(e){var r,i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(r=this.editNode).call(r,this))}},{key:"_createEditEdgeButton",value:function(e){var r,i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(r=this.editEdgeMode).call(r,this))}},{key:"_createDeleteButton",value:function(e){var r,i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";var a=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,A(r=this.deleteSelected).call(r,this))}},{key:"_createBackButton",value:function(e){var r,i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(r=this.showManipulatorToolbar).call(r,this))}},{key:"_createButton",value:function(e,r,i){var a=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 "+r,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,r){this.temporaryEventFunctions.push({event:e,boundFunction:r}),this.body.emitter.on(e,r)}},{key:"_temporaryBindUI",value:function(e,r){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=r;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Ko(Oe(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e<this.temporaryEventFunctions.length;e++){var r=this.temporaryEventFunctions[e].event,i=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(r,i)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,r){var i=new xn(e,{});xu(i,r),this._domEventListenerCleanupQueue.push(function(){i.destroy()});var a=function(s){var u=s.keyCode,l=s.key;(l==="Enter"||l===" "||u===13||u===32)&&r()};e.addEventListener("keyup",a,!1),this._domEventListenerCleanupQueue.push(function(){e.removeEventListener("keyup",a,!1)})}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){var r;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var i=oe(r=this.body.edgeIndices).call(r,this.temporaryIds.edges[e]);if(i!==-1){var a;Tr(a=this.body.edgeIndices).call(a,i,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var u=oe(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(u!==-1){var l;Tr(l=this.body.nodeIndices).call(l,u,1)}}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=je({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,r=this.selectionHandler._pointerToPositionObject(e),i=this.body.nodes[this.temporaryIds.nodes[0]],a=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var s=i.isOverlappingWith(r),u=a.isOverlappingWith(r);s===!0?(this.selectedControlNode=i,o.edgeType.from=i):u===!0&&(this.selectedControlNode=a,o.edgeType.to=a),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(e){this.body.emitter.emit("disablePhysics");var r=this.body.functions.getPointer(e.center),i=this.canvas.DOMtoCanvas(r);this.selectedControlNode!==void 0?(this.selectedControlNode.x=i.x,this.selectedControlNode.y=i.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var r=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(r),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,u=o.length-1;u>=0;u--)if(o[u]!==this.selectedControlNode.id){s=this.body.nodes[o[u]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var l=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===l.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=je({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var r=this.lastTouch,i=this.selectionHandler.getNodeAt(r);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(i.x,i.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Fa(),from:i.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var r=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,u=o.length-1;u>=0;u--){var l;if(oe(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,r),this.temporaryIds.nodes[0]!==void 0){var h=this.body.nodes[this.temporaryIds.nodes[0]];h.x=this.canvas._XconvertDOMtoCanvas(r.x),h.y=this.canvas._YconvertDOMtoCanvas(r.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var r=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,u=o.length-1;u>=0;u--){var l;if(oe(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,r),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var r=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,r,void 0,!0)}},{key:"_performAddNode",value:function(e){var r=this,i={id:Fa(),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(i,function(a){a!=null&&r.inMode==="addNode"&&r.body.data.nodes.getDataSet().add(a),r.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(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,r){var i=this,a={from:e,to:r};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&i.inMode==="addEdge"&&(i.body.data.edges.getDataSet().add(o),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,r){var i=this,a={id:this.edgeBeingEditedId,from:e,to:r,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(de(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||i.inMode!=="editEdge"?(i.body.edges[a.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(s),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}(),M="string",x="boolean",k="number",Pa="array",W="object",$k="dom",nge="any",Wd=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Vd={borderWidth:{number:k},borderWidthSelected:{number:k,undefined:"undefined"},brokenImage:{string:M,undefined:"undefined"},chosen:{label:{boolean:x,function:"function"},node:{boolean:x,function:"function"},__type__:{object:W,boolean:x}},color:{border:{string:M},background:{string:M},highlight:{border:{string:M},background:{string:M},__type__:{object:W,string:M}},hover:{border:{string:M},background:{string:M},__type__:{object:W,string:M}},__type__:{object:W,string:M}},opacity:{number:k,undefined:"undefined"},fixed:{x:{boolean:x},y:{boolean:x},__type__:{object:W,boolean:x}},font:{align:{string:M},color:{string:M},size:{number:k},face:{string:M},background:{string:M},strokeWidth:{number:k},strokeColor:{string:M},vadjust:{number:k},multi:{boolean:x,string:M},bold:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},__type__:{object:W,string:M}},group:{string:M,number:k,undefined:"undefined"},heightConstraint:{minimum:{number:k},valign:{string:M},__type__:{object:W,boolean:x,number:k}},hidden:{boolean:x},icon:{face:{string:M},code:{string:M},size:{number:k},color:{string:M},weight:{string:M,number:k},__type__:{object:W}},id:{string:M,number:k},image:{selected:{string:M,undefined:"undefined"},unselected:{string:M,undefined:"undefined"},__type__:{object:W,string:M}},imagePadding:{top:{number:k},right:{number:k},bottom:{number:k},left:{number:k},__type__:{object:W,number:k}},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:x},level:{number:k,undefined:"undefined"},margin:{top:{number:k},right:{number:k},bottom:{number:k},left:{number:k},__type__:{object:W,number:k}},mass:{number:k},physics:{boolean:x},scaling:{min:{number:k},max:{number:k},label:{enabled:{boolean:x},min:{number:k},max:{number:k},maxVisible:{number:k},drawThreshold:{number:k},__type__:{object:W,boolean:x}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:x},color:{string:M},size:{number:k},x:{number:k},y:{number:k},__type__:{object:W,boolean:x}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:x,array:Pa},borderRadius:{number:k},interpolation:{boolean:x},useImageSize:{boolean:x},useBorderWithImage:{boolean:x},coordinateOrigin:{string:["center","top-left"]},__type__:{object:W}},size:{number:k},title:{string:M,dom:$k,undefined:"undefined"},value:{number:k,undefined:"undefined"},widthConstraint:{minimum:{number:k},maximum:{number:k},__type__:{object:W,boolean:x,number:k}},x:{number:k},y:{number:k},__type__:{object:W}},age={configure:{enabled:{boolean:x},filter:{boolean:x,string:M,array:Pa,function:"function"},container:{dom:$k},showButton:{boolean:x},__type__:{object:W,boolean:x,string:M,array:Pa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:x},scaleFactor:{number:k},type:{string:Wd},imageHeight:{number:k},imageWidth:{number:k},src:{string:M},__type__:{object:W,boolean:x}},middle:{enabled:{boolean:x},scaleFactor:{number:k},type:{string:Wd},imageWidth:{number:k},imageHeight:{number:k},src:{string:M},__type__:{object:W,boolean:x}},from:{enabled:{boolean:x},scaleFactor:{number:k},type:{string:Wd},imageWidth:{number:k},imageHeight:{number:k},src:{string:M},__type__:{object:W,boolean:x}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:k},to:{number:k},__type__:{object:W,number:k}},arrowStrikethrough:{boolean:x},background:{enabled:{boolean:x},color:{string:M},size:{number:k},dashes:{boolean:x,array:Pa},__type__:{object:W,boolean:x}},chosen:{label:{boolean:x,function:"function"},edge:{boolean:x,function:"function"},__type__:{object:W,boolean:x}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:x},opacity:{number:k},__type__:{object:W,string:M}},dashes:{boolean:x,array:Pa},font:{color:{string:M},size:{number:k},face:{string:M},background:{string:M},strokeWidth:{number:k},strokeColor:{string:M},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:k},multi:{boolean:x,string:M},bold:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:k},face:{string:M},mod:{string:M},vadjust:{number:k},__type__:{object:W,string:M}},__type__:{object:W,string:M}},hidden:{boolean:x},hoverWidth:{function:"function",number:k},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:x},length:{number:k,undefined:"undefined"},physics:{boolean:x},scaling:{min:{number:k},max:{number:k},label:{enabled:{boolean:x},min:{number:k},max:{number:k},maxVisible:{number:k},drawThreshold:{number:k},__type__:{object:W,boolean:x}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:k},selfReferenceSize:{number:k},selfReference:{size:{number:k},angle:{number:k},renderBehindTheNode:{boolean:x},__type__:{object:W}},shadow:{enabled:{boolean:x},color:{string:M},size:{number:k},x:{number:k},y:{number:k},__type__:{object:W,boolean:x}},smooth:{enabled:{boolean:x},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:k},forceDirection:{string:["horizontal","vertical","none"],boolean:x},__type__:{object:W,boolean:x}},title:{string:M,undefined:"undefined"},width:{number:k},widthConstraint:{maximum:{number:k},__type__:{object:W,boolean:x,number:k}},value:{number:k,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:x},__any__:Vd,__type__:{object:W}},interaction:{dragNodes:{boolean:x},dragView:{boolean:x},hideEdgesOnDrag:{boolean:x},hideEdgesOnZoom:{boolean:x},hideNodesOnDrag:{boolean:x},hover:{boolean:x},keyboard:{enabled:{boolean:x},speed:{x:{number:k},y:{number:k},zoom:{number:k},__type__:{object:W}},bindToWindow:{boolean:x},autoFocus:{boolean:x},__type__:{object:W,boolean:x}},multiselect:{boolean:x},navigationButtons:{boolean:x},selectable:{boolean:x},selectConnectedEdges:{boolean:x},hoverConnectedEdges:{boolean:x},tooltipDelay:{number:k},zoomView:{boolean:x},zoomSpeed:{number:k},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:k,string:M},improvedLayout:{boolean:x},clusterThreshold:{number:k},hierarchical:{enabled:{boolean:x},levelSeparation:{number:k},nodeSpacing:{number:k},treeSpacing:{number:k},blockShifting:{boolean:x},edgeMinimization:{boolean:x},parentCentralization:{boolean:x},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:x}},__type__:{object:W}},manipulation:{enabled:{boolean:x},initiallyActive:{boolean:x},addNode:{boolean:x,function:"function"},addEdge:{boolean:x,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:x,function:"function"}},deleteNode:{boolean:x,function:"function"},deleteEdge:{boolean:x,function:"function"},controlNodeStyle:Vd,__type__:{object:W,boolean:x}},nodes:Vd,physics:{enabled:{boolean:x},barnesHut:{theta:{number:k},gravitationalConstant:{number:k},centralGravity:{number:k},springLength:{number:k},springConstant:{number:k},damping:{number:k},avoidOverlap:{number:k},__type__:{object:W}},forceAtlas2Based:{theta:{number:k},gravitationalConstant:{number:k},centralGravity:{number:k},springLength:{number:k},springConstant:{number:k},damping:{number:k},avoidOverlap:{number:k},__type__:{object:W}},repulsion:{centralGravity:{number:k},springLength:{number:k},springConstant:{number:k},nodeDistance:{number:k},damping:{number:k},__type__:{object:W}},hierarchicalRepulsion:{centralGravity:{number:k},springLength:{number:k},springConstant:{number:k},nodeDistance:{number:k},damping:{number:k},avoidOverlap:{number:k},__type__:{object:W}},maxVelocity:{number:k},minVelocity:{number:k},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:x},iterations:{number:k},updateInterval:{number:k},onlyDynamicEdges:{boolean:x},fit:{boolean:x},__type__:{object:W,boolean:x}},timestep:{number:k},adaptiveTimestep:{boolean:x},wind:{x:{number:k},y:{number:k},__type__:{object:W}},__type__:{object:W,boolean:x}},autoResize:{boolean:x},clickToUse:{boolean:x},locale:{string:M},locales:{__any__:{any:nge},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},wk={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]}}},oge=function(n,e,r){var i;return!!(pr(n).call(n,"physics")&&pr(i=wk.physics.solver).call(i,e)&&r.physics.solver!==e&&e!=="wind")},sge=function(){function t(){N(this,t)}return F(t,[{key:"getDistances",value:function(e,r,i){for(var a={},o=e.edges,s=0;s<r.length;s++){var u=r[s],l={};a[u]=l;for(var h=0;h<r.length;h++)l[r[h]]=s==h?0:1e9}for(var d=0;d<i.length;d++){var c=o[i[d]];c.connected===!0&&a[c.fromId]!==void 0&&a[c.toId]!==void 0&&(a[c.fromId][c.toId]=1,a[c.toId][c.fromId]=1)}for(var f=r.length,v=0;v<f;v++)for(var p=r[v],$=a[p],g=0;g<f-1;g++)for(var y=r[g],b=a[y],m=g+1;m<f;m++){var w=r[m],E=a[w],T=Math.min(b[w],b[p]+$[w]);b[w]=T,E[y]=T}return a}}]),t}(),uge=function(){function t(n,e,r){N(this,t),this.body=n,this.springLength=e,this.springConstant=r,this.distanceSolver=new sge}return F(t,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,r);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,u=0,l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5,d=1e9,c=0,f=0,v=0,p=0,$=0;d>o&&u<l;){u+=1;var g=this._getHighestEnergyNode(i),y=ke(g,4);for(c=y[0],d=y[1],f=y[2],v=y[3],p=d,$=0;p>s&&$<h;){$+=1,this._moveNode(c,f,v);var b=this._getEnergy(c),m=ke(b,3);p=m[0],f=m[1],v=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var r=this.body.nodeIndices,i=this.body.nodes,a=0,o=r[0],s=0,u=0,l=0;l<r.length;l++){var h=r[l];if(i[h].predefinedPosition!==!0||i[h].isCluster===!0&&e===!0||i[h].options.fixed.x!==!0||i[h].options.fixed.y!==!0){var d=this._getEnergy(h),c=ke(d,3),f=c[0],v=c[1],p=c[2];a<f&&(a=f,o=h,s=v,u=p)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var r=ke(this.E_sums[e],2),i=r[0],a=r[1],o=Math.sqrt(Math.pow(i,2)+Math.pow(a,2));return[o,i,a]}},{key:"_moveNode",value:function(e,r,i){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,u=0,l=0,h=o[e].x,d=o[e].y,c=this.K_matrix[e],f=this.L_matrix[e],v=0;v<a.length;v++){var p=a[v];if(p!==e){var $=o[p].x,g=o[p].y,y=c[p],b=f[p],m=1/Math.pow(Math.pow(h-$,2)+Math.pow(d-g,2),1.5);s+=y*(1-b*Math.pow(d-g,2)*m),u+=y*(b*(h-$)*(d-g)*m),l+=y*(1-b*Math.pow(h-$,2)*m)}}var w=s,E=u,T=r,O=l,_=i,S=(T/w+_/E)/(E/w-O/E),C=-(E*S+T)/w;o[e].x+=C,o[e].y+=S,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var r=this.body.nodeIndices,i=this.springLength;this.L_matrix=[];for(var a=0;a<r.length;a++){this.L_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.L_matrix[r[a]][r[o]]=i*e[r[a]][r[o]]}}},{key:"_createK_matrix",value:function(e){var r=this.body.nodeIndices,i=this.springConstant;this.K_matrix=[];for(var a=0;a<r.length;a++){this.K_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.K_matrix[r[a]][r[o]]=i*Math.pow(e[r[a]][r[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,r=this.body.nodes;this.E_matrix={},this.E_sums={};for(var i=0;i<e.length;i++)this.E_matrix[e[i]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=r[o].x,u=r[o].y,l=0,h=0,d=a;d<e.length;d++){var c=e[d];if(c!==o){var f=r[c].x,v=r[c].y,p=1/Math.sqrt(Math.pow(s-f,2)+Math.pow(u-v,2));this.E_matrix[o][d]=[this.K_matrix[o][c]*(s-f-this.L_matrix[o][c]*(s-f)*p),this.K_matrix[o][c]*(u-v-this.L_matrix[o][c]*(u-v)*p)],this.E_matrix[c][a]=this.E_matrix[o][d],l+=this.E_matrix[o][d][0],h+=this.E_matrix[o][d][1]}}this.E_sums[o]=[l,h]}}},{key:"_updateE_matrix",value:function(e){for(var r=this.body.nodeIndices,i=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],u=i[e].x,l=i[e].y,h=0,d=0,c=0;c<r.length;c++){var f=r[c];if(f!==e){var v=a[c],p=v[0],$=v[1],g=i[f].x,y=i[f].y,b=1/Math.sqrt(Math.pow(u-g,2)+Math.pow(l-y,2)),m=o[f]*(u-g-s[f]*(u-g)*b),w=o[f]*(l-y-s[f]*(l-y)*b);a[c]=[m,w],h+=m,d+=w;var E=this.E_sums[f];E[0]+=m-p,E[1]+=w-$}}this.E_sums[e]=[h,d]}}]),t}();function H(t,n,e){var r,i,a,o,s=this;if(!(this instanceof H))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:Rse,clickToUse:!1},je(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:A(r=this.on).call(r,this),off:A(i=this.off).call(i,this),emit:A(a=this.emit).call(a,this),once:A(o=this.once).call(o,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new Nse(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Zue,this.canvas=new Hfe(this.body),this.selectionHandler=new Ave(this.body,this.canvas),this.interactionHandler=new qfe(this.body,this.canvas,this.selectionHandler),this.view=new Vfe(this.body,this.canvas),this.renderer=new Ffe(this.body,this.canvas),this.physics=new kfe(this.body),this.layoutEngine=new ege(this.body),this.clustering=new Mfe(this.body),this.manipulation=new ige(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new uce(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new yfe(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new uge(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(n)}OS(H.prototype);H.prototype.setOptions=function(t){var n=this;if(t===null&&(t=void 0),t!==void 0){var e=hse.validate(t,age);e===!0&&console.error("%cErrors have been found in the supplied options object.",CT);var r=["locale","locales","clickToUse"];if(ya(r,this.options,t),t.locale!==void 0&&(t.locale=Dse(t.locales||this.options.locales,t.locale)),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),t.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new use(this,this.body.container,wk,this.canvas.pixelRatio,oge)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){var i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};ye(i.nodes,this.nodesHandler.options),ye(i.edges,this.edgesHandler.options),ye(i.layout,this.layoutEngine.options),ye(i.interaction,this.selectionHandler.options),ye(i.interaction,this.renderer.options),ye(i.interaction,this.interactionHandler.options),ye(i.manipulation,this.manipulation.options),ye(i.physics,this.physics.options),ye(i.global,this.canvas.options),ye(i.global,this.options),this.configurator.setModuleOptions(i)}t.clickToUse!==void 0?t.clickToUse===!0?this.activator===void 0&&(this.activator=new sse(this.canvas.frame),this.activator.on("change",function(){n.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")}};H.prototype._updateVisibleIndices=function(){var t=this.body.nodes,n=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&!this.clustering._isClusteredNode(e)&&t[e].options.hidden===!1&&this.body.nodeIndices.push(t[e].id);for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r],a=t[i.fromId],o=t[i.toId],s=a!==void 0&&o!==void 0,u=!this.clustering._isClusteredEdge(r)&&i.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;u&&this.body.edgeIndices.push(i.id)}};H.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})};H.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.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);");var n=$se(t.dot);this.setData(n);return}else if(t&&t.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);");var e=wse(t.gephi);this.setData(e);return}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};H.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(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&delete this.body.edges[n];Vr(this.body.container)};H.prototype._updateValueRange=function(t){var n,e=void 0,r=void 0,i=0;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var a=t[n].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),r=r===void 0?a:Math.max(a,r),i+=a)}if(e!==void 0&&r!==void 0)for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&t[n].setValueRange(e,r,i)};H.prototype.isActive=function(){return!this.activator||this.activator.active};H.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};H.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};H.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};H.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};H.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};H.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};H.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};H.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};H.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};H.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};H.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};H.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};H.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};H.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};H.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};H.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};H.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};H.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};H.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};H.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};H.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};H.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};H.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};H.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};H.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};H.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};H.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};H.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};H.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};H.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};H.prototype.getConnectedNodes=function(t){return this.body.nodes[t]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};H.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};H.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};H.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};H.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};H.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};H.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};H.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};H.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};H.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};H.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};H.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};H.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};H.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};H.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};H.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};H.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};H.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};H.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};H.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};H.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};H.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const lge={flex:"~ gap-4 wrap","w-full":""},hge=Z("span",{op75:""},"Show pages",-1),dge=Z("span",{op75:""},"Show layouts",-1),cge=Z("span",{op75:""},"Show workspace",-1),fge=Z("span",{op75:""},"Show node_modules",-1),vge=Z("span",{op75:""},"Show global components",-1),pge=Z("div",{"i-carbon-close":""},null,-1),gge=Z("div",{"flex-auto":""},null,-1),yge={relative:"","h-full":"","w-full":""},mge=Z("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),Z("div",{op50:""}," Component "),Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),Z("div",{op50:""}," Global Component "),Z("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),Z("div",{op50:""}," Page "),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[Z("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),Z("div",{op50:""}," Layout "),Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),Z("div",{op50:""}," Library Component "),Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),Z("div",{op50:""}," Unknown ")],-1),bge={key:0,py4:"",pt4:"",flex:"~ col"},$ge={border:"t base",p4:""},wge=Kn({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(t){const n=t,e=yn(),r=yn(),i=Ek(),a=yn(),o=Sk(),s=Ok(),u=Tk(),{componentsGraphShowNodeModules:l,componentsGraphShowGlobalComponents:h,componentsGraphShowPages:d,componentsGraphShowLayouts:c,componentsGraphShowWorkspace:f}=Ow(),v=yn(),p=Jt(()=>{const m=n.relationships||[];if(v.value){let w=function(T){!T||E.has(T)||(E.add(T),T.deps.forEach(O=>{w(m.find(_=>_.id===O))}))};const E=new Set;return w(v.value),Array.from(E)}return m}),$=Jt(()=>{const m=p.value.map(E=>{const T=n.components.find(B=>B.filePath===E.id),O=o.value?.find(B=>B.file===E.id),_=u.value?.find(B=>B.file===E.id),S=E.id.replace(/\?.*$/,"").replace(/\#.*$/,""),C=E.id.includes("/node_modules/")?"lib":T?T.global?"global":"user":_?"layout":O?"page":"unknown";if(!l.value&&C==="lib"||!d.value&&C==="page"||!c.value&&C==="layout"||!f.value&&C==="user"&&s.value&&!E.id.startsWith(s.value.rootDir)||!h.value&&C==="global")return null;const L=C==="layout"?"hexagon":C==="page"?"square":"dot";return{id:E.id,label:S.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:C,shape:L,size:15+Math.min(E.deps.length/2,8),font:{color:i.value==="dark"?"white":"black"},color:v.value?.id===E.id?"#82c742":void 0,extra:{id:E.id,component:T,page:O,layout:_,relationship:E}}}).filter(E=>!!E),w=p.value.flatMap(E=>E.deps.map(T=>({from:E.id,to:T,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:m,edges:w}}),g=Jt(()=>a.value?.component?n.relationships?.find(w=>w.id===a.value?.component?.filePath)?.deps?.map(w=>n.relationships?.find(E=>E.id===w)?.id).filter(Boolean):[]),y=Jt(()=>a.value?.component?n.relationships?.filter(w=>w.deps.includes(a.value.component.filePath))?.map(w=>n.relationships?.find(E=>E.id===w.id)?.id).filter(Boolean):[]);kk(()=>{const m={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},w=new H(e.value,$.value,m);w.on("click",E=>{const T=E.nodes?.[0],O=$.value.nodes?.find(_=>_.id===T)?.extra;O&&(a.value=O)}),Pk($,()=>{w.setData($.value)})});function b(){v.value=a.value?.relationship,a.value=void 0}return(m,w)=>{const E=Vk,T=Tw,O=Ik,_=xw,S=Ck,C=Uk;return te(),Te(lr,null,[Se(T,{ref_key:"navbar",ref:r,absolute:"","left-0":"","right-0":"","top-0":""},{search:Ve(()=>[Z("div",lge,[Se(E,{modelValue:Y(d),"onUpdate:modelValue":w[0]||(w[0]=L=>$i(d)?d.value=L:null),n:"primary sm"},{default:Ve(()=>[hge]),_:1},8,["modelValue"]),Se(E,{modelValue:Y(c),"onUpdate:modelValue":w[1]||(w[1]=L=>$i(c)?c.value=L:null),n:"primary sm"},{default:Ve(()=>[dge]),_:1},8,["modelValue"]),Se(E,{modelValue:Y(f),"onUpdate:modelValue":w[2]||(w[2]=L=>$i(f)?f.value=L:null),n:"primary sm"},{default:Ve(()=>[cge]),_:1},8,["modelValue"]),Se(E,{modelValue:Y(l),"onUpdate:modelValue":w[3]||(w[3]=L=>$i(l)?l.value=L:null),n:"primary sm"},{default:Ve(()=>[fge]),_:1},8,["modelValue"]),Se(E,{modelValue:Y(h),"onUpdate:modelValue":w[4]||(w[4]=L=>$i(h)?h.value=L:null),n:"primary sm"},{default:Ve(()=>[vge]),_:1},8,["modelValue"])]),Y(v)?(te(),Te("button",{key:0,flex:"~ gap-1","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:w[5]||(w[5]=L=>v.value=void 0)},[La(" Clear filter "),pge])):lt("",!0),gge,Au(m.$slots,"default")]),_:3},512),Z("div",yge,[Z("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),Se(O,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","glass-effect":""},{default:Ve(()=>[mge]),_:1}),Se(C,{"model-value":!!(Y(a)&&Y(a).component),navbar:Y(r),"w-80":"",onClose:w[7]||(w[7]=L=>a.value=void 0)},{default:Ve(()=>[Y(a)&&Y(a).component?(te(),Te("div",bge,[Se(_,{component:Y(a).component,dependencies:Y(g),dependents:Y(y)},null,8,["component","dependencies","dependents"]),Z("div",$ge,[Se(S,{n:"primary solid",onClick:w[6]||(w[6]=L=>b())},{default:Ve(()=>[La(" Filter to this component ")]),_:1})])])):lt("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),_ge={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},Ege={key:0,"ml--1":"","text-primary":""},Sge=Kn({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(t){const n=t,e=Jt(()=>n.component.filePath||n.component.file||n.component.__file||"");return(r,i)=>{const a=Cw,o=xw,s=xk("VDropdown"),u=kw,l=Pw;return te(),Te("div",_ge,[Se(s,null,{popper:Ve(()=>[Se(o,{component:r.component,dependencies:r.dependencies,dependents:r.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:Ve(()=>[Z("button",{"hover:text-primary":"",class:Ak(r.dependents&&r.dependents.length===0?"op50":"")},[Se(a,{component:r.component},null,8,["component"])],2)]),_:1}),r.dependents?.length?(te(),Te("sup",Ege," x"+au(r.dependents?.length),1)):lt("",!0),r.component.global?(te(),ut(u,{key:1,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0),Au(r.$slots,"default"),Y(e)?(te(),ut(l,{key:2,filepath:Y(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)])}}}),Oge={flex:"~ gap-2 items-center"},Tge={pl4:""},kge=Kn({__name:"ComponentsList",props:{components:{},relationships:{}},setup(t){const n=t,e=yn(""),r=yn("all"),i=Jt(()=>{const s=n.components.map(u=>Rk(u,n.relationships));return r.value==="using"?s.filter(u=>u.dependents?.length):r.value==="not-used"?s.filter(u=>!u.dependents?.length):s}),a=Jt(()=>new Dk(i.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),o=Jt(()=>{const s=[],u=new Map,l=[],h=[],d={user:0,lib:0,builtin:0,runtime:0};return(e.value?a.value.search(e.value).map(f=>f.item):i.value).forEach(f=>{const v=f.component;if(v.filePath&&Mk(v.filePath)){const p=Nk(v.filePath);if(!p)return;p==="nuxt"?(l.push(f),d.builtin++):(u.has(p)||u.set(p,[]),u.get(p).push(f),d.lib++)}else v.global&&!v.filePath?(h.push(f),d.runtime++):(s.push(f),d.user++)}),{count:d,user:s,builtin:l,lib:u,runtime:h}});return(s,u)=>{const l=Fk,h=Gk,d=Tw,c=Sge,f=Kk,v=qk;return te(),Te(lr,null,[Se(d,{search:Y(e),"onUpdate:search":u[1]||(u[1]=p=>$i(e)?e.value=p:null),pb3:""},{actions:Ve(()=>[Au(s.$slots,"default")]),default:Ve(()=>[Z("div",Oge,[Se(l,{icon:"carbon-filter",op50:""}),Se(h,{modelValue:Y(r),"onUpdate:modelValue":u[0]||(u[0]=p=>$i(r)?r.value=p:null),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),Y(o).user.length?(te(),ut(f,{key:0,icon:"carbon-nominal",text:"User components",open:Y(o).user.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:Y(Al)),description:`Total components: ${Y(o).count.user}`},{default:Ve(()=>[(te(!0),Te(lr,null,bi(Y(o).user,p=>(te(),ut(c,ts({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):lt("",!0),Y(o).runtime.length?(te(),ut(f,{key:1,icon:"carbon-load-balancer-global",open:Y(o).runtime.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:Y(Al)),text:"Runtime components",description:`Total components: ${Y(o).count.runtime}`},{default:Ve(()=>[(te(!0),Te(lr,null,bi(Y(o).runtime,p=>(te(),ut(c,ts({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):lt("",!0),Y(o).builtin.length?(te(),ut(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${Y(o).count.builtin}`},{default:Ve(()=>[(te(!0),Te(lr,null,bi(Y(o).builtin,p=>(te(),ut(c,ts({key:p.component.filePath},p),null,16))),128))]),_:1},8,["description"])):lt("",!0),Y(o).lib.size?(te(),ut(f,{key:3,open:Y(o).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:Y(Al)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${Y(o).count.lib} components from ${Y(o).lib.size} packages`},{default:Ve(()=>[(te(!0),Te(lr,null,bi(Y(o).lib.entries(),([p,$])=>(te(),Te("div",{key:p,"ml-2":""},[Se(v,{text:`${p} (${$.length})`,py1:"",op50:""},null,8,["text"]),Z("div",Tge,[(te(!0),Te(lr,null,bi($,g=>(te(),ut(c,ts({key:g.component.filePath},g),null,16))),128))])]))),128))]),_:1},8,["open","description"])):lt("",!0)],64)}}}),Pge={relative:"","h-full":"","of-auto":""},Ige={"flex-none":"",flex:"~ gap3"},Hge=Kn({__name:"components",setup(t){const n=Bk(),e=Hk(),r=Wk(),{componentsView:i}=Ow();function a(){n.value?.inspector?.instance&&n.value.inspector.enable()}function o(){i.value=i.value==="list"?"graph":"list"}return(s,u)=>{const l=Sw,h=eP,d=zk,c=Lk("tooltip");return te(),Te(lr,null,[Z("div",Pge,[(te(),ut(jk(Y(i)==="list"?kge:wge),{components:Y(e),relationships:Y(r)},{default:Ve(()=>[Z("div",Ige,[ng(Se(l,{"text-lg":"",icon:Y(i)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:o},null,8,["icon"]),[[c,"Toggle View",void 0,{"bottom-end":!0}]]),Y(n)?.inspector?.instance?ng((te(),ut(l,{key:0,"text-lg":"",icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:a},null,512)),[[c,"Inspect Vue components",void 0,{"bottom-end":!0}]]):lt("",!0)])]),_:1},8,["components","relationships"]))]),Se(d,null,{default:Ve(()=>[Se(h)]),_:1})],64)}}});export{Hge as default};
|