@nuxt/devtools 1.3.8 → 1.3.14

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.
Files changed (113) hide show
  1. package/dist/chunks/module-main.mjs +526 -5
  2. package/dist/chunks/vscode.mjs +1 -1
  3. package/dist/client/200.html +27 -27
  4. package/dist/client/404.html +27 -27
  5. package/dist/client/_nuxt/{C7cYo4YF.js → 2tJW9cKr.js} +1 -1
  6. package/dist/client/_nuxt/{CbM9OHn3.js → B-wfK0SS.js} +1 -1
  7. package/dist/client/_nuxt/B2TuRHFi.js +1 -0
  8. package/dist/client/_nuxt/{DKSts1V4.js → BEKXAodE.js} +1 -1
  9. package/dist/client/_nuxt/{Ckn823xU.js → BF_UD7ZT.js} +114 -114
  10. package/dist/client/_nuxt/{Cuq1Z6bh.js → BHBvn5Xs.js} +1 -1
  11. package/dist/client/_nuxt/BLmvGqlk.js +1 -0
  12. package/dist/client/_nuxt/{DX-YUedo.js → BMUgLter.js} +9 -9
  13. package/dist/client/_nuxt/BMbUeBqv.js +1 -1
  14. package/dist/client/_nuxt/{BjYCaXNT.js → BO314c-_.js} +1 -1
  15. package/dist/client/_nuxt/{GdB9kz-4.js → BWPbreBU.js} +1 -1
  16. package/dist/client/_nuxt/BYelj_cE.js +1 -0
  17. package/dist/client/_nuxt/{BLxIf9BH.js → BZZpaKJQ.js} +1 -1
  18. package/dist/client/_nuxt/{CPUwo9Dx.js → BZvh3yot.js} +2 -2
  19. package/dist/client/_nuxt/BcJweaq3.js +9 -0
  20. package/dist/client/_nuxt/{CH-roGkP.js → Bi99gj7u.js} +1 -1
  21. package/dist/client/_nuxt/{DETXY6Xa.js → BkmSFWMo.js} +1 -1
  22. package/dist/client/_nuxt/{DvDu1JUs.js → Bl8OBrwH.js} +1 -1
  23. package/dist/client/_nuxt/BrzmMRQX.js +2 -0
  24. package/dist/client/_nuxt/{8q1pCtVS.js → C4OO6w_e.js} +1 -1
  25. package/dist/client/_nuxt/{DuFGBY9A.js → C8RrL2-P.js} +1 -1
  26. package/dist/client/_nuxt/{BnXFHUk0.js → CA5wVMK1.js} +1 -1
  27. package/dist/client/_nuxt/{Dslz6rss.js → CE84j0J9.js} +1 -1
  28. package/dist/client/_nuxt/{o8QbmO42.js → CLVHkiJk.js} +1 -1
  29. package/dist/client/_nuxt/{DE5e3ZuV.js → CPWqrNrA.js} +1 -1
  30. package/dist/client/_nuxt/{C8N9kWh2.js → CPr4CZHz.js} +1 -1
  31. package/dist/client/_nuxt/CTKqK4eG.js +1 -1
  32. package/dist/client/_nuxt/CVW-sDYN.js +1 -0
  33. package/dist/client/_nuxt/{D0h9jATl.js → CWyKSuRn.js} +1 -1
  34. package/dist/client/_nuxt/CbViG2Xw.js +1 -1
  35. package/dist/client/_nuxt/{fwfpIEej.js → Cb_ad2sg.js} +1 -1
  36. package/dist/client/_nuxt/{dXjzJhiW.js → CcKfWHXB.js} +2 -2
  37. package/dist/client/_nuxt/{BG5RUyXI.js → CfVBzxeB.js} +1 -1
  38. package/dist/client/_nuxt/Cic6Ln_D.js +98 -0
  39. package/dist/client/_nuxt/{B_lF4o9u.js → CjFkCrIW.js} +1 -1
  40. package/dist/client/_nuxt/{D7m39p-9.js → CmbkPMjd.js} +1 -1
  41. package/dist/client/_nuxt/CnW1WPg6.js +1 -0
  42. package/dist/client/_nuxt/CsgBhI1g.js +16 -0
  43. package/dist/client/_nuxt/Cvo3JE8Q.js +1 -0
  44. package/dist/client/_nuxt/{DJdrWIcn.js → CxLTb5RC.js} +1 -1
  45. package/dist/client/_nuxt/{DVk2I1gO.js → CyS6YlEb.js} +1 -1
  46. package/dist/client/_nuxt/{mQFKENXH.js → CyvuMq07.js} +1 -1
  47. package/dist/client/_nuxt/D-a-w6CR.js +9 -0
  48. package/dist/client/_nuxt/{Xpd7UJs5.js → D4Ks82zD.js} +1 -1
  49. package/dist/client/_nuxt/{DdjW6vu9.js → D8XE2BC8.js} +1 -1
  50. package/dist/client/_nuxt/DDMtKJxh.js +1 -1
  51. package/dist/client/_nuxt/{C5gCGmDW.js → DK4oFTHQ.js} +1 -1
  52. package/dist/client/_nuxt/{C3FSKLnj.js → DKlNNSWk.js} +1 -1
  53. package/dist/client/_nuxt/{Cda7aUrs.js → DN0HCnq5.js} +1 -1
  54. package/dist/client/_nuxt/{H6yjxI9R.js → DOv5BRyJ.js} +1 -1
  55. package/dist/client/_nuxt/{Bxh-fvdv.js → DVZAdofw.js} +1 -1
  56. package/dist/client/_nuxt/{DeSj8VZN.js → DYx1ZwvQ.js} +1 -1
  57. package/dist/client/_nuxt/Di9lD2rK.js +1 -0
  58. package/dist/client/_nuxt/{BM3cCZms.js → DoQHeYxB.js} +3 -3
  59. package/dist/client/_nuxt/{ix9IAXj6.js → DpYuRYxj.js} +92 -22
  60. package/dist/client/_nuxt/{B04hL9Ab.js → Dv0NFAnW.js} +1 -1
  61. package/dist/client/_nuxt/{DEkvPDn8.js → DwVKZd3-.js} +1 -1
  62. package/dist/client/_nuxt/{QBzUTbSD.js → DwdKwQHN.js} +1 -1
  63. package/dist/client/_nuxt/{BRFlSxxW.js → JMx2uAI6.js} +1 -1
  64. package/dist/client/_nuxt/{BS5FcDmG.js → VNvxalkE.js} +1 -1
  65. package/dist/client/_nuxt/W2Tyz6z1.js +9 -0
  66. package/dist/client/_nuxt/{QQ7YbgtC.js → awWHqjli.js} +1 -1
  67. package/dist/client/_nuxt/builds/latest.json +1 -1
  68. package/dist/client/_nuxt/builds/meta/a69820c2-31c2-48f6-8161-842a62467079.json +1 -0
  69. package/dist/client/_nuxt/ciodjZaS.js +43 -0
  70. package/dist/client/_nuxt/entry.Gpl6Gx6M.css +1 -0
  71. package/dist/client/_nuxt/error-404.Bssqox27.css +1 -0
  72. package/dist/client/_nuxt/error-500.D3oXMFZl.css +1 -0
  73. package/dist/client/_nuxt/{Csl1JfEo.js → ewAh1ZiX.js} +1 -1
  74. package/dist/client/_nuxt/{CHQglk26.js → gXK6hV6W.js} +8 -8
  75. package/dist/client/_nuxt/pl_4MfI2.js +1 -0
  76. package/dist/client/_nuxt/{BTj8T8Us.js → rLudNEh9.js} +1 -1
  77. package/dist/client/_nuxt/terminals.BIEho_Pa.css +1 -0
  78. package/dist/client/_nuxt/timeline.BVVcTKn-.css +1 -0
  79. package/dist/client/_nuxt/{BdSLTmjP.js → viHXAOJs.js} +1 -1
  80. package/dist/client/_nuxt/yFeWtr-M.js +1 -0
  81. package/dist/client/_nuxt/{CyiHZscW.js → z0xAc3RC.js} +1 -1
  82. package/dist/client/_nuxt/{_OFeGLwh.js → zLQhdF7m.js} +1 -1
  83. package/dist/client/_nuxt/{CGZO0Dbu.js → zjxoDR5L.js} +1 -1
  84. package/dist/client/index.html +27 -27
  85. package/dist/module.json +1 -1
  86. package/dist/runtime/auth/index.html +2 -12
  87. package/dist/runtime/function-metrics-helpers.mjs +1 -1
  88. package/dist/runtime/plugins/view/Main.vue +1 -1
  89. package/dist/runtime/plugins/view/client.mjs +7 -5
  90. package/dist/runtime/plugins/view/utils.mjs +10 -6
  91. package/package.json +37 -37
  92. package/dist/client/_nuxt/B6TDWpKk.js +0 -1
  93. package/dist/client/_nuxt/BvHZCDLj.js +0 -9
  94. package/dist/client/_nuxt/BwKcIQOa.js +0 -16
  95. package/dist/client/_nuxt/C2c19bzT.js +0 -1
  96. package/dist/client/_nuxt/C9duD8Qg.js +0 -1
  97. package/dist/client/_nuxt/CCEQErg8.js +0 -1
  98. package/dist/client/_nuxt/CSGOJSAd.js +0 -1
  99. package/dist/client/_nuxt/CZLRDnsa.js +0 -1
  100. package/dist/client/_nuxt/CfkdovQd.js +0 -98
  101. package/dist/client/_nuxt/CssX2CxZ.js +0 -2
  102. package/dist/client/_nuxt/CwTcTc2N.js +0 -43
  103. package/dist/client/_nuxt/D5ctTtkd.js +0 -1
  104. package/dist/client/_nuxt/DJS8TjB-.js +0 -1
  105. package/dist/client/_nuxt/DluxqTUE.js +0 -1
  106. package/dist/client/_nuxt/builds/meta/8ac9da91-0524-4abf-a805-60b3d6199fe9.json +0 -1
  107. package/dist/client/_nuxt/entry.hxdKUDpu.css +0 -1
  108. package/dist/client/_nuxt/error-404.C4UNnO0a.css +0 -1
  109. package/dist/client/_nuxt/error-500.BbJ9e2Fk.css +0 -1
  110. package/dist/client/_nuxt/pA_iBoe4.js +0 -9
  111. package/dist/client/_nuxt/terminals.dNTO8Cf0.css +0 -1
  112. package/dist/client/_nuxt/timeline.DvDJbalt.css +0 -1
  113. package/dist/client/_nuxt/wGyJxDW5.js +0 -9
@@ -0,0 +1,98 @@
1
+ import{o as te,m as Se,k as X,d as Yi,a as rr,v as Qc,t as al,f as K,e as mT,i as _e,h as st,p as lt,F as dr,n as wn,aa as Al,_ as ff,r as _n,ao as bT,ap as $T,ab as wT,aq as _T,ar as ET,as as ST,w as OT,j as He,l as Ur,B as l1,at as TT,au as IT,G as PT,av as kT,ah as CT,aw as xT,ax as AT,ay as ts,a6 as RT,am as DT,a2 as MT,az as NT,I as Gv}from"./ciodjZaS.js";import{_ as FT}from"./CLVHkiJk.js";import{u as BT,a as LT}from"./CPWqrNrA.js";import{_ as jT}from"./BWPbreBU.js";import{_ as u1}from"./D4Ks82zD.js";import{_ as d1}from"./Bi99gj7u.js";import{_ as c1}from"./zjxoDR5L.js";import{_ as zT}from"./DKlNNSWk.js";import{_ as HT}from"./D8XE2BC8.js";import{_ as WT}from"./DwdKwQHN.js";import{_ as VT}from"./zLQhdF7m.js";import{D as Nu}from"./BcJws1i5.js";const UT={class:"markdown-body"},GT=X("h1",null,"Components",-1),KT=X("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),qT=X("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),YT=X("p",null,[X("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),XT=[GT,KT,qT,YT],QT={__name:"components",setup(r,{expose:i}){return i({frontmatter:{}}),(t,n)=>(te(),Se("div",UT,XT))}},JT=QT,ZT=/\d/,eI=["-","_","/","."];function tI(r=""){if(!ZT.test(r))return r!==r.toLowerCase()}function rI(r,i){const e=eI,t=[];if(!r||typeof r!="string")return t;let n="",a,o;for(const s of r){const l=e.includes(s);if(l===!0){t.push(n),n="",a=void 0;continue}const u=tI(s);if(o===!1){if(a===!1&&u===!0){t.push(n),n=s,a=u;continue}if(a===!0&&u===!1&&n.length>1){const d=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=d+s,a=u;continue}}n+=s,a=u,o=l}return t.push(n),t}function nI(r){return r?r[0].toUpperCase()+r.slice(1):""}function h1(r,i){return r?(Array.isArray(r)?r:rI(r)).map(e=>nI(e)).join(""):""}const iI={"text-sm":"","font-mono":""},aI=X("span",{mr1:"",op20:""},"<",-1),oI=X("span",{ml1:"",op20:""},"/>",-1),f1=Yi({__name:"ComponentName",props:{component:{}},setup(r){const i=r,e=rr(()=>i.component.pascalName||h1(i.component.name||i.component.__name||i.component.kebabName||""));return(t,n)=>(te(),Se("code",iI,[aI,Qc(al(K(e)),1),oI]))}}),sI={flex:"~ col gap1","items-start":"","of-hidden":""},lI={flex:"~ gap2",px3:""},uI={px3:"",pb2:""},dI={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},cI={"text-sm":""},hI={"text-primary":""},fI=X("span",{op50:""}," references",-1),vI={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},pI={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},gI={"text-sm":""},yI={"text-primary":""},mI=X("span",{op50:""}," dependencies",-1),bI={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},v1=Yi({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(r){const i=r,e=rr(()=>i.component.pascalName||h1(i.component.name||i.component.__name||i.component.kebabName||"")),t=rr(()=>i.component.filePath||i.component.file||i.component.__file||""),n=mT();return(a,o)=>{const s=f1,l=ff,u=d1,d=c1;return te(),Se("div",sI,[X("div",lI,[_e(s,{component:a.component},null,8,["component"]),_e(l,{title:"Copy name","flex-none":"",icon:"carbon-copy",border:!1,onClick:o[0]||(o[0]=c=>K(n)(`<${K(e)}></${K(e)}>`,"component-name"))}),a.component.global?(te(),st(u,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0)]),X("div",uI,[K(t)?(te(),st(d,{key:0,filepath:K(t),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)]),a.dependents?(te(),Se("div",dI,[X("div",cI,[X("strong",hI,al(a.dependents.length),1),fI]),a.dependents.length?(te(),Se("div",vI,[(te(!0),Se(dr,null,wn(a.dependents,c=>(te(),st(d,{key:c,filepath:c},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),a.dependencies?(te(),Se("div",pI,[X("div",gI,[X("strong",yI,al(a.dependencies.length),1),mI]),a.dependencies.length?(te(),Se("div",bI,[(te(!0),Se(dr,null,wn(a.dependencies,c=>(te(),st(d,{key:c,filepath:c},null,8,["filepath"]))),128))])):lt("",!0)])):lt("",!0),Al(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.9
8
+ * @date 2023-11-24T17:53:34.179Z
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 Rl(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var Fu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function q(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var p1={exports:{}},rs=function(r){return r&&r.Math===Math&&r},be=rs(typeof globalThis=="object"&&globalThis)||rs(typeof window=="object"&&window)||rs(typeof self=="object"&&self)||rs(typeof Fu=="object"&&Fu)||function(){return this}()||Fu||Function("return this")(),le=function(r){try{return!!r()}catch{return!0}},$I=le,lo=!$I(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),wI=lo,g1=Function.prototype,Kv=g1.apply,qv=g1.call,Xi=typeof Reflect=="object"&&Reflect.apply||(wI?qv.bind(Kv):function(){return qv.apply(Kv,arguments)}),y1=lo,m1=Function.prototype,Jc=m1.call,_I=y1&&m1.bind.bind(Jc,Jc),me=y1?_I:function(r){return function(){return Jc.apply(r,arguments)}},b1=me,EI=b1({}.toString),SI=b1("".slice),un=function(r){return SI(EI(r),8,-1)},OI=un,TI=me,$1=function(r){if(OI(r)==="Function")return TI(r)},Zc=typeof document=="object"&&document.all,II=typeof Zc>"u"&&Zc!==void 0,w1={all:Zc,IS_HTMLDDA:II},_1=w1,PI=_1.all,Te=_1.IS_HTMLDDA?function(r){return typeof r=="function"||r===PI}:function(r){return typeof r=="function"},Gn={},kI=le,Ge=!kI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),CI=lo,ns=Function.prototype.call,Ke=CI?ns.bind(ns):function(){return ns.apply(ns,arguments)},Dl={},E1={}.propertyIsEnumerable,S1=Object.getOwnPropertyDescriptor,xI=S1&&!E1.call({1:2},1);Dl.f=xI?function(i){var e=S1(this,i);return!!e&&e.enumerable}:E1;var Kn=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}},AI=me,RI=le,DI=un,Bu=Object,MI=AI("".split),Ml=RI(function(){return!Bu("z").propertyIsEnumerable(0)})?function(r){return DI(r)==="String"?MI(r,""):Bu(r)}:Bu,Qi=function(r){return r==null},NI=Qi,FI=TypeError,vf=function(r){if(NI(r))throw new FI("Can't call method on "+r);return r},BI=Ml,LI=vf,mr=function(r){return BI(LI(r))},Yv=Te,O1=w1,jI=O1.all,rt=O1.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Yv(r)||r===jI}:function(r){return typeof r=="object"?r!==null:Yv(r)},$e={},Lu=$e,ju=be,zI=Te,Xv=function(r){return zI(r)?r:void 0},yt=function(r,i){return arguments.length<2?Xv(Lu[r])||Xv(ju[r]):Lu[r]&&Lu[r][i]||ju[r]&&ju[r][i]},HI=me,je=HI({}.isPrototypeOf),dn=typeof navigator<"u"&&String(navigator.userAgent)||"",T1=be,zu=dn,Qv=T1.process,Jv=T1.Deno,Zv=Qv&&Qv.versions||Jv&&Jv.version,ep=Zv&&Zv.v8,Jt,ol;ep&&(Jt=ep.split("."),ol=Jt[0]>0&&Jt[0]<4?1:+(Jt[0]+Jt[1]));!ol&&zu&&(Jt=zu.match(/Edge\/(\d+)/),(!Jt||Jt[1]>=74)&&(Jt=zu.match(/Chrome\/(\d+)/),Jt&&(ol=+Jt[1])));var Ji=ol,tp=Ji,WI=le,VI=be,UI=VI.String,Zi=!!Object.getOwnPropertySymbols&&!WI(function(){var r=Symbol("symbol detection");return!UI(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&tp&&tp<41}),GI=Zi,I1=GI&&!Symbol.sham&&typeof Symbol.iterator=="symbol",KI=yt,qI=Te,YI=je,XI=I1,QI=Object,uo=XI?function(r){return typeof r=="symbol"}:function(r){var i=KI("Symbol");return qI(i)&&YI(i.prototype,QI(r))},JI=String,ea=function(r){try{return JI(r)}catch{return"Object"}},ZI=Te,eP=ea,tP=TypeError,Pt=function(r){if(ZI(r))return r;throw new tP(eP(r)+" is not a function")},rP=Pt,nP=Qi,pf=function(r,i){var e=r[i];return nP(e)?void 0:rP(e)},Hu=Ke,Wu=Te,Vu=rt,iP=TypeError,aP=function(r,i){var e,t;if(i==="string"&&Wu(e=r.toString)&&!Vu(t=Hu(e,r))||Wu(e=r.valueOf)&&!Vu(t=Hu(e,r))||i!=="string"&&Wu(e=r.toString)&&!Vu(t=Hu(e,r)))return t;throw new iP("Can't convert object to primitive value")},P1={exports:{}},oP=!0,rp=be,sP=Object.defineProperty,lP=function(r,i){try{sP(rp,r,{value:i,configurable:!0,writable:!0})}catch{rp[r]=i}return i},uP=be,dP=lP,np="__core-js_shared__",cP=uP[np]||dP(np,{}),gf=cP,ip=gf;(P1.exports=function(r,i){return ip[r]||(ip[r]=i!==void 0?i:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var ta=P1.exports,hP=vf,fP=Object,kt=function(r){return fP(hP(r))},vP=me,pP=kt,gP=vP({}.hasOwnProperty),ze=Object.hasOwn||function(i,e){return gP(pP(i),e)},yP=me,mP=0,bP=Math.random(),$P=yP(1 .toString),Nl=function(r){return"Symbol("+(r===void 0?"":r)+")_"+$P(++mP+bP,36)},wP=be,_P=ta,ap=ze,EP=Nl,SP=Zi,OP=I1,bi=wP.Symbol,Uu=_P("wks"),TP=OP?bi.for||bi:bi&&bi.withoutSetter||EP,we=function(r){return ap(Uu,r)||(Uu[r]=SP&&ap(bi,r)?bi[r]:TP("Symbol."+r)),Uu[r]},IP=Ke,op=rt,sp=uo,PP=pf,kP=aP,CP=we,xP=TypeError,AP=CP("toPrimitive"),RP=function(r,i){if(!op(r)||sp(r))return r;var e=PP(r,AP),t;if(e){if(i===void 0&&(i="default"),t=IP(e,r,i),!op(t)||sp(t))return t;throw new xP("Can't convert object to primitive value")}return i===void 0&&(i="number"),kP(r,i)},DP=RP,MP=uo,Fl=function(r){var i=DP(r,"string");return MP(i)?i:i+""},NP=be,lp=rt,eh=NP.document,FP=lp(eh)&&lp(eh.createElement),yf=function(r){return FP?eh.createElement(r):{}},BP=Ge,LP=le,jP=yf,k1=!BP&&!LP(function(){return Object.defineProperty(jP("div"),"a",{get:function(){return 7}}).a!==7}),zP=Ge,HP=Ke,WP=Dl,VP=Kn,UP=mr,GP=Fl,KP=ze,qP=k1,up=Object.getOwnPropertyDescriptor;Gn.f=zP?up:function(i,e){if(i=UP(i),e=GP(e),qP)try{return up(i,e)}catch{}if(KP(i,e))return VP(!HP(WP.f,i,e),i[e])};var YP=le,XP=Te,QP=/#|\.prototype\./,co=function(r,i){var e=ZP[JP(r)];return e===tk?!0:e===ek?!1:XP(i)?YP(i):!!i},JP=co.normalize=function(r){return String(r).replace(QP,".").toLowerCase()},ZP=co.data={},ek=co.NATIVE="N",tk=co.POLYFILL="P",C1=co,dp=$1,rk=Pt,nk=lo,ik=dp(dp.bind),cn=function(r,i){return rk(r),i===void 0?r:nk?ik(r,i):function(){return r.apply(i,arguments)}},Ct={},ak=Ge,ok=le,x1=ak&&ok(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),sk=rt,lk=String,uk=TypeError,Bt=function(r){if(sk(r))return r;throw new uk(lk(r)+" is not an object")},dk=Ge,ck=k1,hk=x1,is=Bt,cp=Fl,fk=TypeError,Gu=Object.defineProperty,vk=Object.getOwnPropertyDescriptor,Ku="enumerable",qu="configurable",Yu="writable";Ct.f=dk?hk?function(i,e,t){if(is(i),e=cp(e),is(t),typeof i=="function"&&e==="prototype"&&"value"in t&&Yu in t&&!t[Yu]){var n=vk(i,e);n&&n[Yu]&&(i[e]=t.value,t={configurable:qu in t?t[qu]:n[qu],enumerable:Ku in t?t[Ku]:n[Ku],writable:!1})}return Gu(i,e,t)}:Gu:function(i,e,t){if(is(i),e=cp(e),is(t),ck)try{return Gu(i,e,t)}catch{}if("get"in t||"set"in t)throw new fk("Accessors not supported");return"value"in t&&(i[e]=t.value),i};var pk=Ge,gk=Ct,yk=Kn,Fr=pk?function(r,i,e){return gk.f(r,i,yk(1,e))}:function(r,i,e){return r[i]=e,r},as=be,mk=Xi,bk=$1,$k=Te,wk=Gn.f,_k=C1,si=$e,Ek=cn,li=Fr,hp=ze,Sk=function(r){var i=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return mk(r,this,arguments)};return i.prototype=r.prototype,i},V=function(r,i){var e=r.target,t=r.global,n=r.stat,a=r.proto,o=t?as:n?as[e]:(as[e]||{}).prototype,s=t?si:si[e]||li(si,e,{})[e],l=s.prototype,u,d,c,h,f,v,p,g,y;for(h in i)u=_k(t?h:e+(n?".":"#")+h,r.forced),d=!u&&o&&hp(o,h),v=s[h],d&&(r.dontCallGetSet?(y=wk(o,h),p=y&&y.value):p=o[h]),f=d&&p?p:i[h],!(d&&typeof v==typeof f)&&(r.bind&&d?g=Ek(f,as):r.wrap&&d?g=Sk(f):a&&$k(f)?g=bk(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&li(g,"sham",!0),li(s,h,g),a&&(c=e+"Prototype",hp(si,c)||li(si,c,{}),li(si[c],h,f),r.real&&l&&(u||!l[h])&&li(l,h,f)))},Ok=V,Tk=Ge,fp=Ct.f;Ok({target:"Object",stat:!0,forced:Object.defineProperty!==fp,sham:!Tk},{defineProperty:fp});var Ik=$e,A1=Ik.Object,Pk=p1.exports=function(i,e,t){return A1.defineProperty(i,e,t)};A1.defineProperty.sham&&(Pk.sham=!0);var kk=p1.exports,Ck=kk,R1=Ck,xk=R1,Ak=xk,Rk=Ak,Dk=Rk,D1=Dk,Bl=q(D1),Mk=un,hn=Array.isArray||function(i){return Mk(i)==="Array"},Nk=Math.ceil,Fk=Math.floor,Bk=Math.trunc||function(i){var e=+i;return(e>0?Fk:Nk)(e)},Lk=Bk,Ll=function(r){var i=+r;return i!==i||i===0?0:Lk(i)},jk=Ll,zk=Math.min,Hk=function(r){return r>0?zk(jk(r),9007199254740991):0},Wk=Hk,Lt=function(r){return Wk(r.length)},Vk=TypeError,Uk=9007199254740991,jl=function(r){if(r>Uk)throw Vk("Maximum allowed index exceeded");return r},Gk=Fl,Kk=Ct,qk=Kn,ra=function(r,i,e){var t=Gk(i);t in r?Kk.f(r,t,qk(0,e)):r[t]=e},Yk=we,Xk=Yk("toStringTag"),M1={};M1[Xk]="z";var mf=String(M1)==="[object z]",Qk=mf,Jk=Te,zs=un,Zk=we,eC=Zk("toStringTag"),tC=Object,rC=zs(function(){return arguments}())==="Arguments",nC=function(r,i){try{return r[i]}catch{}},Br=Qk?zs:function(r){var i,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=nC(i=tC(r),eC))=="string"?e:rC?zs(i):(t=zs(i))==="Object"&&Jk(i.callee)?"Arguments":t},iC=me,aC=Te,th=gf,oC=iC(Function.toString);aC(th.inspectSource)||(th.inspectSource=function(r){return oC(r)});var N1=th.inspectSource,sC=me,lC=le,F1=Te,uC=Br,dC=yt,cC=N1,B1=function(){},hC=[],L1=dC("Reflect","construct"),bf=/^\s*(?:class|function)\b/,fC=sC(bf.exec),vC=!bf.test(B1),Ea=function(i){if(!F1(i))return!1;try{return L1(B1,hC,i),!0}catch{return!1}},j1=function(i){if(!F1(i))return!1;switch(uC(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return vC||!!fC(bf,cC(i))}catch{return!0}};j1.sham=!0;var zl=!L1||lC(function(){var r;return Ea(Ea.call)||!Ea(Object)||!Ea(function(){r=!0})||r})?j1:Ea,vp=hn,pC=zl,gC=rt,yC=we,mC=yC("species"),pp=Array,bC=function(r){var i;return vp(r)&&(i=r.constructor,pC(i)&&(i===pp||vp(i.prototype))?i=void 0:gC(i)&&(i=i[mC],i===null&&(i=void 0))),i===void 0?pp:i},$C=bC,Hl=function(r,i){return new($C(r))(i===0?0:i)},wC=le,_C=we,EC=Ji,SC=_C("species"),ho=function(r){return EC>=51||!wC(function(){var i=[],e=i.constructor={};return e[SC]=function(){return{foo:1}},i[r](Boolean).foo!==1})},OC=V,TC=le,IC=hn,PC=rt,kC=kt,CC=Lt,gp=jl,yp=ra,xC=Hl,AC=ho,RC=we,DC=Ji,z1=RC("isConcatSpreadable"),MC=DC>=51||!TC(function(){var r=[];return r[z1]=!1,r.concat()[0]!==r}),NC=function(r){if(!PC(r))return!1;var i=r[z1];return i!==void 0?!!i:IC(r)},FC=!MC||!AC("concat");OC({target:"Array",proto:!0,arity:1,forced:FC},{concat:function(i){var e=kC(this),t=xC(e,0),n=0,a,o,s,l,u;for(a=-1,s=arguments.length;a<s;a++)if(u=a===-1?e:arguments[a],NC(u))for(l=CC(u),gp(n+l),o=0;o<l;o++,n++)o in u&&yp(t,n,u[o]);else gp(n+1),yp(t,n++,u);return t.length=n,t}});var BC=Br,LC=String,qn=function(r){if(BC(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return LC(r)},Wl={},jC=Ll,zC=Math.max,HC=Math.min,Vl=function(r,i){var e=jC(r);return e<0?zC(e+i,0):HC(e,i)},WC=mr,VC=Vl,UC=Lt,mp=function(r){return function(i,e,t){var n=WC(i),a=UC(n),o=VC(t,a),s;if(r&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((r||o in n)&&n[o]===e)return r||o||0;return!r&&-1}},GC={includes:mp(!0),indexOf:mp(!1)},fo={},KC=me,Xu=ze,qC=mr,YC=GC.indexOf,XC=fo,bp=KC([].push),H1=function(r,i){var e=qC(r),t=0,n=[],a;for(a in e)!Xu(XC,a)&&Xu(e,a)&&bp(n,a);for(;i.length>t;)Xu(e,a=i[t++])&&(~YC(n,a)||bp(n,a));return n},$f=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],QC=H1,JC=$f,Ul=Object.keys||function(i){return QC(i,JC)},ZC=Ge,ex=x1,tx=Ct,rx=Bt,nx=mr,ix=Ul;Wl.f=ZC&&!ex?Object.defineProperties:function(i,e){rx(i);for(var t=nx(e),n=ix(e),a=n.length,o=0,s;a>o;)tx.f(i,s=n[o++],t[s]);return i};var ax=yt,W1=ax("document","documentElement"),ox=ta,sx=Nl,$p=ox("keys"),Gl=function(r){return $p[r]||($p[r]=sx(r))},lx=Bt,ux=Wl,wp=$f,dx=fo,cx=W1,hx=yf,fx=Gl,_p=">",Ep="<",rh="prototype",nh="script",V1=fx("IE_PROTO"),Qu=function(){},U1=function(r){return Ep+nh+_p+r+Ep+"/"+nh+_p},Sp=function(r){r.write(U1("")),r.close();var i=r.parentWindow.Object;return r=null,i},vx=function(){var r=hx("iframe"),i="java"+nh+":",e;return r.style.display="none",cx.appendChild(r),r.src=String(i),e=r.contentWindow.document,e.open(),e.write(U1("document.F=Object")),e.close(),e.F},os,Hs=function(){try{os=new ActiveXObject("htmlfile")}catch{}Hs=typeof document<"u"?document.domain&&os?Sp(os):vx():Sp(os);for(var r=wp.length;r--;)delete Hs[rh][wp[r]];return Hs()};dx[V1]=!0;var Yn=Object.create||function(i,e){var t;return i!==null?(Qu[rh]=lx(i),t=new Qu,Qu[rh]=null,t[V1]=i):t=Hs(),e===void 0?t:ux.f(t,e)},vo={},px=H1,gx=$f,yx=gx.concat("length","prototype");vo.f=Object.getOwnPropertyNames||function(i){return px(i,yx)};var wf={},Op=Vl,mx=Lt,bx=ra,$x=Array,wx=Math.max,G1=function(r,i,e){for(var t=mx(r),n=Op(i,t),a=Op(e===void 0?t:e,t),o=$x(wx(a-n,0)),s=0;n<a;n++,s++)bx(o,s,r[n]);return o.length=s,o},_x=un,Ex=mr,K1=vo.f,Sx=G1,q1=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ox=function(r){try{return K1(r)}catch{return Sx(q1)}};wf.f=function(i){return q1&&_x(i)==="Window"?Ox(i):K1(Ex(i))};var po={};po.f=Object.getOwnPropertySymbols;var Tx=Fr,na=function(r,i,e,t){return t&&t.enumerable?r[i]=e:Tx(r,i,e),r},Ix=Ct,_f=function(r,i,e){return Ix.f(r,i,e)},go={},Px=we;go.f=Px;var Tp=$e,kx=ze,Cx=go,xx=Ct.f,Ie=function(r){var i=Tp.Symbol||(Tp.Symbol={});kx(i,r)||xx(i,r,{value:Cx.f(r)})},Ax=Ke,Rx=yt,Dx=we,Mx=na,Y1=function(){var r=Rx("Symbol"),i=r&&r.prototype,e=i&&i.valueOf,t=Dx("toPrimitive");i&&!i[t]&&Mx(i,t,function(n){return Ax(e,this)},{arity:1})},Nx=mf,Fx=Br,Bx=Nx?{}.toString:function(){return"[object "+Fx(this)+"]"},Lx=mf,jx=Ct.f,zx=Fr,Hx=ze,Wx=Bx,Vx=we,Ip=Vx("toStringTag"),Xn=function(r,i,e,t){if(r){var n=e?r:r.prototype;Hx(n,Ip)||jx(n,Ip,{configurable:!0,value:i}),t&&!Lx&&zx(n,"toString",Wx)}},Ux=be,Gx=Te,Pp=Ux.WeakMap,Kx=Gx(Pp)&&/native code/.test(String(Pp)),qx=Kx,X1=be,Yx=rt,Xx=Fr,Ju=ze,Zu=gf,Qx=Gl,Jx=fo,kp="Object already initialized",ih=X1.TypeError,Zx=X1.WeakMap,sl,Ua,ll,eA=function(r){return ll(r)?Ua(r):sl(r,{})},tA=function(r){return function(i){var e;if(!Yx(i)||(e=Ua(i)).type!==r)throw new ih("Incompatible receiver, "+r+" required");return e}};if(qx||Zu.state){var sr=Zu.state||(Zu.state=new Zx);sr.get=sr.get,sr.has=sr.has,sr.set=sr.set,sl=function(r,i){if(sr.has(r))throw new ih(kp);return i.facade=r,sr.set(r,i),i},Ua=function(r){return sr.get(r)||{}},ll=function(r){return sr.has(r)}}else{var ui=Qx("state");Jx[ui]=!0,sl=function(r,i){if(Ju(r,ui))throw new ih(kp);return i.facade=r,Xx(r,ui,i),i},Ua=function(r){return Ju(r,ui)?r[ui]:{}},ll=function(r){return Ju(r,ui)}}var ia={set:sl,get:Ua,has:ll,enforce:eA,getterFor:tA},rA=cn,nA=me,iA=Ml,aA=kt,oA=Lt,sA=Hl,Cp=nA([].push),zr=function(r){var i=r===1,e=r===2,t=r===3,n=r===4,a=r===6,o=r===7,s=r===5||a;return function(l,u,d,c){for(var h=aA(l),f=iA(h),v=rA(u,d),p=oA(f),g=0,y=c||sA,m=i?y(l,p):e||o?y(l,0):void 0,w,b;p>g;g++)if((s||g in f)&&(w=f[g],b=v(w,g,h),r))if(i)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return w;case 6:return g;case 2:Cp(m,w)}else switch(r){case 4:return!1;case 7:Cp(m,w)}return a?-1:t||n?n:m}},aa={forEach:zr(0),map:zr(1),filter:zr(2),some:zr(3),every:zr(4),find:zr(5),findIndex:zr(6),filterReject:zr(7)},Kl=V,yo=be,Ef=Ke,lA=me,Mi=Ge,Ni=Zi,uA=le,Ve=ze,dA=je,ah=Bt,ql=mr,Sf=Fl,cA=qn,oh=Kn,Ga=Yn,Q1=Ul,hA=vo,J1=wf,fA=po,Z1=Gn,ew=Ct,vA=Wl,tw=Dl,xp=na,pA=_f,Of=ta,gA=Gl,rw=fo,Ap=Nl,yA=we,mA=go,bA=Ie,$A=Y1,wA=Xn,nw=ia,Yl=aa.forEach,_t=gA("hidden"),Xl="Symbol",Ka="prototype",_A=nw.set,Rp=nw.getterFor(Xl),nr=Object[Ka],In=yo.Symbol,Ca=In&&In[Ka],EA=yo.RangeError,SA=yo.TypeError,ed=yo.QObject,iw=Z1.f,Pn=ew.f,aw=J1.f,OA=tw.f,ow=lA([].push),Rr=Of("symbols"),mo=Of("op-symbols"),TA=Of("wks"),sh=!ed||!ed[Ka]||!ed[Ka].findChild,sw=function(r,i,e){var t=iw(nr,i);t&&delete nr[i],Pn(r,i,e),t&&r!==nr&&Pn(nr,i,t)},lh=Mi&&uA(function(){return Ga(Pn({},"a",{get:function(){return Pn(this,"a",{value:7}).a}})).a!==7})?sw:Pn,td=function(r,i){var e=Rr[r]=Ga(Ca);return _A(e,{type:Xl,tag:r,description:i}),Mi||(e.description=i),e},Ql=function(i,e,t){i===nr&&Ql(mo,e,t),ah(i);var n=Sf(e);return ah(t),Ve(Rr,n)?(t.enumerable?(Ve(i,_t)&&i[_t][n]&&(i[_t][n]=!1),t=Ga(t,{enumerable:oh(0,!1)})):(Ve(i,_t)||Pn(i,_t,oh(1,{})),i[_t][n]=!0),lh(i,n,t)):Pn(i,n,t)},Tf=function(i,e){ah(i);var t=ql(e),n=Q1(t).concat(cw(t));return Yl(n,function(a){(!Mi||Ef(lw,t,a))&&Ql(i,a,t[a])}),i},IA=function(i,e){return e===void 0?Ga(i):Tf(Ga(i),e)},lw=function(i){var e=Sf(i),t=Ef(OA,this,e);return this===nr&&Ve(Rr,e)&&!Ve(mo,e)?!1:t||!Ve(this,e)||!Ve(Rr,e)||Ve(this,_t)&&this[_t][e]?t:!0},uw=function(i,e){var t=ql(i),n=Sf(e);if(!(t===nr&&Ve(Rr,n)&&!Ve(mo,n))){var a=iw(t,n);return a&&Ve(Rr,n)&&!(Ve(t,_t)&&t[_t][n])&&(a.enumerable=!0),a}},dw=function(i){var e=aw(ql(i)),t=[];return Yl(e,function(n){!Ve(Rr,n)&&!Ve(rw,n)&&ow(t,n)}),t},cw=function(r){var i=r===nr,e=aw(i?mo:ql(r)),t=[];return Yl(e,function(n){Ve(Rr,n)&&(!i||Ve(nr,n))&&ow(t,Rr[n])}),t};Ni||(In=function(){if(dA(Ca,this))throw new SA("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:cA(arguments[0]),e=Ap(i),t=function(n){var a=this===void 0?yo:this;a===nr&&Ef(t,mo,n),Ve(a,_t)&&Ve(a[_t],e)&&(a[_t][e]=!1);var o=oh(1,n);try{lh(a,e,o)}catch(s){if(!(s instanceof EA))throw s;sw(a,e,o)}};return Mi&&sh&&lh(nr,e,{configurable:!0,set:t}),td(e,i)},Ca=In[Ka],xp(Ca,"toString",function(){return Rp(this).tag}),xp(In,"withoutSetter",function(r){return td(Ap(r),r)}),tw.f=lw,ew.f=Ql,vA.f=Tf,Z1.f=uw,hA.f=J1.f=dw,fA.f=cw,mA.f=function(r){return td(yA(r),r)},Mi&&pA(Ca,"description",{configurable:!0,get:function(){return Rp(this).description}}));Kl({global:!0,constructor:!0,wrap:!0,forced:!Ni,sham:!Ni},{Symbol:In});Yl(Q1(TA),function(r){bA(r)});Kl({target:Xl,stat:!0,forced:!Ni},{useSetter:function(){sh=!0},useSimple:function(){sh=!1}});Kl({target:"Object",stat:!0,forced:!Ni,sham:!Mi},{create:IA,defineProperty:Ql,defineProperties:Tf,getOwnPropertyDescriptor:uw});Kl({target:"Object",stat:!0,forced:!Ni},{getOwnPropertyNames:dw});$A();wA(In,Xl);rw[_t]=!0;var PA=Zi,hw=PA&&!!Symbol.for&&!!Symbol.keyFor,kA=V,CA=yt,xA=ze,AA=qn,fw=ta,RA=hw,rd=fw("string-to-symbol-registry"),DA=fw("symbol-to-string-registry");kA({target:"Symbol",stat:!0,forced:!RA},{for:function(r){var i=AA(r);if(xA(rd,i))return rd[i];var e=CA("Symbol")(i);return rd[i]=e,DA[e]=i,e}});var MA=V,NA=ze,FA=uo,BA=ea,LA=ta,jA=hw,Dp=LA("symbol-to-string-registry");MA({target:"Symbol",stat:!0,forced:!jA},{keyFor:function(i){if(!FA(i))throw new TypeError(BA(i)+" is not a symbol");if(NA(Dp,i))return Dp[i]}});var zA=me,bo=zA([].slice),HA=me,Mp=hn,WA=Te,Np=un,VA=qn,Fp=HA([].push),UA=function(r){if(WA(r))return r;if(Mp(r)){for(var i=r.length,e=[],t=0;t<i;t++){var n=r[t];typeof n=="string"?Fp(e,n):(typeof n=="number"||Np(n)==="Number"||Np(n)==="String")&&Fp(e,VA(n))}var a=e.length,o=!0;return function(s,l){if(o)return o=!1,l;if(Mp(this))return l;for(var u=0;u<a;u++)if(e[u]===s)return l}}},GA=V,vw=yt,pw=Xi,KA=Ke,$o=me,gw=le,Bp=Te,Lp=uo,yw=bo,qA=UA,YA=Zi,XA=String,Qr=vw("JSON","stringify"),ss=$o(/./.exec),jp=$o("".charAt),QA=$o("".charCodeAt),JA=$o("".replace),ZA=$o(1 .toString),eR=/[\uD800-\uDFFF]/g,zp=/^[\uD800-\uDBFF]$/,Hp=/^[\uDC00-\uDFFF]$/,Wp=!YA||gw(function(){var r=vw("Symbol")("stringify detection");return Qr([r])!=="[null]"||Qr({a:r})!=="{}"||Qr(Object(r))!=="{}"}),Vp=gw(function(){return Qr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Qr("\uDEAD")!=='"\\udead"'}),tR=function(r,i){var e=yw(arguments),t=qA(i);if(!(!Bp(t)&&(r===void 0||Lp(r))))return e[1]=function(n,a){if(Bp(t)&&(a=KA(t,this,XA(n),a)),!Lp(a))return a},pw(Qr,null,e)},rR=function(r,i,e){var t=jp(e,i-1),n=jp(e,i+1);return ss(zp,r)&&!ss(Hp,n)||ss(Hp,r)&&!ss(zp,t)?"\\u"+ZA(QA(r,0),16):r};Qr&&GA({target:"JSON",stat:!0,arity:3,forced:Wp||Vp},{stringify:function(i,e,t){var n=yw(arguments),a=pw(Wp?tR:Qr,null,n);return Vp&&typeof a=="string"?JA(a,eR,rR):a}});var nR=V,iR=Zi,aR=le,mw=po,oR=kt,sR=!iR||aR(function(){mw.f(1)});nR({target:"Object",stat:!0,forced:sR},{getOwnPropertySymbols:function(i){var e=mw.f;return e?e(oR(i)):[]}});var lR=Ie;lR("asyncIterator");var uR=Ie;uR("hasInstance");var dR=Ie;dR("isConcatSpreadable");var cR=Ie;cR("iterator");var hR=Ie;hR("match");var fR=Ie;fR("matchAll");var vR=Ie;vR("replace");var pR=Ie;pR("search");var gR=Ie;gR("species");var yR=Ie;yR("split");var mR=Ie,bR=Y1;mR("toPrimitive");bR();var $R=yt,wR=Ie,_R=Xn;wR("toStringTag");_R($R("Symbol"),"Symbol");var ER=Ie;ER("unscopables");var SR=be,OR=Xn;OR(SR.JSON,"JSON",!0);var TR=$e,IR=TR.Symbol,oa={},uh=Ge,PR=ze,bw=Function.prototype,kR=uh&&Object.getOwnPropertyDescriptor,If=PR(bw,"name"),CR=If&&function(){}.name==="something",xR=If&&(!uh||uh&&kR(bw,"name").configurable),AR={EXISTS:If,PROPER:CR,CONFIGURABLE:xR},RR=le,$w=!RR(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),DR=ze,MR=Te,NR=kt,FR=Gl,BR=$w,Up=FR("IE_PROTO"),dh=Object,LR=dh.prototype,Jl=BR?dh.getPrototypeOf:function(r){var i=NR(r);if(DR(i,Up))return i[Up];var e=i.constructor;return MR(e)&&i instanceof e?e.prototype:i instanceof dh?LR:null},jR=le,zR=Te,HR=rt,WR=Yn,Gp=Jl,VR=na,UR=we,ch=UR("iterator"),ww=!1,Sr,nd,id;[].keys&&(id=[].keys(),"next"in id?(nd=Gp(Gp(id)),nd!==Object.prototype&&(Sr=nd)):ww=!0);var GR=!HR(Sr)||jR(function(){var r={};return Sr[ch].call(r)!==r});GR?Sr={}:Sr=WR(Sr);zR(Sr[ch])||VR(Sr,ch,function(){return this});var _w={IteratorPrototype:Sr,BUGGY_SAFARI_ITERATORS:ww},KR=_w.IteratorPrototype,qR=Yn,YR=Kn,XR=Xn,QR=oa,JR=function(){return this},ZR=function(r,i,e,t){var n=i+" Iterator";return r.prototype=qR(KR,{next:YR(+!t,e)}),XR(r,n,!1,!0),QR[n]=JR,r},eD=me,tD=Pt,rD=function(r,i,e){try{return eD(tD(Object.getOwnPropertyDescriptor(r,i)[e]))}catch{}},nD=Te,iD=String,aD=TypeError,oD=function(r){if(typeof r=="object"||nD(r))return r;throw new aD("Can't set "+iD(r)+" as a prototype")},sD=rD,lD=Bt,uD=oD,Ew=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,i={},e;try{e=sD(Object.prototype,"__proto__","set"),e(i,[]),r=i instanceof Array}catch{}return function(n,a){return lD(n),uD(a),r?e(n,a):n.__proto__=a,n}}():void 0),dD=V,cD=Ke,hD=AR,fD=ZR,vD=Jl,pD=Xn,Kp=na,gD=we,qp=oa,yD=_w,mD=hD.PROPER,ls=yD.BUGGY_SAFARI_ITERATORS,ad=gD("iterator"),Yp="keys",us="values",Xp="entries",bD=function(){return this},Pf=function(r,i,e,t,n,a,o){fD(e,i,t);var s=function(y){if(y===n&&h)return h;if(!ls&&y&&y in d)return d[y];switch(y){case Yp:return function(){return new e(this,y)};case us:return function(){return new e(this,y)};case Xp:return function(){return new e(this,y)}}return function(){return new e(this)}},l=i+" Iterator",u=!1,d=r.prototype,c=d[ad]||d["@@iterator"]||n&&d[n],h=!ls&&c||s(n),f=i==="Array"&&d.entries||c,v,p,g;if(f&&(v=vD(f.call(new r)),v!==Object.prototype&&v.next&&(pD(v,l,!0,!0),qp[l]=bD)),mD&&n===us&&c&&c.name!==us&&(u=!0,h=function(){return cD(c,this)}),n)if(p={values:s(us),keys:a?h:s(Yp),entries:s(Xp)},o)for(g in p)(ls||u||!(g in d))&&Kp(d,g,p[g]);else dD({target:i,proto:!0,forced:ls||u},p);return o&&d[ad]!==h&&Kp(d,ad,h,{name:n}),qp[i]=h,p},kf=function(r,i){return{value:r,done:i}},$D=mr,Qp=oa,Sw=ia;Ct.f;var wD=Pf,ds=kf,Ow="Array Iterator",_D=Sw.set,ED=Sw.getterFor(Ow);wD(Array,"Array",function(r,i){_D(this,{type:Ow,target:$D(r),index:0,kind:i})},function(){var r=ED(this),i=r.target,e=r.index++;if(!i||e>=i.length)return r.target=void 0,ds(void 0,!0);switch(r.kind){case"keys":return ds(e,!1);case"values":return ds(i[e],!1)}return ds([e,i[e]],!1)},"values");Qp.Arguments=Qp.Array;var SD={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},OD=SD,TD=be,ID=Br,PD=Fr,Jp=oa,kD=we,Zp=kD("toStringTag");for(var od in OD){var eg=TD[od],sd=eg&&eg.prototype;sd&&ID(sd)!==Zp&&PD(sd,Zp,od),Jp[od]=Jp.Array}var CD=IR,Tw=CD,xD=we,AD=Ct.f,tg=xD("metadata"),rg=Function.prototype;rg[tg]===void 0&&AD(rg,tg,{value:null});var RD=Ie;RD("asyncDispose");var DD=Ie;DD("dispose");var MD=Ie;MD("metadata");var ND=Tw,FD=ND,BD=yt,LD=me,Cf=BD("Symbol"),jD=Cf.keyFor,zD=LD(Cf.prototype.valueOf),Iw=Cf.isRegisteredSymbol||function(i){try{return jD(zD(i))!==void 0}catch{return!1}},HD=V,WD=Iw;HD({target:"Symbol",stat:!0},{isRegisteredSymbol:WD});var VD=ta,Pw=yt,UD=me,GD=uo,KD=we,ul=Pw("Symbol"),ng=ul.isWellKnownSymbol,kw=Pw("Object","getOwnPropertyNames"),qD=UD(ul.prototype.valueOf),ig=VD("wks");for(var ld=0,ag=kw(ul),YD=ag.length;ld<YD;ld++)try{var og=ag[ld];GD(ul[og])&&KD(og)}catch{}var Cw=function(i){if(ng&&ng(i))return!0;try{for(var e=qD(i),t=0,n=kw(ig),a=n.length;t<a;t++)if(ig[n[t]]==e)return!0}catch{}return!1},XD=V,QD=Cw;XD({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:QD});var JD=Ie;JD("matcher");var ZD=Ie;ZD("observable");var eM=V,tM=Iw;eM({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:tM});var rM=V,nM=Cw;rM({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:nM});var iM=Ie;iM("metadataKey");var aM=Ie;aM("patternMatch");var oM=Ie;oM("replaceAll");var sM=FD,lM=sM,xf=lM,$i=q(xf),Af=me,uM=Ll,dM=qn,cM=vf,hM=Af("".charAt),sg=Af("".charCodeAt),fM=Af("".slice),lg=function(r){return function(i,e){var t=dM(cM(i)),n=uM(e),a=t.length,o,s;return n<0||n>=a?r?"":void 0:(o=sg(t,n),o<55296||o>56319||n+1===a||(s=sg(t,n+1))<56320||s>57343?r?hM(t,n):o:r?fM(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},vM={codeAt:lg(!1),charAt:lg(!0)},pM=vM.charAt,gM=qn,xw=ia,yM=Pf,ug=kf,Aw="String Iterator",mM=xw.set,bM=xw.getterFor(Aw);yM(String,"String",function(r){mM(this,{type:Aw,string:gM(r),index:0})},function(){var i=bM(this),e=i.string,t=i.index,n;return t>=e.length?ug(void 0,!0):(n=pM(e,t),i.index+=n.length,ug(n,!1))});var $M=go,wM=$M.f("iterator"),_M=wM,Rw=_M,EM=Rw,SM=EM,OM=SM,TM=OM,Dw=TM,IM=q(Dw);function Fi(r){"@babel/helpers - typeof";return Fi=typeof $i=="function"&&typeof IM=="symbol"?function(i){return typeof i}:function(i){return i&&typeof $i=="function"&&i.constructor===$i&&i!==$i.prototype?"symbol":typeof i},Fi(r)}var PM=go,kM=PM.f("toPrimitive"),CM=kM,xM=CM,AM=xM,RM=AM,DM=RM,MM=DM,NM=MM,FM=q(NM);function BM(r,i){if(Fi(r)!=="object"||r===null)return r;var e=r[FM];if(e!==void 0){var t=e.call(r,i||"default");if(Fi(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function Mw(r){var i=BM(r,"string");return Fi(i)==="symbol"?i:String(i)}function dg(r,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Bl(r,Mw(t.key),t)}}function Zl(r,i,e){return i&&dg(r.prototype,i),e&&dg(r,e),Bl(r,"prototype",{writable:!1}),r}function Jr(r,i,e){return i=Mw(i),i in r?Bl(r,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[i]=e,r}var Nw=me,LM=Pt,jM=rt,zM=ze,cg=bo,HM=lo,Fw=Function,WM=Nw([].concat),VM=Nw([].join),ud={},UM=function(r,i,e){if(!zM(ud,i)){for(var t=[],n=0;n<i;n++)t[n]="a["+n+"]";ud[i]=Fw("C,a","return new C("+VM(t,",")+")")}return ud[i](r,e)},Bw=HM?Fw.bind:function(i){var e=LM(this),t=e.prototype,n=cg(arguments,1),a=function(){var s=WM(n,cg(arguments));return this instanceof a?UM(e,s.length,s):e.apply(i,s)};return jM(t)&&(a.prototype=t),a},GM=V,hg=Bw;GM({target:"Function",proto:!0,forced:Function.bind!==hg},{bind:hg});var KM=be,qM=$e,ut=function(r,i){var e=qM[r+"Prototype"],t=e&&e[i];if(t)return t;var n=KM[r],a=n&&n.prototype;return a&&a[i]},YM=ut,XM=YM("Function","bind"),QM=je,JM=XM,dd=Function.prototype,ZM=function(r){var i=r.bind;return r===dd||QM(dd,r)&&i===dd.bind?JM:i},e2=ZM,Lw=e2,t2=Lw,jw=q(t2),r2=Pt,n2=kt,i2=Ml,a2=Lt,o2=TypeError,fg=function(r){return function(i,e,t,n){r2(e);var a=n2(i),o=i2(a),s=a2(a),l=r?s-1:0,u=r?-1:1;if(t<2)for(;;){if(l in o){n=o[l],l+=u;break}if(l+=u,r?l<0:s<=l)throw new o2("Reduce of empty array with no initial value")}for(;r?l>=0:s>l;l+=u)l in o&&(n=e(n,o[l],l,a));return n}},s2={left:fg(!1),right:fg(!0)},l2=le,eu=function(r,i){var e=[][r];return!!e&&l2(function(){e.call(null,i||function(){return 1},1)})},u2=be,d2=un,wo=d2(u2.process)==="process",c2=V,h2=s2.left,f2=eu,vg=Ji,v2=wo,p2=!v2&&vg>79&&vg<83,g2=p2||!f2("reduce");c2({target:"Array",proto:!0,forced:g2},{reduce:function(i){var e=arguments.length;return h2(this,i,e,e>1?arguments[1]:void 0)}});var y2=ut,m2=y2("Array","reduce"),b2=je,$2=m2,cd=Array.prototype,w2=function(r){var i=r.reduce;return r===cd||b2(cd,r)&&i===cd.reduce?$2:i},_2=w2,E2=_2,S2=E2,O2=q(S2),T2=V,I2=aa.filter,P2=ho,k2=P2("filter");T2({target:"Array",proto:!0,forced:!k2},{filter:function(i){return I2(this,i,arguments.length>1?arguments[1]:void 0)}});var C2=ut,x2=C2("Array","filter"),A2=je,R2=x2,hd=Array.prototype,D2=function(r){var i=r.filter;return r===hd||A2(hd,r)&&i===hd.filter?R2:i},M2=D2,N2=M2,F2=N2,wi=q(F2),B2=V,L2=aa.map,j2=ho,z2=j2("map");B2({target:"Array",proto:!0,forced:!z2},{map:function(i){return L2(this,i,arguments.length>1?arguments[1]:void 0)}});var H2=ut,W2=H2("Array","map"),V2=je,U2=W2,fd=Array.prototype,G2=function(r){var i=r.map;return r===fd||V2(fd,r)&&i===fd.map?U2:i},K2=G2,q2=K2,Y2=q2,Zt=q(Y2),X2=hn,Q2=Lt,J2=jl,Z2=cn,zw=function(r,i,e,t,n,a,o,s){for(var l=n,u=0,d=o?Z2(o,s):!1,c,h;u<t;)u in e&&(c=d?d(e[u],u,i):e[u],a>0&&X2(c)?(h=Q2(c),l=zw(r,i,c,h,l,a-1)-1):(J2(l+1),r[l]=c),l++),u++;return l},eN=zw,tN=V,rN=eN,nN=Pt,iN=kt,aN=Lt,oN=Hl;tN({target:"Array",proto:!0},{flatMap:function(i){var e=iN(this),t=aN(e),n;return nN(i),n=oN(e,0),n.length=rN(n,e,e,t,0,1,i,arguments.length>1?arguments[1]:void 0),n}});var sN=ut;sN("Array","flatMap");var lN=Ke,pg=Bt,uN=pf,Hw=function(r,i,e){var t,n;pg(r);try{if(t=uN(r,"return"),!t){if(i==="throw")throw e;return e}t=lN(t,r)}catch(a){n=!0,t=a}if(i==="throw")throw e;if(n)throw t;return pg(t),e},dN=Bt,cN=Hw,hN=function(r,i,e,t){try{return t?i(dN(e)[0],e[1]):i(e)}catch(n){cN(r,"throw",n)}},fN=we,vN=oa,pN=fN("iterator"),gN=Array.prototype,Ww=function(r){return r!==void 0&&(vN.Array===r||gN[pN]===r)},yN=Br,gg=pf,mN=Qi,bN=oa,$N=we,wN=$N("iterator"),tu=function(r){if(!mN(r))return gg(r,wN)||gg(r,"@@iterator")||bN[yN(r)]},_N=Ke,EN=Pt,SN=Bt,ON=ea,TN=tu,IN=TypeError,Rf=function(r,i){var e=arguments.length<2?TN(r):i;if(EN(e))return SN(_N(e,r));throw new IN(ON(r)+" is not iterable")},PN=cn,kN=Ke,CN=kt,xN=hN,AN=Ww,RN=zl,DN=Lt,yg=ra,MN=Rf,NN=tu,mg=Array,FN=function(i){var e=CN(i),t=RN(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=PN(a,n>2?arguments[2]:void 0));var s=NN(e),l=0,u,d,c,h,f,v;if(s&&!(this===mg&&AN(s)))for(h=MN(e,s),f=h.next,d=t?new this:[];!(c=kN(f,h)).done;l++)v=o?xN(h,a,[c.value,l],!0):c.value,yg(d,l,v);else for(u=DN(e),d=t?new this(u):mg(u);u>l;l++)v=o?a(e[l],l):e[l],yg(d,l,v);return d.length=l,d},BN=we,Vw=BN("iterator"),Uw=!1;try{var LN=0,bg={next:function(){return{done:!!LN++}},return:function(){Uw=!0}};bg[Vw]=function(){return this},Array.from(bg,function(){throw 2})}catch{}var Gw=function(r,i){try{if(!i&&!Uw)return!1}catch{return!1}var e=!1;try{var t={};t[Vw]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},jN=V,zN=FN,HN=Gw,WN=!HN(function(r){Array.from(r)});jN({target:"Array",stat:!0,forced:WN},{from:zN});var VN=$e,UN=VN.Array.from,GN=UN,Kw=GN,KN=Kw,Df=q(KN),qN=tu,YN=qN,XN=YN,QN=XN,JN=QN,ZN=JN,eF=ZN,tF=eF,qw=tF,Yw=q(qw),rF=qw,Mf=q(rF),nF=V,iF=hn;nF({target:"Array",stat:!0},{isArray:iF});var aF=$e,oF=aF.Array.isArray,sF=oF,Xw=sF,lF=Xw,uF=lF,dF=uF,cF=dF,hF=cF,Qw=q(hF);function fF(r){if(Qw(r))return r}var vF=Ge,pF=hn,gF=TypeError,yF=Object.getOwnPropertyDescriptor,mF=vF&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}(),Jw=mF?function(r,i){if(pF(r)&&!yF(r,"length").writable)throw new gF("Cannot set read only .length");return r.length=i}:function(r,i){return r.length=i},bF=V,$F=kt,wF=Lt,_F=Jw,EF=jl,SF=le,OF=SF(function(){return[].push.call({length:4294967296},1)!==4294967297}),TF=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}},IF=OF||!TF();bF({target:"Array",proto:!0,arity:1,forced:IF},{push:function(i){var e=$F(this),t=wF(e),n=arguments.length;EF(t+n);for(var a=0;a<n;a++)e[t]=arguments[a],t++;return _F(e,t),t}});var PF=ut,kF=PF("Array","push"),CF=je,xF=kF,vd=Array.prototype,AF=function(r){var i=r.push;return r===vd||CF(vd,r)&&i===vd.push?xF:i},RF=AF,DF=RF,MF=DF,NF=MF,FF=NF,BF=FF,Zw=BF,LF=q(Zw);function jF(r,i){var e=r==null?null:typeof $i<"u"&&Yw(r)||r["@@iterator"];if(e!=null){var t,n,a,o,s=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,i===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(LF(s).call(s,t.value),s.length!==i);l=!0);}catch(d){u=!0,n=d}finally{try{if(!l&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(u)throw n}}return s}}var zF=V,$g=hn,HF=zl,WF=rt,wg=Vl,VF=Lt,UF=mr,GF=ra,KF=we,qF=ho,YF=bo,XF=qF("slice"),QF=KF("species"),pd=Array,JF=Math.max;zF({target:"Array",proto:!0,forced:!XF},{slice:function(i,e){var t=UF(this),n=VF(t),a=wg(i,n),o=wg(e===void 0?n:e,n),s,l,u;if($g(t)&&(s=t.constructor,HF(s)&&(s===pd||$g(s.prototype))?s=void 0:WF(s)&&(s=s[QF],s===null&&(s=void 0)),s===pd||s===void 0))return YF(t,a,o);for(l=new(s===void 0?pd:s)(JF(o-a,0)),u=0;a<o;a++,u++)a in t&&GF(l,u,t[a]);return l.length=u,l}});var ZF=ut,eB=ZF("Array","slice"),tB=je,rB=eB,gd=Array.prototype,nB=function(r){var i=r.slice;return r===gd||tB(gd,r)&&i===gd.slice?rB:i},iB=nB,e_=iB,aB=e_,oB=aB,sB=oB,lB=sB,t_=lB,uB=q(t_),dB=Kw,cB=dB,hB=cB,fB=hB,vB=fB,r_=q(vB);function hh(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function n_(r,i){var e;if(r){if(typeof r=="string")return hh(r,i);var t=uB(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return r_(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hh(r,i)}}function pB(){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(r,i){return fF(r)||jF(r,i)||n_(r,i)||pB()}function gB(r){if(Qw(r))return hh(r)}function yB(r){if(typeof $i<"u"&&Yw(r)!=null||r["@@iterator"]!=null)return r_(r)}function mB(){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(r){return gB(r)||yB(r)||n_(r)||mB()}var bB=Tw,ru=q(bB),$B=ut,wB=$B("Array","concat"),_B=je,EB=wB,yd=Array.prototype,SB=function(r){var i=r.concat;return r===yd||_B(yd,r)&&i===yd.concat?EB:i},OB=SB,TB=OB,IB=TB,nu=q(IB),PB=e_,iu=q(PB),kB=yt,CB=me,xB=vo,AB=po,RB=Bt,DB=CB([].concat),Nf=kB("Reflect","ownKeys")||function(i){var e=xB.f(RB(i)),t=AB.f;return t?DB(e,t(i)):e},MB=V,NB=Nf;MB({target:"Reflect",stat:!0},{ownKeys:NB});var FB=$e,BB=FB.Reflect.ownKeys,LB=BB,jB=LB,zB=jB,HB=q(zB),WB=Xw,Nt=q(WB),VB=V,UB=kt,i_=Ul,GB=le,KB=GB(function(){i_(1)});VB({target:"Object",stat:!0,forced:KB},{keys:function(i){return i_(UB(i))}});var qB=$e,YB=qB.Object.keys,XB=YB,QB=XB,JB=QB,Ff=q(JB),ZB=aa.forEach,eL=eu,tL=eL("forEach"),rL=tL?[].forEach:function(i){return ZB(this,i,arguments.length>1?arguments[1]:void 0)},nL=V,_g=rL;nL({target:"Array",proto:!0,forced:[].forEach!==_g},{forEach:_g});var iL=ut,aL=iL("Array","forEach"),oL=aL,sL=oL,lL=Br,uL=ze,dL=je,cL=sL,md=Array.prototype,hL={DOMTokenList:!0,NodeList:!0},a_=function(r){var i=r.forEach;return r===md||dL(md,r)&&i===md.forEach||uL(hL,lL(r))?cL:i},fL=a_,Fn=q(fL),vL=V,pL=me,gL=hn,yL=pL([].reverse),Eg=[1,2];vL({target:"Array",proto:!0,forced:String(Eg)===String(Eg.reverse())},{reverse:function(){return gL(this)&&(this.length=this.length),yL(this)}});var mL=ut,bL=mL("Array","reverse"),$L=je,wL=bL,bd=Array.prototype,_L=function(r){var i=r.reverse;return r===bd||$L(bd,r)&&i===bd.reverse?wL:i},EL=_L,o_=EL,SL=o_,OL=q(SL),Sg=ea,TL=TypeError,s_=function(r,i){if(!delete r[i])throw new TL("Cannot delete property "+Sg(i)+" of "+Sg(r))},IL=V,PL=kt,kL=Vl,CL=Ll,xL=Lt,AL=Jw,RL=jl,DL=Hl,ML=ra,$d=s_,NL=ho,FL=NL("splice"),BL=Math.max,LL=Math.min;IL({target:"Array",proto:!0,forced:!FL},{splice:function(i,e){var t=PL(this),n=xL(t),a=kL(i,n),o=arguments.length,s,l,u,d,c,h;for(o===0?s=l=0:o===1?(s=0,l=n-a):(s=o-2,l=LL(BL(CL(e),0),n-a)),RL(n+s-l),u=DL(t,l),d=0;d<l;d++)c=a+d,c in t&&ML(u,d,t[c]);if(u.length=l,s<l){for(d=a;d<n-l;d++)c=d+l,h=d+s,c in t?t[h]=t[c]:$d(t,h);for(d=n;d>n-l+s;d--)$d(t,d-1)}else if(s>l)for(d=n-l;d>a;d--)c=d+l-1,h=d+s-1,c in t?t[h]=t[c]:$d(t,h);for(d=0;d<s;d++)t[d+a]=arguments[d+2];return AL(t,n-l+s),u}});var jL=ut,zL=jL("Array","splice"),HL=je,WL=zL,wd=Array.prototype,VL=function(r){var i=r.splice;return r===wd||HL(wd,r)&&i===wd.splice?WL:i},UL=VL,GL=UL,KL=GL,l_=q(KL),Og=Ge,qL=me,YL=Ke,XL=le,_d=Ul,QL=po,JL=Dl,ZL=kt,ej=Ml,di=Object.assign,Tg=Object.defineProperty,tj=qL([].concat),rj=!di||XL(function(){if(Og&&di({b:1},di(Tg({},"a",{enumerable:!0,get:function(){Tg(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},i={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(n){i[n]=n}),di({},r)[e]!==7||_d(di({},i)).join("")!==t})?function(i,e){for(var t=ZL(i),n=arguments.length,a=1,o=QL.f,s=JL.f;n>a;)for(var l=ej(arguments[a++]),u=o?tj(_d(l),o(l)):_d(l),d=u.length,c=0,h;d>c;)h=u[c++],(!Og||YL(s,l,h))&&(t[h]=l[h]);return t}:di,nj=V,Ig=rj;nj({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ig},{assign:Ig});var ij=$e,aj=ij.Object.assign,oj=aj,sj=oj,lj=sj,uj=q(lj),dj=V,cj=le,hj=kt,u_=Jl,fj=$w,vj=cj(function(){u_(1)});dj({target:"Object",stat:!0,forced:vj,sham:!fj},{getPrototypeOf:function(i){return u_(hj(i))}});var pj=$e,gj=pj.Object.getPrototypeOf,yj=gj,mj=yj,bj=V,$j=Ge,wj=Yn;bj({target:"Object",stat:!0,sham:!$j},{create:wj});var _j=$e,Ej=_j.Object,Sj=function(i,e){return Ej.create(i,e)},Oj=Sj,d_=Oj,Tj=d_,Ij=q(Tj),fh=$e,Pj=Xi;fh.JSON||(fh.JSON={stringify:JSON.stringify});var kj=function(i,e,t){return Pj(fh.JSON.stringify,null,arguments)},Cj=kj,xj=Cj,Aj=xj,Rj=q(Aj),Dj=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Mj=TypeError,c_=function(r,i){if(r<i)throw new Mj("Not enough arguments");return r},h_=be,Nj=Xi,Fj=Te,Bj=Dj,Lj=dn,jj=bo,zj=c_,Hj=h_.Function,Wj=/MSIE .\./.test(Lj)||Bj&&function(){var r=h_.Bun.version.split(".");return r.length<3||r[0]==="0"&&(r[1]<3||r[1]==="3"&&r[2]==="0")}(),f_=function(r,i){var e=i?2:1;return Wj?function(t,n){var a=zj(arguments.length,1)>e,o=Fj(t)?t:Hj(t),s=a?jj(arguments,e):[],l=a?function(){Nj(o,this,s)}:o;return i?r(l,n):r(l)}:r},Vj=V,v_=be,Uj=f_,Pg=Uj(v_.setInterval,!0);Vj({global:!0,bind:!0,forced:v_.setInterval!==Pg},{setInterval:Pg});var Gj=V,p_=be,Kj=f_,kg=Kj(p_.setTimeout,!0);Gj({global:!0,bind:!0,forced:p_.setTimeout!==kg},{setTimeout:kg});var qj=$e,Yj=qj.setTimeout,Xj=Yj,Qj=q(Xj),g_={exports:{}};(function(r){function i(t){if(t)return e(t);this._callbacks=new Map}function e(t){return Object.assign(t,i.prototype),t._callbacks=new Map,t}i.prototype.on=function(t,n){const a=this._callbacks.get(t)??[];return a.push(n),this._callbacks.set(t,a),this},i.prototype.once=function(t,n){const a=(...o)=>{this.off(t,a),n.apply(this,o)};return a.fn=n,this.on(t,a),this},i.prototype.off=function(t,n){if(t===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(t),this;const a=this._callbacks.get(t);if(a){for(const[o,s]of a.entries())if(s===n||s.fn===n){a.splice(o,1);break}a.length===0?this._callbacks.delete(t):this._callbacks.set(t,a)}return this},i.prototype.emit=function(t,...n){const a=this._callbacks.get(t);if(a){const o=[...a];for(const s of o)s.apply(this,n)}return this},i.prototype.listeners=function(t){return this._callbacks.get(t)??[]},i.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let n=0;for(const a of this._callbacks.values())n+=a.length;return n},i.prototype.hasListeners=function(t){return this.listenerCount(t)>0},i.prototype.addEventListener=i.prototype.on,i.prototype.removeListener=i.prototype.off,i.prototype.removeEventListener=i.prototype.off,i.prototype.removeAllListeners=i.prototype.off,r.exports=i})(g_);var Jj=g_.exports,Zj=q(Jj);/*! 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 ar(){return ar=Object.assign||function(r){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},ar.apply(this,arguments)}function qt(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i}function cs(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var vh;typeof Object.assign!="function"?vh=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(i),t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:vh=Object.assign;var Bn=vh,Cg=["","webkit","Moz","MS","ms","o"],ez=typeof document>"u"?{style:{}}:document.createElement("div"),tz="function",_i=Math.round,Ln=Math.abs,Bf=Date.now;function au(r,i){for(var e,t,n=i[0].toUpperCase()+i.slice(1),a=0;a<Cg.length;){if(e=Cg[a],t=e?e+n:i,t in r)return t;a++}}var Or;typeof window>"u"?Or={}:Or=window;var y_=au(ez.style,"touchAction"),m_=y_!==void 0;function rz(){if(!m_)return!1;var r={},i=Or.CSS&&Or.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=i?Or.CSS.supports("touch-action",e):!0}),r}var b_="compute",$_="auto",ph="manipulation",kn="none",qa="pan-x",Ya="pan-y",hs=rz(),nz=/mobile|tablet|ip(ad|hone|od)|android/i,w_="ontouchstart"in Or,iz=au(Or,"PointerEvent")!==void 0,az=w_&&nz.test(navigator.userAgent),_o="touch",oz="pen",Lf="mouse",sz="kinect",lz=25,pt=1,Qn=2,Fe=4,Tt=8,dl=1,Eo=2,So=4,Oo=8,Bi=16,pr=Eo|So,Cn=Oo|Bi,__=pr|Cn,E_=["x","y"],cl=["clientX","clientY"];function Tr(r,i,e){var t;if(r)if(r.forEach)r.forEach(i,e);else if(r.length!==void 0)for(t=0;t<r.length;)i.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&i.call(e,r[t],t,r)}function ou(r,i){return typeof r===tz?r.apply(i&&i[0]||void 0,i):r}function Sn(r,i){return r.indexOf(i)>-1}function uz(r){if(Sn(r,kn))return kn;var i=Sn(r,qa),e=Sn(r,Ya);return i&&e?kn:i||e?i?qa:Ya:Sn(r,ph)?ph:$_}var S_=function(){function r(e,t){this.manager=e,this.set(t)}var i=r.prototype;return i.set=function(t){t===b_&&(t=this.compute()),m_&&this.manager.element.style&&hs[t]&&(this.manager.element.style[y_]=t),this.actions=t.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var t=[];return Tr(this.manager.recognizers,function(n){ou(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),uz(t.join(" "))},i.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Sn(o,kn)&&!hs[kn],l=Sn(o,Ya)&&!hs[Ya],u=Sn(o,qa)&&!hs[qa];if(s){var d=t.pointers.length===1,c=t.distance<2,h=t.deltaTime<250;if(d&&c&&h)return}if(!(u&&l)&&(s||l&&a&pr||u&&a&Cn))return this.preventSrc(n)},i.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function jf(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}function O_(r){var i=r.length;if(i===1)return{x:_i(r[0].clientX),y:_i(r[0].clientY)};for(var e=0,t=0,n=0;n<i;)e+=r[n].clientX,t+=r[n].clientY,n++;return{x:_i(e/i),y:_i(t/i)}}function xg(r){for(var i=[],e=0;e<r.pointers.length;)i[e]={clientX:_i(r.pointers[e].clientX),clientY:_i(r.pointers[e].clientY)},e++;return{timeStamp:Bf(),pointers:i,center:O_(i),deltaX:r.deltaX,deltaY:r.deltaY}}function hl(r,i,e){e||(e=E_);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.sqrt(t*t+n*n)}function gh(r,i,e){e||(e=E_);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.atan2(n,t)*180/Math.PI}function T_(r,i){return r===i?dl:Ln(r)>=Ln(i)?r<0?Eo:So:i<0?Oo:Bi}function dz(r,i){var e=i.center,t=r.offsetDelta||{},n=r.prevDelta||{},a=r.prevInput||{};(i.eventType===pt||a.eventType===Fe)&&(n=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-t.x),i.deltaY=n.y+(e.y-t.y)}function I_(r,i,e){return{x:i/r||0,y:e/r||0}}function cz(r,i){return hl(i[0],i[1],cl)/hl(r[0],r[1],cl)}function hz(r,i){return gh(i[1],i[0],cl)+gh(r[1],r[0],cl)}function fz(r,i){var e=r.lastInterval||i,t=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Tt&&(t>lz||e.velocity===void 0)){var l=i.deltaX-e.deltaX,u=i.deltaY-e.deltaY,d=I_(t,l,u);a=d.x,o=d.y,n=Ln(d.x)>Ln(d.y)?d.x:d.y,s=T_(l,u),r.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function vz(r,i){var e=r.session,t=i.pointers,n=t.length;e.firstInput||(e.firstInput=xg(i)),n>1&&!e.firstMultiple?e.firstMultiple=xg(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=i.center=O_(t);i.timeStamp=Bf(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=gh(s,l),i.distance=hl(s,l),dz(e,i),i.offsetDirection=T_(i.deltaX,i.deltaY);var u=I_(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=u.x,i.overallVelocityY=u.y,i.overallVelocity=Ln(u.x)>Ln(u.y)?u.x:u.y,i.scale=o?cz(o.pointers,t):1,i.rotation=o?hz(o.pointers,t):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,fz(e,i);var d=r.element,c=i.srcEvent,h;c.composedPath?h=c.composedPath()[0]:c.path?h=c.path[0]:h=c.target,jf(h,d)&&(d=h),i.target=d}function pz(r,i,e){var t=e.pointers.length,n=e.changedPointers.length,a=i&pt&&t-n===0,o=i&(Fe|Tt)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=i,vz(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function Xa(r){return r.trim().split(/\s+/g)}function Da(r,i,e){Tr(Xa(i),function(t){r.addEventListener(t,e,!1)})}function Ma(r,i,e){Tr(Xa(i),function(t){r.removeEventListener(t,e,!1)})}function Ag(r){var i=r.ownerDocument||r;return i.defaultView||i.parentWindow||window}var sa=function(){function r(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){ou(e.options.enable,[e])&&n.handler(a)},this.init()}var i=r.prototype;return i.handler=function(){},i.init=function(){this.evEl&&Da(this.element,this.evEl,this.domHandler),this.evTarget&&Da(this.target,this.evTarget,this.domHandler),this.evWin&&Da(Ag(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&Ma(this.element,this.evEl,this.domHandler),this.evTarget&&Ma(this.target,this.evTarget,this.domHandler),this.evWin&&Ma(Ag(this.element),this.evWin,this.domHandler)},r}();function jn(r,i,e){if(r.indexOf&&!e)return r.indexOf(i);for(var t=0;t<r.length;){if(e&&r[t][e]==i||!e&&r[t]===i)return t;t++}return-1}var gz={pointerdown:pt,pointermove:Qn,pointerup:Fe,pointercancel:Tt,pointerout:Tt},yz={2:_o,3:oz,4:Lf,5:sz},P_="pointerdown",k_="pointermove pointerup pointercancel";Or.MSPointerEvent&&!Or.PointerEvent&&(P_="MSPointerDown",k_="MSPointerMove MSPointerUp MSPointerCancel");var C_=function(r){qt(i,r);function i(){var t,n=i.prototype;return n.evEl=P_,n.evWin=k_,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=i.prototype;return e.handler=function(n){var a=this.store,o=!1,s=n.type.toLowerCase().replace("ms",""),l=gz[s],u=yz[n.pointerType]||n.pointerType,d=u===_o,c=jn(a,n.pointerId,"pointerId");l&pt&&(n.button===0||d)?c<0&&(a.push(n),c=a.length-1):l&(Fe|Tt)&&(o=!0),!(c<0)&&(a[c]=n,this.callback(this.manager,l,{pointers:a,changedPointers:[n],pointerType:u,srcEvent:n}),o&&a.splice(c,1))},i}(sa);function Qa(r){return Array.prototype.slice.call(r,0)}function zf(r,i,e){for(var t=[],n=[],a=0;a<r.length;){var o=i?r[a][i]:r[a];jn(n,o)<0&&t.push(r[a]),n[a]=o,a++}return e&&(i?t=t.sort(function(s,l){return s[i]>l[i]}):t=t.sort()),t}var mz={touchstart:pt,touchmove:Qn,touchend:Fe,touchcancel:Tt},bz="touchstart touchmove touchend touchcancel",Hf=function(r){qt(i,r);function i(){var t;return i.prototype.evTarget=bz,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=i.prototype;return e.handler=function(n){var a=mz[n.type],o=$z.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:_o,srcEvent:n})},i}(sa);function $z(r,i){var e=Qa(r.touches),t=this.targetIds;if(i&(pt|Qn)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=Qa(r.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return jf(u.target,l)}),i===pt)for(n=0;n<a.length;)t[a[n].identifier]=!0,n++;for(n=0;n<o.length;)t[o[n].identifier]&&s.push(o[n]),i&(Fe|Tt)&&delete t[o[n].identifier],n++;if(s.length)return[zf(a.concat(s),"identifier",!0),s]}var wz={mousedown:pt,mousemove:Qn,mouseup:Fe},_z="mousedown",Ez="mousemove mouseup",Wf=function(r){qt(i,r);function i(){var t,n=i.prototype;return n.evEl=_z,n.evWin=Ez,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=i.prototype;return e.handler=function(n){var a=wz[n.type];a&pt&&n.button===0&&(this.pressed=!0),a&Qn&&n.which!==1&&(a=Fe),this.pressed&&(a&Fe&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Lf,srcEvent:n}))},i}(sa),Sz=2500,Rg=25;function Dg(r){var i=r.changedPointers,e=i[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=n.indexOf(t);s>-1&&n.splice(s,1)};setTimeout(a,Sz)}}function Oz(r,i){r&pt?(this.primaryTouch=i.changedPointers[0].identifier,Dg.call(this,i)):r&(Fe|Tt)&&Dg.call(this,i)}function Tz(r){for(var i=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var n=this.lastTouches[t],a=Math.abs(i-n.x),o=Math.abs(e-n.y);if(a<=Rg&&o<=Rg)return!0}return!1}var x_=function(){var r=function(i){qt(e,i);function e(n,a){var o;return o=i.call(this,n,a)||this,o.handler=function(s,l,u){var d=u.pointerType===_o,c=u.pointerType===Lf;if(!(c&&u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents)){if(d)Oz.call(cs(cs(o)),l,u);else if(c&&Tz.call(cs(cs(o)),u))return;o.callback(s,l,u)}},o.touch=new Hf(o.manager,o.handler),o.mouse=new Wf(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(sa);return r}();function Iz(r){var i,e=r.options.inputClass;return e?i=e:iz?i=C_:az?i=Hf:w_?i=x_:i=Wf,new i(r,pz)}function Ei(r,i,e){return Array.isArray(r)?(Tr(r,e[i],e),!0):!1}var Ws=1,Gt=2,Li=4,Zr=8,Ir=Zr,Ja=16,hr=32,Pz=1;function kz(){return Pz++}function fs(r,i){var e=i.manager;return e?e.get(r):r}function Mg(r){return r&Ja?"cancel":r&Zr?"end":r&Li?"move":r&Gt?"start":""}var To=function(){function r(e){e===void 0&&(e={}),this.options=ar({enable:!0},e),this.id=kz(),this.manager=null,this.state=Ws,this.simultaneous={},this.requireFail=[]}var i=r.prototype;return i.set=function(t){return Bn(this.options,t),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(t){if(Ei(t,"recognizeWith",this))return this;var n=this.simultaneous;return t=fs(t,this),n[t.id]||(n[t.id]=t,t.recognizeWith(this)),this},i.dropRecognizeWith=function(t){return Ei(t,"dropRecognizeWith",this)?this:(t=fs(t,this),delete this.simultaneous[t.id],this)},i.requireFailure=function(t){if(Ei(t,"requireFailure",this))return this;var n=this.requireFail;return t=fs(t,this),jn(n,t)===-1&&(n.push(t),t.requireFailure(this)),this},i.dropRequireFailure=function(t){if(Ei(t,"dropRequireFailure",this))return this;t=fs(t,this);var n=jn(this.requireFail,t);return n>-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},i.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a<Zr&&o(n.options.event+Mg(a)),o(n.options.event),t.additionalEvent&&o(t.additionalEvent),a>=Zr&&o(n.options.event+Mg(a))},i.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=hr},i.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(hr|Ws)))return!1;t++}return!0},i.recognize=function(t){var n=Bn({},t);if(!ou(this.options.enable,[this,n])){this.reset(),this.state=hr;return}this.state&(Ir|Ja|hr)&&(this.state=Ws),this.state=this.process(n),this.state&(Gt|Li|Zr|Ja)&&this.tryEmit(n)},i.process=function(t){},i.getTouchAction=function(){},i.reset=function(){},r}(),yh=function(r){qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,ar({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var e=i.prototype;return e.getTouchAction=function(){return[ph]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime<o.time;if(this.reset(),n.eventType&pt&&this.count===0)return this.failTimeout();if(l&&u&&s){if(n.eventType!==Fe)return this.failTimeout();var d=this.pTime?n.timeStamp-this.pTime<o.interval:!0,c=!this.pCenter||hl(this.pCenter,n.center)<o.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!c||!d?this.count=1:this.count+=1,this._input=n;var h=this.count%o.taps;if(h===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Ir,a.tryEmit()},o.interval),Gt):Ir}return hr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=hr},this.options.interval),hr},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))},i}(To),ji=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({pointers:1},t))||this}var e=i.prototype;return e.attrTest=function(n){var a=this.options.pointers;return a===0||n.pointers.length===a},e.process=function(n){var a=this.state,o=n.eventType,s=a&(Gt|Li),l=this.attrTest(n);return s&&(o&Tt||!l)?a|Ja:s||l?o&Fe?a|Zr:a&Gt?a|Li:Gt:hr},i}(To);function A_(r){return r===Bi?"down":r===Oo?"up":r===Eo?"left":r===So?"right":""}var Vf=function(r){qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,ar({event:"pan",threshold:10,pointers:1,direction:__},t))||this,n.pX=null,n.pY=null,n}var e=i.prototype;return e.getTouchAction=function(){var n=this.options.direction,a=[];return n&pr&&a.push(Ya),n&Cn&&a.push(qa),a},e.directionTest=function(n){var a=this.options,o=!0,s=n.distance,l=n.direction,u=n.deltaX,d=n.deltaY;return l&a.direction||(a.direction&pr?(l=u===0?dl:u<0?Eo:So,o=u!==this.pX,s=Math.abs(n.deltaX)):(l=d===0?dl:d<0?Oo:Bi,o=d!==this.pY,s=Math.abs(n.deltaY))),n.direction=l,o&&s>a.threshold&&l&a.direction},e.attrTest=function(n){return ji.prototype.attrTest.call(this,n)&&(this.state&Gt||!(this.state&Gt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=A_(n.direction);a&&(n.additionalEvent=this.options.event+a),r.prototype.emit.call(this,n)},i}(ji),R_=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({event:"swipe",threshold:10,velocity:.3,direction:pr|Cn,pointers:1},t))||this}var e=i.prototype;return e.getTouchAction=function(){return Vf.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(pr|Cn)?o=n.overallVelocity:a&pr?o=n.overallVelocityX:a&Cn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Ln(o)>this.options.velocity&&n.eventType&Fe},e.emit=function(n){var a=A_(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(ji),D_=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({event:"pinch",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Gt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}r.prototype.emit.call(this,n)},i}(ji),M_=function(r){qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,ar({event:"rotate",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Gt)},i}(ji),N_=function(r){qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,ar({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[$_]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime>o.time;if(this._input=n,!l||!s||n.eventType&(Fe|Tt)&&!u)this.reset();else if(n.eventType&pt)this.reset(),this._timer=setTimeout(function(){a.state=Ir,a.tryEmit()},o.time);else if(n.eventType&Fe)return Ir;return hr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Ir&&(n&&n.eventType&Fe?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Bf(),this.manager.emit(this.options.event,this._input)))},i}(To),F_={domEvents:!1,touchAction:b_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ng=[[M_,{enable:!1}],[D_,{enable:!1},["rotate"]],[R_,{direction:pr}],[Vf,{direction:pr},["swipe"]],[yh],[yh,{event:"doubletap",taps:2},["tap"]],[N_]],Cz=1,Fg=2;function Bg(r,i){var e=r.element;if(e.style){var t;Tr(r.options.cssProps,function(n,a){t=au(e.style,a),i?(r.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=r.oldCssProps[t]||""}),i||(r.oldCssProps={})}}function xz(r,i){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var Lg=function(){function r(e,t){var n=this;this.options=Bn({},F_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Iz(this),this.touchAction=new S_(this,this.options.touchAction),Bg(this,!0),Tr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=r.prototype;return i.set=function(t){return Bn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},i.stop=function(t){this.session.stopped=t?Fg:Cz},i.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Ir)&&(n.curRecognizer=null,s=null);for(var l=0;l<o.length;)a=o[l],n.stopped!==Fg&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Gt|Li|Zr)&&(n.curRecognizer=a,s=a),l++}},i.get=function(t){if(t instanceof To)return t;for(var n=this.recognizers,a=0;a<n.length;a++)if(n[a].options.event===t)return n[a];return null},i.add=function(t){if(Ei(t,"add",this))return this;var n=this.get(t.options.event);return n&&this.remove(n),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},i.remove=function(t){if(Ei(t,"remove",this))return this;var n=this.get(t);if(t){var a=this.recognizers,o=jn(a,n);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},i.on=function(t,n){if(t===void 0||n===void 0)return this;var a=this.handlers;return Tr(Xa(t),function(o){a[o]=a[o]||[],a[o].push(n)}),this},i.off=function(t,n){if(t===void 0)return this;var a=this.handlers;return Tr(Xa(t),function(o){n?a[o]&&a[o].splice(jn(a[o],n),1):delete a[o]}),this},i.emit=function(t,n){this.options.domEvents&&xz(t,n);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){n.type=t,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](n),o++}},i.destroy=function(){this.element&&Bg(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),Az={touchstart:pt,touchmove:Qn,touchend:Fe,touchcancel:Tt},Rz="touchstart",Dz="touchstart touchmove touchend touchcancel",Mz=function(r){qt(i,r);function i(){var t,n=i.prototype;return n.evTarget=Rz,n.evWin=Dz,t=r.apply(this,arguments)||this,t.started=!1,t}var e=i.prototype;return e.handler=function(n){var a=Az[n.type];if(a===pt&&(this.started=!0),!!this.started){var o=Nz.call(this,n,a);a&(Fe|Tt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:_o,srcEvent:n})}},i}(sa);function Nz(r,i){var e=Qa(r.touches),t=Qa(r.changedTouches);return i&(Fe|Tt)&&(e=zf(e.concat(t),"identifier",!0)),[e,t]}function B_(r,i,e){var t="DEPRECATED METHOD: "+i+`
33
+ `+e+` AT
34
+ `;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.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,t,a),r.apply(this,arguments)}}var L_=B_(function(r,i,e){for(var t=Object.keys(i),n=0;n<t.length;)(!e||e&&r[t[n]]===void 0)&&(r[t[n]]=i[t[n]]),n++;return r},"extend","Use `assign`."),Fz=B_(function(r,i){return L_(r,i,!0)},"merge","Use `assign`.");function Bz(r,i,e){var t=i.prototype,n;n=r.prototype=Object.create(t),n.constructor=r,n._super=t,e&&Bn(n,e)}function jg(r,i){return function(){return r.apply(i,arguments)}}var Lz=function(){var r=function(e,t){return t===void 0&&(t={}),new Lg(e,ar({recognizers:Ng.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=__,r.DIRECTION_DOWN=Bi,r.DIRECTION_LEFT=Eo,r.DIRECTION_RIGHT=So,r.DIRECTION_UP=Oo,r.DIRECTION_HORIZONTAL=pr,r.DIRECTION_VERTICAL=Cn,r.DIRECTION_NONE=dl,r.DIRECTION_DOWN=Bi,r.INPUT_START=pt,r.INPUT_MOVE=Qn,r.INPUT_END=Fe,r.INPUT_CANCEL=Tt,r.STATE_POSSIBLE=Ws,r.STATE_BEGAN=Gt,r.STATE_CHANGED=Li,r.STATE_ENDED=Zr,r.STATE_RECOGNIZED=Ir,r.STATE_CANCELLED=Ja,r.STATE_FAILED=hr,r.Manager=Lg,r.Input=sa,r.TouchAction=S_,r.TouchInput=Hf,r.MouseInput=Wf,r.PointerEventInput=C_,r.TouchMouseInput=x_,r.SingleTouchInput=Mz,r.Recognizer=To,r.AttrRecognizer=ji,r.Tap=yh,r.Pan=Vf,r.Swipe=R_,r.Pinch=D_,r.Rotate=M_,r.Press=N_,r.on=Da,r.off=Ma,r.each=Tr,r.merge=Fz,r.extend=L_,r.bindFn=jg,r.assign=Bn,r.inherit=Bz,r.bindFn=jg,r.prefixed=au,r.toArray=Qa,r.inArray=jn,r.uniqueArray=zf,r.splitStr=Xa,r.boolOrFn=ou,r.hasParent=jf,r.addEventListeners=Da,r.removeEventListeners=Ma,r.defaults=Bn({},F_,{preset:Ng}),r}(),jz=Lz;function j_(r,i){var e=typeof ru<"u"&&Mf(r)||r["@@iterator"];if(!e){if(Nt(r)||(e=zz(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function zz(r,i){var e;if(r){if(typeof r=="string")return zg(r,i);var t=iu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Df(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return zg(r,i)}}function zg(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var z_=ru("DELETE");function Hz(r){for(var i,e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return H_.apply(void 0,nu(i=[{},r]).call(i,t))}function H_(){var r=fl.apply(void 0,arguments);return V_(r),r}function fl(){for(var r=arguments.length,i=new Array(r),e=0;e<r;e++)i[e]=arguments[e];if(i.length<2)return i[0];if(i.length>2){var t;return fl.apply(void 0,nu(t=[H_(i[0],i[1])]).call(t,Et(iu(i).call(i,2))))}var n=i[0],a=i[1];if(n instanceof Date&&a instanceof Date)return n.setTime(a.getTime()),n;var o=j_(HB(a)),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(a,l)&&(a[l]===z_?delete n[l]:n[l]!==null&&a[l]!==null&&typeof n[l]=="object"&&typeof a[l]=="object"&&!Nt(n[l])&&!Nt(a[l])?n[l]=fl(n[l],a[l]):n[l]=W_(a[l]))}}catch(u){o.e(u)}finally{o.f()}return n}function W_(r){return Nt(r)?Zt(r).call(r,function(i){return W_(i)}):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):fl({},r):r}function V_(r){for(var i=0,e=Ff(r);i<e.length;i++){var t=e[i];r[t]===z_?delete r[t]:typeof r[t]=="object"&&r[t]!==null&&V_(r[t])}}function Wz(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}var Vz=typeof window<"u"?window.Hammer||jz:function(){return Wz()};function Er(r){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var t=Vz(this._dom.overlay);t.on("tap",jw(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Fn(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){Uz(a.target,r)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}Zj(Er.prototype);Er.current=null;Er.prototype.destroy=function(){var r,i;this.deactivate();var e=j_(OL(r=l_(i=this._cleanupQueue).call(i,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};Er.prototype.activate=function(){Er.current&&Er.current.deactivate(),Er.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)};Er.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")};Er.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function Uz(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}var Gz=zl,Kz=ea,qz=TypeError,U_=function(r){if(Gz(r))return r;throw new qz(Kz(r)+" is not a constructor")},Yz=V,Xz=yt,Ed=Xi,Qz=Bw,Hg=U_,Jz=Bt,Wg=rt,Zz=Yn,G_=le,Uf=Xz("Reflect","construct"),e3=Object.prototype,t3=[].push,K_=G_(function(){function r(){}return!(Uf(function(){},[],r)instanceof r)}),q_=!G_(function(){Uf(function(){})}),Vg=K_||q_;Yz({target:"Reflect",stat:!0,forced:Vg,sham:Vg},{construct:function(i,e){Hg(i),Jz(e);var t=arguments.length<3?i:Hg(arguments[2]);if(q_&&!K_)return Uf(i,e,t);if(i===t){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Ed(t3,n,e),new(Ed(Qz,i,n))}var a=t.prototype,o=Zz(Wg(a)?a:e3),s=Ed(i,o,e);return Wg(s)?s:o}});var r3=$e,n3=r3.Reflect.construct,i3=n3,a3=i3,o3=a3,Vs=q(o3),s3=$e,l3=s3.Object.getOwnPropertySymbols,u3=l3,d3=u3,c3=d3,Ug=q(c3),Y_={exports:{}},h3=V,f3=le,v3=mr,X_=Gn.f,Q_=Ge,p3=!Q_||f3(function(){X_(1)});h3({target:"Object",stat:!0,forced:p3,sham:!Q_},{getOwnPropertyDescriptor:function(i,e){return X_(v3(i),e)}});var g3=$e,J_=g3.Object,y3=Y_.exports=function(i,e){return J_.getOwnPropertyDescriptor(i,e)};J_.getOwnPropertyDescriptor.sham&&(y3.sham=!0);var m3=Y_.exports,b3=m3,$3=b3,w3=$3,Z_=q(w3),_3=V,E3=Ge,S3=Nf,O3=mr,T3=Gn,I3=ra;_3({target:"Object",stat:!0,sham:!E3},{getOwnPropertyDescriptors:function(i){for(var e=O3(i),t=T3.f,n=S3(e),a={},o=0,s,l;n.length>o;)l=t(e,s=n[o++]),l!==void 0&&I3(a,s,l);return a}});var P3=$e,k3=P3.Object.getOwnPropertyDescriptors,C3=k3,x3=C3,A3=x3,Gg=q(A3),e0={exports:{}},R3=V,D3=Ge,Kg=Wl.f;R3({target:"Object",stat:!0,forced:Object.defineProperties!==Kg,sham:!D3},{defineProperties:Kg});var M3=$e,t0=M3.Object,N3=e0.exports=function(i,e){return t0.defineProperties(i,e)};t0.defineProperties.sham&&(N3.sham=!0);var F3=e0.exports,B3=F3,L3=B3,j3=L3,z3=q(j3),H3=R1,W3=q(H3);function r0(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var V3=d_,U3=V3,G3=U3,K3=G3,n0=K3,q3=q(n0),Y3=V,X3=Ew;Y3({target:"Object",stat:!0},{setPrototypeOf:X3});var Q3=$e,J3=Q3.Object.setPrototypeOf,Z3=J3,e5=Z3,t5=e5,r5=t5,n5=r5,i5=n5,i0=i5,mh=q(i0),a5=Lw,o5=a5,s5=o5,l5=s5,u5=l5,a0=q(u5);function bh(r,i){var e;return bh=mh?a0(e=mh).call(e):function(n,a){return n.__proto__=a,n},bh(r,i)}function d5(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=q3(i&&i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Bl(r,"prototype",{writable:!1}),i&&bh(r,i)}function c5(r,i){if(i&&(Fi(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r0(r)}var h5=mj,f5=h5,v5=f5,p5=v5,o0=p5,qg=q(o0);function vl(r){var i;return vl=mh?a0(i=qg).call(i):function(t){return t.__proto__||qg(t)},vl(r)}var s0={exports:{}},l0={exports:{}};(function(r){var i=xf,e=Dw;function t(n){"@babel/helpers - typeof";return r.exports=t=typeof i=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof i=="function"&&a.constructor===i&&a!==i.prototype?"symbol":typeof a},r.exports.__esModule=!0,r.exports.default=r.exports,t(n)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports})(l0);var g5=l0.exports,y5=a_,m5=y5,b5=m5,$5=b5,w5=$5,Yg=ze,_5=Nf,E5=Gn,S5=Ct,O5=function(r,i,e){for(var t=_5(i),n=S5.f,a=E5.f,o=0;o<t.length;o++){var s=t[o];!Yg(r,s)&&!(e&&Yg(e,s))&&n(r,s,a(i,s))}},T5=rt,I5=Fr,P5=function(r,i){T5(i)&&"cause"in i&&I5(r,"cause",i.cause)},k5=me,u0=Error,C5=k5("".replace),x5=function(r){return String(new u0(r).stack)}("zxcasd"),d0=/\n\s*at [^:]*:[^\n]*/,A5=d0.test(x5),R5=function(r,i){if(A5&&typeof r=="string"&&!u0.prepareStackTrace)for(;i--;)r=C5(r,d0,"");return r},D5=le,M5=Kn,N5=!D5(function(){var r=new Error("a");return"stack"in r?(Object.defineProperty(r,"stack",M5(1,7)),r.stack!==7):!0}),F5=Fr,B5=R5,L5=N5,Xg=Error.captureStackTrace,j5=function(r,i,e,t){L5&&(Xg?Xg(r,i):F5(r,"stack",B5(e,t)))},z5=cn,H5=Ke,W5=Bt,V5=ea,U5=Ww,G5=Lt,Qg=je,K5=Rf,q5=tu,Jg=Hw,Y5=TypeError,Us=function(r,i){this.stopped=r,this.result=i},Zg=Us.prototype,Jn=function(r,i,e){var t=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),l=z5(i,t),u,d,c,h,f,v,p,g=function(m){return u&&Jg(u,"normal",m),new Us(!0,m)},y=function(m){return n?(W5(m),s?l(m[0],m[1],g):l(m[0],m[1])):s?l(m,g):l(m)};if(a)u=r.iterator;else if(o)u=r;else{if(d=q5(r),!d)throw new Y5(V5(r)+" is not iterable");if(U5(d)){for(c=0,h=G5(r);h>c;c++)if(f=y(r[c]),f&&Qg(Zg,f))return f;return new Us(!1)}u=K5(r,d)}for(v=a?r.next:u.next;!(p=H5(v,u)).done;){try{f=y(p.value)}catch(m){Jg(u,"throw",m)}if(typeof f=="object"&&f&&Qg(Zg,f))return f}return new Us(!1)},X5=qn,Q5=function(r,i){return r===void 0?arguments.length<2?"":i:X5(r)},J5=V,Z5=je,eH=Jl,pl=Ew,tH=O5,c0=Yn,Sd=Fr,Od=Kn,rH=P5,nH=j5,iH=Jn,aH=Q5,oH=we,sH=oH("toStringTag"),gl=Error,lH=[].push,zi=function(i,e){var t=Z5(Td,this),n;pl?n=pl(new gl,t?eH(this):Td):(n=t?this:c0(Td),Sd(n,sH,"Error")),e!==void 0&&Sd(n,"message",aH(e)),nH(n,zi,n.stack,1),arguments.length>2&&rH(n,arguments[2]);var a=[];return iH(i,lH,{that:a}),Sd(n,"errors",a),n};pl?pl(zi,gl):tH(zi,gl,{name:!0});var Td=zi.prototype=c0(gl.prototype,{constructor:Od(1,zi),message:Od(1,""),name:Od(1,"AggregateError")});J5({global:!0,constructor:!0,arity:2},{AggregateError:zi});var uH=yt,dH=_f,cH=we,hH=Ge,ey=cH("species"),h0=function(r){var i=uH(r);hH&&i&&!i[ey]&&dH(i,ey,{configurable:!0,get:function(){return this}})},fH=je,vH=TypeError,Gf=function(r,i){if(fH(i,r))return r;throw new vH("Incorrect invocation")},ty=Bt,pH=U_,gH=Qi,yH=we,mH=yH("species"),f0=function(r,i){var e=ty(r).constructor,t;return e===void 0||gH(t=ty(e)[mH])?i:pH(t)},bH=dn,v0=/(?:ipad|iphone|ipod).*applewebkit/i.test(bH),Ft=be,$H=Xi,wH=cn,ry=Te,_H=ze,p0=le,ny=W1,EH=bo,iy=yf,SH=c_,OH=v0,TH=wo,$h=Ft.setImmediate,wh=Ft.clearImmediate,IH=Ft.process,Id=Ft.Dispatch,PH=Ft.Function,ay=Ft.MessageChannel,kH=Ft.String,Pd=0,Na={},oy="onreadystatechange",Za,bn,kd,Cd;p0(function(){Za=Ft.location});var Kf=function(r){if(_H(Na,r)){var i=Na[r];delete Na[r],i()}},xd=function(r){return function(){Kf(r)}},sy=function(r){Kf(r.data)},ly=function(r){Ft.postMessage(kH(r),Za.protocol+"//"+Za.host)};(!$h||!wh)&&($h=function(i){SH(arguments.length,1);var e=ry(i)?i:PH(i),t=EH(arguments,1);return Na[++Pd]=function(){$H(e,void 0,t)},bn(Pd),Pd},wh=function(i){delete Na[i]},TH?bn=function(r){IH.nextTick(xd(r))}:Id&&Id.now?bn=function(r){Id.now(xd(r))}:ay&&!OH?(kd=new ay,Cd=kd.port2,kd.port1.onmessage=sy,bn=wH(Cd.postMessage,Cd)):Ft.addEventListener&&ry(Ft.postMessage)&&!Ft.importScripts&&Za&&Za.protocol!=="file:"&&!p0(ly)?(bn=ly,Ft.addEventListener("message",sy,!1)):oy in iy("script")?bn=function(r){ny.appendChild(iy("script"))[oy]=function(){ny.removeChild(this),Kf(r)}}:bn=function(r){setTimeout(xd(r),0)});var g0={set:$h,clear:wh},y0=function(){this.head=null,this.tail=null};y0.prototype={add:function(r){var i={item:r,next:null},e=this.tail;e?e.next=i:this.head=i,this.tail=i},get:function(){var r=this.head;if(r){var i=this.head=r.next;return i===null&&(this.tail=null),r.item}}};var m0=y0,CH=dn,xH=/ipad|iphone|ipod/i.test(CH)&&typeof Pebble<"u",AH=dn,RH=/web0s(?!.*chrome)/i.test(AH),zn=be,uy=cn,DH=Gn.f,Ad=g0.set,MH=m0,NH=v0,FH=xH,BH=RH,Rd=wo,dy=zn.MutationObserver||zn.WebKitMutationObserver,cy=zn.document,hy=zn.process,vs=zn.Promise,fy=DH(zn,"queueMicrotask"),_h=fy&&fy.value,ci,Dd,Md,ps,vy;if(!_h){var gs=new MH,ys=function(){var r,i;for(Rd&&(r=hy.domain)&&r.exit();i=gs.get();)try{i()}catch(e){throw gs.head&&ci(),e}r&&r.enter()};!NH&&!Rd&&!BH&&dy&&cy?(Dd=!0,Md=cy.createTextNode(""),new dy(ys).observe(Md,{characterData:!0}),ci=function(){Md.data=Dd=!Dd}):!FH&&vs&&vs.resolve?(ps=vs.resolve(void 0),ps.constructor=vs,vy=uy(ps.then,ps),ci=function(){vy(ys)}):Rd?ci=function(){hy.nextTick(ys)}:(Ad=uy(Ad,zn),ci=function(){Ad(ys)}),_h=function(r){gs.head||ci(),gs.add(r)}}var LH=_h,jH=function(r,i){try{arguments.length===1?console.error(r):console.error(r,i)}catch{}},la=function(r){try{return{error:!1,value:r()}}catch(i){return{error:!0,value:i}}},zH=be,ua=zH.Promise,b0=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",HH=b0,WH=wo,VH=!HH&&!WH&&typeof window=="object"&&typeof document=="object",UH=be,Fa=ua,GH=Te,KH=C1,qH=N1,YH=we,XH=VH,QH=b0,Nd=Ji,py=Fa&&Fa.prototype,JH=YH("species"),Eh=!1,$0=GH(UH.PromiseRejectionEvent),ZH=KH("Promise",function(){var r=qH(Fa),i=r!==String(Fa);if(!i&&Nd===66||!(py.catch&&py.finally))return!0;if(!Nd||Nd<51||!/native code/.test(r)){var e=new Fa(function(a){a(1)}),t=function(a){a(function(){},function(){})},n=e.constructor={};if(n[JH]=t,Eh=e.then(function(){})instanceof t,!Eh)return!0}return!i&&(XH||QH)&&!$0}),Io={CONSTRUCTOR:ZH,REJECTION_EVENT:$0,SUBCLASSING:Eh},br={},gy=Pt,e4=TypeError,t4=function(r){var i,e;this.promise=new r(function(t,n){if(i!==void 0||e!==void 0)throw new e4("Bad Promise constructor");i=t,e=n}),this.resolve=gy(i),this.reject=gy(e)};br.f=function(r){return new t4(r)};var r4=V,yl=wo,an=be,Po=Ke,n4=na,i4=Xn,a4=h0,o4=Pt,Sh=Te,s4=rt,l4=Gf,u4=f0,w0=g0.set,qf=LH,d4=jH,c4=la,h4=m0,_0=ia,Oh=ua,E0=Io,S0=br,su="Promise",O0=E0.CONSTRUCTOR,f4=E0.REJECTION_EVENT,Fd=_0.getterFor(su),v4=_0.set,p4=Oh&&Oh.prototype,Si=Oh,Bd=p4,T0=an.TypeError,Th=an.document,Yf=an.process,Ih=S0.f,g4=Ih,y4=!!(Th&&Th.createEvent&&an.dispatchEvent),I0="unhandledrejection",m4="rejectionhandled",yy=0,P0=1,b4=2,Xf=1,k0=2,ms,my,$4,C0=function(r){var i;return s4(r)&&Sh(i=r.then)?i:!1},x0=function(r,i){var e=i.value,t=i.state===P0,n=t?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,l,u,d;try{n?(t||(i.rejection===k0&&_4(i),i.rejection=Xf),n===!0?l=e:(s&&s.enter(),l=n(e),s&&(s.exit(),d=!0)),l===r.promise?o(new T0("Promise-chain cycle")):(u=C0(l))?Po(u,l,a,o):a(l)):o(e)}catch(c){s&&!d&&s.exit(),o(c)}},A0=function(r,i){r.notified||(r.notified=!0,qf(function(){for(var e=r.reactions,t;t=e.get();)x0(t,r);r.notified=!1,i&&!r.rejection&&w4(r)}))},R0=function(r,i,e){var t,n;y4?(t=Th.createEvent("Event"),t.promise=i,t.reason=e,t.initEvent(r,!1,!0),an.dispatchEvent(t)):t={promise:i,reason:e},!f4&&(n=an["on"+r])?n(t):r===I0&&d4("Unhandled promise rejection",e)},w4=function(r){Po(w0,an,function(){var i=r.facade,e=r.value,t=by(r),n;if(t&&(n=c4(function(){yl?Yf.emit("unhandledRejection",e,i):R0(I0,i,e)}),r.rejection=yl||by(r)?k0:Xf,n.error))throw n.value})},by=function(r){return r.rejection!==Xf&&!r.parent},_4=function(r){Po(w0,an,function(){var i=r.facade;yl?Yf.emit("rejectionHandled",i):R0(m4,i,r.value)})},Oi=function(r,i,e){return function(t){r(i,t,e)}},xi=function(r,i,e){r.done||(r.done=!0,e&&(r=e),r.value=i,r.state=b4,A0(r,!0))},Ph=function(r,i,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===i)throw new T0("Promise can't be resolved itself");var t=C0(i);t?qf(function(){var n={done:!1};try{Po(t,i,Oi(Ph,n,r),Oi(xi,n,r))}catch(a){xi(n,a,r)}}):(r.value=i,r.state=P0,A0(r,!1))}catch(n){xi({done:!1},n,r)}}};O0&&(Si=function(i){l4(this,Bd),o4(i),Po(ms,this);var e=Fd(this);try{i(Oi(Ph,e),Oi(xi,e))}catch(t){xi(e,t)}},Bd=Si.prototype,ms=function(i){v4(this,{type:su,done:!1,notified:!1,parent:!1,reactions:new h4,rejection:!1,state:yy,value:void 0})},ms.prototype=n4(Bd,"then",function(i,e){var t=Fd(this),n=Ih(u4(this,Si));return t.parent=!0,n.ok=Sh(i)?i:!0,n.fail=Sh(e)&&e,n.domain=yl?Yf.domain:void 0,t.state===yy?t.reactions.add(n):qf(function(){x0(n,t)}),n.promise}),my=function(){var r=new ms,i=Fd(r);this.promise=r,this.resolve=Oi(Ph,i),this.reject=Oi(xi,i)},S0.f=Ih=function(r){return r===Si||r===$4?new my(r):g4(r)});r4({global:!0,constructor:!0,wrap:!0,forced:O0},{Promise:Si});i4(Si,su,!1,!0);a4(su);var E4=ua,S4=Gw,O4=Io.CONSTRUCTOR,lu=O4||!S4(function(r){E4.all(r).then(void 0,function(){})}),T4=V,I4=Ke,P4=Pt,k4=br,C4=la,x4=Jn,A4=lu;T4({target:"Promise",stat:!0,forced:A4},{all:function(i){var e=this,t=k4.f(e),n=t.resolve,a=t.reject,o=C4(function(){var s=P4(e.resolve),l=[],u=0,d=1;x4(i,function(c){var h=u++,f=!1;d++,I4(s,e,c).then(function(v){f||(f=!0,l[h]=v,--d||n(l))},a)}),--d||n(l)});return o.error&&a(o.value),t.promise}});var R4=V,D4=Io.CONSTRUCTOR,$y=ua;$y&&$y.prototype;R4({target:"Promise",proto:!0,forced:D4,real:!0},{catch:function(r){return this.then(void 0,r)}});var M4=V,N4=Ke,F4=Pt,B4=br,L4=la,j4=Jn,z4=lu;M4({target:"Promise",stat:!0,forced:z4},{race:function(i){var e=this,t=B4.f(e),n=t.reject,a=L4(function(){var o=F4(e.resolve);j4(i,function(s){N4(o,e,s).then(t.resolve,n)})});return a.error&&n(a.value),t.promise}});var H4=V,W4=Ke,V4=br,U4=Io.CONSTRUCTOR;H4({target:"Promise",stat:!0,forced:U4},{reject:function(i){var e=V4.f(this);return W4(e.reject,void 0,i),e.promise}});var G4=Bt,K4=rt,q4=br,D0=function(r,i){if(G4(r),K4(i)&&i.constructor===r)return i;var e=q4.f(r),t=e.resolve;return t(i),e.promise},Y4=V,X4=yt,Q4=oP,J4=ua,Z4=Io.CONSTRUCTOR,eW=D0,tW=X4("Promise"),rW=!Z4;Y4({target:"Promise",stat:!0,forced:Q4},{resolve:function(i){return eW(rW&&this===tW?J4:this,i)}});var nW=V,iW=Ke,aW=Pt,oW=br,sW=la,lW=Jn,uW=lu;nW({target:"Promise",stat:!0,forced:uW},{allSettled:function(i){var e=this,t=oW.f(e),n=t.resolve,a=t.reject,o=sW(function(){var s=aW(e.resolve),l=[],u=0,d=1;lW(i,function(c){var h=u++,f=!1;d++,iW(s,e,c).then(function(v){f||(f=!0,l[h]={status:"fulfilled",value:v},--d||n(l))},function(v){f||(f=!0,l[h]={status:"rejected",reason:v},--d||n(l))})}),--d||n(l)});return o.error&&a(o.value),t.promise}});var dW=V,cW=Ke,hW=Pt,fW=yt,vW=br,pW=la,gW=Jn,yW=lu,wy="No one promise resolved";dW({target:"Promise",stat:!0,forced:yW},{any:function(i){var e=this,t=fW("AggregateError"),n=vW.f(e),a=n.resolve,o=n.reject,s=pW(function(){var l=hW(e.resolve),u=[],d=0,c=1,h=!1;gW(i,function(f){var v=d++,p=!1;c++,cW(l,e,f).then(function(g){p||h||(h=!0,a(g))},function(g){p||h||(p=!0,u[v]=g,--c||o(new t(u,wy)))})}),--c||o(new t(u,wy))});return s.error&&o(s.value),n.promise}});var mW=V,kh=ua,bW=le,$W=yt,wW=Te,_W=f0,_y=D0,EW=kh&&kh.prototype,SW=!!kh&&bW(function(){EW.finally.call({then:function(){}},function(){})});mW({target:"Promise",proto:!0,real:!0,forced:SW},{finally:function(r){var i=_W(this,$W("Promise")),e=wW(r);return this.then(e?function(t){return _y(i,r()).then(function(){return t})}:r,e?function(t){return _y(i,r()).then(function(){throw t})}:r)}});var OW=$e,TW=OW.Promise,IW=TW,PW=IW,kW=V,CW=br;kW({target:"Promise",stat:!0},{withResolvers:function(){var i=CW.f(this);return{promise:i.promise,resolve:i.resolve,reject:i.reject}}});var xW=PW,AW=xW,RW=V,DW=br,MW=la;RW({target:"Promise",stat:!0,forced:!0},{try:function(r){var i=DW.f(this),e=MW(r);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var NW=AW,FW=NW,BW=FW,LW=o_,jW=LW,zW=jW,HW=zW,WW=HW;(function(r){var i=g5.default,e=D1,t=xf,n=n0,a=o0,o=w5,s=Zw,l=i0,u=BW,d=WW,c=t_;function h(){r.exports=h=function(){return v},r.exports.__esModule=!0,r.exports.default=r.exports;var f,v={},p=Object.prototype,g=p.hasOwnProperty,y=e||function(M,k,x){M[k]=x.value},m=typeof t=="function"?t:{},w=m.iterator||"@@iterator",b=m.asyncIterator||"@@asyncIterator",E=m.toStringTag||"@@toStringTag";function O(M,k,x){return e(M,k,{value:x,enumerable:!0,configurable:!0,writable:!0}),M[k]}try{O({},"")}catch{O=function(x,H,J){return x[H]=J}}function S(M,k,x,H){var J=k&&k.prototype instanceof Z?k:Z,Y=n(J.prototype),Ae=new Dt(H||[]);return y(Y,"_invoke",{value:Ne(M,x,Ae)}),Y}function T(M,k,x){try{return{type:"normal",arg:M.call(k,x)}}catch(H){return{type:"throw",arg:H}}}v.wrap=S;var C="suspendedStart",N="suspendedYield",L="executing",Q="completed",W={};function Z(){}function Me(){}function fe(){}var At={};O(At,w,function(){return this});var dt=a,nt=dt&&dt(dt(ot([])));nt&&nt!==p&&g.call(nt,w)&&(At=nt);var Rt=fe.prototype=Z.prototype=n(At);function it(M){var k;o(k=["next","throw","return"]).call(k,function(x){O(M,x,function(H){return this._invoke(x,H)})})}function ye(M,k){function x(J,Y,Ae,ct){var mt=T(M[J],M,Y);if(mt.type!=="throw"){var yn=mt.arg,jr=yn.value;return jr&&i(jr)=="object"&&g.call(jr,"__await")?k.resolve(jr.__await).then(function(mn){x("next",mn,Ae,ct)},function(mn){x("throw",mn,Ae,ct)}):k.resolve(jr).then(function(mn){yn.value=mn,Ae(yn)},function(mn){return x("throw",mn,Ae,ct)})}ct(mt.arg)}var H;y(this,"_invoke",{value:function(Y,Ae){function ct(){return new k(function(mt,yn){x(Y,Ae,mt,yn)})}return H=H?H.then(ct,ct):ct()}})}function Ne(M,k,x){var H=C;return function(J,Y){if(H===L)throw new Error("Generator is already running");if(H===Q){if(J==="throw")throw Y;return{value:f,done:!0}}for(x.method=J,x.arg=Y;;){var Ae=x.delegate;if(Ae){var ct=xe(Ae,x);if(ct){if(ct===W)continue;return ct}}if(x.method==="next")x.sent=x._sent=x.arg;else if(x.method==="throw"){if(H===C)throw H=Q,x.arg;x.dispatchException(x.arg)}else x.method==="return"&&x.abrupt("return",x.arg);H=L;var mt=T(M,k,x);if(mt.type==="normal"){if(H=x.done?Q:N,mt.arg===W)continue;return{value:mt.arg,done:x.done}}mt.type==="throw"&&(H=Q,x.method="throw",x.arg=mt.arg)}}}function xe(M,k){var x=k.method,H=M.iterator[x];if(H===f)return k.delegate=null,x==="throw"&&M.iterator.return&&(k.method="return",k.arg=f,xe(M,k),k.method==="throw")||x!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+x+"' method")),W;var J=T(H,M.iterator,k.arg);if(J.type==="throw")return k.method="throw",k.arg=J.arg,k.delegate=null,W;var Y=J.arg;return Y?Y.done?(k[M.resultName]=Y.value,k.next=M.nextLoc,k.method!=="return"&&(k.method="next",k.arg=f),k.delegate=null,W):Y:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,W)}function at(M){var k,x={tryLoc:M[0]};1 in M&&(x.catchLoc=M[1]),2 in M&&(x.finallyLoc=M[2],x.afterLoc=M[3]),s(k=this.tryEntries).call(k,x)}function _r(M){var k=M.completion||{};k.type="normal",delete k.arg,M.completion=k}function Dt(M){this.tryEntries=[{tryLoc:"root"}],o(M).call(M,at,this),this.reset(!0)}function ot(M){if(M||M===""){var k=M[w];if(k)return k.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length)){var x=-1,H=function J(){for(;++x<M.length;)if(g.call(M,x))return J.value=M[x],J.done=!1,J;return J.value=f,J.done=!0,J};return H.next=H}}throw new TypeError(i(M)+" is not iterable")}return Me.prototype=fe,y(Rt,"constructor",{value:fe,configurable:!0}),y(fe,"constructor",{value:Me,configurable:!0}),Me.displayName=O(fe,E,"GeneratorFunction"),v.isGeneratorFunction=function(M){var k=typeof M=="function"&&M.constructor;return!!k&&(k===Me||(k.displayName||k.name)==="GeneratorFunction")},v.mark=function(M){return l?l(M,fe):(M.__proto__=fe,O(M,E,"GeneratorFunction")),M.prototype=n(Rt),M},v.awrap=function(M){return{__await:M}},it(ye.prototype),O(ye.prototype,b,function(){return this}),v.AsyncIterator=ye,v.async=function(M,k,x,H,J){J===void 0&&(J=u);var Y=new ye(S(M,k,x,H),J);return v.isGeneratorFunction(k)?Y:Y.next().then(function(Ae){return Ae.done?Ae.value:Y.next()})},it(Rt),O(Rt,E,"Generator"),O(Rt,w,function(){return this}),O(Rt,"toString",function(){return"[object Generator]"}),v.keys=function(M){var k=Object(M),x=[];for(var H in k)s(x).call(x,H);return d(x).call(x),function J(){for(;x.length;){var Y=x.pop();if(Y in k)return J.value=Y,J.done=!1,J}return J.done=!0,J}},v.values=ot,Dt.prototype={constructor:Dt,reset:function(k){var x;if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,o(x=this.tryEntries).call(x,_r),!k)for(var H in this)H.charAt(0)==="t"&&g.call(this,H)&&!isNaN(+c(H).call(H,1))&&(this[H]=f)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var x=this;function H(yn,jr){return Ae.type="throw",Ae.arg=k,x.next=yn,jr&&(x.method="next",x.arg=f),!!jr}for(var J=this.tryEntries.length-1;J>=0;--J){var Y=this.tryEntries[J],Ae=Y.completion;if(Y.tryLoc==="root")return H("end");if(Y.tryLoc<=this.prev){var ct=g.call(Y,"catchLoc"),mt=g.call(Y,"finallyLoc");if(ct&&mt){if(this.prev<Y.catchLoc)return H(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return H(Y.finallyLoc)}else if(ct){if(this.prev<Y.catchLoc)return H(Y.catchLoc,!0)}else{if(!mt)throw new Error("try statement without catch or finally");if(this.prev<Y.finallyLoc)return H(Y.finallyLoc)}}}},abrupt:function(k,x){for(var H=this.tryEntries.length-1;H>=0;--H){var J=this.tryEntries[H];if(J.tryLoc<=this.prev&&g.call(J,"finallyLoc")&&this.prev<J.finallyLoc){var Y=J;break}}Y&&(k==="break"||k==="continue")&&Y.tryLoc<=x&&x<=Y.finallyLoc&&(Y=null);var Ae=Y?Y.completion:{};return Ae.type=k,Ae.arg=x,Y?(this.method="next",this.next=Y.finallyLoc,W):this.complete(Ae)},complete:function(k,x){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&x&&(this.next=x),W},finish:function(k){for(var x=this.tryEntries.length-1;x>=0;--x){var H=this.tryEntries[x];if(H.finallyLoc===k)return this.complete(H.completion,H.afterLoc),_r(H),W}},catch:function(k){for(var x=this.tryEntries.length-1;x>=0;--x){var H=this.tryEntries[x];if(H.tryLoc===k){var J=H.completion;if(J.type==="throw"){var Y=J.arg;_r(H)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(k,x,H){return this.delegate={iterator:ot(k),resultName:x,nextLoc:H},this.method==="next"&&(this.arg=f),W}},v}r.exports=h,r.exports.__esModule=!0,r.exports.default=r.exports})(s0);var VW=s0.exports,Gs=VW(),UW=Gs;try{regeneratorRuntime=Gs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Gs:Function("r","regeneratorRuntime = r")(Gs)}var $t=q(UW),M0={exports:{}},GW=le,KW=GW(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),qW=le,YW=rt,XW=un,Ey=KW,Ks=Object.isExtensible,QW=qW(function(){Ks(1)}),JW=QW||Ey?function(i){return!YW(i)||Ey&&XW(i)==="ArrayBuffer"?!1:Ks?Ks(i):!0}:Ks,ZW=le,e6=!ZW(function(){return Object.isExtensible(Object.preventExtensions({}))}),t6=V,r6=me,n6=fo,i6=rt,Qf=ze,a6=Ct.f,Sy=vo,o6=wf,Jf=JW,s6=Nl,l6=e6,N0=!1,Dr=s6("meta"),u6=0,Zf=function(r){a6(r,Dr,{value:{objectID:"O"+u6++,weakData:{}}})},d6=function(r,i){if(!i6(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Qf(r,Dr)){if(!Jf(r))return"F";if(!i)return"E";Zf(r)}return r[Dr].objectID},c6=function(r,i){if(!Qf(r,Dr)){if(!Jf(r))return!0;if(!i)return!1;Zf(r)}return r[Dr].weakData},h6=function(r){return l6&&N0&&Jf(r)&&!Qf(r,Dr)&&Zf(r),r},f6=function(){v6.enable=function(){},N0=!0;var r=Sy.f,i=r6([].splice),e={};e[Dr]=1,r(e).length&&(Sy.f=function(t){for(var n=r(t),a=0,o=n.length;a<o;a++)if(n[a]===Dr){i(n,a,1);break}return n},t6({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:o6.f}))},v6=M0.exports={enable:f6,fastKey:d6,getWeakData:c6,onFreeze:h6};n6[Dr]=!0;var F0=M0.exports,p6=V,g6=be,y6=F0,m6=le,b6=Fr,$6=Jn,w6=Gf,_6=Te,E6=rt,S6=Qi,O6=Xn,T6=Ct.f,I6=aa.forEach,P6=Ge,B0=ia,k6=B0.set,C6=B0.getterFor,L0=function(r,i,e){var t=r.indexOf("Map")!==-1,n=r.indexOf("Weak")!==-1,a=t?"set":"add",o=g6[r],s=o&&o.prototype,l={},u;if(!P6||!_6(o)||!(n||s.forEach&&!m6(function(){new o().entries().next()})))u=e.getConstructor(i,r,t,a),y6.enable();else{u=i(function(h,f){k6(w6(h,d),{type:r,collection:new o}),S6(f)||$6(f,h[a],{that:h,AS_ENTRIES:t})});var d=u.prototype,c=C6(r);I6(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var f=h==="add"||h==="set";h in s&&!(n&&h==="clear")&&b6(d,h,function(v,p){var g=c(this).collection;if(!f&&n&&!E6(v))return h==="get"?void 0:!1;var y=g[h](v===0?0:v,p);return f?this:y})}),n||T6(d,"size",{configurable:!0,get:function(){return c(this).collection.size}})}return O6(u,r,!1,!0),l[r]=u,p6({global:!0,forced:!0},l),n||e.setStrong(u,r,t),u},x6=na,A6=function(r,i,e){for(var t in i)e&&e.unsafe&&r[t]?r[t]=i[t]:x6(r,t,i[t],e);return r},R6=Yn,D6=_f,Oy=A6,M6=cn,N6=Gf,F6=Qi,B6=Jn,L6=Pf,bs=kf,j6=h0,Sa=Ge,Ty=F0.fastKey,j0=ia,Iy=j0.set,Ld=j0.getterFor,z0={getConstructor:function(r,i,e,t){var n=r(function(u,d){N6(u,a),Iy(u,{type:i,index:R6(null),first:void 0,last:void 0,size:0}),Sa||(u.size=0),F6(d)||B6(d,u[t],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=Ld(i),s=function(u,d,c){var h=o(u),f=l(u,d),v,p;return f?f.value=c:(h.last=f={index:p=Ty(d,!0),key:d,value:c,previous:v=h.last,next:void 0,removed:!1},h.first||(h.first=f),v&&(v.next=f),Sa?h.size++:u.size++,p!=="F"&&(h.index[p]=f)),u},l=function(u,d){var c=o(u),h=Ty(d),f;if(h!=="F")return c.index[h];for(f=c.first;f;f=f.next)if(f.key===d)return f};return Oy(a,{clear:function(){for(var d=this,c=o(d),h=c.index,f=c.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete h[f.index],f=f.next;c.first=c.last=void 0,Sa?c.size=0:d.size=0},delete:function(u){var d=this,c=o(d),h=l(d,u);if(h){var f=h.next,v=h.previous;delete c.index[h.index],h.removed=!0,v&&(v.next=f),f&&(f.previous=v),c.first===h&&(c.first=f),c.last===h&&(c.last=v),Sa?c.size--:d.size--}return!!h},forEach:function(d){for(var c=o(this),h=M6(d,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:c.first;)for(h(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(d){return!!l(this,d)}}),Oy(a,e?{get:function(d){var c=l(this,d);return c&&c.value},set:function(d,c){return s(this,d===0?0:d,c)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),Sa&&D6(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(r,i,e){var t=i+" Iterator",n=Ld(i),a=Ld(t);L6(r,i,function(o,s){Iy(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,bs(void 0,!0)):bs(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),j6(i)}},z6=L0,H6=z0;z6("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},H6);var W6=$e,V6=W6.Map,U6=V6,G6=U6,K6=G6,H0=q(K6),q6=V,Y6=aa.some,X6=eu,Q6=X6("some");q6({target:"Array",proto:!0,forced:!Q6},{some:function(i){return Y6(this,i,arguments.length>1?arguments[1]:void 0)}});var J6=ut,Z6=J6("Array","some"),e8=je,t8=Z6,jd=Array.prototype,r8=function(r){var i=r.some;return r===jd||e8(jd,r)&&i===jd.some?t8:i},n8=r8,i8=n8,a8=i8,o8=q(a8),s8=ut,l8=s8("Array","keys"),u8=l8,d8=u8,c8=Br,h8=ze,f8=je,v8=d8,zd=Array.prototype,p8={DOMTokenList:!0,NodeList:!0},g8=function(r){var i=r.keys;return r===zd||f8(zd,r)&&i===zd.keys||h8(p8,c8(r))?v8:i},y8=g8,hi=q(y8),Py=G1,m8=Math.floor,Ch=function(r,i){var e=r.length,t=m8(e/2);return e<8?b8(r,i):$8(r,Ch(Py(r,0,t),i),Ch(Py(r,t),i),i)},b8=function(r,i){for(var e=r.length,t=1,n,a;t<e;){for(a=t,n=r[t];a&&i(r[a-1],n)>0;)r[a]=r[--a];a!==t++&&(r[a]=n)}return r},$8=function(r,i,e,t){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)r[o+s]=o<n&&s<a?t(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return r},w8=Ch,_8=dn,ky=_8.match(/firefox\/(\d+)/i),E8=!!ky&&+ky[1],S8=dn,O8=/MSIE|Trident/.test(S8),T8=dn,Cy=T8.match(/AppleWebKit\/(\d+)\./),I8=!!Cy&&+Cy[1],P8=V,W0=me,k8=Pt,C8=kt,xy=Lt,x8=s_,Ay=qn,ev=le,A8=w8,R8=eu,Ry=E8,D8=O8,Dy=Ji,My=I8,qr=[],Ny=W0(qr.sort),M8=W0(qr.push),N8=ev(function(){qr.sort(void 0)}),F8=ev(function(){qr.sort(null)}),B8=R8("sort"),V0=!ev(function(){if(Dy)return Dy<70;if(!(Ry&&Ry>3)){if(D8)return!0;if(My)return My<603;var r="",i,e,t,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)qr.push({k:e+n,v:t})}for(qr.sort(function(a,o){return o.v-a.v}),n=0;n<qr.length;n++)e=qr[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),L8=N8||!F8||!B8||!V0,j8=function(r){return function(i,e){return e===void 0?-1:i===void 0?1:r!==void 0?+r(i,e)||0:Ay(i)>Ay(e)?1:-1}};P8({target:"Array",proto:!0,forced:L8},{sort:function(i){i!==void 0&&k8(i);var e=C8(this);if(V0)return i===void 0?Ny(e):Ny(e,i);var t=[],n=xy(e),a,o;for(o=0;o<n;o++)o in e&&M8(t,e[o]);for(A8(t,j8(i)),a=xy(t),o=0;o<a;)e[o]=t[o++];for(;o<n;)x8(e,o++);return e}});var z8=ut,H8=z8("Array","sort"),W8=je,V8=H8,Hd=Array.prototype,U8=function(r){var i=r.sort;return r===Hd||W8(Hd,r)&&i===Hd.sort?V8:i},G8=U8,K8=G8,q8=K8,xh=q(q8),Y8=ut,X8=Y8("Array","values"),Q8=X8,J8=Q8,Z8=Br,eV=ze,tV=je,rV=J8,Wd=Array.prototype,nV={DOMTokenList:!0,NodeList:!0},iV=function(r){var i=r.values;return r===Wd||tV(Wd,r)&&i===Wd.values||eV(nV,Z8(r))?rV:i},aV=iV,Fy=q(aV),oV=Rw,Ti=q(oV),sV=ut,lV=sV("Array","entries"),uV=lV,dV=uV,cV=Br,hV=ze,fV=je,vV=dV,Vd=Array.prototype,pV={DOMTokenList:!0,NodeList:!0},gV=function(r){var i=r.entries;return r===Vd||fV(Vd,r)&&i===Vd.entries||hV(pV,cV(r))?vV:i},yV=gV,mV=q(yV);let $s;const bV=new Uint8Array(16);function $V(){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(bV)}const Ze=[];for(let r=0;r<256;++r)Ze.push((r+256).toString(16).slice(1));function wV(r,i=0){return Ze[r[i+0]]+Ze[r[i+1]]+Ze[r[i+2]]+Ze[r[i+3]]+"-"+Ze[r[i+4]]+Ze[r[i+5]]+"-"+Ze[r[i+6]]+Ze[r[i+7]]+"-"+Ze[r[i+8]]+Ze[r[i+9]]+"-"+Ze[r[i+10]]+Ze[r[i+11]]+Ze[r[i+12]]+Ze[r[i+13]]+Ze[r[i+14]]+Ze[r[i+15]]}const _V=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var By={randomUUID:_V};function EV(r,i,e){if(By.randomUUID&&!i&&!r)return By.randomUUID();r=r||{};const t=r.random||(r.rng||$V)();return t[6]=t[6]&15|64,t[8]=t[8]&63|128,wV(t)}function Ly(r){return typeof r=="string"||typeof r=="number"}var SV=function(){function r(i){Rl(this,r),Jr(this,"_queue",[]),Jr(this,"_timeout",null),Jr(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(i)}return Zl(r,[{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,t=this._extended.methods,n=0;n<t.length;n++){var a=t[n];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,t){var n=this,a=e[t];if(!a)throw new Error("Method "+t+" undefined");e[t]=function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.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=Qj(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;Fn(e=l_(t=this._queue).call(t,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,t){var n=new r(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o<t.replace.length;o++){var s=t.replace[o];a.push({name:s,original:e[s]}),n.replace(e,s)}return n._extended={object:e,methods:a},n}}]),r}(),OV=function(){function r(){Rl(this,r),Jr(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Jr(this,"subscribe",r.prototype.on),Jr(this,"unsubscribe",r.prototype.off)}return Zl(r,[{key:"_trigger",value:function(e,t,n){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Fn(a=nu(o=[]).call(o,Et(this._subscribers[e]),Et(this._subscribers["*"]))).call(a,function(s){s(e,t,n??null)})}},{key:"on",value:function(e,t){typeof t=="function"&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var n;this._subscribers[e]=wi(n=this._subscribers[e]).call(n,function(a){return a!==t})}}]),r}(),TV=L0,IV=z0;TV("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},IV);var PV=$e,kV=PV.Set,CV=kV,xV=CV,AV=xV,Ud=q(AV),RV=Rf,DV=RV,MV=DV,NV=MV,FV=NV,BV=FV,LV=BV,jV=LV,zV=jV,HV=zV,Gd=q(HV);function lr(r,i){var e=typeof ru<"u"&&Mf(r)||r["@@iterator"];if(!e){if(Nt(r)||(e=WV(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function WV(r,i){var e;if(r){if(typeof r=="string")return jy(r,i);var t=iu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Df(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return jy(r,i)}}function jy(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var zy=function(r){function i(e){Rl(this,i),this._pairs=e}return Zl(i,[{key:r,value:$t.mark(function e(){var t,n,a,o,s;return $t.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:t=lr(this._pairs),u.prev=1,t.s();case 3:if((n=t.n()).done){u.next=9;break}return a=bt(n.value,2),o=a[0],s=a[1],u.next=7,[o,s];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),t.e(u.t0);case 14:return u.prev=14,t.f(),u.finish(14);case 17:case"end":return u.stop()}},e,this,[[1,11,14,17]])})},{key:"entries",value:$t.mark(function e(){var t,n,a,o,s;return $t.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:t=lr(this._pairs),u.prev=1,t.s();case 3:if((n=t.n()).done){u.next=9;break}return a=bt(n.value,2),o=a[0],s=a[1],u.next=7,[o,s];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),t.e(u.t0);case 14:return u.prev=14,t.f(),u.finish(14);case 17:case"end":return u.stop()}},e,this,[[1,11,14,17]])})},{key:"keys",value:$t.mark(function e(){var t,n,a,o;return $t.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:t=lr(this._pairs),l.prev=1,t.s();case 3:if((n=t.n()).done){l.next=9;break}return a=bt(n.value,1),o=a[0],l.next=7,o;case 7:l.next=3;break;case 9:l.next=14;break;case 11:l.prev=11,l.t0=l.catch(1),t.e(l.t0);case 14:return l.prev=14,t.f(),l.finish(14);case 17:case"end":return l.stop()}},e,this,[[1,11,14,17]])})},{key:"values",value:$t.mark(function e(){var t,n,a,o;return $t.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:t=lr(this._pairs),l.prev=1,t.s();case 3:if((n=t.n()).done){l.next=9;break}return a=bt(n.value,2),o=a[1],l.next=7,o;case 7:l.next=3;break;case 9:l.next=14;break;case 11:l.prev=11,l.t0=l.catch(1),t.e(l.t0);case 14:return l.prev=14,t.f(),l.finish(14);case 17:case"end":return l.stop()}},e,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var t;return Zt(t=Et(this._pairs)).call(t,function(n){return n[0]})}},{key:"toItemArray",value:function(){var t;return Zt(t=Et(this._pairs)).call(t,function(n){return n[1]})}},{key:"toEntryArray",value:function(){return Et(this._pairs)}},{key:"toObjectMap",value:function(){var t=Ij(null),n=lr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=bt(a.value,2),s=o[0],l=o[1];t[s]=l}}catch(u){n.e(u)}finally{n.f()}return t}},{key:"toMap",value:function(){return new H0(this._pairs)}},{key:"toIdSet",value:function(){return new Ud(this.toIdArray())}},{key:"toItemSet",value:function(){return new Ud(this.toItemArray())}},{key:"cache",value:function(){return new i(Et(this._pairs))}},{key:"distinct",value:function(t){var n=new Ud,a=lr(this._pairs),o;try{for(a.s();!(o=a.n()).done;){var s=bt(o.value,2),l=s[0],u=s[1];n.add(t(u,l))}}catch(d){a.e(d)}finally{a.f()}return n}},{key:"filter",value:function(t){var n=this._pairs;return new i({[Ti](){return $t.mark(function a(){var o,s,l,u,d;return $t.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:o=lr(n),h.prev=1,o.s();case 3:if((s=o.n()).done){h.next=10;break}if(l=bt(s.value,2),u=l[0],d=l[1],!t(d,u)){h.next=8;break}return h.next=8,[u,d];case 8:h.next=3;break;case 10:h.next=15;break;case 12:h.prev=12,h.t0=h.catch(1),o.e(h.t0);case 15:return h.prev=15,o.f(),h.finish(15);case 18:case"end":return h.stop()}},a,null,[[1,12,15,18]])})()}})}},{key:"forEach",value:function(t){var n=lr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=bt(a.value,2),s=o[0],l=o[1];t(l,s)}}catch(u){n.e(u)}finally{n.f()}}},{key:"map",value:function(t){var n=this._pairs;return new i({[Ti](){return $t.mark(function a(){var o,s,l,u,d;return $t.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:o=lr(n),h.prev=1,o.s();case 3:if((s=o.n()).done){h.next=9;break}return l=bt(s.value,2),u=l[0],d=l[1],h.next=7,[u,t(d,u)];case 7:h.next=3;break;case 9:h.next=14;break;case 11:h.prev=11,h.t0=h.catch(1),o.e(h.t0);case 14:return h.prev=14,o.f(),h.finish(14);case 17:case"end":return h.stop()}},a,null,[[1,11,14,17]])})()}})}},{key:"max",value:function(t){var n=Gd(this._pairs),a=n.next();if(a.done)return null;for(var o=a.value[1],s=t(a.value[1],a.value[0]);!(a=n.next()).done;){var l=bt(a.value,2),u=l[0],d=l[1],c=t(d,u);c>s&&(s=c,o=d)}return o}},{key:"min",value:function(t){var n=Gd(this._pairs),a=n.next();if(a.done)return null;for(var o=a.value[1],s=t(a.value[1],a.value[0]);!(a=n.next()).done;){var l=bt(a.value,2),u=l[0],d=l[1],c=t(d,u);c<s&&(s=c,o=d)}return o}},{key:"reduce",value:function(t,n){var a=lr(this._pairs),o;try{for(a.s();!(o=a.n()).done;){var s=bt(o.value,2),l=s[0],u=s[1];n=t(n,u,l)}}catch(d){a.e(d)}finally{a.f()}return n}},{key:"sort",value:function(t){var n=this;return new i({[Ti]:function(){var a;return Gd(xh(a=Et(n._pairs)).call(a,function(o,s){var l=bt(o,2),u=l[0],d=l[1],c=bt(s,2),h=c[0],f=c[1];return t(d,f,u,h)}))}})}}]),i}(Ti);function Hy(r,i){var e=Ff(r);if(Ug){var t=Ug(r);i&&(t=wi(t).call(t,function(n){return Z_(r,n).enumerable})),e.push.apply(e,t)}return e}function Wy(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?Fn(e=Hy(Object(n),!0)).call(e,function(a){Jr(r,a,n[a])}):Gg?z3(r,Gg(n)):Fn(t=Hy(Object(n))).call(t,function(a){W3(r,a,Z_(n,a))})}return r}function Kd(r,i){var e=typeof ru<"u"&&Mf(r)||r["@@iterator"];if(!e){if(Nt(r)||(e=VV(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function VV(r,i){var e;if(r){if(typeof r=="string")return Vy(r,i);var t=iu(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Df(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Vy(r,i)}}function Vy(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function UV(r){var i=GV();return function(){var t=vl(r),n;if(i){var a=vl(this).constructor;n=Vs(t,arguments,a)}else n=t.apply(this,arguments);return c5(this,n)}}function GV(){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 KV(r,i){return r[i]==null&&(r[i]=EV()),r}var ml=function(r){d5(e,r);var i=UV(e);function e(t,n){var a;return Rl(this,e),a=i.call(this),Jr(r0(a),"_queue",null),t&&!Nt(t)&&(n=t,t=[]),a._options=n||{},a._data=new H0,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(n),a}return Zl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=SV.extend(this,{replace:["add","update","remove"]})),n.queue&&typeof n.queue=="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],l;if(Nt(n)){var u=Zt(n).call(n,function(h){return h[o._idProp]});if(o8(u).call(u,function(h){return o._data.has(h)}))throw new Error("A duplicate id was found in the parameter array.");for(var d=0,c=n.length;d<c;d++)l=this._addItem(n[d]),s.push(l)}else if(n&&typeof n=="object")l=this._addItem(n),s.push(l);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(n,a){var o=this,s=[],l=[],u=[],d=[],c=this._idProp,h=function(y){var m=y[c];if(m!=null&&o._data.has(m)){var w=y,b=uj({},o._data.get(m)),E=o._updateItem(w);l.push(E),d.push(w),u.push(b)}else{var O=o._addItem(y);s.push(O)}};if(Nt(n))for(var f=0,v=n.length;f<v;f++)n[f]&&typeof n[f]=="object"?h(n[f]):console.warn("Ignoring input item, which is not an object at index "+f);else if(n&&typeof n=="object")h(n);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),l.length){var p={items:l,oldData:u,data:d};this._trigger("update",p,a)}return nu(s).call(s,l)}},{key:"updateOnly",value:function(n,a){var o,s=this;Nt(n)||(n=[n]);var l=Zt(o=Zt(n).call(n,function(d){var c=s._data.get(d[s._idProp]);if(c==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:c,update:d}})).call(o,function(d){var c=d.oldData,h=d.update,f=c[s._idProp],v=Hz(c,h);return s._data.set(f,v),{id:f,oldData:c,updatedData:v}});if(l.length){var u={items:Zt(l).call(l,function(d){return d.id}),oldData:Zt(l).call(l,function(d){return d.oldData}),data:Zt(l).call(l,function(d){return d.updatedData})};return this._trigger("update",u,a),u.items}else return[]}},{key:"get",value:function(n,a){var o=void 0,s=void 0,l=void 0;Ly(n)?(o=n,l=a):Nt(n)?(s=n,l=a):l=n;var u=l&&l.returnType==="Object"?"Object":"Array",d=l&&wi(l),c=[],h=void 0,f=void 0,v=void 0;if(o!=null)h=this._data.get(o),h&&d&&!d(h)&&(h=void 0);else if(s!=null)for(var p=0,g=s.length;p<g;p++)h=this._data.get(s[p]),h!=null&&(!d||d(h))&&c.push(h);else{var y;f=Et(hi(y=this._data).call(y));for(var m=0,w=f.length;m<w;m++)v=f[m],h=this._data.get(v),h!=null&&(!d||d(h))&&c.push(h)}if(l&&l.order&&o==null&&this._sort(c,l.order),l&&l.fields){var b=l.fields;if(o!=null&&h!=null)h=this._filterFields(h,b);else for(var E=0,O=c.length;E<O;E++)c[E]=this._filterFields(c[E],b)}if(u=="Object"){for(var S={},T=0,C=c.length;T<C;T++){var N=c[T],L=N[this._idProp];S[L]=N}return S}else if(o!=null){var Q;return(Q=h)!==null&&Q!==void 0?Q:null}else return c}},{key:"getIds",value:function(n){var a=this._data,o=n&&wi(n),s=n&&n.order,l=Et(hi(a).call(a)),u=[];if(o)if(s){for(var d=[],c=0,h=l.length;c<h;c++){var f=l[c],v=this._data.get(f);v!=null&&o(v)&&d.push(v)}this._sort(d,s);for(var p=0,g=d.length;p<g;p++)u.push(d[p][this._idProp])}else for(var y=0,m=l.length;y<m;y++){var w=l[y],b=this._data.get(w);b!=null&&o(b)&&u.push(b[this._idProp])}else if(s){for(var E=[],O=0,S=l.length;O<S;O++){var T=l[O];E.push(a.get(T))}this._sort(E,s);for(var C=0,N=E.length;C<N;C++)u.push(E[C][this._idProp])}else for(var L=0,Q=l.length;L<Q;L++){var W=l[L],Z=a.get(W);Z!=null&&u.push(Z[this._idProp])}return u}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(n,a){var o=a&&wi(a),s=this._data,l=Et(hi(s).call(s));if(a&&a.order)for(var u=this.get(a),d=0,c=u.length;d<c;d++){var h=u[d],f=h[this._idProp];n(h,f)}else for(var v=0,p=l.length;v<p;v++){var g=l[v],y=this._data.get(g);y!=null&&(!o||o(y))&&n(y,g)}}},{key:"map",value:function(n,a){for(var o=a&&wi(a),s=[],l=this._data,u=Et(hi(l).call(l)),d=0,c=u.length;d<c;d++){var h=u[d],f=this._data.get(h);f!=null&&(!o||o(f))&&s.push(n(f,h))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(n,a){var o;return n&&O2(o=Nt(a)?a:Ff(a)).call(o,function(s,l){return s[l]=n[l],s},{})}},{key:"_sort",value:function(n,a){if(typeof a=="string"){var o=a;xh(n).call(n,function(s,l){var u=s[o],d=l[o];return u>d?1:u<d?-1:0})}else if(typeof a=="function")xh(n).call(n,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(n,a){for(var o=[],s=[],l=Nt(n)?n:[n],u=0,d=l.length;u<d;u++){var c=this._remove(l[u]);if(c){var h=c[this._idProp];h!=null&&(o.push(h),s.push(c))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(n){var a;if(Ly(n)?a=n:n&&typeof n=="object"&&(a=n[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(n){for(var a,o=Et(hi(a=this._data).call(a)),s=[],l=0,u=o.length;l<u;l++)s.push(this._data.get(o[l]));return this._data.clear(),this.length=0,this._trigger("remove",{items:o,oldData:s},n),o}},{key:"max",value:function(n){var a,o=null,s=null,l=Kd(Fy(a=this._data).call(a)),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,c=d[n];typeof c=="number"&&(s==null||c>s)&&(o=d,s=c)}}catch(h){l.e(h)}finally{l.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,l=Kd(Fy(a=this._data).call(a)),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,c=d[n];typeof c=="number"&&(s==null||c<s)&&(o=d,s=c)}}catch(h){l.e(h)}finally{l.f()}return o||null}},{key:"distinct",value:function(n){for(var a=this._data,o=Et(hi(a).call(a)),s=[],l=0,u=0,d=o.length;u<d;u++){for(var c=o[u],h=a.get(c),f=h[n],v=!1,p=0;p<l;p++)if(s[p]==f){v=!0;break}!v&&f!==void 0&&(s[l]=f,l++)}return s}},{key:"_addItem",value:function(n){var a=KV(n,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(n){var a=n[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+Rj(n)+")");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,Wy(Wy({},o),n)),a}},{key:"stream",value:function(n){if(n){var a=this._data;return new zy({[Ti](){return $t.mark(function s(){var l,u,d,c;return $t.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:l=Kd(n),f.prev=1,l.s();case 3:if((u=l.n()).done){f.next=11;break}if(d=u.value,c=a.get(d),c==null){f.next=9;break}return f.next=9,[d,c];case 9:f.next=3;break;case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(1),l.e(f.t0);case 16:return f.prev=16,l.f(),f.finish(16);case 19:case"end":return f.stop()}},s,null,[[1,13,16,19]])})()}})}else{var o;return new zy({[Ti]:jw(o=mV(this._data)).call(o,this._data)})}}}]),e}(OV);function qV(r,i){return typeof i=="object"&&i!==null&&r===i.idProp&&typeof i.add=="function"&&typeof i.clear=="function"&&typeof i.distinct=="function"&&typeof Fn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof Zt(i)=="function"&&typeof i.max=="function"&&typeof i.min=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.remove=="function"&&typeof i.setOptions=="function"&&typeof i.stream=="function"&&typeof i.update=="function"&&typeof i.updateOnly=="function"}function U0(r,i){return typeof i=="object"&&i!==null&&r===i.idProp&&typeof Fn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof Zt(i)=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.stream=="function"&&qV(r,i.getDataSet())}/**
38
+ * vis-network
39
+ * https://visjs.github.io/vis-network/
40
+ *
41
+ * A dynamic, browser-based visualization library.
42
+ *
43
+ * @version 9.1.9
44
+ * @date 2023-11-03T01:42:27.418Z
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 qd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ws=function(r){return r&&r.Math===Math&&r},Pe=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof qd=="object"&&qd)||function(){return this}()||qd||Function("return this")(),ie=function(r){try{return!!r()}catch{return!0}},YV=ie,ko=!YV(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),XV=ko,G0=Function.prototype,Uy=G0.apply,Gy=G0.call,Co=typeof Reflect=="object"&&Reflect.apply||(XV?Gy.bind(Uy):function(){return Gy.apply(Uy,arguments)}),K0=ko,q0=Function.prototype,Ah=q0.call,QV=K0&&q0.bind.bind(Ah,Ah),oe=K0?QV:function(r){return function(){return Ah.apply(r,arguments)}},Y0=oe,JV=Y0({}.toString),ZV=Y0("".slice),Lr=function(r){return ZV(JV(r),8,-1)},eU=Lr,tU=oe,tv=function(r){if(eU(r)==="Function")return tU(r)},Rh=typeof document=="object"&&document.all,rU=typeof Rh>"u"&&Rh!==void 0,X0={all:Rh,IS_HTMLDDA:rU},Q0=X0,nU=Q0.all,qe=Q0.IS_HTMLDDA?function(r){return typeof r=="function"||r===nU}:function(r){return typeof r=="function"},da={},iU=ie,Ye=!iU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),aU=ko,_s=Function.prototype.call,jt=aU?_s.bind(_s):function(){return _s.apply(_s,arguments)},uu={},J0={}.propertyIsEnumerable,Z0=Object.getOwnPropertyDescriptor,oU=Z0&&!J0.call({1:2},1);uu.f=oU?function(i){var e=Z0(this,i);return!!e&&e.enumerable}:J0;var xo=function(r,i){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:i}},sU=oe,lU=ie,uU=Lr,Yd=Object,dU=sU("".split),du=lU(function(){return!Yd("z").propertyIsEnumerable(0)})?function(r){return uU(r)==="String"?dU(r,""):Yd(r)}:Yd,ca=function(r){return r==null},cU=ca,hU=TypeError,Ao=function(r){if(cU(r))throw new hU("Can't call method on "+r);return r},fU=du,vU=Ao,$r=function(r){return fU(vU(r))},Ky=qe,eE=X0,pU=eE.all,Xe=eE.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Ky(r)||r===pU}:function(r){return typeof r=="object"?r!==null:Ky(r)},ae={},Xd=ae,Qd=Pe,gU=qe,qy=function(r){return gU(r)?r:void 0},Yt=function(r,i){return arguments.length<2?qy(Xd[r])||qy(Qd[r]):Xd[r]&&Xd[r][i]||Qd[r]&&Qd[r][i]},yU=oe,De=yU({}.isPrototypeOf),Ro=typeof navigator<"u"&&String(navigator.userAgent)||"",tE=Pe,Jd=Ro,Yy=tE.process,Xy=tE.Deno,Qy=Yy&&Yy.versions||Xy&&Xy.version,Jy=Qy&&Qy.v8,er,bl;Jy&&(er=Jy.split("."),bl=er[0]>0&&er[0]<4?1:+(er[0]+er[1]));!bl&&Jd&&(er=Jd.match(/Edge\/(\d+)/),(!er||er[1]>=74)&&(er=Jd.match(/Chrome\/(\d+)/),er&&(bl=+er[1])));var Do=bl,Zy=Do,mU=ie,bU=Pe,$U=bU.String,ha=!!Object.getOwnPropertySymbols&&!mU(function(){var r=Symbol("symbol detection");return!$U(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Zy&&Zy<41}),wU=ha,rE=wU&&!Symbol.sham&&typeof Symbol.iterator=="symbol",_U=Yt,EU=qe,SU=De,OU=rE,TU=Object,Mo=OU?function(r){return typeof r=="symbol"}:function(r){var i=_U("Symbol");return EU(i)&&SU(i.prototype,TU(r))},IU=String,fa=function(r){try{return IU(r)}catch{return"Object"}},PU=qe,kU=fa,CU=TypeError,Zn=function(r){if(PU(r))return r;throw new CU(kU(r)+" is not a function")},xU=Zn,AU=ca,rv=function(r,i){var e=r[i];return AU(e)?void 0:xU(e)},Zd=jt,ec=qe,tc=Xe,RU=TypeError,DU=function(r,i){var e,t;if(i==="string"&&ec(e=r.toString)&&!tc(t=Zd(e,r))||ec(e=r.valueOf)&&!tc(t=Zd(e,r))||i!=="string"&&ec(e=r.toString)&&!tc(t=Zd(e,r)))return t;throw new RU("Can't convert object to primitive value")},nE={exports:{}},em=Pe,MU=Object.defineProperty,NU=function(r,i){try{MU(em,r,{value:i,configurable:!0,writable:!0})}catch{em[r]=i}return i},FU=Pe,BU=NU,tm="__core-js_shared__",LU=FU[tm]||BU(tm,{}),nv=LU,rm=nv;(nE.exports=function(r,i){return rm[r]||(rm[r]=i!==void 0?i:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var va=nE.exports,jU=Ao,zU=Object,xt=function(r){return zU(jU(r))},HU=oe,WU=xt,VU=HU({}.hasOwnProperty),Qe=Object.hasOwn||function(i,e){return VU(WU(i),e)},UU=oe,GU=0,KU=Math.random(),qU=UU(1 .toString),cu=function(r){return"Symbol("+(r===void 0?"":r)+")_"+qU(++GU+KU,36)},YU=Pe,XU=va,nm=Qe,QU=cu,JU=ha,ZU=rE,Ii=YU.Symbol,rc=XU("wks"),eG=ZU?Ii.for||Ii:Ii&&Ii.withoutSetter||QU,ke=function(r){return nm(rc,r)||(rc[r]=JU&&nm(Ii,r)?Ii[r]:eG("Symbol."+r)),rc[r]},tG=jt,im=Xe,am=Mo,rG=rv,nG=DU,iG=ke,aG=TypeError,oG=iG("toPrimitive"),sG=function(r,i){if(!im(r)||am(r))return r;var e=rG(r,oG),t;if(e){if(i===void 0&&(i="default"),t=tG(e,r,i),!im(t)||am(t))return t;throw new aG("Can't convert object to primitive value")}return i===void 0&&(i="number"),nG(r,i)},lG=sG,uG=Mo,hu=function(r){var i=lG(r,"string");return uG(i)?i:i+""},dG=Pe,om=Xe,Dh=dG.document,cG=om(Dh)&&om(Dh.createElement),iE=function(r){return cG?Dh.createElement(r):{}},hG=Ye,fG=ie,vG=iE,aE=!hG&&!fG(function(){return Object.defineProperty(vG("div"),"a",{get:function(){return 7}}).a!==7}),pG=Ye,gG=jt,yG=uu,mG=xo,bG=$r,$G=hu,wG=Qe,_G=aE,sm=Object.getOwnPropertyDescriptor;da.f=pG?sm:function(i,e){if(i=bG(i),e=$G(e),_G)try{return sm(i,e)}catch{}if(wG(i,e))return mG(!gG(yG.f,i,e),i[e])};var EG=ie,SG=qe,OG=/#|\.prototype\./,No=function(r,i){var e=IG[TG(r)];return e===kG?!0:e===PG?!1:SG(i)?EG(i):!!i},TG=No.normalize=function(r){return String(r).replace(OG,".").toLowerCase()},IG=No.data={},PG=No.NATIVE="N",kG=No.POLYFILL="P",CG=No,lm=tv,xG=Zn,AG=ko,RG=lm(lm.bind),Fo=function(r,i){return xG(r),i===void 0?r:AG?RG(r,i):function(){return r.apply(i,arguments)}},zt={},DG=Ye,MG=ie,oE=DG&&MG(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),NG=Xe,FG=String,BG=TypeError,Ht=function(r){if(NG(r))return r;throw new BG(FG(r)+" is not an object")},LG=Ye,jG=aE,zG=oE,Es=Ht,um=hu,HG=TypeError,nc=Object.defineProperty,WG=Object.getOwnPropertyDescriptor,ic="enumerable",ac="configurable",oc="writable";zt.f=LG?zG?function(i,e,t){if(Es(i),e=um(e),Es(t),typeof i=="function"&&e==="prototype"&&"value"in t&&oc in t&&!t[oc]){var n=WG(i,e);n&&n[oc]&&(i[e]=t.value,t={configurable:ac in t?t[ac]:n[ac],enumerable:ic in t?t[ic]:n[ic],writable:!1})}return nc(i,e,t)}:nc:function(i,e,t){if(Es(i),e=um(e),Es(t),jG)try{return nc(i,e,t)}catch{}if("get"in t||"set"in t)throw new HG("Accessors not supported");return"value"in t&&(i[e]=t.value),i};var VG=Ye,UG=zt,GG=xo,pa=VG?function(r,i,e){return UG.f(r,i,GG(1,e))}:function(r,i,e){return r[i]=e,r},Ss=Pe,KG=Co,qG=tv,YG=qe,XG=da.f,QG=CG,fi=ae,JG=Fo,vi=pa,dm=Qe,ZG=function(r){var i=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return KG(r,this,arguments)};return i.prototype=r.prototype,i},G=function(r,i){var e=r.target,t=r.global,n=r.stat,a=r.proto,o=t?Ss:n?Ss[e]:(Ss[e]||{}).prototype,s=t?fi:fi[e]||vi(fi,e,{})[e],l=s.prototype,u,d,c,h,f,v,p,g,y;for(h in i)u=QG(t?h:e+(n?".":"#")+h,r.forced),d=!u&&o&&dm(o,h),v=s[h],d&&(r.dontCallGetSet?(y=XG(o,h),p=y&&y.value):p=o[h]),f=d&&p?p:i[h],!(d&&typeof v==typeof f)&&(r.bind&&d?g=JG(f,Ss):r.wrap&&d?g=ZG(f):a&&YG(f)?g=qG(f):g=f,(r.sham||f&&f.sham||v&&v.sham)&&vi(g,"sham",!0),vi(s,h,g),a&&(c=e+"Prototype",dm(fi,c)||vi(fi,c,{}),vi(fi[c],h,f),r.real&&l&&(u||!l[h])&&vi(l,h,f)))},e9=Math.ceil,t9=Math.floor,r9=Math.trunc||function(i){var e=+i;return(e>0?t9:e9)(e)},n9=r9,fu=function(r){var i=+r;return i!==i||i===0?0:n9(i)},i9=fu,a9=Math.max,o9=Math.min,Bo=function(r,i){var e=i9(r);return e<0?a9(e+i,0):o9(e,i)},s9=fu,l9=Math.min,u9=function(r){return r>0?l9(s9(r),9007199254740991):0},d9=u9,Xt=function(r){return d9(r.length)},c9=$r,h9=Bo,f9=Xt,cm=function(r){return function(i,e,t){var n=c9(i),a=f9(n),o=h9(t,a),s;if(r&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((r||o in n)&&n[o]===e)return r||o||0;return!r&&-1}},iv={includes:cm(!0),indexOf:cm(!1)},Lo={},v9=oe,sc=Qe,p9=$r,g9=iv.indexOf,y9=Lo,hm=v9([].push),sE=function(r,i){var e=p9(r),t=0,n=[],a;for(a in e)!sc(y9,a)&&sc(e,a)&&hm(n,a);for(;i.length>t;)sc(e,a=i[t++])&&(~g9(n,a)||hm(n,a));return n},av=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],m9=sE,b9=av,vu=Object.keys||function(i){return m9(i,b9)},jo={};jo.f=Object.getOwnPropertySymbols;var fm=Ye,$9=oe,w9=jt,_9=ie,lc=vu,E9=jo,S9=uu,O9=xt,T9=du,pi=Object.assign,vm=Object.defineProperty,I9=$9([].concat),P9=!pi||_9(function(){if(fm&&pi({b:1},pi(vm({},"a",{enumerable:!0,get:function(){vm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},i={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(n){i[n]=n}),pi({},r)[e]!==7||lc(pi({},i)).join("")!==t})?function(i,e){for(var t=O9(i),n=arguments.length,a=1,o=E9.f,s=S9.f;n>a;)for(var l=T9(arguments[a++]),u=o?I9(lc(l),o(l)):lc(l),d=u.length,c=0,h;d>c;)h=u[c++],(!fm||w9(s,l,h))&&(t[h]=l[h]);return t}:pi,k9=G,pm=P9;k9({target:"Object",stat:!0,arity:2,forced:Object.assign!==pm},{assign:pm});var C9=ae,x9=C9.Object.assign,A9=x9,R9=A9,D9=R9,Be=z(D9),M9=oe,pu=M9([].slice),lE=oe,N9=Zn,F9=Xe,B9=Qe,gm=pu,L9=ko,uE=Function,j9=lE([].concat),z9=lE([].join),uc={},H9=function(r,i,e){if(!B9(uc,i)){for(var t=[],n=0;n<i;n++)t[n]="a["+n+"]";uc[i]=uE("C,a","return new C("+z9(t,",")+")")}return uc[i](r,e)},dE=L9?uE.bind:function(i){var e=N9(this),t=e.prototype,n=gm(arguments,1),a=function(){var s=j9(n,gm(arguments));return this instanceof a?H9(e,s.length,s):e.apply(i,s)};return F9(t)&&(a.prototype=t),a},W9=G,ym=dE;W9({target:"Function",proto:!0,forced:Function.bind!==ym},{bind:ym});var V9=ae,Je=function(r){return V9[r+"Prototype"]},U9=Je,G9=U9("Function").bind,K9=De,q9=G9,dc=Function.prototype,Y9=function(r){var i=r.bind;return r===dc||K9(dc,r)&&i===dc.bind?q9:i},X9=Y9,cE=X9,Q9=cE,P=z(Q9);function ov(r,i,e,t){r.beginPath(),r.arc(i,e,t,0,2*Math.PI,!1),r.closePath()}function J9(r,i,e,t){r.beginPath(),r.rect(i-t,e-t,t*2,t*2),r.closePath()}function Z9(r,i,e,t){r.beginPath(),t*=1.15,e+=.275*t;var n=t*2,a=n/2,o=Math.sqrt(3)/6*n,s=Math.sqrt(n*n-a*a);r.moveTo(i,e-(s-o)),r.lineTo(i+a,e+o),r.lineTo(i-a,e+o),r.lineTo(i,e-(s-o)),r.closePath()}function e7(r,i,e,t){r.beginPath(),t*=1.15,e-=.275*t;var n=t*2,a=n/2,o=Math.sqrt(3)/6*n,s=Math.sqrt(n*n-a*a);r.moveTo(i,e+(s-o)),r.lineTo(i+a,e-o),r.lineTo(i-a,e-o),r.lineTo(i,e+(s-o)),r.closePath()}function t7(r,i,e,t){r.beginPath(),t*=.82,e+=.1*t;for(var n=0;n<10;n++){var a=n%2===0?t*1.3:t*.5;r.lineTo(i+a*Math.sin(n*2*Math.PI/10),e-a*Math.cos(n*2*Math.PI/10))}r.closePath()}function r7(r,i,e,t){r.beginPath(),r.lineTo(i,e+t),r.lineTo(i+t,e),r.lineTo(i,e-t),r.lineTo(i-t,e),r.closePath()}function hE(r,i,e,t,n,a){var o=Math.PI/180;t-2*a<0&&(a=t/2),n-2*a<0&&(a=n/2),r.beginPath(),r.moveTo(i+a,e),r.lineTo(i+t-a,e),r.arc(i+t-a,e+a,a,o*270,o*360,!1),r.lineTo(i+t,e+n-a),r.arc(i+t-a,e+n-a,a,0,o*90,!1),r.lineTo(i+a,e+n),r.arc(i+a,e+n-a,a,o*90,o*180,!1),r.lineTo(i,e+a),r.arc(i+a,e+a,a,o*180,o*270,!1),r.closePath()}function Mh(r,i,e,t,n){var a=.5522848,o=t/2*a,s=n/2*a,l=i+t,u=e+n,d=i+t/2,c=e+n/2;r.beginPath(),r.moveTo(i,c),r.bezierCurveTo(i,c-s,d-o,e,d,e),r.bezierCurveTo(d+o,e,l,c-s,l,c),r.bezierCurveTo(l,c+s,d+o,u,d,u),r.bezierCurveTo(d-o,u,i,c+s,i,c),r.closePath()}function fE(r,i,e,t,n){var a=.3333333333333333,o=t,s=n*a,l=.5522848,u=o/2*l,d=s/2*l,c=i+o,h=e+s,f=i+o/2,v=e+s/2,p=e+(n-s/2),g=e+n;r.beginPath(),r.moveTo(c,v),r.bezierCurveTo(c,v+d,f+u,h,f,h),r.bezierCurveTo(f-u,h,i,v+d,i,v),r.bezierCurveTo(i,v-d,f-u,e,f,e),r.bezierCurveTo(f+u,e,c,v-d,c,v),r.lineTo(c,p),r.bezierCurveTo(c,p+d,f+u,g,f,g),r.bezierCurveTo(f-u,g,i,p+d,i,p),r.lineTo(i,v)}function vE(r,i,e,t,n,a){r.beginPath(),r.moveTo(i,e);for(var o=a.length,s=t-i,l=n-e,u=l/s,d=Math.sqrt(s*s+l*l),c=0,h=!0,f=0,v=+a[0];d>=.1;)v=+a[c++%o],v>d&&(v=d),f=Math.sqrt(v*v/(1+u*u)),f=s<0?-f:f,i+=f,e+=u*f,h===!0?r.lineTo(i,e):r.moveTo(i,e),d-=v,h=!h}function n7(r,i,e,t){r.beginPath();var n=6,a=Math.PI*2/n;r.moveTo(i+t,e);for(var o=1;o<n;o++)r.lineTo(i+t*Math.cos(a*o),e+t*Math.sin(a*o));r.closePath()}var mm={circle:ov,dashedLine:vE,database:fE,diamond:r7,ellipse:Mh,ellipse_vis:Mh,hexagon:n7,roundRect:hE,square:J9,star:t7,triangle:Z9,triangleDown:e7};function i7(r){return Object.prototype.hasOwnProperty.call(mm,r)?mm[r]:function(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];CanvasRenderingContext2D.prototype[r].call(i,t)}}var pE={exports:{}};(function(r){r.exports=i;function i(t){if(t)return e(t)}function e(t){for(var n in i.prototype)t[n]=i.prototype[n];return t}i.prototype.on=i.prototype.addEventListener=function(t,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(n),this},i.prototype.once=function(t,n){function a(){this.off(t,a),n.apply(this,arguments)}return a.fn=n,this.on(t,a),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+t];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===n||o.fn===n){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},i.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,n)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(pE);var a7=pE.exports,gE=z(a7),o7=ke,s7=o7("toStringTag"),yE={};yE[s7]="z";var sv=String(yE)==="[object z]",l7=sv,u7=qe,qs=Lr,d7=ke,c7=d7("toStringTag"),h7=Object,f7=qs(function(){return arguments}())==="Arguments",v7=function(r,i){try{return r[i]}catch{}},ei=l7?qs:function(r){var i,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=v7(i=h7(r),c7))=="string"?e:f7?qs(i):(t=qs(i))==="Object"&&u7(i.callee)?"Arguments":t},p7=ei,g7=String,wr=function(r){if(p7(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return g7(r)},lv=oe,y7=fu,m7=wr,b7=Ao,$7=lv("".charAt),bm=lv("".charCodeAt),w7=lv("".slice),$m=function(r){return function(i,e){var t=m7(b7(i)),n=y7(e),a=t.length,o,s;return n<0||n>=a?r?"":void 0:(o=bm(t,n),o<55296||o>56319||n+1===a||(s=bm(t,n+1))<56320||s>57343?r?$7(t,n):o:r?w7(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},_7={codeAt:$m(!1),charAt:$m(!0)},E7=Pe,S7=qe,wm=E7.WeakMap,mE=S7(wm)&&/native code/.test(String(wm)),O7=va,T7=cu,_m=O7("keys"),gu=function(r){return _m[r]||(_m[r]=T7(r))},I7=mE,bE=Pe,P7=Xe,k7=pa,cc=Qe,hc=nv,C7=gu,x7=Lo,Em="Object already initialized",Nh=bE.TypeError,A7=bE.WeakMap,$l,eo,wl,R7=function(r){return wl(r)?eo(r):$l(r,{})},D7=function(r){return function(i){var e;if(!P7(i)||(e=eo(i)).type!==r)throw new Nh("Incompatible receiver, "+r+" required");return e}};if(I7||hc.state){var ur=hc.state||(hc.state=new A7);ur.get=ur.get,ur.has=ur.has,ur.set=ur.set,$l=function(r,i){if(ur.has(r))throw new Nh(Em);return i.facade=r,ur.set(r,i),i},eo=function(r){return ur.get(r)||{}},wl=function(r){return ur.has(r)}}else{var gi=C7("state");x7[gi]=!0,$l=function(r,i){if(cc(r,gi))throw new Nh(Em);return i.facade=r,k7(r,gi,i),i},eo=function(r){return cc(r,gi)?r[gi]:{}},wl=function(r){return cc(r,gi)}}var ti={set:$l,get:eo,has:wl,enforce:R7,getterFor:D7},Fh=Ye,M7=Qe,$E=Function.prototype,N7=Fh&&Object.getOwnPropertyDescriptor,uv=M7($E,"name"),F7=uv&&function(){}.name==="something",B7=uv&&(!Fh||Fh&&N7($E,"name").configurable),L7={EXISTS:uv,PROPER:F7,CONFIGURABLE:B7},yu={},j7=Ye,z7=oE,H7=zt,W7=Ht,V7=$r,U7=vu;yu.f=j7&&!z7?Object.defineProperties:function(i,e){W7(i);for(var t=V7(e),n=U7(e),a=n.length,o=0,s;a>o;)H7.f(i,s=n[o++],t[s]);return i};var G7=Yt,K7=G7("document","documentElement"),q7=Ht,Y7=yu,Sm=av,X7=Lo,Q7=K7,J7=iE,Z7=gu,Om=">",Tm="<",Bh="prototype",Lh="script",wE=Z7("IE_PROTO"),fc=function(){},_E=function(r){return Tm+Lh+Om+r+Tm+"/"+Lh+Om},Im=function(r){r.write(_E("")),r.close();var i=r.parentWindow.Object;return r=null,i},eK=function(){var r=J7("iframe"),i="java"+Lh+":",e;return r.style.display="none",Q7.appendChild(r),r.src=String(i),e=r.contentWindow.document,e.open(),e.write(_E("document.F=Object")),e.close(),e.F},Os,Ys=function(){try{Os=new ActiveXObject("htmlfile")}catch{}Ys=typeof document<"u"?document.domain&&Os?Im(Os):eK():Im(Os);for(var r=Sm.length;r--;)delete Ys[Bh][Sm[r]];return Ys()};X7[wE]=!0;var ga=Object.create||function(i,e){var t;return i!==null?(fc[Bh]=q7(i),t=new fc,fc[Bh]=null,t[wE]=i):t=Ys(),e===void 0?t:Y7.f(t,e)},tK=ie,EE=!tK(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),rK=Qe,nK=qe,iK=xt,aK=gu,oK=EE,Pm=aK("IE_PROTO"),jh=Object,sK=jh.prototype,mu=oK?jh.getPrototypeOf:function(r){var i=iK(r);if(rK(i,Pm))return i[Pm];var e=i.constructor;return nK(e)&&i instanceof e?e.prototype:i instanceof jh?sK:null},lK=pa,zo=function(r,i,e,t){return t&&t.enumerable?r[i]=e:lK(r,i,e),r},uK=ie,dK=qe,cK=Xe,hK=ga,km=mu,fK=zo,vK=ke,zh=vK("iterator"),SE=!1,Pr,vc,pc;[].keys&&(pc=[].keys(),"next"in pc?(vc=km(km(pc)),vc!==Object.prototype&&(Pr=vc)):SE=!0);var pK=!cK(Pr)||uK(function(){var r={};return Pr[zh].call(r)!==r});pK?Pr={}:Pr=hK(Pr);dK(Pr[zh])||fK(Pr,zh,function(){return this});var OE={IteratorPrototype:Pr,BUGGY_SAFARI_ITERATORS:SE},gK=sv,yK=ei,mK=gK?{}.toString:function(){return"[object "+yK(this)+"]"},bK=sv,$K=zt.f,wK=pa,_K=Qe,EK=mK,SK=ke,Cm=SK("toStringTag"),ya=function(r,i,e,t){if(r){var n=e?r:r.prototype;_K(n,Cm)||$K(n,Cm,{configurable:!0,value:i}),t&&!bK&&wK(n,"toString",EK)}},ma={},OK=OE.IteratorPrototype,TK=ga,IK=xo,PK=ya,kK=ma,CK=function(){return this},xK=function(r,i,e,t){var n=i+" Iterator";return r.prototype=TK(OK,{next:IK(+!t,e)}),PK(r,n,!1,!0),kK[n]=CK,r},AK=oe,RK=Zn,DK=function(r,i,e){try{return AK(RK(Object.getOwnPropertyDescriptor(r,i)[e]))}catch{}},MK=qe,NK=String,FK=TypeError,BK=function(r){if(typeof r=="object"||MK(r))return r;throw new FK("Can't set "+NK(r)+" as a prototype")},LK=DK,jK=Ht,zK=BK,HK=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,i={},e;try{e=LK(Object.prototype,"__proto__","set"),e(i,[]),r=i instanceof Array}catch{}return function(n,a){return jK(n),zK(a),r?e(n,a):n.__proto__=a,n}}():void 0),WK=G,VK=jt,UK=L7,GK=xK,KK=mu,qK=ya,xm=zo,YK=ke,Am=ma,XK=OE,QK=UK.PROPER,Ts=XK.BUGGY_SAFARI_ITERATORS,gc=YK("iterator"),Rm="keys",Is="values",Dm="entries",JK=function(){return this},dv=function(r,i,e,t,n,a,o){GK(e,i,t);var s=function(y){if(y===n&&h)return h;if(!Ts&&y&&y in d)return d[y];switch(y){case Rm:return function(){return new e(this,y)};case Is:return function(){return new e(this,y)};case Dm:return function(){return new e(this,y)}}return function(){return new e(this)}},l=i+" Iterator",u=!1,d=r.prototype,c=d[gc]||d["@@iterator"]||n&&d[n],h=!Ts&&c||s(n),f=i==="Array"&&d.entries||c,v,p,g;if(f&&(v=KK(f.call(new r)),v!==Object.prototype&&v.next&&(qK(v,l,!0,!0),Am[l]=JK)),QK&&n===Is&&c&&c.name!==Is&&(u=!0,h=function(){return VK(c,this)}),n)if(p={values:s(Is),keys:a?h:s(Rm),entries:s(Dm)},o)for(g in p)(Ts||u||!(g in d))&&xm(d,g,p[g]);else WK({target:i,proto:!0,forced:Ts||u},p);return o&&d[gc]!==h&&xm(d,gc,h,{name:n}),Am[i]=h,p},cv=function(r,i){return{value:r,done:i}},ZK=_7.charAt,eq=wr,TE=ti,tq=dv,Mm=cv,IE="String Iterator",rq=TE.set,nq=TE.getterFor(IE);tq(String,"String",function(r){rq(this,{type:IE,string:eq(r),index:0})},function(){var i=nq(this),e=i.string,t=i.index,n;return t>=e.length?Mm(void 0,!0):(n=ZK(e,t),i.index+=n.length,Mm(n,!1))});var iq=jt,Nm=Ht,aq=rv,PE=function(r,i,e){var t,n;Nm(r);try{if(t=aq(r,"return"),!t){if(i==="throw")throw e;return e}t=iq(t,r)}catch(a){n=!0,t=a}if(i==="throw")throw e;if(n)throw t;return Nm(t),e},oq=Ht,sq=PE,lq=function(r,i,e,t){try{return t?i(oq(e)[0],e[1]):i(e)}catch(n){sq(r,"throw",n)}},uq=ke,dq=ma,cq=uq("iterator"),hq=Array.prototype,kE=function(r){return r!==void 0&&(dq.Array===r||hq[cq]===r)},fq=oe,vq=qe,Hh=nv,pq=fq(Function.toString);vq(Hh.inspectSource)||(Hh.inspectSource=function(r){return pq(r)});var gq=Hh.inspectSource,yq=oe,mq=ie,CE=qe,bq=ei,$q=Yt,wq=gq,xE=function(){},_q=[],AE=$q("Reflect","construct"),hv=/^\s*(?:class|function)\b/,Eq=yq(hv.exec),Sq=!hv.test(xE),Oa=function(i){if(!CE(i))return!1;try{return AE(xE,_q,i),!0}catch{return!1}},RE=function(i){if(!CE(i))return!1;switch(bq(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Sq||!!Eq(hv,wq(i))}catch{return!0}};RE.sham=!0;var bu=!AE||mq(function(){var r;return Oa(Oa.call)||!Oa(Object)||!Oa(function(){r=!0})||r})?RE:Oa,Oq=hu,Tq=zt,Iq=xo,ba=function(r,i,e){var t=Oq(i);t in r?Tq.f(r,t,Iq(0,e)):r[t]=e},Pq=ei,Fm=rv,kq=ca,Cq=ma,xq=ke,Aq=xq("iterator"),$u=function(r){if(!kq(r))return Fm(r,Aq)||Fm(r,"@@iterator")||Cq[Pq(r)]},Rq=jt,Dq=Zn,Mq=Ht,Nq=fa,Fq=$u,Bq=TypeError,DE=function(r,i){var e=arguments.length<2?Fq(r):i;if(Dq(e))return Mq(Rq(e,r));throw new Bq(Nq(r)+" is not iterable")},Lq=Fo,jq=jt,zq=xt,Hq=lq,Wq=kE,Vq=bu,Uq=Xt,Bm=ba,Gq=DE,Kq=$u,Lm=Array,qq=function(i){var e=zq(i),t=Vq(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=Lq(a,n>2?arguments[2]:void 0));var s=Kq(e),l=0,u,d,c,h,f,v;if(s&&!(this===Lm&&Wq(s)))for(h=Gq(e,s),f=h.next,d=t?new this:[];!(c=jq(f,h)).done;l++)v=o?Hq(h,a,[c.value,l],!0):c.value,Bm(d,l,v);else for(u=Uq(e),d=t?new this(u):Lm(u);u>l;l++)v=o?a(e[l],l):e[l],Bm(d,l,v);return d.length=l,d},Yq=ke,ME=Yq("iterator"),NE=!1;try{var Xq=0,jm={next:function(){return{done:!!Xq++}},return:function(){NE=!0}};jm[ME]=function(){return this},Array.from(jm,function(){throw 2})}catch{}var Qq=function(r,i){try{if(!i&&!NE)return!1}catch{return!1}var e=!1;try{var t={};t[ME]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},Jq=G,Zq=qq,eY=Qq,tY=!eY(function(r){Array.from(r)});Jq({target:"Array",stat:!0,forced:tY},{from:Zq});var rY=ae,nY=rY.Array.from,iY=nY,FE=iY,aY=FE,ri=z(aY),oY=$r,zm=ma,BE=ti;zt.f;var sY=dv,Ps=cv,LE="Array Iterator",lY=BE.set,uY=BE.getterFor(LE);sY(Array,"Array",function(r,i){lY(this,{type:LE,target:oY(r),index:0,kind:i})},function(){var r=uY(this),i=r.target,e=r.kind,t=r.index++;if(!i||t>=i.length)return r.target=void 0,Ps(void 0,!0);switch(e){case"keys":return Ps(t,!1);case"values":return Ps(i[t],!1)}return Ps([t,i[t]],!1)},"values");zm.Arguments=zm.Array;var dY=$u,cY=dY,hY={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},fY=hY,vY=Pe,pY=ei,gY=pa,Hm=ma,yY=ke,Wm=yY("toStringTag");for(var yc in fY){var Vm=vY[yc],mc=Vm&&Vm.prototype;mc&&pY(mc)!==Wm&&gY(mc,Wm,yc),Hm[yc]=Hm.Array}var mY=cY,bY=mY,$Y=bY,wY=$Y,_Y=wY,EY=_Y,jE=EY,zE=z(jE),SY=jE,ni=z(SY);function R(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var HE={exports:{}},OY=G,TY=Ye,Um=zt.f;OY({target:"Object",stat:!0,forced:Object.defineProperty!==Um,sham:!TY},{defineProperty:Um});var IY=ae,WE=IY.Object,PY=HE.exports=function(i,e,t){return WE.defineProperty(i,e,t)};WE.defineProperty.sham&&(PY.sham=!0);var kY=HE.exports,CY=kY,VE=CY,xY=VE,AY=xY,RY=AY,DY=RY,MY=DY,wu=z(MY),NY=Lr,ii=Array.isArray||function(i){return NY(i)==="Array"},FY=TypeError,BY=9007199254740991,fv=function(r){if(r>BY)throw FY("Maximum allowed index exceeded");return r},Gm=ii,LY=bu,jY=Xe,zY=ke,HY=zY("species"),Km=Array,WY=function(r){var i;return Gm(r)&&(i=r.constructor,LY(i)&&(i===Km||Gm(i.prototype))?i=void 0:jY(i)&&(i=i[HY],i===null&&(i=void 0))),i===void 0?Km:i},VY=WY,vv=function(r,i){return new(VY(r))(i===0?0:i)},UY=ie,GY=ke,KY=Do,qY=GY("species"),Ho=function(r){return KY>=51||!UY(function(){var i=[],e=i.constructor={};return e[qY]=function(){return{foo:1}},i[r](Boolean).foo!==1})},YY=G,XY=ie,QY=ii,JY=Xe,ZY=xt,eX=Xt,qm=fv,Ym=ba,tX=vv,rX=Ho,nX=ke,iX=Do,UE=nX("isConcatSpreadable"),aX=iX>=51||!XY(function(){var r=[];return r[UE]=!1,r.concat()[0]!==r}),oX=function(r){if(!JY(r))return!1;var i=r[UE];return i!==void 0?!!i:QY(r)},sX=!aX||!rX("concat");YY({target:"Array",proto:!0,arity:1,forced:sX},{concat:function(i){var e=ZY(this),t=tX(e,0),n=0,a,o,s,l,u;for(a=-1,s=arguments.length;a<s;a++)if(u=a===-1?e:arguments[a],oX(u))for(l=eX(u),qm(n+l),o=0;o<l;o++,n++)o in u&&Ym(t,n,u[o]);else qm(n+1),Ym(t,n++,u);return t.length=n,t}});var Wo={},lX=sE,uX=av,dX=uX.concat("length","prototype");Wo.f=Object.getOwnPropertyNames||function(i){return lX(i,dX)};var _u={},Xm=Bo,cX=Xt,hX=ba,fX=Array,vX=Math.max,GE=function(r,i,e){for(var t=cX(r),n=Xm(i,t),a=Xm(e===void 0?t:e,t),o=fX(vX(a-n,0)),s=0;n<a;n++,s++)hX(o,s,r[n]);return o.length=s,o},pX=Lr,gX=$r,KE=Wo.f,yX=GE,qE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],mX=function(r){try{return KE(r)}catch{return yX(qE)}};_u.f=function(i){return qE&&pX(i)==="Window"?mX(i):KE(gX(i))};var bX=zt,pv=function(r,i,e){return bX.f(r,i,e)},Vo={},$X=ke;Vo.f=$X;var Qm=ae,wX=Qe,_X=Vo,EX=zt.f,Ce=function(r){var i=Qm.Symbol||(Qm.Symbol={});wX(i,r)||EX(i,r,{value:_X.f(r)})},SX=jt,OX=Yt,TX=ke,IX=zo,YE=function(){var r=OX("Symbol"),i=r&&r.prototype,e=i&&i.valueOf,t=TX("toPrimitive");i&&!i[t]&&IX(i,t,function(n){return SX(e,this)},{arity:1})},PX=Fo,kX=oe,CX=du,xX=xt,AX=Xt,RX=vv,Jm=kX([].push),Hr=function(r){var i=r===1,e=r===2,t=r===3,n=r===4,a=r===6,o=r===7,s=r===5||a;return function(l,u,d,c){for(var h=xX(l),f=CX(h),v=PX(u,d),p=AX(f),g=0,y=c||RX,m=i?y(l,p):e||o?y(l,0):void 0,w,b;p>g;g++)if((s||g in f)&&(w=f[g],b=v(w,g,h),r))if(i)m[g]=b;else if(b)switch(r){case 3:return!0;case 5:return w;case 6:return g;case 2:Jm(m,w)}else switch(r){case 4:return!1;case 7:Jm(m,w)}return a?-1:t||n?n:m}},fn={forEach:Hr(0),map:Hr(1),filter:Hr(2),some:Hr(3),every:Hr(4),find:Hr(5),findIndex:Hr(6),filterReject:Hr(7)},Eu=G,Su=Pe,gv=jt,DX=oe,Hi=Ye,Wi=ha,MX=ie,Ue=Qe,NX=De,Wh=Ht,Ou=$r,yv=hu,FX=wr,Vh=xo,to=ga,XE=vu,BX=Wo,QE=_u,LX=jo,JE=da,ZE=zt,jX=yu,eS=uu,Zm=zo,zX=pv,mv=va,HX=gu,tS=Lo,eb=cu,WX=ke,VX=Vo,UX=Ce,GX=YE,KX=ya,rS=ti,Tu=fn.forEach,St=HX("hidden"),Iu="Symbol",ro="prototype",qX=rS.set,tb=rS.getterFor(Iu),ir=Object[ro],xn=Su.Symbol,xa=xn&&xn[ro],YX=Su.RangeError,XX=Su.TypeError,bc=Su.QObject,nS=JE.f,An=ZE.f,iS=QE.f,QX=eS.f,aS=DX([].push),Mr=mv("symbols"),Uo=mv("op-symbols"),JX=mv("wks"),Uh=!bc||!bc[ro]||!bc[ro].findChild,oS=function(r,i,e){var t=nS(ir,i);t&&delete ir[i],An(r,i,e),t&&r!==ir&&An(ir,i,t)},Gh=Hi&&MX(function(){return to(An({},"a",{get:function(){return An(this,"a",{value:7}).a}})).a!==7})?oS:An,$c=function(r,i){var e=Mr[r]=to(xa);return qX(e,{type:Iu,tag:r,description:i}),Hi||(e.description=i),e},Pu=function(i,e,t){i===ir&&Pu(Uo,e,t),Wh(i);var n=yv(e);return Wh(t),Ue(Mr,n)?(t.enumerable?(Ue(i,St)&&i[St][n]&&(i[St][n]=!1),t=to(t,{enumerable:Vh(0,!1)})):(Ue(i,St)||An(i,St,Vh(1,{})),i[St][n]=!0),Gh(i,n,t)):An(i,n,t)},bv=function(i,e){Wh(i);var t=Ou(e),n=XE(t).concat(dS(t));return Tu(n,function(a){(!Hi||gv(sS,t,a))&&Pu(i,a,t[a])}),i},ZX=function(i,e){return e===void 0?to(i):bv(to(i),e)},sS=function(i){var e=yv(i),t=gv(QX,this,e);return this===ir&&Ue(Mr,e)&&!Ue(Uo,e)?!1:t||!Ue(this,e)||!Ue(Mr,e)||Ue(this,St)&&this[St][e]?t:!0},lS=function(i,e){var t=Ou(i),n=yv(e);if(!(t===ir&&Ue(Mr,n)&&!Ue(Uo,n))){var a=nS(t,n);return a&&Ue(Mr,n)&&!(Ue(t,St)&&t[St][n])&&(a.enumerable=!0),a}},uS=function(i){var e=iS(Ou(i)),t=[];return Tu(e,function(n){!Ue(Mr,n)&&!Ue(tS,n)&&aS(t,n)}),t},dS=function(r){var i=r===ir,e=iS(i?Uo:Ou(r)),t=[];return Tu(e,function(n){Ue(Mr,n)&&(!i||Ue(ir,n))&&aS(t,Mr[n])}),t};Wi||(xn=function(){if(NX(xa,this))throw new XX("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:FX(arguments[0]),e=eb(i),t=function(n){this===ir&&gv(t,Uo,n),Ue(this,St)&&Ue(this[St],e)&&(this[St][e]=!1);var a=Vh(1,n);try{Gh(this,e,a)}catch(o){if(!(o instanceof YX))throw o;oS(this,e,a)}};return Hi&&Uh&&Gh(ir,e,{configurable:!0,set:t}),$c(e,i)},xa=xn[ro],Zm(xa,"toString",function(){return tb(this).tag}),Zm(xn,"withoutSetter",function(r){return $c(eb(r),r)}),eS.f=sS,ZE.f=Pu,jX.f=bv,JE.f=lS,BX.f=QE.f=uS,LX.f=dS,VX.f=function(r){return $c(WX(r),r)},Hi&&zX(xa,"description",{configurable:!0,get:function(){return tb(this).description}}));Eu({global:!0,constructor:!0,wrap:!0,forced:!Wi,sham:!Wi},{Symbol:xn});Tu(XE(JX),function(r){UX(r)});Eu({target:Iu,stat:!0,forced:!Wi},{useSetter:function(){Uh=!0},useSimple:function(){Uh=!1}});Eu({target:"Object",stat:!0,forced:!Wi,sham:!Hi},{create:ZX,defineProperty:Pu,defineProperties:bv,getOwnPropertyDescriptor:lS});Eu({target:"Object",stat:!0,forced:!Wi},{getOwnPropertyNames:uS});GX();KX(xn,Iu);tS[St]=!0;var eQ=ha,cS=eQ&&!!Symbol.for&&!!Symbol.keyFor,tQ=G,rQ=Yt,nQ=Qe,iQ=wr,hS=va,aQ=cS,wc=hS("string-to-symbol-registry"),oQ=hS("symbol-to-string-registry");tQ({target:"Symbol",stat:!0,forced:!aQ},{for:function(r){var i=iQ(r);if(nQ(wc,i))return wc[i];var e=rQ("Symbol")(i);return wc[i]=e,oQ[e]=i,e}});var sQ=G,lQ=Qe,uQ=Mo,dQ=fa,cQ=va,hQ=cS,rb=cQ("symbol-to-string-registry");sQ({target:"Symbol",stat:!0,forced:!hQ},{keyFor:function(i){if(!uQ(i))throw new TypeError(dQ(i)+" is not a symbol");if(lQ(rb,i))return rb[i]}});var fQ=oe,nb=ii,vQ=qe,ib=Lr,pQ=wr,ab=fQ([].push),gQ=function(r){if(vQ(r))return r;if(nb(r)){for(var i=r.length,e=[],t=0;t<i;t++){var n=r[t];typeof n=="string"?ab(e,n):(typeof n=="number"||ib(n)==="Number"||ib(n)==="String")&&ab(e,pQ(n))}var a=e.length,o=!0;return function(s,l){if(o)return o=!1,l;if(nb(this))return l;for(var u=0;u<a;u++)if(e[u]===s)return l}}},yQ=G,fS=Yt,vS=Co,mQ=jt,Go=oe,pS=ie,ob=qe,sb=Mo,gS=pu,bQ=gQ,$Q=ha,wQ=String,en=fS("JSON","stringify"),ks=Go(/./.exec),lb=Go("".charAt),_Q=Go("".charCodeAt),EQ=Go("".replace),SQ=Go(1 .toString),OQ=/[\uD800-\uDFFF]/g,ub=/^[\uD800-\uDBFF]$/,db=/^[\uDC00-\uDFFF]$/,cb=!$Q||pS(function(){var r=fS("Symbol")("stringify detection");return en([r])!=="[null]"||en({a:r})!=="{}"||en(Object(r))!=="{}"}),hb=pS(function(){return en("\uDF06\uD834")!=='"\\udf06\\ud834"'||en("\uDEAD")!=='"\\udead"'}),TQ=function(r,i){var e=gS(arguments),t=bQ(i);if(!(!ob(t)&&(r===void 0||sb(r))))return e[1]=function(n,a){if(ob(t)&&(a=mQ(t,this,wQ(n),a)),!sb(a))return a},vS(en,null,e)},IQ=function(r,i,e){var t=lb(e,i-1),n=lb(e,i+1);return ks(ub,r)&&!ks(db,n)||ks(db,r)&&!ks(ub,t)?"\\u"+SQ(_Q(r,0),16):r};en&&yQ({target:"JSON",stat:!0,arity:3,forced:cb||hb},{stringify:function(i,e,t){var n=gS(arguments),a=vS(cb?TQ:en,null,n);return hb&&typeof a=="string"?EQ(a,OQ,IQ):a}});var PQ=G,kQ=ha,CQ=ie,yS=jo,xQ=xt,AQ=!kQ||CQ(function(){yS.f(1)});PQ({target:"Object",stat:!0,forced:AQ},{getOwnPropertySymbols:function(i){var e=yS.f;return e?e(xQ(i)):[]}});var RQ=Ce;RQ("asyncIterator");var DQ=Ce;DQ("hasInstance");var MQ=Ce;MQ("isConcatSpreadable");var NQ=Ce;NQ("iterator");var FQ=Ce;FQ("match");var BQ=Ce;BQ("matchAll");var LQ=Ce;LQ("replace");var jQ=Ce;jQ("search");var zQ=Ce;zQ("species");var HQ=Ce;HQ("split");var WQ=Ce,VQ=YE;WQ("toPrimitive");VQ();var UQ=Yt,GQ=Ce,KQ=ya;GQ("toStringTag");KQ(UQ("Symbol"),"Symbol");var qQ=Ce;qQ("unscopables");var YQ=Pe,XQ=ya;XQ(YQ.JSON,"JSON",!0);var QQ=ae,JQ=QQ.Symbol,ZQ=JQ,mS=ZQ,eJ=ke,tJ=zt.f,fb=eJ("metadata"),vb=Function.prototype;vb[fb]===void 0&&tJ(vb,fb,{value:null});var rJ=Ce;rJ("asyncDispose");var nJ=Ce;nJ("dispose");var iJ=Ce;iJ("metadata");var aJ=mS,oJ=aJ,sJ=Yt,lJ=oe,$v=sJ("Symbol"),uJ=$v.keyFor,dJ=lJ($v.prototype.valueOf),bS=$v.isRegisteredSymbol||function(i){try{return uJ(dJ(i))!==void 0}catch{return!1}},cJ=G,hJ=bS;cJ({target:"Symbol",stat:!0},{isRegisteredSymbol:hJ});var fJ=va,$S=Yt,vJ=oe,pJ=Mo,gJ=ke,_l=$S("Symbol"),pb=_l.isWellKnownSymbol,wS=$S("Object","getOwnPropertyNames"),yJ=vJ(_l.prototype.valueOf),gb=fJ("wks");for(var _c=0,yb=wS(_l),mJ=yb.length;_c<mJ;_c++)try{var mb=yb[_c];pJ(_l[mb])&&gJ(mb)}catch{}var _S=function(i){if(pb&&pb(i))return!0;try{for(var e=yJ(i),t=0,n=wS(gb),a=n.length;t<a;t++)if(gb[n[t]]==e)return!0}catch{}return!1},bJ=G,$J=_S;bJ({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:$J});var wJ=Ce;wJ("matcher");var _J=Ce;_J("observable");var EJ=G,SJ=bS;EJ({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:SJ});var OJ=G,TJ=_S;OJ({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:TJ});var IJ=Ce;IJ("metadataKey");var PJ=Ce;PJ("patternMatch");var kJ=Ce;kJ("replaceAll");var CJ=oJ,xJ=CJ,AJ=xJ,Pi=z(AJ),RJ=Vo,DJ=RJ.f("iterator"),MJ=DJ,NJ=MJ,FJ=NJ,BJ=FJ,LJ=BJ,jJ=LJ,zJ=jJ,HJ=z(zJ);function ce(r){"@babel/helpers - typeof";return ce=typeof Pi=="function"&&typeof HJ=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Pi=="function"&&i.constructor===Pi&&i!==Pi.prototype?"symbol":typeof i},ce(r)}var WJ=Vo,VJ=WJ.f("toPrimitive"),UJ=VJ,GJ=UJ,KJ=GJ,qJ=KJ,YJ=qJ,XJ=YJ,QJ=XJ,JJ=z(QJ);function ZJ(r,i){if(ce(r)!=="object"||r===null)return r;var e=r[JJ];if(e!==void 0){var t=e.call(r,i||"default");if(ce(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function ES(r){var i=ZJ(r,"string");return ce(i)==="symbol"?i:String(i)}function bb(r,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),wu(r,ES(t.key),t)}}function D(r,i,e){return i&&bb(r.prototype,i),e&&bb(r,e),wu(r,"prototype",{writable:!1}),r}var eZ=G,tZ=ii;eZ({target:"Array",stat:!0},{isArray:tZ});var rZ=ae,nZ=rZ.Array.isArray,iZ=nZ,SS=iZ,aZ=SS,oZ=aZ,sZ=oZ,lZ=sZ,uZ=lZ,OS=z(uZ);function dZ(r){if(OS(r))return r}var cZ=Ye,hZ=ii,fZ=TypeError,vZ=Object.getOwnPropertyDescriptor,pZ=cZ&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}(),TS=pZ?function(r,i){if(hZ(r)&&!vZ(r,"length").writable)throw new fZ("Cannot set read only .length");return r.length=i}:function(r,i){return r.length=i},gZ=G,yZ=xt,mZ=Xt,bZ=TS,$Z=fv,wZ=ie,_Z=wZ(function(){return[].push.call({length:4294967296},1)!==4294967297}),EZ=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}},SZ=_Z||!EZ();gZ({target:"Array",proto:!0,arity:1,forced:SZ},{push:function(i){var e=yZ(this),t=mZ(e),n=arguments.length;$Z(t+n);for(var a=0;a<n;a++)e[t]=arguments[a],t++;return bZ(e,t),t}});var OZ=Je,TZ=OZ("Array").push,IZ=De,PZ=TZ,Ec=Array.prototype,kZ=function(r){var i=r.push;return r===Ec||IZ(Ec,r)&&i===Ec.push?PZ:i},CZ=kZ,xZ=CZ,AZ=xZ,RZ=AZ,DZ=RZ,MZ=DZ,NZ=MZ,FZ=z(NZ);function BZ(r,i){var e=r==null?null:typeof Pi<"u"&&zE(r)||r["@@iterator"];if(e!=null){var t,n,a,o,s=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,i===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(FZ(s).call(s,t.value),s.length!==i);l=!0);}catch(d){u=!0,n=d}finally{try{if(!l&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(u)throw n}}return s}}var LZ=G,$b=ii,jZ=bu,zZ=Xe,wb=Bo,HZ=Xt,WZ=$r,VZ=ba,UZ=ke,GZ=Ho,KZ=pu,qZ=GZ("slice"),YZ=UZ("species"),Sc=Array,XZ=Math.max;LZ({target:"Array",proto:!0,forced:!qZ},{slice:function(i,e){var t=WZ(this),n=HZ(t),a=wb(i,n),o=wb(e===void 0?n:e,n),s,l,u;if($b(t)&&(s=t.constructor,jZ(s)&&(s===Sc||$b(s.prototype))?s=void 0:zZ(s)&&(s=s[YZ],s===null&&(s=void 0)),s===Sc||s===void 0))return KZ(t,a,o);for(l=new(s===void 0?Sc:s)(XZ(o-a,0)),u=0;a<o;a++,u++)a in t&&VZ(l,u,t[a]);return l.length=u,l}});var QZ=Je,JZ=QZ("Array").slice,ZZ=De,eee=JZ,Oc=Array.prototype,tee=function(r){var i=r.slice;return r===Oc||ZZ(Oc,r)&&i===Oc.slice?eee:i},ree=tee,IS=ree,nee=IS,iee=nee,aee=iee,oee=aee,see=oee,lee=z(see),uee=FE,dee=uee,cee=dee,hee=cee,fee=hee,PS=z(fee);function Kh(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function kS(r,i){var e;if(r){if(typeof r=="string")return Kh(r,i);var t=lee(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return PS(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Kh(r,i)}}function vee(){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 Oe(r,i){return dZ(r)||BZ(r,i)||kS(r,i)||vee()}function pee(r){if(OS(r))return Kh(r)}function gee(r){if(typeof Pi<"u"&&zE(r)!=null||r["@@iterator"]!=null)return PS(r)}function yee(){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 cr(r){return pee(r)||gee(r)||kS(r)||yee()}var mee=mS,vn=z(mee),bee=Je,$ee=bee("Array").concat,wee=De,_ee=$ee,Tc=Array.prototype,Eee=function(r){var i=r.concat;return r===Tc||wee(Tc,r)&&i===Tc.concat?_ee:i},See=Eee,Oee=See,Tee=Oee,wv=z(Tee),Iee=IS,tt=z(Iee),Pee=Yt,kee=oe,Cee=Wo,xee=jo,Aee=Ht,Ree=kee([].concat),Dee=Pee("Reflect","ownKeys")||function(i){var e=Cee.f(Aee(i)),t=xee.f;return t?Ree(e,t(i)):e},Mee=SS,ue=z(Mee),Nee=G,Fee=fn.map,Bee=Ho,Lee=Bee("map");Nee({target:"Array",proto:!0,forced:!Lee},{map:function(i){return Fee(this,i,arguments.length>1?arguments[1]:void 0)}});var jee=Je,zee=jee("Array").map,Hee=De,Wee=zee,Ic=Array.prototype,Vee=function(r){var i=r.map;return r===Ic||Hee(Ic,r)&&i===Ic.map?Wee:i},Uee=Vee,Gee=Uee,Kee=Gee,Vi=z(Kee),qee=G,Yee=xt,CS=vu,Xee=ie,Qee=Xee(function(){CS(1)});qee({target:"Object",stat:!0,forced:Qee},{keys:function(i){return CS(Yee(i))}});var Jee=ae,Zee=Jee.Object.keys,ete=Zee,tte=ete,rte=tte,Ee=z(rte),nte=G,ite=oe,xS=Date,ate=ite(xS.prototype.getTime);nte({target:"Date",stat:!0},{now:function(){return ate(new xS)}});var ote=ae,ste=ote.Date.now,lte=ste,ute=lte,dte=ute,El=z(dte),cte=ie,$a=function(r,i){var e=[][r];return!!e&&cte(function(){e.call(null,i||function(){return 1},1)})},hte=fn.forEach,fte=$a,vte=fte("forEach"),pte=vte?[].forEach:function(i){return hte(this,i,arguments.length>1?arguments[1]:void 0)},gte=G,_b=pte;gte({target:"Array",proto:!0,forced:[].forEach!==_b},{forEach:_b});var yte=Je,mte=yte("Array").forEach,bte=mte,$te=bte,wte=ei,_te=Qe,Ete=De,Ste=$te,Pc=Array.prototype,Ote={DOMTokenList:!0,NodeList:!0},Tte=function(r){var i=r.forEach;return r===Pc||Ete(Pc,r)&&i===Pc.forEach||_te(Ote,wte(r))?Ste:i},Ite=Tte,he=z(Ite),Pte=G,kte=oe,Cte=ii,xte=kte([].reverse),Eb=[1,2];Pte({target:"Array",proto:!0,forced:String(Eb)===String(Eb.reverse())},{reverse:function(){return Cte(this)&&(this.length=this.length),xte(this)}});var Ate=Je,Rte=Ate("Array").reverse,Dte=De,Mte=Rte,kc=Array.prototype,Nte=function(r){var i=r.reverse;return r===kc||Dte(kc,r)&&i===kc.reverse?Mte:i},Fte=Nte,Bte=Fte,Lte=Bte,Rn=z(Lte),Sb=fa,jte=TypeError,AS=function(r,i){if(!delete r[i])throw new jte("Cannot delete property "+Sb(i)+" of "+Sb(r))},zte=G,Hte=xt,Wte=Bo,Vte=fu,Ute=Xt,Gte=TS,Kte=fv,qte=vv,Yte=ba,Cc=AS,Xte=Ho,Qte=Xte("splice"),Jte=Math.max,Zte=Math.min;zte({target:"Array",proto:!0,forced:!Qte},{splice:function(i,e){var t=Hte(this),n=Ute(t),a=Wte(i,n),o=arguments.length,s,l,u,d,c,h;for(o===0?s=l=0:o===1?(s=0,l=n-a):(s=o-2,l=Zte(Jte(Vte(e),0),n-a)),Kte(n+s-l),u=qte(t,l),d=0;d<l;d++)c=a+d,c in t&&Yte(u,d,t[c]);if(u.length=l,s<l){for(d=a;d<n-l;d++)c=d+l,h=d+s,c in t?t[h]=t[c]:Cc(t,h);for(d=n;d>n-l+s;d--)Cc(t,d-1)}else if(s>l)for(d=n-l;d>a;d--)c=d+l-1,h=d+s-1,c in t?t[h]=t[c]:Cc(t,h);for(d=0;d<s;d++)t[d+a]=arguments[d+2];return Gte(t,n-l+s),u}});var ere=Je,tre=ere("Array").splice,rre=De,nre=tre,xc=Array.prototype,ire=function(r){var i=r.splice;return r===xc||rre(xc,r)&&i===xc.splice?nre:i},are=ire,ore=are,sre=ore,kr=z(sre),lre=G,ure=iv.includes,dre=ie,cre=dre(function(){return!Array(1).includes()});lre({target:"Array",proto:!0,forced:cre},{includes:function(i){return ure(this,i,arguments.length>1?arguments[1]:void 0)}});var hre=Je,fre=hre("Array").includes,vre=Xe,pre=Lr,gre=ke,yre=gre("match"),mre=function(r){var i;return vre(r)&&((i=r[yre])!==void 0?!!i:pre(r)==="RegExp")},bre=mre,$re=TypeError,wre=function(r){if(bre(r))throw new $re("The method doesn't accept regular expressions");return r},_re=ke,Ere=_re("match"),Sre=function(r){var i=/./;try{"/./"[r](i)}catch{try{return i[Ere]=!1,"/./"[r](i)}catch{}}return!1},Ore=G,Tre=oe,Ire=wre,Pre=Ao,Ob=wr,kre=Sre,Cre=Tre("".indexOf);Ore({target:"String",proto:!0,forced:!kre("includes")},{includes:function(i){return!!~Cre(Ob(Pre(this)),Ob(Ire(i)),arguments.length>1?arguments[1]:void 0)}});var xre=Je,Are=xre("String").includes,Tb=De,Rre=fre,Dre=Are,Ac=Array.prototype,Rc=String.prototype,Mre=function(r){var i=r.includes;return r===Ac||Tb(Ac,r)&&i===Ac.includes?Rre:typeof r=="string"||r===Rc||Tb(Rc,r)&&i===Rc.includes?Dre:i},Nre=Mre,Fre=Nre,Bre=Fre,tn=z(Bre),Lre=G,jre=ie,zre=xt,RS=mu,Hre=EE,Wre=jre(function(){RS(1)});Lre({target:"Object",stat:!0,forced:Wre,sham:!Hre},{getPrototypeOf:function(i){return RS(zre(i))}});var Vre=ae,Ure=Vre.Object.getPrototypeOf,Gre=Ure,DS=Gre,Kre=DS,Ib=z(Kre),qre=G,Yre=fn.filter,Xre=Ho,Qre=Xre("filter");qre({target:"Array",proto:!0,forced:!Qre},{filter:function(i){return Yre(this,i,arguments.length>1?arguments[1]:void 0)}});var Jre=Je,Zre=Jre("Array").filter,ene=De,tne=Zre,Dc=Array.prototype,rne=function(r){var i=r.filter;return r===Dc||ene(Dc,r)&&i===Dc.filter?tne:i},nne=rne,ine=nne,ane=ine,Ot=z(ane),_v=`
64
+ \v\f\r                 \u2028\u2029\uFEFF`,one=oe,sne=Ao,lne=wr,qh=_v,Pb=one("".replace),une=RegExp("^["+qh+"]+"),dne=RegExp("(^|[^"+qh+"])["+qh+"]+$"),Mc=function(r){return function(i){var e=lne(sne(i));return r&1&&(e=Pb(e,une,"")),r&2&&(e=Pb(e,dne,"$1")),e}},MS={start:Mc(1),end:Mc(2),trim:Mc(3)},NS=Pe,cne=ie,hne=oe,fne=wr,vne=MS.trim,kb=_v,Ba=NS.parseInt,Cb=NS.Symbol,xb=Cb&&Cb.iterator,FS=/^[+-]?0x/i,pne=hne(FS.exec),gne=Ba(kb+"08")!==8||Ba(kb+"0x16")!==22||xb&&!cne(function(){Ba(Object(xb))}),yne=gne?function(i,e){var t=vne(fne(i));return Ba(t,e>>>0||(pne(FS,t)?16:10))}:Ba,mne=G,Ab=yne;mne({global:!0,forced:parseInt!==Ab},{parseInt:Ab});var bne=ae,$ne=bne.parseInt,wne=$ne,_ne=wne,Ene=_ne,tr=z(Ene),Sne=G,One=tv,Tne=iv.indexOf,Ine=$a,Yh=One([].indexOf),BS=!!Yh&&1/Yh([1],1,-0)<0,Pne=BS||!Ine("indexOf");Sne({target:"Array",proto:!0,forced:Pne},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return BS?Yh(this,i,e)||0:Tne(this,i,e)}});var kne=Je,Cne=kne("Array").indexOf,xne=De,Ane=Cne,Nc=Array.prototype,Rne=function(r){var i=r.indexOf;return r===Nc||xne(Nc,r)&&i===Nc.indexOf?Ane:i},Dne=Rne,Mne=Dne,Nne=Mne,ne=z(Nne),Fne=G,Bne=Ye,Lne=ga;Fne({target:"Object",stat:!0,sham:!Bne},{create:Lne});var jne=ae,zne=jne.Object,Hne=function(i,e){return zne.create(i,e)},Wne=Hne,LS=Wne,Vne=LS,Dn=z(Vne),Xh=ae,Une=Co;Xh.JSON||(Xh.JSON={stringify:JSON.stringify});var Gne=function(i,e,t){return Une(Xh.JSON.stringify,null,arguments)},Kne=Gne,qne=Kne,Yne=qne,Ko=z(Yne),Xne=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Qne=TypeError,Jne=function(r,i){if(r<i)throw new Qne("Not enough arguments");return r},jS=Pe,Zne=Co,eie=qe,tie=Xne,rie=Ro,nie=pu,iie=Jne,aie=jS.Function,oie=/MSIE .\./.test(rie)||tie&&function(){var r=jS.Bun.version.split(".");return r.length<3||r[0]==="0"&&(r[1]<3||r[1]==="3"&&r[2]==="0")}(),zS=function(r,i){var e=i?2:1;return oie?function(t,n){var a=iie(arguments.length,1)>e,o=eie(t)?t:aie(t),s=a?nie(arguments,e):[],l=a?function(){Zne(o,this,s)}:o;return i?r(l,n):r(l)}:r},sie=G,HS=Pe,lie=zS,Rb=lie(HS.setInterval,!0);sie({global:!0,bind:!0,forced:HS.setInterval!==Rb},{setInterval:Rb});var uie=G,WS=Pe,die=zS,Db=die(WS.setTimeout,!0);uie({global:!0,bind:!0,forced:WS.setTimeout!==Db},{setTimeout:Db});var cie=ae,hie=cie.setTimeout,fie=hie,gr=z(fie),vie=xt,Mb=Bo,pie=Xt,gie=function(i){for(var e=vie(this),t=pie(e),n=arguments.length,a=Mb(n>1?arguments[1]:void 0,t),o=n>2?arguments[2]:void 0,s=o===void 0?t:Mb(o,t);s>a;)e[a++]=i;return e},yie=G,mie=gie;yie({target:"Array",proto:!0},{fill:mie});var bie=Je,$ie=bie("Array").fill,wie=De,_ie=$ie,Fc=Array.prototype,Eie=function(r){var i=r.fill;return r===Fc||wie(Fc,r)&&i===Fc.fill?_ie:i},Sie=Eie,Oie=Sie,Tie=Oie,qo=z(Tie);/*! 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 or(){return or=Object.assign||function(r){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},or.apply(this,arguments)}function Qt(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i}function Cs(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var Qh;typeof Object.assign!="function"?Qh=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(i),t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:Qh=Object.assign;var Hn=Qh,Nb=["","webkit","Moz","MS","ms","o"],Iie=typeof document>"u"?{style:{}}:document.createElement("div"),Pie="function",ki=Math.round,Wn=Math.abs,Ev=Date.now;function ku(r,i){for(var e,t,n=i[0].toUpperCase()+i.slice(1),a=0;a<Nb.length;){if(e=Nb[a],t=e?e+n:i,t in r)return t;a++}}var Cr;typeof window>"u"?Cr={}:Cr=window;var VS=ku(Iie.style,"touchAction"),US=VS!==void 0;function kie(){if(!US)return!1;var r={},i=Cr.CSS&&Cr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=i?Cr.CSS.supports("touch-action",e):!0}),r}var GS="compute",KS="auto",Jh="manipulation",Mn="none",no="pan-x",io="pan-y",xs=kie(),Cie=/mobile|tablet|ip(ad|hone|od)|android/i,qS="ontouchstart"in Cr,xie=ku(Cr,"PointerEvent")!==void 0,Aie=qS&&Cie.test(navigator.userAgent),Yo="touch",Rie="pen",Sv="mouse",Die="kinect",Mie=25,gt=1,ai=2,Le=4,It=8,Sl=1,Xo=2,Qo=4,Jo=8,Ui=16,yr=Xo|Qo,Nn=Jo|Ui,YS=yr|Nn,XS=["x","y"],Ol=["clientX","clientY"];function xr(r,i,e){var t;if(r)if(r.forEach)r.forEach(i,e);else if(r.length!==void 0)for(t=0;t<r.length;)i.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&i.call(e,r[t],t,r)}function Cu(r,i){return typeof r===Pie?r.apply(i&&i[0]||void 0,i):r}function On(r,i){return r.indexOf(i)>-1}function Nie(r){if(On(r,Mn))return Mn;var i=On(r,no),e=On(r,io);return i&&e?Mn:i||e?i?no:io:On(r,Jh)?Jh:KS}var QS=function(){function r(e,t){this.manager=e,this.set(t)}var i=r.prototype;return i.set=function(t){t===GS&&(t=this.compute()),US&&this.manager.element.style&&xs[t]&&(this.manager.element.style[VS]=t),this.actions=t.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var t=[];return xr(this.manager.recognizers,function(n){Cu(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),Nie(t.join(" "))},i.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=On(o,Mn)&&!xs[Mn],l=On(o,io)&&!xs[io],u=On(o,no)&&!xs[no];if(s){var d=t.pointers.length===1,c=t.distance<2,h=t.deltaTime<250;if(d&&c&&h)return}if(!(u&&l)&&(s||l&&a&yr||u&&a&Nn))return this.preventSrc(n)},i.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function Ov(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}function JS(r){var i=r.length;if(i===1)return{x:ki(r[0].clientX),y:ki(r[0].clientY)};for(var e=0,t=0,n=0;n<i;)e+=r[n].clientX,t+=r[n].clientY,n++;return{x:ki(e/i),y:ki(t/i)}}function Fb(r){for(var i=[],e=0;e<r.pointers.length;)i[e]={clientX:ki(r.pointers[e].clientX),clientY:ki(r.pointers[e].clientY)},e++;return{timeStamp:Ev(),pointers:i,center:JS(i),deltaX:r.deltaX,deltaY:r.deltaY}}function Tl(r,i,e){e||(e=XS);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.sqrt(t*t+n*n)}function Zh(r,i,e){e||(e=XS);var t=i[e[0]]-r[e[0]],n=i[e[1]]-r[e[1]];return Math.atan2(n,t)*180/Math.PI}function ZS(r,i){return r===i?Sl:Wn(r)>=Wn(i)?r<0?Xo:Qo:i<0?Jo:Ui}function Fie(r,i){var e=i.center,t=r.offsetDelta||{},n=r.prevDelta||{},a=r.prevInput||{};(i.eventType===gt||a.eventType===Le)&&(n=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-t.x),i.deltaY=n.y+(e.y-t.y)}function eO(r,i,e){return{x:i/r||0,y:e/r||0}}function Bie(r,i){return Tl(i[0],i[1],Ol)/Tl(r[0],r[1],Ol)}function Lie(r,i){return Zh(i[1],i[0],Ol)+Zh(r[1],r[0],Ol)}function jie(r,i){var e=r.lastInterval||i,t=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==It&&(t>Mie||e.velocity===void 0)){var l=i.deltaX-e.deltaX,u=i.deltaY-e.deltaY,d=eO(t,l,u);a=d.x,o=d.y,n=Wn(d.x)>Wn(d.y)?d.x:d.y,s=ZS(l,u),r.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function zie(r,i){var e=r.session,t=i.pointers,n=t.length;e.firstInput||(e.firstInput=Fb(i)),n>1&&!e.firstMultiple?e.firstMultiple=Fb(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,l=i.center=JS(t);i.timeStamp=Ev(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=Zh(s,l),i.distance=Tl(s,l),Fie(e,i),i.offsetDirection=ZS(i.deltaX,i.deltaY);var u=eO(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=u.x,i.overallVelocityY=u.y,i.overallVelocity=Wn(u.x)>Wn(u.y)?u.x:u.y,i.scale=o?Bie(o.pointers,t):1,i.rotation=o?Lie(o.pointers,t):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,jie(e,i);var d=r.element,c=i.srcEvent,h;c.composedPath?h=c.composedPath()[0]:c.path?h=c.path[0]:h=c.target,Ov(h,d)&&(d=h),i.target=d}function Hie(r,i,e){var t=e.pointers.length,n=e.changedPointers.length,a=i&gt&&t-n===0,o=i&(Le|It)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=i,zie(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function ao(r){return r.trim().split(/\s+/g)}function La(r,i,e){xr(ao(i),function(t){r.addEventListener(t,e,!1)})}function ja(r,i,e){xr(ao(i),function(t){r.removeEventListener(t,e,!1)})}function Bb(r){var i=r.ownerDocument||r;return i.defaultView||i.parentWindow||window}var wa=function(){function r(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Cu(e.options.enable,[e])&&n.handler(a)},this.init()}var i=r.prototype;return i.handler=function(){},i.init=function(){this.evEl&&La(this.element,this.evEl,this.domHandler),this.evTarget&&La(this.target,this.evTarget,this.domHandler),this.evWin&&La(Bb(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&ja(this.element,this.evEl,this.domHandler),this.evTarget&&ja(this.target,this.evTarget,this.domHandler),this.evWin&&ja(Bb(this.element),this.evWin,this.domHandler)},r}();function Vn(r,i,e){if(r.indexOf&&!e)return r.indexOf(i);for(var t=0;t<r.length;){if(e&&r[t][e]==i||!e&&r[t]===i)return t;t++}return-1}var Wie={pointerdown:gt,pointermove:ai,pointerup:Le,pointercancel:It,pointerout:It},Vie={2:Yo,3:Rie,4:Sv,5:Die},tO="pointerdown",rO="pointermove pointerup pointercancel";Cr.MSPointerEvent&&!Cr.PointerEvent&&(tO="MSPointerDown",rO="MSPointerMove MSPointerUp MSPointerCancel");var nO=function(r){Qt(i,r);function i(){var t,n=i.prototype;return n.evEl=tO,n.evWin=rO,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=i.prototype;return e.handler=function(n){var a=this.store,o=!1,s=n.type.toLowerCase().replace("ms",""),l=Wie[s],u=Vie[n.pointerType]||n.pointerType,d=u===Yo,c=Vn(a,n.pointerId,"pointerId");l&gt&&(n.button===0||d)?c<0&&(a.push(n),c=a.length-1):l&(Le|It)&&(o=!0),!(c<0)&&(a[c]=n,this.callback(this.manager,l,{pointers:a,changedPointers:[n],pointerType:u,srcEvent:n}),o&&a.splice(c,1))},i}(wa);function oo(r){return Array.prototype.slice.call(r,0)}function Tv(r,i,e){for(var t=[],n=[],a=0;a<r.length;){var o=i?r[a][i]:r[a];Vn(n,o)<0&&t.push(r[a]),n[a]=o,a++}return e&&(i?t=t.sort(function(s,l){return s[i]>l[i]}):t=t.sort()),t}var Uie={touchstart:gt,touchmove:ai,touchend:Le,touchcancel:It},Gie="touchstart touchmove touchend touchcancel",Iv=function(r){Qt(i,r);function i(){var t;return i.prototype.evTarget=Gie,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=i.prototype;return e.handler=function(n){var a=Uie[n.type],o=Kie.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Yo,srcEvent:n})},i}(wa);function Kie(r,i){var e=oo(r.touches),t=this.targetIds;if(i&(gt|ai)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=oo(r.changedTouches),s=[],l=this.target;if(a=e.filter(function(u){return Ov(u.target,l)}),i===gt)for(n=0;n<a.length;)t[a[n].identifier]=!0,n++;for(n=0;n<o.length;)t[o[n].identifier]&&s.push(o[n]),i&(Le|It)&&delete t[o[n].identifier],n++;if(s.length)return[Tv(a.concat(s),"identifier",!0),s]}var qie={mousedown:gt,mousemove:ai,mouseup:Le},Yie="mousedown",Xie="mousemove mouseup",Pv=function(r){Qt(i,r);function i(){var t,n=i.prototype;return n.evEl=Yie,n.evWin=Xie,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=i.prototype;return e.handler=function(n){var a=qie[n.type];a&gt&&n.button===0&&(this.pressed=!0),a&ai&&n.which!==1&&(a=Le),this.pressed&&(a&Le&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Sv,srcEvent:n}))},i}(wa),Qie=2500,Lb=25;function jb(r){var i=r.changedPointers,e=i[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=n.indexOf(t);s>-1&&n.splice(s,1)};setTimeout(a,Qie)}}function Jie(r,i){r&gt?(this.primaryTouch=i.changedPointers[0].identifier,jb.call(this,i)):r&(Le|It)&&jb.call(this,i)}function Zie(r){for(var i=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var n=this.lastTouches[t],a=Math.abs(i-n.x),o=Math.abs(e-n.y);if(a<=Lb&&o<=Lb)return!0}return!1}var iO=function(){var r=function(i){Qt(e,i);function e(n,a){var o;return o=i.call(this,n,a)||this,o.handler=function(s,l,u){var d=u.pointerType===Yo,c=u.pointerType===Sv;if(!(c&&u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents)){if(d)Jie.call(Cs(Cs(o)),l,u);else if(c&&Zie.call(Cs(Cs(o)),u))return;o.callback(s,l,u)}},o.touch=new Iv(o.manager,o.handler),o.mouse=new Pv(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(wa);return r}();function eae(r){var i,e=r.options.inputClass;return e?i=e:xie?i=nO:Aie?i=Iv:qS?i=iO:i=Pv,new i(r,Hie)}function Ci(r,i,e){return Array.isArray(r)?(xr(r,e[i],e),!0):!1}var Xs=1,Kt=2,Gi=4,rn=8,Ar=rn,so=16,fr=32,tae=1;function rae(){return tae++}function As(r,i){var e=i.manager;return e?e.get(r):r}function zb(r){return r&so?"cancel":r&rn?"end":r&Gi?"move":r&Kt?"start":""}var Zo=function(){function r(e){e===void 0&&(e={}),this.options=or({enable:!0},e),this.id=rae(),this.manager=null,this.state=Xs,this.simultaneous={},this.requireFail=[]}var i=r.prototype;return i.set=function(t){return Hn(this.options,t),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(t){if(Ci(t,"recognizeWith",this))return this;var n=this.simultaneous;return t=As(t,this),n[t.id]||(n[t.id]=t,t.recognizeWith(this)),this},i.dropRecognizeWith=function(t){return Ci(t,"dropRecognizeWith",this)?this:(t=As(t,this),delete this.simultaneous[t.id],this)},i.requireFailure=function(t){if(Ci(t,"requireFailure",this))return this;var n=this.requireFail;return t=As(t,this),Vn(n,t)===-1&&(n.push(t),t.requireFailure(this)),this},i.dropRequireFailure=function(t){if(Ci(t,"dropRequireFailure",this))return this;t=As(t,this);var n=Vn(this.requireFail,t);return n>-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},i.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a<rn&&o(n.options.event+zb(a)),o(n.options.event),t.additionalEvent&&o(t.additionalEvent),a>=rn&&o(n.options.event+zb(a))},i.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=fr},i.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(fr|Xs)))return!1;t++}return!0},i.recognize=function(t){var n=Hn({},t);if(!Cu(this.options.enable,[this,n])){this.reset(),this.state=fr;return}this.state&(Ar|so|fr)&&(this.state=Xs),this.state=this.process(n),this.state&(Kt|Gi|rn|so)&&this.tryEmit(n)},i.process=function(t){},i.getTouchAction=function(){},i.reset=function(){},r}(),ef=function(r){Qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,or({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var e=i.prototype;return e.getTouchAction=function(){return[Jh]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime<o.time;if(this.reset(),n.eventType&gt&&this.count===0)return this.failTimeout();if(l&&u&&s){if(n.eventType!==Le)return this.failTimeout();var d=this.pTime?n.timeStamp-this.pTime<o.interval:!0,c=!this.pCenter||Tl(this.pCenter,n.center)<o.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!c||!d?this.count=1:this.count+=1,this._input=n;var h=this.count%o.taps;if(h===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Ar,a.tryEmit()},o.interval),Kt):Ar}return fr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=fr},this.options.interval),fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Ar&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(Zo),Ki=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({pointers:1},t))||this}var e=i.prototype;return e.attrTest=function(n){var a=this.options.pointers;return a===0||n.pointers.length===a},e.process=function(n){var a=this.state,o=n.eventType,s=a&(Kt|Gi),l=this.attrTest(n);return s&&(o&It||!l)?a|so:s||l?o&Le?a|rn:a&Kt?a|Gi:Kt:fr},i}(Zo);function aO(r){return r===Ui?"down":r===Jo?"up":r===Xo?"left":r===Qo?"right":""}var kv=function(r){Qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,or({event:"pan",threshold:10,pointers:1,direction:YS},t))||this,n.pX=null,n.pY=null,n}var e=i.prototype;return e.getTouchAction=function(){var n=this.options.direction,a=[];return n&yr&&a.push(io),n&Nn&&a.push(no),a},e.directionTest=function(n){var a=this.options,o=!0,s=n.distance,l=n.direction,u=n.deltaX,d=n.deltaY;return l&a.direction||(a.direction&yr?(l=u===0?Sl:u<0?Xo:Qo,o=u!==this.pX,s=Math.abs(n.deltaX)):(l=d===0?Sl:d<0?Jo:Ui,o=d!==this.pY,s=Math.abs(n.deltaY))),n.direction=l,o&&s>a.threshold&&l&a.direction},e.attrTest=function(n){return Ki.prototype.attrTest.call(this,n)&&(this.state&Kt||!(this.state&Kt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=aO(n.direction);a&&(n.additionalEvent=this.options.event+a),r.prototype.emit.call(this,n)},i}(Ki),oO=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({event:"swipe",threshold:10,velocity:.3,direction:yr|Nn,pointers:1},t))||this}var e=i.prototype;return e.getTouchAction=function(){return kv.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(yr|Nn)?o=n.overallVelocity:a&yr?o=n.overallVelocityX:a&Nn&&(o=n.overallVelocityY),r.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Wn(o)>this.options.velocity&&n.eventType&Le},e.emit=function(n){var a=aO(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Ki),sO=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({event:"pinch",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[Mn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Kt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}r.prototype.emit.call(this,n)},i}(Ki),lO=function(r){Qt(i,r);function i(t){return t===void 0&&(t={}),r.call(this,or({event:"rotate",threshold:0,pointers:2},t))||this}var e=i.prototype;return e.getTouchAction=function(){return[Mn]},e.attrTest=function(n){return r.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Kt)},i}(Ki),uO=function(r){Qt(i,r);function i(t){var n;return t===void 0&&(t={}),n=r.call(this,or({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[KS]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,l=n.distance<o.threshold,u=n.deltaTime>o.time;if(this._input=n,!l||!s||n.eventType&(Le|It)&&!u)this.reset();else if(n.eventType&gt)this.reset(),this._timer=setTimeout(function(){a.state=Ar,a.tryEmit()},o.time);else if(n.eventType&Le)return Ar;return fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Ar&&(n&&n.eventType&Le?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Ev(),this.manager.emit(this.options.event,this._input)))},i}(Zo),dO={domEvents:!1,touchAction:GS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Hb=[[lO,{enable:!1}],[sO,{enable:!1},["rotate"]],[oO,{direction:yr}],[kv,{direction:yr},["swipe"]],[ef],[ef,{event:"doubletap",taps:2},["tap"]],[uO]],nae=1,Wb=2;function Vb(r,i){var e=r.element;if(e.style){var t;xr(r.options.cssProps,function(n,a){t=ku(e.style,a),i?(r.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=r.oldCssProps[t]||""}),i||(r.oldCssProps={})}}function iae(r,i){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var Ub=function(){function r(e,t){var n=this;this.options=Hn({},dO,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=eae(this),this.touchAction=new QS(this,this.options.touchAction),Vb(this,!0),xr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=r.prototype;return i.set=function(t){return Hn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},i.stop=function(t){this.session.stopped=t?Wb:nae},i.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Ar)&&(n.curRecognizer=null,s=null);for(var l=0;l<o.length;)a=o[l],n.stopped!==Wb&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Kt|Gi|rn)&&(n.curRecognizer=a,s=a),l++}},i.get=function(t){if(t instanceof Zo)return t;for(var n=this.recognizers,a=0;a<n.length;a++)if(n[a].options.event===t)return n[a];return null},i.add=function(t){if(Ci(t,"add",this))return this;var n=this.get(t.options.event);return n&&this.remove(n),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},i.remove=function(t){if(Ci(t,"remove",this))return this;var n=this.get(t);if(t){var a=this.recognizers,o=Vn(a,n);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},i.on=function(t,n){if(t===void 0||n===void 0)return this;var a=this.handlers;return xr(ao(t),function(o){a[o]=a[o]||[],a[o].push(n)}),this},i.off=function(t,n){if(t===void 0)return this;var a=this.handlers;return xr(ao(t),function(o){n?a[o]&&a[o].splice(Vn(a[o],n),1):delete a[o]}),this},i.emit=function(t,n){this.options.domEvents&&iae(t,n);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){n.type=t,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](n),o++}},i.destroy=function(){this.element&&Vb(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),aae={touchstart:gt,touchmove:ai,touchend:Le,touchcancel:It},oae="touchstart",sae="touchstart touchmove touchend touchcancel",lae=function(r){Qt(i,r);function i(){var t,n=i.prototype;return n.evTarget=oae,n.evWin=sae,t=r.apply(this,arguments)||this,t.started=!1,t}var e=i.prototype;return e.handler=function(n){var a=aae[n.type];if(a===gt&&(this.started=!0),!!this.started){var o=uae.call(this,n,a);a&(Le|It)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Yo,srcEvent:n})}},i}(wa);function uae(r,i){var e=oo(r.touches),t=oo(r.changedTouches);return i&(Le|It)&&(e=Tv(e.concat(t),"identifier",!0)),[e,t]}function cO(r,i,e){var t="DEPRECATED METHOD: "+i+`
70
+ `+e+` AT
71
+ `;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.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,t,a),r.apply(this,arguments)}}var hO=cO(function(r,i,e){for(var t=Object.keys(i),n=0;n<t.length;)(!e||e&&r[t[n]]===void 0)&&(r[t[n]]=i[t[n]]),n++;return r},"extend","Use `assign`."),dae=cO(function(r,i){return hO(r,i,!0)},"merge","Use `assign`.");function cae(r,i,e){var t=i.prototype,n;n=r.prototype=Object.create(t),n.constructor=r,n._super=t,e&&Hn(n,e)}function Gb(r,i){return function(){return r.apply(i,arguments)}}var fO=function(){var r=function(e,t){return t===void 0&&(t={}),new Ub(e,or({recognizers:Hb.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=YS,r.DIRECTION_DOWN=Ui,r.DIRECTION_LEFT=Xo,r.DIRECTION_RIGHT=Qo,r.DIRECTION_UP=Jo,r.DIRECTION_HORIZONTAL=yr,r.DIRECTION_VERTICAL=Nn,r.DIRECTION_NONE=Sl,r.DIRECTION_DOWN=Ui,r.INPUT_START=gt,r.INPUT_MOVE=ai,r.INPUT_END=Le,r.INPUT_CANCEL=It,r.STATE_POSSIBLE=Xs,r.STATE_BEGAN=Kt,r.STATE_CHANGED=Gi,r.STATE_ENDED=rn,r.STATE_RECOGNIZED=Ar,r.STATE_CANCELLED=so,r.STATE_FAILED=fr,r.Manager=Ub,r.Input=wa,r.TouchAction=QS,r.TouchInput=Iv,r.MouseInput=Pv,r.PointerEventInput=nO,r.TouchMouseInput=iO,r.SingleTouchInput=lae,r.Recognizer=Zo,r.AttrRecognizer=Ki,r.Tap=ef,r.Pan=kv,r.Swipe=oO,r.Pinch=sO,r.Rotate=lO,r.Press=uO,r.on=La,r.off=ja,r.each=xr,r.merge=dae,r.extend=hO,r.bindFn=Gb,r.assign=Hn,r.inherit=cae,r.bindFn=Gb,r.prefixed=ku,r.toArray=oo,r.inArray=Vn,r.uniqueArray=Tv,r.splitStr=ao,r.boolOrFn=Cu,r.hasParent=Ov,r.addEventListeners=La,r.removeEventListeners=ja,r.defaults=Hn({},dO,{preset:Hb}),r}();fO.defaults;var hae=fO;function vO(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(ue(r)||(e=fae(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function fae(r,i){var e;if(r){if(typeof r=="string")return Kb(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Kb(r,i)}}function Kb(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}vn("DELETE");function xu(){for(var r=arguments.length,i=new Array(r),e=0;e<r;e++)i[e]=arguments[e];return vae(i.length?i:[El()])}function vae(r){var i=pae(r),e=Oe(i,3),t=e[0],n=e[1],a=e[2],o=1,s=function(){var u=2091639*t+o*23283064365386963e-26;return t=n,n=a,a=u-(o=u|0)};return s.uint32=function(){return s()*4294967296},s.fract53=function(){return s()+(s()*2097152|0)*11102230246251565e-32},s.algorithm="Alea",s.seed=r,s.version="0.9",s}function pae(){for(var r=gae(),i=r(" "),e=r(" "),t=r(" "),n=0;n<arguments.length;n++)i-=r(n<0||arguments.length<=n?void 0:arguments[n]),i<0&&(i+=1),e-=r(n<0||arguments.length<=n?void 0:arguments[n]),e<0&&(e+=1),t-=r(n<0||arguments.length<=n?void 0:arguments[n]),t<0&&(t+=1);return[i,e,t]}function gae(){var r=4022871197;return function(i){for(var e=i.toString(),t=0;t<e.length;t++){r+=e.charCodeAt(t);var n=.02519603282416938*r;r=n>>>0,n-=r,n*=r,r=n>>>0,n-=r,r+=n*4294967296}return(r>>>0)*23283064365386963e-26}}function yae(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get:function(){return{set:r}}}}var Cv=typeof window<"u"?window.Hammer||hae:function(){return yae()};function vr(r){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var t=Cv(this._dom.overlay);t.on("tap",P(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];he(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){mae(a.target,r)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}gE(vr.prototype);vr.current=null;vr.prototype.destroy=function(){var r,i;this.deactivate();var e=vO(Rn(r=kr(i=this._cleanupQueue).call(i,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};vr.prototype.activate=function(){vr.current&&vr.current.deactivate(),vr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};vr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};vr.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function mae(r,i){for(;r;){if(r===i)return!0;r=r.parentNode}return!1}var bae=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,$ae=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,wae=/^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,_ae=/^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 Gr(r){if(r)for(;r.hasChildNodes()===!0;){var i=r.firstChild;i&&(Gr(i),r.removeChild(i))}}function Ai(r){return r instanceof String||typeof r=="string"}function qb(r){return ce(r)==="object"&&r!==null}function Un(r,i,e,t){var n=!1;t===!0&&(n=i[e]===null&&r[e]!==void 0),n?delete r[e]:r[e]=i[e]}function pO(r,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in r)if(i[t]!==void 0)if(i[t]===null||ce(i[t])!=="object")Un(r,i,t,e);else{var n=r[t],a=i[t];qb(n)&&qb(a)&&pO(n,a,e)}}function _a(r,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ue(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n=0;n<r.length;n++){var a=r[n];if(Object.prototype.hasOwnProperty.call(e,a))if(e[a]&&e[a].constructor===Object)i[a]===void 0&&(i[a]={}),i[a].constructor===Object?pe(i[a],e[a],!1,t):Un(i,e,a,t);else{if(ue(e[a]))throw new TypeError("Arrays are not supported by deepExtend");Un(i,e,a,t)}}return i}function Il(r,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ue(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!tn(r).call(r,n))if(e[n]&&e[n].constructor===Object)i[n]===void 0&&(i[n]={}),i[n].constructor===Object?pe(i[n],e[n]):Un(i,e,n,t);else if(ue(e[n])){i[n]=[];for(var a=0;a<e[n].length;a++)i[n].push(e[n][a])}else Un(i,e,n,t);return i}function pe(r,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)||e===!0)if(ce(i[n])==="object"&&i[n]!==null&&Ib(i[n])===Object.prototype)r[n]===void 0?r[n]=pe({},i[n],e):ce(r[n])==="object"&&r[n]!==null&&Ib(r[n])===Object.prototype?pe(r[n],i[n],e):Un(r,i,n,t);else if(ue(i[n])){var a;r[n]=tt(a=i[n]).call(a)}else Un(r,i,n,t);return r}function Pl(r,i){var e;return wv(e=[]).call(e,cr(r),[i])}function Eae(r){return tt(r).call(r)}function Sae(r){return r.getBoundingClientRect().left}function Oae(r){return r.getBoundingClientRect().top}function re(r,i){if(ue(r))for(var e=r.length,t=0;t<e;t++)i(r[t],t,r);else for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&i(r[n],n,r)}function xv(r){var i;switch(r.length){case 3:case 4:return i=$ae.exec(r),i?{r:tr(i[1]+i[1],16),g:tr(i[2]+i[2],16),b:tr(i[3]+i[3],16)}:null;case 6:case 7:return i=bae.exec(r),i?{r:tr(i[1],16),g:tr(i[2],16),b:tr(i[3],16)}:null;default:return null}}function Ut(r,i){if(tn(r).call(r,"rgba"))return r;if(tn(r).call(r,"rgb")){var e=r.substr(ne(r).call(r,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+i+")"}else{var t=xv(r);return t==null?r:"rgba("+t.r+","+t.g+","+t.b+","+i+")"}}function gO(r,i,e){var t;return"#"+tt(t=((1<<24)+(r<<16)+(i<<8)+e).toString(16)).call(t,1)}function tf(r,i){if(Ai(r)){var e=r;if(mO(e)){var t,n=Vi(t=e.substr(4).substr(0,e.length-5).split(",")).call(t,function(c){return tr(c)});e=gO(n[0],n[1],n[2])}if(yO(e)===!0){var a=Tae(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},l=rf(s.h,s.s,s.v),u=rf(o.h,o.s,o.v);return{background:e,border:l,highlight:{background:u,border:l},hover:{background:u,border:l}}}else return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else{var d={background:r.background||void 0,border:r.border||void 0,highlight:Ai(r.highlight)?{border:r.highlight,background:r.highlight}:{background:r.highlight&&r.highlight.background||void 0,border:r.highlight&&r.highlight.border||void 0},hover:Ai(r.hover)?{border:r.hover,background:r.hover}:{border:r.hover&&r.hover.border||void 0,background:r.hover&&r.hover.background||void 0}};return d}}function Aa(r,i,e){r=r/255,i=i/255,e=e/255;var t=Math.min(r,Math.min(i,e)),n=Math.max(r,Math.max(i,e));if(t===n)return{h:0,s:0,v:t};var a=r===t?i-e:e===t?r-i:e-r,o=r===t?3:e===t?1:5,s=60*(o-a/(n-t))/360,l=(n-t)/n,u=n;return{h:s,s:l,v:u}}function Qs(r,i,e){var t,n,a,o=Math.floor(r*6),s=r*6-o,l=e*(1-i),u=e*(1-s*i),d=e*(1-(1-s)*i);switch(o%6){case 0:t=e,n=d,a=l;break;case 1:t=u,n=e,a=l;break;case 2:t=l,n=e,a=d;break;case 3:t=l,n=u,a=e;break;case 4:t=d,n=l,a=e;break;case 5:t=e,n=l,a=u;break}return{r:Math.floor(t*255),g:Math.floor(n*255),b:Math.floor(a*255)}}function rf(r,i,e){var t=Qs(r,i,e);return gO(t.r,t.g,t.b)}function Tae(r){var i=xv(r);if(!i)throw new TypeError("'".concat(r,"' is not a valid color."));return Aa(i.r,i.g,i.b)}function yO(r){var i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r);return i}function mO(r){return wae.test(r)}function Iae(r){return _ae.test(r)}function nn(r){if(r===null||ce(r)!=="object")return null;if(r instanceof Element)return r;var i=Dn(r);for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&ce(r[e])=="object"&&(i[e]=nn(r[e]));return i}function Vt(r,i,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=function(v){return v!=null},a=function(v){return v!==null&&ce(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(r))throw new Error("Parameter mergeTarget must be an object");if(!a(i))throw new Error("Parameter options must be an object");if(!n(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,p,g){a(v[g])||(v[g]={});var y=p[g],m=v[g];for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(m[w]=y[w])},l=i[e],u=a(t)&&!o(t),d=u?t[e]:void 0,c=d?d.enabled:void 0;if(l!==void 0){if(typeof l=="boolean"){a(r[e])||(r[e]={}),r[e].enabled=l;return}if(l===null&&!a(r[e]))if(n(d))r[e]=Dn(d);else return;if(a(l)){var h=!0;l.enabled!==void 0?h=l.enabled:c!==void 0&&(h=d.enabled),s(r,i,e),r[e].enabled=h}}}var Pae={linear:function(i){return i},easeInQuad:function(i){return i*i},easeOutQuad:function(i){return i*(2-i)},easeInOutQuad:function(i){return i<.5?2*i*i:-1+(4-2*i)*i},easeInCubic:function(i){return i*i*i},easeOutCubic:function(i){return--i*i*i+1},easeInOutCubic:function(i){return i<.5?4*i*i*i:(i-1)*(2*i-2)*(2*i-2)+1},easeInQuart:function(i){return i*i*i*i},easeOutQuart:function(i){return 1- --i*i*i*i},easeInOutQuart:function(i){return i<.5?8*i*i*i*i:1-8*--i*i*i*i},easeInQuint:function(i){return i*i*i*i*i},easeOutQuint:function(i){return 1+--i*i*i*i*i},easeInOutQuint:function(i){return i<.5?16*i*i*i*i*i:1+16*--i*i*i*i*i}};function Kr(r,i){var e;ue(i)||(i=[i]);var t=vO(r),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;if(a){e=a[i[0]];for(var o=1;o<i.length;o++)e&&(e=e[i[o]]);if(typeof e<"u")break}}}catch(s){t.e(s)}finally{t.f()}return e}var kae={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"},Cae=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;R(this,r),this.pixelRatio=i,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 D(r,[{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 kae[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n,a=this._isColorString(e);if(a!==void 0&&(e=a),Ai(e)===!0){if(mO(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if(Iae(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(yO(e)===!0){var l=xv(e);n={r:l.r,g:l.g,b:l.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var u=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a:u}}if(n===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(n,t)}}},{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,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=Be({},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 t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=Be({},e)),this.color=e;var n=Aa(e.r,e.g,e.b),a=2*Math.PI,o=this.r*n.s,s=this.centerCoordinates.x+o*Math.sin(a*n.h),l=this.centerCoordinates.y+o*Math.cos(a*n.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=l-.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 t=Aa(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=Qs(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=Aa(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,a,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),qo(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{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,t,n,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 l=this;this.opacityRange.onchange=function(){l._setOpacity(this.value)},this.opacityRange.oninput=function(){l._setOpacity(this.value)},this.brightnessRange.onchange=function(){l._setBrightness(this.value)},this.brightnessRange.oninput=function(){l._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=P(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=P(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=P(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=P(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 Cv(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{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 t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);var a,o,s,l;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;var u=2*Math.PI/360,d=1/360,c=1/this.r,h;for(s=0;s<360;s++)for(l=0;l<this.r;l++)a=this.centerCoordinates.x+l*Math.sin(u*s),o=this.centerCoordinates.y+l*Math.cos(u*s),h=Qs(s*d,l*c,1),e.fillStyle="rgb("+h.r+","+h.g+","+h.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,t,n)}this.generated=!0}},{key:"_moveSelector",value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,a=e.center.y-t.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,l=n-s,u=a-o,d=Math.atan2(l,u),c=.98*Math.min(Math.sqrt(l*l+u*u),s),h=Math.cos(d)*c+o,f=Math.sin(d)*c+s;this.colorPickerSelector.style.top=h-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=f-.5*this.colorPickerSelector.clientWidth+"px";var v=d/(2*Math.PI);v=v<0?v+1:v;var p=c/this.r,g=Aa(this.color.r,this.color.g,this.color.b);g.h=v,g.s=p;var y=Qs(g.h,g.s,g.v);y.a=this.color.a,this.color=y,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+")"}}]),r}();function nf(){for(var r=arguments.length,i=new Array(r),e=0;e<r;e++)i[e]=arguments[e];if(i.length<1)throw new TypeError("Invalid arguments.");if(i.length===1)return document.createTextNode(i[0]);var t=document.createElement(i[0]);return t.appendChild(nf.apply(void 0,cr(tt(i).call(i,1)))),t}var xae=function(){function r(i,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};R(this,r),this.parent=i,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},Be(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Cae(n),this.wrapper=void 0}return D(r,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var t=!0;if(typeof e=="string")this.options.filter=e;else if(ue(e))this.options.filter=e.join();else if(ce(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&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);Ot(this.options)===!1&&(t=!1),this.options.enabled=t}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),t=0,n=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(a,[]),n=n||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||ne(e).call(e,a)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),t++);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 t=this.moduleOptions,n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}},{key:"_makeItem",value:function(e){if(this.allowCreation===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return he(a).call(a,function(s){t.appendChild(s)}),this.domElements.push(t),this.domElements.length}return 0}},{key:"_makeHeader",value:function(e){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}},{key:"_makeLabel",value:function(e,t){var n=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"+t.length,n===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(nf("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,n){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&ne(e).call(e,t)!==-1&&(o=ne(e).call(e,t));for(var s=0;s<e.length;s++){var l=document.createElement("option");l.value=e[s],s===o&&(l.selected="selected"),l.innerText=e[s],a.appendChild(l)}var u=this;a.onchange=function(){u._update(this.value,n)};var d=this._makeLabel(n[n.length-1],n);this._makeItem(n,d,a)}},{key:"_makeRange",value:function(e,t,n){var a=e[0],o=e[1],s=e[2],l=e[3],u=document.createElement("input");u.className="vis-configuration vis-config-range";try{u.type="range",u.min=o,u.max=s}catch{}u.step=l;var d="",c=0;if(t!==void 0){var h=1.2;t<0&&t*h<o?(u.min=Math.ceil(t*h),c=u.min,d="range increased"):t/h<o&&(u.min=Math.ceil(t/h),c=u.min,d="range increased"),t*h>s&&s!==1&&(u.max=Math.ceil(t*h),c=u.max,d="range increased"),u.value=t}else u.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=u.value;var v=this;u.onchange=function(){f.value=this.value,v._update(Number(this.value),n)},u.oninput=function(){f.value=this.value};var p=this._makeLabel(n[n.length-1],n),g=this._makeItem(n,p,u,f);d!==""&&this.popupHistory[g]!==c&&(this.popupHistory[g]=c,this._setupPopup(d,g))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.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(t)}}},{key:"_setupPopup",value:function(e,t){var n=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(){n._removePopup()},this.popupCounter+=1,this.popupDiv={html:a,index:t}}}},{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 t=this.domElements[this.popupDiv.index],n=t.getBoundingClientRect();this.popupDiv.html.style.left=n.left+"px",this.popupDiv.html.style.top=n.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,t,n){var a=document.createElement("input");a.type="checkbox",a.className="vis-configuration vis-config-checkbox",a.checked=e,t!==void 0&&(a.checked=t,t!==e&&(ce(e)==="object"?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));var o=this;a.onchange=function(){o._update(this.checked,n)};var s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,a)}},{key:"_makeTextInput",value:function(e,t,n){var a=document.createElement("input");a.type="text",a.className="vis-configuration vis-config-text",a.value=t,t!==e&&this.changedOptions.push({path:n,value:t});var o=this;a.onchange=function(){o._update(this.value,n)};var s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,a)}},{key:"_makeColorField",value:function(e,t,n){var a=this,o=e[1],s=document.createElement("div");t=t===void 0?o:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?o:t,s.onclick=function(){a._showColorPicker(t,s,n)};var l=this._makeLabel(n[n.length-1],n);this._makeItem(n,l,s)}},{key:"_showColorPicker",value:function(e,t,n){var a=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(o){var s="rgba("+o.r+","+o.g+","+o.b+","+o.a+")";t.style.backgroundColor=s,a._update(s,n)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){a._showColorPicker(e,t,n)}})}},{key:"_handleObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=Ot(this.options),s=!1;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){a=!0;var u=e[l],d=Pl(t,l);if(typeof o=="function"&&(a=o(l,t),a===!1&&!ue(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,a=this._handleObject(u,d,!0),this.allowCreation=n===!1)),a!==!1){s=!0;var c=this._getValue(d);if(ue(u))this._handleArray(u,c,d);else if(typeof u=="string")this._makeTextInput(u,c,d);else if(typeof u=="boolean")this._makeCheckbox(u,c,d);else if(u instanceof Object){if(!this.hideOption(t,l,this.moduleOptions))if(u.enabled!==void 0){var h=Pl(d,"enabled"),f=this._getValue(h);if(f===!0){var v=this._makeLabel(l,d,!0);this._makeItem(d,v),s=this._handleObject(u,d)||s}else this._makeCheckbox(u,f,d)}else{var p=this._makeLabel(l,d,!0);this._makeItem(d,p),s=this._handleObject(u,d)||s}}else console.error("dont know how to handle",u,l,d)}}return s}},{key:"_handleArray",value:function(e,t,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}},{key:"_update",value:function(e,t){var n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;o<t.length;o++)t[o]!=="global"&&(a[t[o]]===void 0&&(a[t[o]]={}),o!==t.length-1?a=a[t[o]]:a[t[o]]=e);return n}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(nf("pre","const options = "+Ko(e,null,2)))}},{key:"getOptions",value:function(){for(var e={},t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}}]),r}(),Aae=function(){function r(i,e){R(this,r),this.container=i,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 D(r,[{key:"setPosition",value:function(e,t){this.x=tr(e),this.y=tr(t)}},{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 t=this.frame.clientHeight,n=this.frame.clientWidth,a=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,l=0;if(this.overflowMethod=="flip"){var u=!1,d=!0;this.y-t<this.padding&&(d=!1),this.x+n>o-this.padding&&(u=!0),u?s=this.x-n:s=this.x,d?l=this.y-t:l=this.y}else l=this.y-t,l+t+this.padding>a&&(l=a-t-this.padding),l<this.padding&&(l=this.padding),s=this.x,s+n+this.padding>o&&(s=o-n-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=l+"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)}}]),r}(),Ta=!1,Yb,af="background: #FFeeee; color: #dd0000",Rae=function(){function r(){R(this,r)}return D(r,null,[{key:"validate",value:function(e,t,n){Ta=!1,Yb=t;var a=t;return n!==void 0&&(a=t[n]),r.parse(e,a,[]),Ta}},{key:"parse",value:function(e,t,n){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.check(a,e,t,n)}},{key:"check",value:function(e,t,n,a){if(n[e]===void 0&&n.__any__===void 0){r.getSuggestion(e,n,a);return}var o=e,s=!0;n[e]===void 0&&n.__any__!==void 0&&(o="__any__",s=r.getType(t[e])==="object");var l=n[o];s&&l.__type__!==void 0&&(l=l.__type__),r.checkFields(e,t,n,o,l,a)}},{key:"checkFields",value:function(e,t,n,a,o,s){var l=function(h){console.error("%c"+h+r.printLocation(s,e),af)},u=r.getType(t[e]),d=o[u];d!==void 0?r.getType(d)==="array"&&ne(d).call(d,t[e])===-1?(l('Invalid option detected in "'+e+'". Allowed values are:'+r.print(d)+' not "'+t[e]+'". '),Ta=!0):u==="object"&&a!=="__any__"&&(s=Pl(s,e),r.parse(t[e],n[a],s)):o.any===void 0&&(l('Invalid type received for "'+e+'". Expected: '+r.print(Ee(o))+". Received ["+u+'] "'+t[e]+'"'),Ta=!0)}},{key:"getType",value:function(e){var t=ce(e);return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":ue(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}},{key:"getSuggestion",value:function(e,t,n){var a=r.findInOptions(e,t,n,!1),o=r.findInOptions(e,Yb,[],!0),s=8,l=4,u;a.indexMatch!==void 0?u=" in "+r.printLocation(a.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?
73
+
74
+ `:o.distance<=l&&a.distance>o.distance?u=" in "+r.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+r.printLocation(o.path,o.closestMatch,""):a.distance<=s?u='. Did you mean "'+a.closestMatch+'"?'+r.printLocation(a.path,e):u=". Did you mean one of these: "+r.print(Ee(t))+r.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+u,af),Ta=!0}},{key:"findInOptions",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",l=[],u=e.toLowerCase(),d=void 0;for(var c in t){var h=void 0;if(t[c].__type__!==void 0&&a===!0){var f=r.findInOptions(e,t[c],Pl(n,c));o>f.distance&&(s=f.closestMatch,l=f.path,o=f.distance,d=f.indexMatch)}else{var v;ne(v=c.toLowerCase()).call(v,u)!==-1&&(d=c),h=r.levenshteinDistance(e,c),o>h&&(s=c,l=Eae(n),o=h)}}return{closestMatch:s,path:l,distance:o,indexMatch:d}}},{key:"printLocation",value:function(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
75
+ `,a=`
76
+
77
+ `+n+`options = {
78
+ `,o=0;o<e.length;o++){for(var s=0;s<o+1;s++)a+=" ";a+=e[o]+`: {
79
+ `}for(var l=0;l<e.length+1;l++)a+=" ";a+=t+`
80
+ `;for(var u=0;u<e.length+1;u++){for(var d=0;d<e.length-u;d++)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,t){if(e.length===0)return t.length;if(t.length===0)return e.length;var n=[],a;for(a=0;a<=t.length;a++)n[a]=[a];var o;for(o=0;o<=e.length;o++)n[0][o]=o;for(a=1;a<=t.length;a++)for(o=1;o<=e.length;o++)t.charAt(a-1)==e.charAt(o-1)?n[a][o]=n[a-1][o-1]:n[a][o]=Math.min(n[a-1][o-1]+1,Math.min(n[a][o-1]+1,n[a-1][o]+1));return n[t.length][e.length]}}]),r}(),Dae=vr,Mae=xae,Ri=Cv,Nae=Aae,bO=af,Fae=Rae;function Bae(r){return Yr=r,Hae()}var $O={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Av=Dn($O);Av.color="color.color";Av.style="dashes";var ht={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},Xb={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Yr="",qi=0,ee="",U="",wt=ht.NULL;function Lae(){qi=0,ee=Yr.charAt(0)}function We(){qi++,ee=Yr.charAt(qi)}function yi(){return Yr.charAt(qi+1)}function Qb(r){var i=r.charCodeAt(0);return i<47?i===35||i===46:i<59?i>47:i<91?i>64:i<96?i===95:i<123?i>96:!1}function on(r,i){if(r||(r={}),i)for(var e in i)i.hasOwnProperty(e)&&(r[e]=i[e]);return r}function jae(r,i,e){for(var t=i.split("."),n=r;t.length;){var a=t.shift();t.length?(n[a]||(n[a]={}),n=n[a]):n[a]=e}}function wO(r,i){for(var e,t,n=null,a=[r],o=r;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,t=o.nodes.length;e<t;e++)if(i.id===o.nodes[e].id){n=o.nodes[e];break}}for(n||(n={id:i.id},r.node&&(n.attr=on(n.attr,r.node))),e=a.length-1;e>=0;e--){var s,l=a[e];l.nodes||(l.nodes=[]),ne(s=l.nodes).call(s,n)===-1&&l.nodes.push(n)}i.attr&&(n.attr=on(n.attr,i.attr))}function zae(r,i){if(r.edges||(r.edges=[]),r.edges.push(i),r.edge){var e=on({},r.edge);i.attr=on(e,i.attr)}}function _O(r,i,e,t,n){var a={from:i,to:e,type:t};return r.edge&&(a.attr=on({},r.edge)),a.attr=on(a.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(a.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),a}function ge(){for(wt=ht.NULL,U="";ee===" "||ee===" "||ee===`
84
+ `||ee==="\r";)We();do{var r=!1;if(ee==="#"){for(var i=qi-1;Yr.charAt(i)===" "||Yr.charAt(i)===" ";)i--;if(Yr.charAt(i)===`
85
+ `||Yr.charAt(i)===""){for(;ee!=""&&ee!=`
86
+ `;)We();r=!0}}if(ee==="/"&&yi()==="/"){for(;ee!=""&&ee!=`
87
+ `;)We();r=!0}if(ee==="/"&&yi()==="*"){for(;ee!="";)if(ee==="*"&&yi()==="/"){We(),We();break}else We();r=!0}for(;ee===" "||ee===" "||ee===`
88
+ `||ee==="\r";)We()}while(r);if(ee===""){wt=ht.DELIMITER;return}var e=ee+yi();if(Xb[e]){wt=ht.DELIMITER,U=e,We(),We();return}if(Xb[ee]){wt=ht.DELIMITER,U=ee,We();return}if(Qb(ee)||ee==="-"){for(U+=ee,We();Qb(ee);)U+=ee,We();U==="false"?U=!1:U==="true"?U=!0:isNaN(Number(U))||(U=Number(U)),wt=ht.IDENTIFIER;return}if(ee==='"'){for(We();ee!=""&&(ee!='"'||ee==='"'&&yi()==='"');)ee==='"'?(U+=ee,We()):ee==="\\"&&yi()==="n"?(U+=`
89
+ `,We()):U+=ee,We();if(ee!='"')throw ft('End of string " expected');We(),wt=ht.IDENTIFIER;return}for(wt=ht.UNKNOWN;ee!="";)U+=ee,We();throw new SyntaxError('Syntax error in part "'+TO(U,30)+'"')}function Hae(){var r={};if(Lae(),ge(),U==="strict"&&(r.strict=!0,ge()),(U==="graph"||U==="digraph")&&(r.type=U,ge()),wt===ht.IDENTIFIER&&(r.id=U,ge()),U!="{")throw ft("Angle bracket { expected");if(ge(),EO(r),U!="}")throw ft("Angle bracket } expected");if(ge(),U!=="")throw ft("End of file expected");return ge(),delete r.node,delete r.edge,delete r.graph,r}function EO(r){for(;U!==""&&U!="}";)Wae(r),U===";"&&ge()}function Wae(r){var i=SO(r);if(i){OO(r,i);return}var e=Vae(r);if(!e){if(wt!=ht.IDENTIFIER)throw ft("Identifier expected");var t=U;if(ge(),U==="="){if(ge(),wt!=ht.IDENTIFIER)throw ft("Identifier expected");r[t]=U,ge()}else Uae(r,t)}}function SO(r){var i=null;if(U==="subgraph"&&(i={},i.type="subgraph",ge(),wt===ht.IDENTIFIER&&(i.id=U,ge())),U==="{"){if(ge(),i||(i={}),i.parent=r,i.node=r.node,i.edge=r.edge,i.graph=r.graph,EO(i),U!="}")throw ft("Angle bracket } expected");ge(),delete i.node,delete i.edge,delete i.graph,delete i.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(i)}return i}function Vae(r){return U==="node"?(ge(),r.node=za(),"node"):U==="edge"?(ge(),r.edge=za(),"edge"):U==="graph"?(ge(),r.graph=za(),"graph"):null}function Uae(r,i){var e={id:i},t=za();t&&(e.attr=t),wO(r,e),OO(r,i)}function OO(r,i){for(;U==="->"||U==="--";){var e,t=U;ge();var n=SO(r);if(n)e=n;else{if(wt!=ht.IDENTIFIER)throw ft("Identifier or subgraph expected");e=U,wO(r,{id:e}),ge()}var a=za(),o=_O(r,i,e,t,a);zae(r,o),i=e}}function za(){for(var r,i=null,e={dashed:!0,solid:!1,dotted:[1,5]},t={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,a=new Array;U==="[";){for(ge(),i={};U!==""&&U!="]";){if(wt!=ht.IDENTIFIER)throw ft("Attribute name expected");var o=U;if(ge(),U!="=")throw ft("Equal sign = expected");if(ge(),wt!=ht.IDENTIFIER)throw ft("Attribute value expected");var s=U;o==="style"&&(s=e[s]);var l;o==="arrowhead"&&(l=t[s],o="arrows",s={to:{enabled:!0,type:l}}),o==="arrowtail"&&(l=t[s],o="arrows",s={from:{enabled:!0,type:l}}),n.push({attr:i,name:o,value:s}),a.push(o),ge(),U==","&&ge()}if(U!="]")throw ft("Bracket ] expected");ge()}if(tn(a).call(a,"dir")){var u={};for(u.arrows={},r=0;r<n.length;r++)if(n[r].name==="arrows")if(n[r].value.to!=null)u.arrows.to=r;else if(n[r].value.from!=null)u.arrows.from=r;else throw ft("Invalid value of arrows");else n[r].name==="dir"&&(u.dir=r);var d=n[u.dir].value;if(!tn(a).call(a,"arrows"))if(d==="both")n.push({attr:n[u.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),u.arrows.to=n.length-1,n.push({attr:n[u.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),u.arrows.from=n.length-1;else if(d==="forward")n.push({attr:n[u.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),u.arrows.to=n.length-1;else if(d==="back")n.push({attr:n[u.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),u.arrows.from=n.length-1;else if(d==="none")n.push({attr:n[u.dir].attr,name:"arrows",value:""}),u.arrows.to=n.length-1;else throw ft('Invalid dir type "'+d+'"');var c,h;if(d==="both")u.arrows.to&&u.arrows.from?(h=n[u.arrows.to].value.to.type,c=n[u.arrows.from].value.from.type,n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}},kr(n).call(n,u.arrows.from,1)):u.arrows.to?(h=n[u.arrows.to].value.to.type,c="arrow",n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):u.arrows.from&&(h="arrow",c=n[u.arrows.from].value.from.type,n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}});else if(d==="back")u.arrows.to&&u.arrows.from?(h="",c=n[u.arrows.from].value.from.type,n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):u.arrows.to?(h="",c="arrow",u.arrows.from=u.arrows.to,n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):u.arrows.from&&(h="",c=n[u.arrows.from].value.from.type,n[u.arrows.to]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}),n[u.arrows.from]={attr:n[u.arrows.from].attr,name:n[u.arrows.from].name,value:{from:{enabled:!0,type:n[u.arrows.from].value.from.type}}};else if(d==="none"){var f;u.arrows.to?f=u.arrows.to:f=u.arrows.from,n[f]={attr:n[f].attr,name:n[f].name,value:""}}else if(d==="forward")u.arrows.to&&u.arrows.from?(h=n[u.arrows.to].value.to.type,c="",n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):u.arrows.to?(h=n[u.arrows.to].value.to.type,c="",n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):u.arrows.from&&(h="arrow",c="",u.arrows.to=u.arrows.from,n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}),n[u.arrows.to]={attr:n[u.arrows.to].attr,name:n[u.arrows.to].name,value:{to:{enabled:!0,type:n[u.arrows.to].value.to.type}}};else throw ft('Invalid dir type "'+d+'"');kr(n).call(n,u.dir,1)}var v;if(tn(a).call(a,"penwidth")){var p=[];for(v=n.length,r=0;r<v;r++)n[r].name!=="width"&&(n[r].name==="penwidth"&&(n[r].name="width"),p.push(n[r]));n=p}for(v=n.length,r=0;r<v;r++)jae(n[r].attr,n[r].name,n[r].value);return i}function ft(r){return new SyntaxError(r+', got "'+TO(U,30)+'" (char '+qi+")")}function TO(r,i){return r.length<=i?r:r.substr(0,27)+"..."}function Gae(r,i,e){ue(r)?he(r).call(r,function(t){ue(i)?he(i).call(i,function(n){e(t,n)}):e(t,i)}):ue(i)?he(i).call(i,function(t){e(r,t)}):e(r,i)}function Bc(r,i,e){for(var t=i.split("."),n=t.pop(),a=r,o=0;o<t.length;o++){var s=t[o];s in a||(a[s]={}),a=a[s]}return a[n]=e,r}function Jb(r,i){var e={};for(var t in r)if(r.hasOwnProperty(t)){var n=i[t];ue(n)?he(n).call(n,function(a){Bc(e,a,r[t])}):typeof n=="string"?Bc(e,n,r[t]):Bc(e,t,r[t])}return e}function Kae(r){var i=Bae(r),e={nodes:[],edges:[],options:{}};if(i.nodes){var t;he(t=i.nodes).call(t,function(o){var s={id:o.id,label:String(o.label||o.id)};on(s,Jb(o.attr,$O)),s.image&&(s.shape="image"),e.nodes.push(s)})}if(i.edges){var n,a=function(s){var l={from:s.from,to:s.to};return on(l,Jb(s.attr,Av)),l.arrows==null&&s.type==="->"&&(l.arrows="to"),l};he(n=i.edges).call(n,function(o){var s,l;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?l=o.to.nodes:l={id:o.to},o.from instanceof Object&&o.from.edges){var u;he(u=o.from.edges).call(u,function(c){var h=a(c);e.edges.push(h)})}if(Gae(s,l,function(c,h){var f=_O(e,c.id,h.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var d;he(d=o.to.edges).call(d,function(c){var h=a(c);e.edges.push(h)})}})}return i.attr&&(e.options=i.attr),e}function qae(r,i){var e,t={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};i!=null&&(i.fixed!=null&&(t.nodes.fixed=i.fixed),i.parseColor!=null&&(t.nodes.parseColor=i.parseColor),i.inheritColor!=null&&(t.edges.inheritColor=i.inheritColor));var n=r.edges,a=Vi(n).call(n,function(s){var l={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.type==="Directed"&&(l.arrows="to"),s.color&&t.edges.inheritColor===!1&&(l.color=s.color),l}),o=Vi(e=r.nodes).call(e,function(s){var l={id:s.id,fixed:t.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.size!=null&&(l.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.title!=null&&(l.title=s.title),s.x!=null&&(l.x=s.x),s.y!=null&&(l.y=s.y),s.color!=null&&(t.nodes.parseColor===!0?l.color=s.color:l.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),l});return{nodes:o,edges:a}}var Yae={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"},Xae={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"},Qae={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"},Jae={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"},Zae={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"},eoe={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ó"},toe={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},roe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},noe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},ioe={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"},aoe={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"},ooe=Object.freeze({__proto__:null,cn:roe,cs:aoe,de:Xae,en:Yae,es:Qae,fr:ioe,it:Jae,nl:Zae,pt:eoe,ru:toe,uk:noe});function soe(r,i){try{var e=i.split(/[-_ /]/,2),t=Oe(e,2),n=t[0],a=t[1],o=n!=null?n.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var l=o+"-"+s;if(Object.prototype.hasOwnProperty.call(r,l))return l;var u;console.warn(wv(u="Unknown variant ".concat(s," of language ")).call(u,o,"."))}if(o){var d=o;if(Object.prototype.hasOwnProperty.call(r,d))return d;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(i,", falling back to English.")),"en"}catch(c){return console.error(c),console.warn("Unexpected error while normalizing locale ".concat(i,", falling back to English.")),"en"}}var loe=function(){function r(){R(this,r),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return D(r,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,t=this.image.height;this.width=e,this.height=t;var n=Math.floor(t/2),a=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),l=Math.floor(e/2),u=Math.floor(e/4),d=Math.floor(e/8),c=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=n,this.coordinates=[[0,0,l,n],[l,0,u,a],[l,a,d,o],[5*d,a,c,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var n=1;n<this.NUM_ITERATIONS;n++){var a=this.coordinates[n-1],o=this.coordinates[n];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,t,n,a,o,s){if(this.initialized())if(t>2){t*=.5;for(var l=0;t>2&&l<this.NUM_ITERATIONS;)t*=.5,l+=1;l>=this.NUM_ITERATIONS&&(l=this.NUM_ITERATIONS-1);var u=this.coordinates[l];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],n,a,o,s)}else e.drawImage(this.image,n,a,o,s)}}]),r}(),uoe=function(){function r(i){R(this,r),this.images={},this.imageBroken={},this.callback=i}return D(r,[{key:"_tryloadBrokenUrl",value:function(e,t,n){if(!(e===void 0||n===void 0)){if(t===void 0){console.warn("No broken url image defined");return}n.image.onerror=function(){console.error("Could not load brokenImage:",t)},n.image.src=t}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var n=this,a=this.images[e];if(a)return a;var o=new loe;return this.images[e]=o,o.image.onload=function(){n._fixImageCoordinates(o.image),o.init(),n._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),n._tryloadBrokenUrl(e,t,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))}}]),r}(),IO={exports:{}},doe=ie,coe=doe(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),hoe=ie,foe=Xe,voe=Lr,Zb=coe,Js=Object.isExtensible,poe=hoe(function(){Js(1)}),goe=poe||Zb?function(i){return!foe(i)||Zb&&voe(i)==="ArrayBuffer"?!1:Js?Js(i):!0}:Js,yoe=ie,PO=!yoe(function(){return Object.isExtensible(Object.preventExtensions({}))}),moe=G,boe=oe,$oe=Lo,woe=Xe,Rv=Qe,_oe=zt.f,e$=Wo,Eoe=_u,Dv=goe,Soe=cu,Ooe=PO,kO=!1,Nr=Soe("meta"),Toe=0,Mv=function(r){_oe(r,Nr,{value:{objectID:"O"+Toe++,weakData:{}}})},Ioe=function(r,i){if(!woe(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Rv(r,Nr)){if(!Dv(r))return"F";if(!i)return"E";Mv(r)}return r[Nr].objectID},Poe=function(r,i){if(!Rv(r,Nr)){if(!Dv(r))return!0;if(!i)return!1;Mv(r)}return r[Nr].weakData},koe=function(r){return Ooe&&kO&&Dv(r)&&!Rv(r,Nr)&&Mv(r),r},Coe=function(){xoe.enable=function(){},kO=!0;var r=e$.f,i=boe([].splice),e={};e[Nr]=1,r(e).length&&(e$.f=function(t){for(var n=r(t),a=0,o=n.length;a<o;a++)if(n[a]===Nr){i(n,a,1);break}return n},moe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Eoe.f}))},xoe=IO.exports={enable:Coe,fastKey:Ioe,getWeakData:Poe,onFreeze:koe};$oe[Nr]=!0;var Au=IO.exports,Aoe=Fo,Roe=jt,Doe=Ht,Moe=fa,Noe=kE,Foe=Xt,t$=De,Boe=DE,Loe=$u,r$=PE,joe=TypeError,Zs=function(r,i){this.stopped=r,this.result=i},n$=Zs.prototype,Nv=function(r,i,e){var t=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),l=Aoe(i,t),u,d,c,h,f,v,p,g=function(m){return u&&r$(u,"normal",m),new Zs(!0,m)},y=function(m){return n?(Doe(m),s?l(m[0],m[1],g):l(m[0],m[1])):s?l(m,g):l(m)};if(a)u=r.iterator;else if(o)u=r;else{if(d=Loe(r),!d)throw new joe(Moe(r)+" is not iterable");if(Noe(d)){for(c=0,h=Foe(r);h>c;c++)if(f=y(r[c]),f&&t$(n$,f))return f;return new Zs(!1)}u=Boe(r,d)}for(v=a?r.next:u.next;!(p=Roe(v,u)).done;){try{f=y(p.value)}catch(m){r$(u,"throw",m)}if(typeof f=="object"&&f&&t$(n$,f))return f}return new Zs(!1)},zoe=De,Hoe=TypeError,Fv=function(r,i){if(zoe(i,r))return r;throw new Hoe("Incorrect invocation")},Woe=G,Voe=Pe,Uoe=Au,Goe=ie,Koe=pa,qoe=Nv,Yoe=Fv,Xoe=qe,Qoe=Xe,Joe=ca,Zoe=ya,ese=zt.f,tse=fn.forEach,rse=Ye,CO=ti,nse=CO.set,ise=CO.getterFor,Bv=function(r,i,e){var t=r.indexOf("Map")!==-1,n=r.indexOf("Weak")!==-1,a=t?"set":"add",o=Voe[r],s=o&&o.prototype,l={},u;if(!rse||!Xoe(o)||!(n||s.forEach&&!Goe(function(){new o().entries().next()})))u=e.getConstructor(i,r,t,a),Uoe.enable();else{u=i(function(h,f){nse(Yoe(h,d),{type:r,collection:new o}),Joe(f)||qoe(f,h[a],{that:h,AS_ENTRIES:t})});var d=u.prototype,c=ise(r);tse(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var f=h==="add"||h==="set";h in s&&!(n&&h==="clear")&&Koe(d,h,function(v,p){var g=c(this).collection;if(!f&&n&&!Qoe(v))return h==="get"?void 0:!1;var y=g[h](v===0?0:v,p);return f?this:y})}),n||ese(d,"size",{configurable:!0,get:function(){return c(this).collection.size}})}return Zoe(u,r,!1,!0),l[r]=u,Woe({global:!0,forced:!0},l),n||e.setStrong(u,r,t),u},ase=zo,Lv=function(r,i,e){for(var t in i)e&&e.unsafe&&r[t]?r[t]=i[t]:ase(r,t,i[t],e);return r},ose=Yt,sse=pv,lse=ke,use=Ye,i$=lse("species"),dse=function(r){var i=ose(r);use&&i&&!i[i$]&&sse(i,i$,{configurable:!0,get:function(){return this}})},cse=ga,hse=pv,a$=Lv,fse=Fo,vse=Fv,pse=ca,gse=Nv,yse=dv,Rs=cv,mse=dse,Ia=Ye,o$=Au.fastKey,xO=ti,s$=xO.set,Lc=xO.getterFor,AO={getConstructor:function(r,i,e,t){var n=r(function(u,d){vse(u,a),s$(u,{type:i,index:cse(null),first:void 0,last:void 0,size:0}),Ia||(u.size=0),pse(d)||gse(d,u[t],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=Lc(i),s=function(u,d,c){var h=o(u),f=l(u,d),v,p;return f?f.value=c:(h.last=f={index:p=o$(d,!0),key:d,value:c,previous:v=h.last,next:void 0,removed:!1},h.first||(h.first=f),v&&(v.next=f),Ia?h.size++:u.size++,p!=="F"&&(h.index[p]=f)),u},l=function(u,d){var c=o(u),h=o$(d),f;if(h!=="F")return c.index[h];for(f=c.first;f;f=f.next)if(f.key===d)return f};return a$(a,{clear:function(){for(var d=this,c=o(d),h=c.index,f=c.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete h[f.index],f=f.next;c.first=c.last=void 0,Ia?c.size=0:d.size=0},delete:function(u){var d=this,c=o(d),h=l(d,u);if(h){var f=h.next,v=h.previous;delete c.index[h.index],h.removed=!0,v&&(v.next=f),f&&(f.previous=v),c.first===h&&(c.first=f),c.last===h&&(c.last=v),Ia?c.size--:d.size--}return!!h},forEach:function(d){for(var c=o(this),h=fse(d,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:c.first;)for(h(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(d){return!!l(this,d)}}),a$(a,e?{get:function(d){var c=l(this,d);return c&&c.value},set:function(d,c){return s(this,d===0?0:d,c)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),Ia&&hse(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(r,i,e){var t=i+" Iterator",n=Lc(i),a=Lc(t);yse(r,i,function(o,s){s$(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=void 0,Rs(void 0,!0)):Rs(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},e?"entries":"values",!e,!0),mse(i)}},bse=Bv,$se=AO;bse("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},$se);var wse=ae,_se=wse.Map,Ese=_se,Sse=Ese,Ose=Sse,RO=z(Ose),Tse=function(){function r(){R(this,r),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},Be(this.options,this.defaultOptions)}return D(r,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(e!==void 0){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ne(t).call(t,n)===-1){var a=e[n];this.add(n,a)}}}},{key:"clear",value:function(){this._groups=new RO,this._groupNames=[]}},{key:"get",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[a]),this._groups.set(e,n)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[o],this._groups.set(e,n)}return n}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),r}(),Ise=G;Ise({target:"Number",stat:!0},{isNaN:function(i){return i!==i}});var Pse=ae,kse=Pse.Number.isNaN,Cse=kse,xse=Cse,Ase=xse,of=z(Ase),Rse=Pe,Dse=Rse.isFinite,Mse=Number.isFinite||function(i){return typeof i=="number"&&Dse(i)},Nse=G,Fse=Mse;Nse({target:"Number",stat:!0},{isFinite:Fse});var Bse=ae,Lse=Bse.Number.isFinite,jse=Lse,zse=jse,Hse=zse,Tn=z(Hse),Wse=G,Vse=fn.some,Use=$a,Gse=Use("some");Wse({target:"Array",proto:!0,forced:!Gse},{some:function(i){return Vse(this,i,arguments.length>1?arguments[1]:void 0)}});var Kse=Je,qse=Kse("Array").some,Yse=De,Xse=qse,jc=Array.prototype,Qse=function(r){var i=r.some;return r===jc||Yse(jc,r)&&i===jc.some?Xse:i},Jse=Qse,Zse=Jse,ele=Zse,tle=z(ele),rle=ae,nle=rle.Object.getOwnPropertySymbols,ile=nle,ale=ile,ole=ale,sn=z(ole),DO={exports:{}},sle=G,lle=ie,ule=$r,MO=da.f,NO=Ye,dle=!NO||lle(function(){MO(1)});sle({target:"Object",stat:!0,forced:dle,sham:!NO},{getOwnPropertyDescriptor:function(i,e){return MO(ule(i),e)}});var cle=ae,FO=cle.Object,hle=DO.exports=function(i,e){return FO.getOwnPropertyDescriptor(i,e)};FO.getOwnPropertyDescriptor.sham&&(hle.sham=!0);var fle=DO.exports,vle=fle,BO=vle,ple=BO,pn=z(ple),gle=G,yle=Ye,mle=Dee,ble=$r,$le=da,wle=ba;gle({target:"Object",stat:!0,sham:!yle},{getOwnPropertyDescriptors:function(i){for(var e=ble(i),t=$le.f,n=mle(e),a={},o=0,s,l;n.length>o;)l=t(e,s=n[o++]),l!==void 0&&wle(a,s,l);return a}});var _le=ae,Ele=_le.Object.getOwnPropertyDescriptors,Sle=Ele,Ole=Sle,Tle=Ole,ln=z(Tle),LO={exports:{}},Ile=G,Ple=Ye,l$=yu.f;Ile({target:"Object",stat:!0,forced:Object.defineProperties!==l$,sham:!Ple},{defineProperties:l$});var kle=ae,jO=kle.Object,Cle=LO.exports=function(i,e){return jO.defineProperties(i,e)};jO.defineProperties.sham&&(Cle.sham=!0);var xle=LO.exports,Ale=xle,Rle=Ale,Dle=Rle,Ru=z(Dle),Mle=VE,Du=z(Mle);function Mu(r,i,e){return i=ES(i),i in r?wu(r,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[i]=e,r}var zO=Pe,Nle=ie,Fle=oe,Ble=wr,Lle=MS.trim,jle=_v,zle=Fle("".charAt),kl=zO.parseFloat,u$=zO.Symbol,d$=u$&&u$.iterator,Hle=1/kl(jle+"-0")!==-1/0||d$&&!Nle(function(){kl(Object(d$))}),Wle=Hle?function(i){var e=Lle(Ble(i)),t=kl(e);return t===0&&zle(e,0)==="-"?-0:t}:kl,Vle=G,c$=Wle;Vle({global:!0,forced:parseFloat!==c$},{parseFloat:c$});var Ule=ae,Gle=Ule.parseFloat,Kle=Gle,qle=Kle,Yle=qle,HO=z(Yle),Xle=G,Qle=ie,Jle=_u.f,Zle=Qle(function(){return!Object.getOwnPropertyNames(1)});Xle({target:"Object",stat:!0,forced:Zle},{getOwnPropertyNames:Jle});var eue=ae,tue=eue.Object,rue=function(i){return tue.getOwnPropertyNames(i)},nue=rue,iue=nue,aue=iue,oue=z(aue);function jv(r,i){var e=["node","edge","label"],t=!0,n=Kr(i,"chosen");if(typeof n=="boolean")t=n;else if(ce(n)==="object"){if(ne(e).call(e,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+e.join("', '")+"'");var a=Kr(i,["chosen",r]);(typeof a=="boolean"||typeof a=="function")&&(t=a)}return t}function sf(r,i,e){if(r.width<=0||r.height<=0)return!1;if(e!==void 0){var t={x:i.x-e.x,y:i.y-e.y};if(e.angle!==0){var n=-e.angle,a={x:Math.cos(n)*t.x-Math.sin(n)*t.y,y:Math.sin(n)*t.x+Math.cos(n)*t.y};i=a}else i=t}var o=r.x+r.width,s=r.y+r.width;return r.left<i.x&&o>i.x&&r.top<i.y&&s>i.y}function Cl(r){return typeof r=="string"&&r!==""}function WO(r,i,e,t){var n=t.x,a=t.y;if(typeof t.distanceToBorder=="function"){var o=t.distanceToBorder(r,i),s=Math.sin(i)*o,l=Math.cos(i)*o;l===o?(n+=o,a=t.y):s===o?(n=t.x,a-=o):(n+=l,a-=s)}else t.shape.width>t.shape.height?(n=t.x+t.shape.width*.5,a=t.y-e):(n=t.x+e,a=t.y-t.shape.height*.5);return{x:n,y:a}}var sue=Je,lue=sue("Array").values,uue=lue,due=uue,cue=ei,hue=Qe,fue=De,vue=due,zc=Array.prototype,pue={DOMTokenList:!0,NodeList:!0},gue=function(r){var i=r.values;return r===zc||fue(zc,r)&&i===zc.values||hue(pue,cue(r))?vue:i},yue=gue,VO=z(yue),mue=function(){function r(i){R(this,r),this.measureText=i,this.current=0,this.width=0,this.height=0,this.lines=[]}return D(r,[{key:"_add",value:function(e,t){var n=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=t;(t===void 0||t==="")&&(a=" ");var o=this.measureText(a,n),s=Be({},VO(o));s.text=t,s.width=o.width,s.mod=n,(t===void 0||t==="")&&(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 t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}},{key:"newLine",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e],n=0;if(t.blocks!==void 0)for(var a=0;a<t.blocks.length;a++){var o=t.blocks[a];n<o.height&&(n=o.height)}t.height=n}}},{key:"determineLabelSize",value:function(){for(var e=0,t=0,n=0;n<this.lines.length;n++){var a=this.lines[n];a.width>e&&(e=a.width),t+=a.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.blocks.length!==0&&!(t===this.lines.length-1&&n.width===0)){var a={};Be(a,n),a.blocks=[];for(var o=void 0,s=[],l=0;l<n.blocks.length;l++){var u=n.blocks[l];u.width!==0?s.push(u):o===void 0&&(o=u)}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}}}]),r}(),bue={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},h$=function(){function r(i){R(this,r),this.text=i,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return D(r,[{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,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.prepareRegExp(e),a=Oe(n,2),o=a[0],s=a[1],l=o.test(this.text.substr(this.position,s));return l&&t&&(this.position+=s-1),l}},{key:"parseEndTag",value:function(e,t,n){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(t)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t,n;if(e instanceof RegExp)n=e,t=1;else{var a=bue[e];a!==void 0?n=a:n=new RegExp(e),t=e.length}return[n,t]}}]),r}(),$ue=function(){function r(i,e,t,n){var a=this;R(this,r),this.ctx=i,this.parent=e,this.selected=t,this.hover=n;var o=function(l,u){if(l===void 0)return 0;var d=a.parent.getFormattingValues(i,t,n,u),c=0;if(l!==""){var h=a.ctx.measureText(l);c=h.width}return{width:c,values:d}};this.lines=new mue(o)}return D(r,[{key:"process",value:function(e){if(!Cl(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
90
+ `),e=e.replace(/\r/g,`
91
+ `);var n=String(e).split(`
92
+ `),a=n.length;if(t.multi)for(var o=0;o<a;o++){var s=this.splitBlocks(n[o],t.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(var l=0;l<s.length;l++){var u=s[l].mod,d=s[l].text;this.splitStringIntoLines(d,u,!0)}else for(var c=0;c<s.length;c++){var h=s[c].mod,f=s[c].text;this.lines.append(f,h)}this.lines.newLine()}}else if(t.maxWdt>0)for(var v=0;v<a;v++)this.splitStringIntoLines(n[v]);else for(var p=0;p<a;p++)this.lines.newLine(n[p]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}},{key:"splitHtmlBlocks",value:function(e){for(var t=new h$(e),n=function(l){if(/&/.test(l)){var u=t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&");return u||t.add("&"),!0}return!1};t.position<t.text.length;){var a=t.text.charAt(t.position),o=t.parseWS(a)||/</.test(a)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||n(a);o||t.add(a),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,n=new h$(e),a=!0,o=function(d){return/\\/.test(d)?(n.position<t.text.length+1&&(n.position++,d=t.text.charAt(n.position),/ \t/.test(d)?n.spacing=!0:(n.add(d),a=!1)),!0):!1};n.position<n.text.length;){var s=n.text.charAt(n.position),l=n.parseWS(s)||o(s)||(a||n.spacing)&&(n.parseStartTag("bold","*")||n.parseStartTag("ital","_")||n.parseStartTag("mono","`"))||n.parseEndTag("bold","*","afterBold")||n.parseEndTag("ital","_","afterItal")||n.parseEndTag("mono","`","afterMono");l||(n.add(s),a=!1),n.position++}return n.emitBlock(),n.blocks}},{key:"splitBlocks",value:function(e,t){var n=this.decodeMarkupSystem(t);if(n==="none")return[{text:e,mod:"normal"}];if(n==="markdown")return this.splitMarkdownBlocks(e);if(n==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",n=0;n<e.length;){var a=t===""?"":" ",o=t+a+e[n];if(this.overMaxWidth(o))break;t=o,n++}return n}},{key:"getLongestFitWord",value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(tt(e).call(e,0,t));)t++;return t}},{key:"splitStringIntoLines",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],l=this.getLongestFitWord(s);this.lines.newLine(tt(s).call(s,0,l),t),a[0]=tt(s).call(s,l)}else{var u=o;a[o-1]===" "?o--:a[u]===" "&&u++;var d=tt(a).call(a,0,o).join("");o==a.length&&n?this.lines.append(d,t):this.lines.newLine(d,t),a=tt(a).call(a,u)}}}}]),r}(),Pa=["bold","ital","boldital","mono"],UO=function(){function r(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;R(this,r),this.body=i,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=t}return D(r,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Cl(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(ce(e.font)==="object"){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:"initFontOptions",value:function(e){var t=this;if(re(Pa,function(n){t.fontOptions[n]={}}),r.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}re(e,function(n,a){n!=null&&ce(n)!=="object"&&(t.fontOptions[a]=n)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Kr(e,"widthConstraint");if(typeof n=="number")t.maxWdt=Number(n),t.minWdt=Number(n);else if(ce(n)==="object"){var a=Kr(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));var o=Kr(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}var s=Kr(e,"heightConstraint");if(typeof s=="number")t.minHgt=Number(s);else if(ce(s)==="object"){var l=Kr(e,["heightConstraint","minimum"]);typeof l=="number"&&(t.minHgt=Number(l));var u=Kr(e,["heightConstraint","valign"]);typeof u=="string"&&(u==="top"||u==="bottom")&&(t.valign=u)}return t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),pe(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=jv("label",t)}},{key:"adjustSizes",value:function(e){var t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);var n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}},{key:"addFontOptionsToPile",value:function(e,t){for(var n=0;n<t.length;++n)this.addFontToPile(e,t[n])}},{key:"addFontToPile",value:function(e,t){if(t!==void 0&&!(t.font===void 0||t.font===null)){var n=t.font;e.push(n)}}},{key:"getBasicOptions",value:function(e){for(var t={},n=0;n<e.length;++n){var a=e[n],o={};r.parseFontString(o,a)&&(a=o),re(a,function(s,l){s!==void 0&&(Object.prototype.hasOwnProperty.call(t,l)||(ne(Pa).call(Pa,l)!==-1?t[l]={}:t[l]=s))})}return t}},{key:"getFontOption",value:function(e,t,n){for(var a,o=0;o<e.length;++o){var s=e[o];if(Object.prototype.hasOwnProperty.call(s,t)){if(a=s[t],a==null)continue;var l={};if(r.parseFontString(l,a)&&(a=l),Object.prototype.hasOwnProperty.call(a,n))return a[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}},{key:"getFontOptions",value:function(e,t){for(var n={},a=["color","size","face","mod","vadjust"],o=0;o<a.length;++o){var s=a[o];n[s]=this.getFontOption(e,t,s)}return n}},{key:"propagateFonts",value:function(e){var t=this,n=[];this.addFontOptionsToPile(n,e),this.fontOptions=this.getBasicOptions(n);for(var a=function(){var l=Pa[o],u=t.fontOptions[l],d=t.getFontOptions(n,l);re(d,function(c,h){u[h]=c}),u.size=Number(u.size),u.vadjust=Number(u.vadjust)},o=0;o<Pa.length;++o)a()}},{key:"draw",value:function(e,t,n,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var l=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&l<this.elementOptions.scaling.label.drawThreshold-1||(l>=this.elementOptions.scaling.label.maxVisible&&(l=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,t,n,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,l))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,t,n,a),l=Oe(s,2);t=l[0],n=l[1],e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(var u=0;u<this.lineCount;u++){var d=this.lines[u];if(d&&d.blocks){var c=0;this.isEdgeLabel||this.fontOptions.align==="center"?c+=(this.size.width-d.width)/2:this.fontOptions.align==="right"&&(c+=this.size.width-d.width);for(var h=0;h<d.blocks.length;h++){var f=d.blocks[h];e.font=f.font;var v=this._getColor(f.color,o,f.strokeColor),p=Oe(v,2),g=p[0],y=p[1];f.strokeWidth>0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=y,e.lineJoin="round"),e.fillStyle=g,f.strokeWidth>0&&e.strokeText(f.text,t+c,n+f.vadjust),e.fillText(f.text,t+c,n+f.vadjust),c+=f.width}n+=d.height}}}},{key:"_setAlignment",value:function(e,t,n,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,n=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[t,n]}},{key:"_getColor",value:function(e,t,n){var a=e||"#000000",o=n||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));a=Ut(a,s),o=Ut(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,t=this.size.left,n=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,n=-this.size.height*.5;break;case"top":t=a,n=-(this.size.height+e);break;case"bottom":t=a,n=e;break}}var o={left:t,top:n,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,t,n){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,t,n),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,t,n,a){var o=function(d,c,h){return c==="normal"?h==="mod"?"":d[h]:d[c][h]!==void 0?d[c][h]:d[h]},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};(t||n)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,n));var l="";return s.mod!==void 0&&s.mod!==""&&(l+=s.mod+" "),l+=s.size+"px "+s.face,e.font=l.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,n,a){var o=new $ue(e,this,t,n);return o.process(a)}},{key:"_processLabel",value:function(e,t,n){if(!(this.labelDirty===!1&&!this.differentState(t,n))){var a=this._processLabelText(e,t,n,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=t,this.hoverState=n,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,t){if(!t||typeof t!="string")return!1;var n=t.split(" ");return e.size=+n[0].replace("px",""),e.face=n[1],e.color=n[2],!0}}]),r}(),wue=bu,_ue=fa,Eue=TypeError,Sue=function(r){if(wue(r))return r;throw new Eue(_ue(r)+" is not a constructor")},Oue=G,Tue=Yt,Hc=Co,Iue=dE,f$=Sue,Pue=Ht,v$=Xe,kue=ga,GO=ie,zv=Tue("Reflect","construct"),Cue=Object.prototype,xue=[].push,KO=GO(function(){function r(){}return!(zv(function(){},[],r)instanceof r)}),qO=!GO(function(){zv(function(){})}),p$=KO||qO;Oue({target:"Reflect",stat:!0,forced:p$,sham:p$},{construct:function(i,e){f$(i),Pue(e);var t=arguments.length<3?i:f$(arguments[2]);if(qO&&!KO)return zv(i,e,t);if(i===t){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Hc(xue,n,e),new(Hc(Iue,i,n))}var a=t.prototype,o=kue(v$(a)?a:Cue),s=Hc(i,o,e);return v$(s)?s:o}});var Aue=ae,Rue=Aue.Reflect.construct,Due=Rue,Mue=Due,Nue=Mue,_=z(Nue),Fue=LS,Bue=Fue,Lue=Bue,jue=Lue,zue=jue,Hue=z(zue),Wue=G,Vue=HK;Wue({target:"Object",stat:!0},{setPrototypeOf:Vue});var Uue=ae,Gue=Uue.Object.setPrototypeOf,Kue=Gue,que=Kue,Yue=que,Xue=Yue,Que=Xue,Jue=Que,Zue=Jue,lf=z(Zue),ede=cE,tde=ede,rde=tde,nde=rde,ide=nde,Hv=z(ide);function uf(r,i){var e;return uf=lf?Hv(e=lf).call(e):function(n,a){return n.__proto__=a,n},uf(r,i)}function se(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Hue(i&&i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),wu(r,"prototype",{writable:!1}),i&&uf(r,i)}function ade(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function de(r,i){if(i&&(ce(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ade(r)}var ode=DS,sde=ode,lde=sde,ude=lde,dde=ude,g$=z(dde);function F(r){var i;return F=lf?Hv(i=g$).call(i):function(t){return t.__proto__||g$(t)},F(r)}var oi=function(){function r(i,e,t){R(this,r),this.body=e,this.labelModule=t,this.setOptions(i),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 D(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&(ce(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,t){var n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}},{key:"enableShadow",value:function(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){var n=t.borderDashes;n===!0&&(n=[5,15]),e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}},{key:"disableBorderDashes",value:function(e,t){t.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,t.borderDashes=!1))}},{key:"needsRefresh",value:function(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}},{key:"initContextForDraw",value:function(e,t){var n=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=t.borderColor,e.fillStyle=t.color}},{key:"performStroke",value:function(e,t){var n=t.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}},{key:"performFill",value:function(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),qo(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}},{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,t,n,a,o){n!==void 0&&this.resize(n,a,o),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,t,n,a,o){this._updateBoundingBox(e,t,n,a,o)}},{key:"getDimensionsFromLabel",value:function(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),r}();function cde(r){var i=hde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function hde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var fde=function(r){se(e,r);var i=cde(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(n){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(n,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(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,u),hE(n,this.left,this.top,this.width,this.height,u.borderRadius),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"updateBoundingBox",value:function(n,a,o,s,l){this._updateBoundingBox(n,a,o,s,l);var u=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(u)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);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}(oi);function vde(r){var i=pde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function pde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Wv=function(r){se(e,r);var i=vde(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o.labelOffset=0,o.selected=!1,o}return D(e,[{key:"setOptions",value:function(n,a,o){this.options=n,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(n,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=n):(this.imageObj=n,this.imageObjAlt=a)}},{key:"switchImages",value:function(n){var a=n&&!this.selected||!n&&this.selected;if(this.selected=n,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var n={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;ce(a)=="object"?(n.top=a.top,n.right=a.right,n.bottom=a.bottom,n.left=a.left):(n.top=a,n.right=a,n.bottom=a,n.left=a)}return n}},{key:"_resizeImage",value:function(){var n,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),n=this.options.size*2*o,a=this.options.size*2*s}else{var l=this._getImagePadding();n=this.imageObj.width+l.left+l.right,a=this.imageObj.height+l.top+l.bottom}this.width=n,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(n,a,o,s){this.initContextForDraw(n,s),ov(n,a,o,s.size),this.performFill(n,s)}},{key:"_drawImageAtPosition",value:function(n,a){if(this.imageObj.width!=0){n.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(n,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),l=this.left+s.left,u=this.top+s.top,d=this.width-s.left-s.right,c=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(n,o,l,u,d,c),this.disableShadow(n,a)}}},{key:"_drawImageLabel",value:function(n,a,o,s,l){var u=0;if(this.height!==void 0){u=this.height*.5;var d=this.labelModule.getTextSize(n,s,l);d.lineCount>=1&&(u+=d.height/2)}var c=o+u;this.options.label&&(this.labelOffset=u),this.labelModule.draw(n,a,c,s,l,"hanging")}}]),e}(oi);function gde(r){var i=yde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function yde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var mde=function(r){se(e,r);var i=gde(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(n){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(n,a,o),l=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=l/2,this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(n,a,o,u),this.updateBoundingBox(a,o),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,o,s,l)}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.width*.5}}]),e}(Wv);function bde(r){var i=$de();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function $de(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var wde=function(r){se(e,r);var i=bde(e);function e(t,n,a,o,s){var l;return R(this,e),l=i.call(this,t,n,a),l.setImages(o,s),l}return D(e,[{key:"resize",value:function(n){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 l=this.options.size*2;this.width=l,this.height=l,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(n,a,o,s,l,u){this.switchImages(s),this.resize();var d=a,c=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,d+=this.width/2,c+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(n,d,c,u),n.save(),n.clip(),this._drawImageAtPosition(n,u),n.restore(),this._drawImageLabel(n,d,c,s,l),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(n,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=n,this.boundingBox.right=n+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+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(n){return n&&this.resize(n),this.width*.5}}]),e}(Wv);function _de(r){var i=Ede();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Ede(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var gn=function(r){se(e,r);var i=_de(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"resize",value:function(n){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 l,u;this.labelModule.getTextSize(n,a,o);var d=2*s.size;this.width=(l=this.customSizeWidth)!==null&&l!==void 0?l:d,this.height=(u=this.customSizeHeight)!==null&&u!==void 0?u:d,this.radius=.5*this.width}}},{key:"_drawShape",value:function(n,a,o,s,l,u,d,c){var h=this;return this.resize(n,u,d,c),this.left=s-this.width/2,this.top=l-this.height/2,this.initContextForDraw(n,c),i7(a)(n,s,l,c.size),this.performFill(n,c),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(n.font=(u?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",n.fillText(this.options.icon.code,s,l)),{drawExternalLabel:function(){if(h.options.label!==void 0){h.labelModule.calculateLabelSize(n,u,d,s,l,"hanging");var v=l+.5*h.height+.5*h.labelModule.size.height;h.labelModule.draw(n,s,v,u,d,"hanging")}h.updateBoundingBox(s,l)}}}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+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}(oi);function y$(r,i){var e=Ee(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function Sde(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?he(e=y$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):he(t=y$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}function Ode(r){var i=Tde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Tde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Ide=function(r){se(e,r);var i=Ode(e);function e(t,n,a,o){var s;return R(this,e),s=i.call(this,t,n,a,o),s.ctxRenderer=o,s}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l,u),this.left=a-this.width/2,this.top=o-this.height/2,n.save();var d=this.ctxRenderer({ctx:n,id:this.options.id,x:a,y:o,state:{selected:s,hover:l},style:Sde({},u),label:this.options.label});if(d.drawNode!=null&&d.drawNode(),n.restore(),d.drawExternalLabel){var c=d.drawExternalLabel;d.drawExternalLabel=function(){n.save(),c(),n.restore()}}return d.nodeDimensions&&(this.customSizeWidth=d.nodeDimensions.width,this.customSizeHeight=d.nodeDimensions.height),d}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Pde(r){var i=kde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function kde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Cde=function(r){se(e,r);var i=Pde(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(n,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o),l=s.width+this.margin.right+this.margin.left;this.width=l,this.height=l,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,u),fE(n,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(oi);function xde(r){var i=Ade();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Ade(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Rde=function(r){se(e,r);var i=xde(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"diamond",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Dde(r){var i=Mde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Mde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Nde=function(r){se(e,r);var i=Dde(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"circle",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.options.size}}]),e}(gn);function Fde(r){var i=Bde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Bde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var m$=function(r){se(e,r);var i=Fde(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"resize",value:function(n){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(n,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(n,u),Mh(n,this.left,this.top,this.width,this.height),this.performFill(n,u),this.updateBoundingBox(a,o,n,s,l),this.labelModule.draw(n,a,o,s,l)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);var o=this.width*.5,s=this.height*.5,l=Math.sin(a)*o,u=Math.cos(a)*s;return o*s/Math.sqrt(l*l+u*u)}}]),e}(oi);function Lde(r){var i=jde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function jde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var zde=function(r){se(e,r);var i=Lde(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(n,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(n,a,o,s,l,u){var d=this;return this.resize(n,s,l),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(n,a,o,s,l,u),{drawExternalLabel:function(){if(d.options.label!==void 0){var h=5;d.labelModule.draw(n,d.left+d.iconSize.width/2+d.margin.left,o+d.height/2+h,s)}d.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(n,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=n-this.options.icon.size*.5,this.boundingBox.right=n+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(n,a,o,s,l,u){var d=Number(this.options.icon.size);this.options.icon.code!==void 0?(n.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+d+"px",this.options.icon.face].join(" "),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",this.enableShadow(n,u),n.fillText(this.options.icon.code,a,o),this.disableShadow(n,u)):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(n,a){return this._distanceToBorder(n,a)}}]),e}(oi);function Hde(r){var i=Wde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Wde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Vde=function(r){se(e,r);var i=Hde(e);function e(t,n,a,o,s){var l;return R(this,e),l=i.call(this,t,n,a),l.setImages(o,s),l}return D(e,[{key:"resize",value:function(n){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 l=this.options.size*2;this.width=l,this.height=l;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(n,a,o,s,l,u){n.save(),this.switchImages(s),this.resize();var d=a,c=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,d+=this.width/2,c+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var h=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:h)/this.body.view.scale;n.lineWidth=Math.min(this.width,v),n.beginPath();var p=s?this.options.color.highlight.border:l?this.options.color.hover.border:this.options.color.border,g=s?this.options.color.highlight.background:l?this.options.color.hover.background:this.options.color.background;u.opacity!==void 0&&(p=Ut(p,u.opacity),g=Ut(g,u.opacity)),n.strokeStyle=p,n.fillStyle=g,n.rect(this.left-.5*n.lineWidth,this.top-.5*n.lineWidth,this.width+n.lineWidth,this.height+n.lineWidth),qo(n).call(n),this.performStroke(n,u),n.closePath()}this._drawImageAtPosition(n,u),this._drawImageLabel(n,d,c,s,l),this.updateBoundingBox(a,o),n.restore()}},{key:"updateBoundingBox",value:function(n,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=n,this.top=a):(this.left=n-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(n,a){return this._distanceToBorder(n,a)}}]),e}(Wv);function Ude(r){var i=Gde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Gde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Kde=function(r){se(e,r);var i=Ude(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"square",2,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function qde(r){var i=Yde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Yde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Xde=function(r){se(e,r);var i=qde(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"hexagon",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Qde(r){var i=Jde();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Jde(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Zde=function(r){se(e,r);var i=Qde(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"star",4,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function ece(r){var i=tce();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function tce(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var rce=function(r){se(e,r);var i=ece(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o._setMargins(a),o}return D(e,[{key:"resize",value:function(n,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(n,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(n,a,o,s,l,u){this.resize(n,s,l),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(n,u),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,l),this.disableShadow(n,u),this.updateBoundingBox(a,o,n,s,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(oi);function nce(r){var i=ice();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function ice(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var ace=function(r){se(e,r);var i=nce(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"triangle",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function oce(r){var i=sce();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function sce(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var lce=function(r){se(e,r);var i=oce(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"draw",value:function(n,a,o,s,l,u){return this._drawShape(n,"triangleDown",3,a,o,s,l,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function b$(r,i){var e=Ee(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function $$(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?he(e=b$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):he(t=b$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}var Mt=function(){function r(i,e,t,n,a,o){R(this,r),this.options=nn(a),this.globalOptions=a,this.defaultOptions=o,this.body=e,this.edges=[],this.id=void 0,this.imagelist=t,this.grouplist=n,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 UO(this.body,this.options,!1),this.setOptions(i)}return D(r,[{key:"attachEdge",value:function(e){var t;ne(t=this.edges).call(t,e)===-1&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var t,n=ne(t=this.edges).call(t,e);if(n!=-1){var a;kr(a=this.edges).call(a,n,1)}}},{key:"setOptions",value:function(e){var t=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");r.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=tr(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=tr(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=HO(e.value)),r.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var n=[e,this.options,this.defaultOptions];return this.chooser=jv("node",n),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&r.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),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 t=this.options.opacity;e.borderColor=Ut(e.borderColor,t),e.color=Ut(e.color,t),e.shadowColor=Ut(e.shadowColor,t)}return e}},{key:"updateLabelModule",value:function(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),r.updateGroupOptions(this.options,$$($$({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var t=this.grouplist.get(this.options.group,!1),n=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),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 fde(this.options,this.body,this.labelModule);break;case"circle":this.shape=new mde(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new wde(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Ide(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Cde(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Rde(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Nde(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new m$(this.options,this.body,this.labelModule);break;case"icon":this.shape=new zde(this.options,this.body,this.labelModule);break;case"image":this.shape=new Vde(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Kde(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Xde(this.options,this.body,this.labelModule);break;case"star":this.shape=new Zde(this.options,this.body,this.labelModule);break;case"text":this.shape=new rce(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new ace(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new lce(this.options,this.body,this.labelModule);break;default:this.shape=new m$(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,t){return this.shape.distanceToBorder(e,t)}},{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,t,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,n,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 t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}},{key:"updateBoundingBox",value:function(e){this.shape.updateBoundingBox(this.x,this.y,e)}},{key:"resize",value:function(e){var t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}},{key:"getItemsOnPoint",value:function(e){var t=[];return this.labelModule.visible()&&sf(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),sf(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}},{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,t,n){var a;if(n!==void 0){var o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var l=n.get(o);l.opacity!==void 0&&t.opacity===void 0&&(r.checkOpacity(l.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+l.opacity),l.opacity=void 0));var u=Ot(a=oue(t)).call(a,function(d){return t[d]!=null});u.push("font"),Il(u,e,l),e.color=tf(e.color)}}}},{key:"parseOptions",value:function(e,t){var n=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(Il(s,e,t,n),r.checkMass(t),e.opacity!==void 0&&(r.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(r.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!r.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Vt(e,t,"shadow",a),t.color!==void 0&&t.color!==null){var l=tf(t.color);pO(e.color,l)}else n===!0&&t.color===null&&(e.color=nn(a.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),n===!0&&t.font===null&&(e.font=nn(a.font)),r.updateGroupOptions(e,t,o),t.scaling!==void 0&&Vt(e.scaling,t.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,t){if(e.mass!==void 0&&e.mass<=0){var n="";t!==void 0&&(n=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",bO),e.mass=1}}}]),r}();function uce(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(ue(r)||(e=dce(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function dce(r,i){var e;if(r){if(typeof r=="string")return w$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w$(r,i)}}function w$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var cce=function(){function r(i,e,t,n){var a,o=this;if(R(this,r),this.body=i,this.images=e,this.groups=t,this.layoutEngine=n,this.body.functions.createNode=P(a=this.create).call(a,this),this.nodesListeners={add:function(l,u){o.add(u.items)},update:function(l,u){o.update(u.items,u.data,u.oldData)},remove:function(l,u){o.remove(u.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(l,u,d,c){if(u===l)return .5;var h=1/(u-l);return Math.max(0,(c-l)*h)}},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=nn(this.defaultOptions),this.bindEventListeners()}return D(r,[{key:"bindEventListeners",value:function(){var e,t,n=this;this.body.emitter.on("refreshNodes",P(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",P(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",function(){re(n.nodesListeners,function(a,o){n.body.data.nodes&&n.body.data.nodes.off(o,a)}),delete n.body.functions.createNode,delete n.nodesListeners.add,delete n.nodesListeners.update,delete n.nodesListeners.remove,delete n.nodesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){if(Mt.parseOptions(this.options,e),e.opacity!==void 0&&(of(e.opacity)||!Tn(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var n=0,a=Ee(this.body.nodes);n<a.length;n++){var o=a[n];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 t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.data.nodes;if(U0("id",e))this.body.data.nodes=e;else if(ue(e))this.body.data.nodes=new ml,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new ml;else throw new TypeError("Array or DataSet expected");if(n&&re(this.nodesListeners,function(s,l){n.off(l,s)}),this.body.nodes={},this.body.data.nodes){var a=this;re(this.nodesListeners,function(s,l){a.body.data.nodes.on(l,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,a=[],o=0;o<e.length;o++){n=e[o];var s=this.body.data.nodes.get(n),l=this.create(s);a.push(l),this.body.nodes[n]=l}this.layoutEngine.positionInitially(a),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,t,n){for(var a=this.body.nodes,o=!1,s=0;s<e.length;s++){var l=e[s],u=a[l],d=t[s];u!==void 0?u.setOptions(d)&&(o=!0):(o=!0,u=this.create(d),a[l]=u)}!o&&n!==void 0&&(o=tle(t).call(t,function(c,h){var f=n[h];return f&&f.level!==c.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var t=this.body.nodes,n=0;n<e.length;n++){var a=e[n];delete t[a]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mt;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;re(this.body.nodes,function(n,a){var o=e.body.data.nodes.get(a);o!==void 0&&(t===!0&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(o))})}},{key:"getPositions",value:function(e){var t={};if(e!==void 0){if(ue(e)===!0){for(var n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){var a=this.body.nodes[e[n]];t[e[n]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){var o=this.body.nodes[e];t[e]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var s=0;s<this.body.nodeIndices.length;s++){var l=this.body.nodes[this.body.nodeIndices[s]];t[this.body.nodeIndices[s]]={x:Math.round(l.x),y:Math.round(l.y)}}return t}},{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=[],t=this.body.data.nodes.getDataSet(),n=uce(t.get()),a;try{for(n.s();!(a=n.n()).done;){var o=a.value,s=o.id,l=this.body.nodes[s],u=Math.round(l.x),d=Math.round(l.y);(o.x!==u||o.y!==d)&&e.push({id:s,x:u,y:d})}}catch(c){n.e(c)}finally{n.f()}t.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,t){var n=[];if(this.body.nodes[e]!==void 0)for(var a=this.body.nodes[e],o={},s=0;s<a.edges.length;s++){var l=a.edges[s];t!=="to"&&l.toId==a.id?o[l.fromId]===void 0&&(n.push(l.fromId),o[l.fromId]=!0):t!=="from"&&l.fromId==a.id&&o[l.toId]===void 0&&(n.push(l.toId),o[l.toId]=!0)}return n}},{key:"getConnectedEdges",value:function(e){var t=[];if(this.body.nodes[e]!==void 0)for(var n=this.body.nodes[e],a=0;a<n.edges.length;a++)t.push(n.edges[a].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}},{key:"moveNode",value:function(e,t,n){var a=this;this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(n),gr(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),r}(),_$=Qe,hce=function(r){return r!==void 0&&(_$(r,"value")||_$(r,"writable"))},fce=G,vce=jt,pce=Xe,gce=Ht,yce=hce,mce=da,bce=mu;function YO(r,i){var e=arguments.length<3?r:arguments[2],t,n;if(gce(r)===e)return r[i];if(t=mce.f(r,i),t)return yce(t)?t.value:t.get===void 0?void 0:vce(t.get,e);if(pce(n=bce(r)))return YO(n,i,e)}fce({target:"Reflect",stat:!0},{get:YO});var $ce=ae,wce=$ce.Reflect.get,_ce=wce,Ece=_ce,Sce=Ece,Oce=Sce,Tce=Oce,Ice=Tce,Pce=Ice,E$=z(Pce),kce=BO,Cce=kce,xce=Cce,Ace=xce,Rce=Ace,Dce=z(Rce);function Mce(r,i){for(;!Object.prototype.hasOwnProperty.call(r,i)&&(r=F(r),r!==null););return r}function el(){if(typeof Reflect<"u"&&E$){var r;el=Hv(r=E$).call(r)}else el=function(e,t,n){var a=Mce(e,t);if(a){var o=Dce(a,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}};return el.apply(this,arguments)}var Nce=G,S$=Math.hypot,Fce=Math.abs,Bce=Math.sqrt,Lce=!!S$&&S$(1/0,NaN)!==1/0;Nce({target:"Math",stat:!0,arity:2,forced:Lce},{hypot:function(i,e){for(var t=0,n=0,a=arguments.length,o=0,s,l;n<a;)s=Fce(arguments[n++]),o<s?(l=o/s,t=t*l*l+1,o=s):s>0?(l=s/o,t+=l*l):t+=s;return o===1/0?1/0:o*Bce(t)}});var jce=ae,zce=jce.Math.hypot,Hce=zce,Wce=Hce,Vce=Wce,Uce=z(Vce);function XO(r){var i=Gce();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Gce(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Re=function(){function r(){R(this,r)}return D(r,null,[{key:"transform",value:function(e,t){ue(e)||(e=[e]);for(var n=t.point.x,a=t.point.y,o=t.angle,s=t.length,l=0;l<e.length;++l){var u=e[l],d=u.x*Math.cos(o)-u.y*Math.sin(o),c=u.x*Math.sin(o)+u.y*Math.cos(o);u.x=n+s*d,u.y=a+s*c}}},{key:"drawPath",value:function(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;++n)e.lineTo(t[n].x,t[n].y);e.closePath()}}]),r}(),Kce=function(r){se(e,r);var i=XO(e);function e(){return R(this,e),i.apply(this,arguments)}return D(e,null,[{key:"draw",value:function(n,a){if(a.image){n.save(),n.translate(a.point.x,a.point.y),n.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(n,1,-o/2,0,o,s),n.restore()}return!1}}]),e}(Re),qce=function(r){se(e,r);var i=XO(e);function e(){return R(this,e),i.apply(this,arguments)}return D(e,null,[{key:"draw",value:function(n,a){var o=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Re.transform(o,a),Re.drawPath(n,o),!0}}]),e}(Re),Yce=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Re.transform(n,t),Re.drawPath(e,n),!0}}]),r}(),Xce=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n={x:-.4,y:0};Re.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle-a/2,s=t.angle+a/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),Qce=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n={x:-.3,y:0};Re.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle+a/2,s=t.angle+3*a/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),Jce=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Re.transform(n,t),Re.drawPath(e,n),!0}}]),r}(),Zce=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Re.transform(n,t),Re.drawPath(e,n),!0}}]),r}(),ehe=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n={x:-.4,y:0};return Re.transform(n,t),ov(e,n.x,n.y,t.length*.4),!0}}]),r}(),the=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Re.transform(n,t),Re.drawPath(e,n),!0}}]),r}(),rhe=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Re.transform(n,t),Re.drawPath(e,n),!0}}]),r}(),nhe=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Re.transform(n,t),Re.drawPath(e,n),!0}}]),r}(),ihe=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Re.transform(n,t),Re.drawPath(e,n),!0}}]),r}(),QO=function(){function r(){R(this,r)}return D(r,null,[{key:"draw",value:function(e,t){var n;switch(t.type&&(n=t.type.toLowerCase()),n){case"image":return Kce.draw(e,t);case"circle":return ehe.draw(e,t);case"box":return rhe.draw(e,t);case"crow":return Yce.draw(e,t);case"curve":return Xce.draw(e,t);case"diamond":return nhe.draw(e,t);case"inv_curve":return Qce.draw(e,t);case"triangle":return Jce.draw(e,t);case"inv_triangle":return Zce.draw(e,t);case"bar":return the.draw(e,t);case"vee":return ihe.draw(e,t);case"arrow":default:return qce.draw(e,t)}}}]),r}();function O$(r,i){var e=Ee(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function T$(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?he(e=O$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):he(t=O$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}var JO=function(){function r(i,e,t){R(this,r),this._body=e,this._labelModule=t,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(i),this.fromPoint=this.from,this.toPoint=this.to}return D(r,[{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,t,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}},{key:"_drawLine",value:function(e,t,n,a,o){if(this.from!=this.to)this._line(e,t,n,a,o);else{var s=this._getCircleData(e),l=Oe(s,3),u=l[0],d=l[1],c=l[2];this._circle(e,t,u,d,c)}}},{key:"_drawDashedLine",value:function(e,t,n,a,o){e.lineCap="round";var s=ue(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{var l=this._getCircleData(e),u=Oe(l,3),d=u[0],c=u[1],h=u[2];this._circle(e,t,d,c,h)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)vE(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=Oe(f,3),p=v[0],g=v[1],y=v[2];this._circle(e,t,p,g,y)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}},{key:"findBorderPosition",value:function(e,t,n){return this.from!=this.to?this._findBorderPosition(e,t,n):this._findBorderPositionCircle(e,t,n)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var t,n=tt(t=this._getCircleData(e)).call(t,0,2),a=Oe(n,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 t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var n=WO(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}},{key:"_pointOnCircle",value:function(e,t,n,a){var o=a*2*Math.PI;return{x:e+n*Math.cos(o),y:t-n*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,n){var a=n.x,o=n.y,s=n.low,l=n.high,u=n.direction,d=10,c=this.options.selfReference.size,h=.05,f,v=(s+l)*.5,p=0;this.options.arrowStrikethrough===!0&&(u===-1?p=this.options.endPointOffset.from:u===1&&(p=this.options.endPointOffset.to));var g=0;do{v=(s+l)*.5,f=this._pointOnCircle(a,o,c,v);var y=Math.atan2(e.y-f.y,e.x-f.x),m=e.distanceToBorder(t,y)+p,w=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),b=m-w;if(Math.abs(b)<h)break;b>0?u>0?s=v:l=v:u>0?l=v:s=v,++g}while(s<=l&&g<d);return T$(T$({},f),{},{t:v})}},{key:"getLineWidth",value:function(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!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,t){if(t.inheritsColor!==!1){if(t.inheritsColor==="both"&&this.from.id!==this.to.id){var n=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=Ut(this.from.options.color.border,t.opacity),o=Ut(this.to.options.color.border,t.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),n.addColorStop(0,a),n.addColorStop(1,o),n}return t.inheritsColor==="to"?Ut(this.to.options.color.border,t.opacity):Ut(this.from.options.color.border,t.opacity)}else return Ut(t.color,t.opacity)}},{key:"_circle",value:function(e,t,n,a,o){this.enableShadow(e,t);var s=0,l=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){var u=this.options.selfReference.angle,d=this.options.selfReference.angle+Math.PI,c=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:u,high:d,direction:-1}),h=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:u,high:d,direction:1});s=Math.atan2(c.y-a,c.x-n),l=Math.atan2(h.y-a,h.x-n)}e.beginPath(),e.arc(n,a,o,s,l,!1),e.stroke(),this.disableShadow(e,t)}},{key:"getDistanceToEdge",value:function(e,t,n,a,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,t,n,a,o,s);var l=this._getCircleData(void 0),u=Oe(l,3),d=u[0],c=u[1],h=u[2],f=d-o,v=c-s;return Math.abs(Math.sqrt(f*f+v*v)-h)}},{key:"_getDistanceToLine",value:function(e,t,n,a,o,s){var l=n-e,u=a-t,d=l*l+u*u,c=((o-e)*l+(s-t)*u)/d;c>1?c=1:c<0&&(c=0);var h=e+c*l,f=t+c*u,v=h-o,p=f-s;return Math.sqrt(v*v+p*p)}},{key:"getArrowData",value:function(e,t,n,a,o,s){var l,u,d,c,h,f,v,p=s.width;t==="from"?(d=this.from,c=this.to,h=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):t==="to"?(d=this.to,c=this.from,h=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(d=this.to,c=this.from,h=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var g=15*f+3*p;if(d!=c){var y=Uce(d.x-c.x,d.y-c.y),m=g/y;if(t!=="middle")if(this.options.smooth.enabled===!0){var w=this._findBorderPosition(d,e,{via:n}),b=this.getPoint(w.t+m*(t==="from"?1:-1),n);l=Math.atan2(w.y-b.y,w.x-b.x),u=w}else l=Math.atan2(d.y-c.y,d.x-c.x),u=this._findBorderPosition(d,e);else{var E=(h?-m:m)/2,O=this.getPoint(.5+E,n),S=this.getPoint(.5-E,n);l=Math.atan2(O.y-S.y,O.x-S.x),u=this.getPoint(.5,n)}}else{var T=this._getCircleData(e),C=Oe(T,3),N=C[0],L=C[1],Q=C[2];if(t==="from"){var W=this.options.selfReference.angle,Z=this.options.selfReference.angle+Math.PI,Me=this._findBorderPositionCircle(this.from,e,{x:N,y:L,low:W,high:Z,direction:-1});l=Me.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=Me}else if(t==="to"){var fe=this.options.selfReference.angle,At=this.options.selfReference.angle+Math.PI,dt=this._findBorderPositionCircle(this.from,e,{x:N,y:L,low:fe,high:At,direction:1});l=dt.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=dt}else{var nt=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(N,L,Q,nt),l=nt*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var Rt=u.x-g*.9*Math.cos(l),it=u.y-g*.9*Math.sin(l),ye={x:Rt,y:it};return{point:u,core:ye,angle:l,length:g,type:v}}},{key:"drawArrowHead",value:function(e,t,n,a,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width;var s=QO.draw(e,o);s&&(this.enableShadow(e,t),qo(e).call(e),this.disableShadow(e,t))}},{key:"enableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(t.background!==!1){var n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(t!==!1)if(e.setLineDash!==void 0){var n=ue(t)?t:[5,5];e.setLineDash(n)}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.")}}]),r}();function I$(r,i){var e=Ee(r);if(sn){var t=sn(r);i&&(t=Ot(t).call(t,function(n){return pn(r,n).enumerable})),e.push.apply(e,t)}return e}function P$(r){for(var i=1;i<arguments.length;i++){var e,t,n=arguments[i]!=null?arguments[i]:{};i%2?he(e=I$(Object(n),!0)).call(e,function(a){Mu(r,a,n[a])}):ln?Ru(r,ln(n)):he(t=I$(Object(n))).call(t,function(a){Du(r,a,pn(n,a))})}return r}function ahe(r){var i=ohe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function ohe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Vv=function(r){se(e,r);var i=ahe(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"_findBorderPositionBezier",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,l=.2,u=!1,d=1,c=0,h=this.to,f,v,p=this.options.endPointOffset?this.options.endPointOffset.to:0;n.id===this.from.id&&(h=this.from,u=!0,p=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(p=0);var g=0;do{v=(c+d)*.5,f=this.getPoint(v,o);var y=Math.atan2(h.y-f.y,h.x-f.x),m=h.distanceToBorder(a,y)+p,w=Math.sqrt(Math.pow(f.x-h.x,2)+Math.pow(f.y-h.y,2)),b=m-w;if(Math.abs(b)<l)break;b<0?u===!1?c=v:d=v:u===!1?d=v:c=v,++g}while(c<=d&&g<s);return P$(P$({},f),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(n,a,o,s,l,u,d){var c=1e9,h,f,v,p,g,y=n,m=a;for(f=1;f<10;f++)v=.1*f,p=Math.pow(1-v,2)*n+2*v*(1-v)*d.x+Math.pow(v,2)*o,g=Math.pow(1-v,2)*a+2*v*(1-v)*d.y+Math.pow(v,2)*s,f>0&&(h=this._getDistanceToLine(y,m,p,g,l,u),c=h<c?h:c),y=p,m=g;return c}},{key:"_bezierCurve",value:function(n,a,o,s){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),o!=null&&o.x!=null?s!=null&&s.x!=null?n.bezierCurveTo(o.x,o.y,s.x,s.y,this.toPoint.x,this.toPoint.y):n.quadraticCurveTo(o.x,o.y,this.toPoint.x,this.toPoint.y):n.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(n,a),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(JO);function she(r){var i=lhe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function lhe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var k$=function(r){se(e,r);var i=she(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return D(e,[{key:"setOptions",value:function(n){el(F(e.prototype),"setOptions",this).call(this,n);var a=!1;this.options.physics!==n.physics&&(a=!0),this.options=n,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 n="edgeId:"+this.id,a=this._body.functions.createNode({id:n,shape:"circle",physics:!0,hidden:!0});this._body.nodes[n]=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(n,a,o){this._bezierCurve(n,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=Oe(o,3),l=s[0],u=s[1],d=s[2],c=2*Math.PI*(1-n);return{x:l+d*Math.sin(c),y:u+d-d*(1-Math.cos(c))}}else return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*a.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*a.y+Math.pow(n,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a,this.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){return this._getDistanceToBezierEdge(n,a,o,s,l,u,this.via)}}]),e}(Vv);function uhe(r){var i=dhe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function dhe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var C$=function(r){se(e,r);var i=uhe(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"_line",value:function(n,a,o){this._bezierCurve(n,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var n=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 l,u;o<=s?l=u=n*s:l=u=n*o,this.from.x>this.to.x&&(l=-l),this.from.y>=this.to.y&&(u=-u);var d=this.from.x+l,c=this.from.y+u;return a==="discrete"&&(o<=s?d=o<n*s?this.from.x:d:c=s<n*o?this.from.y:c),{x:d,y:c}}else if(a==="straightCross"){var h=(1-n)*o,f=(1-n)*s;return o<=s?(h=0,this.from.y<this.to.y&&(f=-f)):(this.from.x<this.to.x&&(h=-h),f=0),{x:this.to.x+h,y:this.to.y+f}}else if(a==="horizontal"){var v=(1-n)*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-n)*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 g=Math.sqrt(o*o+s*s),y=Math.PI,m=Math.atan2(s,o),w=(m+(n*.5+.5)*y)%(2*y);return{x:this.from.x+(n*.5+.5)*g*Math.sin(w),y:this.from.y+(n*.5+.5)*g*Math.cos(w)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var b=Math.sqrt(o*o+s*s),E=Math.PI,O=Math.atan2(s,o),S=(O+(-n*.5+.5)*E)%(2*E);return{x:this.from.x+(n*.5+.5)*b*Math.sin(S),y:this.from.y+(n*.5+.5)*b*Math.cos(S)}}else{var T,C;o<=s?T=C=n*s:T=C=n*o,this.from.x>this.to.x&&(T=-T),this.from.y>=this.to.y&&(C=-C);var N=this.from.x+T,L=this.from.y+C;return o<=s?this.from.x<=this.to.x?N=this.to.x<N?this.to.x:N:N=this.to.x>N?this.to.x:N:this.from.y>=this.to.y?L=this.to.y>L?this.to.y:L:L=this.to.y<L?this.to.y:L,{x:N,y:L}}}},{key:"_findBorderPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(n,a,o.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(n,a,o,s,l,u,d)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=n,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,l=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:l}}}]),e}(Vv);function che(r){var i=hhe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function hhe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var fhe=function(r){se(e,r);var i=che(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"_getDistanceToBezierEdge2",value:function(n,a,o,s,l,u,d,c){for(var h=1e9,f=n,v=a,p=[0,0,0,0],g=1;g<10;g++){var y=.1*g;p[0]=Math.pow(1-y,3),p[1]=3*y*Math.pow(1-y,2),p[2]=3*Math.pow(y,2)*(1-y),p[3]=Math.pow(y,3);var m=p[0]*n+p[1]*d.x+p[2]*c.x+p[3]*o,w=p[0]*a+p[1]*d.y+p[2]*c.y+p[3]*s;if(g>0){var b=this._getDistanceToLine(f,v,m,w,l,u);h=b<h?b:h}f=m,v=w}return h}}]),e}(Vv);function vhe(r){var i=phe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function phe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var x$=function(r){se(e,r);var i=vhe(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"_line",value:function(n,a,o){var s=o[0],l=o[1];this._bezierCurve(n,a,s,l)}},{key:"_getViaCoordinates",value:function(){var n=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,l,u,d=this.options.smooth.roundness;return(Math.abs(n)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,u=this.to.y,o=this.from.x-d*n,l=this.to.x+d*n):(s=this.from.y-d*a,u=this.to.y+d*a,o=this.from.x,l=this.to.x),[{x:o,y:s},{x:l,y:u}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){var d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),c=Oe(d,2),h=c[0],f=c[1];return this._getDistanceToBezierEdge2(n,a,o,s,l,u,h,f)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=Oe(a,2),s=o[0],l=o[1],u=n,d=[Math.pow(1-u,3),3*u*Math.pow(1-u,2),3*Math.pow(u,2)*(1-u),Math.pow(u,3)],c=d[0]*this.fromPoint.x+d[1]*s.x+d[2]*l.x+d[3]*this.toPoint.x,h=d[0]*this.fromPoint.y+d[1]*s.y+d[2]*l.y+d[3]*this.toPoint.y;return{x:c,y:h}}}]),e}(fhe);function ghe(r){var i=yhe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function yhe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var A$=function(r){se(e,r);var i=ghe(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"_line",value:function(n,a){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),n.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(n){return{x:(1-n)*this.fromPoint.x+n*this.toPoint.x,y:(1-n)*this.fromPoint.y+n*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){var o=this.to,s=this.from;n.id===this.from.id&&(o=this.from,s=this.to);var l=Math.atan2(o.y-s.y,o.x-s.x),u=o.x-s.x,d=o.y-s.y,c=Math.sqrt(u*u+d*d),h=n.distanceToBorder(a,l),f=(c-h)/c;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(n,a,o,s,l,u){return this._getDistanceToLine(n,a,o,s,l,u)}}]),e}(JO),Di=function(){function r(i,e,t,n,a){if(R(this,r),e===void 0)throw new Error("No body provided");this.options=nn(n),this.globalOptions=n,this.defaultOptions=a,this.body=e,this.imagelist=t,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 UO(this.body,this.options,!0),this.setOptions(i)}return D(r,[{key:"setOptions",value:function(e){if(e){var t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;r.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=HO(e.value));var n=[e,this.options,this.defaultOptions];return this.chooser=jv("edge",n),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=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:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color: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 l=this.options.hoverWidth;typeof l=="function"?o.width=l(o.width):typeof l=="number"&&(o.width+=l),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 t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,t=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof k$&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof x$&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof C$&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof A$&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new k$(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new x$(this.options,this.body,this.labelModule):this.edgeType=new C$(this.options,this.body,this.labelModule):this.edgeType=new A$(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{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,t,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,n,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 t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,n),this.drawLabel(e,n)}}},{key:"drawArrows",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),t.fromArrowSrc&&(a.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(a.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(a.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),t.toArrowSrc&&(a.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(a.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(a.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,t),t.middleArrowSrc&&(a.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(a.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(a.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,t){if(this.options.label!==void 0){var n=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(n.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),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 l=WO(e,this.options.selfReference.angle,this.options.selfReference.size,n);o=this._pointOnCircle(l.x,l.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 t=[];if(this.labelModule.visible()){var n=this._getRotation();sf(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,n=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,l=e.left,u=e.top,d=this.edgeType.getDistanceToEdge(n,a,o,s,l,u);return d<t}else return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);var a={x:n.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,l=Math.atan2(o,s);return(l<-1&&s<0||l>0&&s<0)&&(l+=Math.PI),a.angle=l,a}},{key:"_pointOnCircle",value:function(e,t,n,a){return{x:e+n*Math.cos(a),y:t-n*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,t){var n=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(_a(s,e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(Tn(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(Tn(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Cl(t.label)?e.label=t.label:Cl(e.label)||(e.label=void 0),Vt(e,t,"smooth",a),Vt(e,t,"shadow",a),Vt(e,t,"background",a),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=Dn(a.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),Vt(e.scaling,t.scaling,"label",a.scaling)):n===!0&&t.scaling===null&&(e.scaling=Dn(a.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){var l=t.arrows.toLowerCase();e.arrows.to.enabled=ne(l).call(l,"to")!=-1,e.arrows.middle.enabled=ne(l).call(l,"middle")!=-1,e.arrows.from.enabled=ne(l).call(l,"from")!=-1}else if(ce(t.arrows)==="object")Vt(e.arrows,t.arrows,"to",a.arrows),Vt(e.arrows,t.arrows,"middle",a.arrows),Vt(e.arrows,t.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(t.arrows));else n===!0&&t.arrows===null&&(e.arrows=Dn(a.arrows));if(t.color!==void 0&&t.color!==null){var u=Ai(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,d=e.color;if(o)pe(d,a.color,!1,n);else for(var c in d)Object.prototype.hasOwnProperty.call(d,c)&&delete d[c];if(Ai(d))d.color=d,d.highlight=d,d.hover=d,d.inherit=!1,u.opacity===void 0&&(d.opacity=1);else{var h=!1;u.color!==void 0&&(d.color=u.color,h=!0),u.highlight!==void 0&&(d.highlight=u.highlight,h=!0),u.hover!==void 0&&(d.hover=u.hover,h=!0),u.inherit!==void 0&&(d.inherit=u.inherit),u.opacity!==void 0&&(d.opacity=Math.min(1,Math.max(0,u.opacity))),h===!0?d.inherit=!1:d.inherit===void 0&&(d.inherit="from")}}else n===!0&&t.color===null&&(e.color=nn(a.color));n===!0&&t.font===null&&(e.font=nn(a.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}}]),r}(),mhe=function(){function r(i,e,t){var n,a=this;R(this,r),this.body=i,this.images=e,this.groups=t,this.body.functions.createEdge=P(n=this.create).call(n,this),this.edgesListeners={add:function(s,l){a.add(l.items)},update:function(s,l){a.update(l.items)},remove:function(s,l){a.remove(l.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,l,u,d){if(l===s)return .5;var c=1/(l-s);return Math.max(0,(d-s)*c)}},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},pe(this.options,this.defaultOptions),this.bindEventListeners()}return D(r,[{key:"bindEventListeners",value:function(){var e=this,t,n;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 l in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,l)){var u=e.body.edges[l],d=e.body.data.edges.get(l);if(d!=null){var c=d.smooth;c!==void 0&&c.enabled===!0&&c.type==="dynamic"&&(a===void 0?u.setOptions({smooth:!1}):u.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",P(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",P(n=this.refresh).call(n,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){Di.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(e.smooth!==void 0)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(t=this.body.edges[n].updateEdgeType()||t);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||t===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(U0("id",e))this.body.data.edges=e;else if(ue(e))this.body.data.edges=new ml,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new ml;else throw new TypeError("Array or DataSet expected");if(a&&re(this.edgesListeners,function(s,l){a.off(l,s)}),this.body.edges={},this.body.data.edges){re(this.edgesListeners,function(s,l){t.body.data.edges.on(l,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),n===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.edges,a=this.body.data.edges,o=0;o<e.length;o++){var s=e[o],l=n[s];l&&l.disconnect();var u=a.get(s,{showInternalIds:!0});n[s]=this.create(u)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var t=this.body.edges,n=this.body.data.edges,a=!1,o=0;o<e.length;o++){var s=e[o],l=n.get(s),u=t[s];u!==void 0?(u.disconnect(),a=u.setOptions(l)||a,u.connect()):(this.body.edges[s]=this.create(l),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 t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var n=this.body.edges;re(e,function(a){var o=n[a];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;re(this.body.edges,function(t,n){var a=e.body.data.edges.get(n);a!==void 0&&t.setOptions(a)})}},{key:"create",value:function(e){return new Di(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,n=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var a=n[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(this.body.edges[e]!==void 0){var n=this.body.edges[e];n.fromId!==void 0&&t.push(n.fromId),n.toId!==void 0&&t.push(n.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,t=[];re(this.body.edges,function(n,a){var o=e.body.nodes[n.toId],s=e.body.nodes[n.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&t.push(a)}),this.remove(t,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var t=this.body.edges,n=[];he(e).call(e,function(a,o){var s=t[o];s===void 0&&n.push(o)}),this.add(n,!0)}}}]),r}(),ZO=function(){function r(i,e,t){R(this,r),this.body=i,this.physicsBody=e,this.barnesHutTree,this.setOptions(t),this._rng=xu("BARNES HUT SOLVER")}return D(r,[{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,t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,a=n.length,o=this._formBarnesHutTree(t,n);this.barnesHutTree=o;for(var s=0;s<a;s++)e=t[n[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var n=e.centerOfMass.x-t.x,a=e.centerOfMass.y-t.y,o=Math.sqrt(n*n+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,n,a,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,n,a,t,e)}}},{key:"_calculateForces",value:function(e,t,n,a,o){e===0&&(e=.1,t=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),l=t*s,u=n*s;this.physicsBody.forces[a.id].x+=l,this.physicsBody.forces[a.id].y+=u}},{key:"_formBarnesHutTree",value:function(e,t){for(var n,a=t.length,o=e[t[0]].x,s=e[t[0]].y,l=e[t[0]].x,u=e[t[0]].y,d=1;d<a;d++){var c=e[t[d]],h=c.x,f=c.y;c.options.mass>0&&(h<o&&(o=h),h>l&&(l=h),f<s&&(s=f),f>u&&(u=f))}var v=Math.abs(l-o)-Math.abs(u-s);v>0?(s-=.5*v,u+=.5*v):(o+=.5*v,l-=.5*v);var p=1e-5,g=Math.max(p,Math.abs(l-o)),y=.5*g,m=.5*(o+l),w=.5*(s+u),b={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-y,maxX:m+y,minY:w-y,maxY:w+y},size:g,calcSize:1/g,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(b.root);for(var E=0;E<a;E++)n=e[t[E]],n.options.mass>0&&this._placeInTree(b.root,n);return b}},{key:"_updateBranchMass",value:function(e,t){var n=e.centerOfMass,a=e.mass+t.options.mass,o=1/a;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=o,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=o,e.mass=a;var s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}},{key:"_placeInTree",value:function(e,t,n){(n!=!0||n===void 0)&&this._updateBranchMass(e,t);var a=e.children.NW.range,o;a.maxX>t.x?a.maxY>t.y?o="NW":o="SW":a.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}},{key:"_placeInRegion",value:function(e,t,n){var a=e.children[n];switch(a.childrenCount){case 0:a.children.data=t,a.childrenCount=1,this._updateBranchMass(a,t);break;case 1:a.children.data.x===t.x&&a.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,t));break;case 4:this._placeInTree(a,t);break}}},{key:"_splitBranch",value:function(e){var t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var n,a,o,s,l=.5*e.size;switch(t){case"NW":n=e.range.minX,a=e.range.minX+l,o=e.range.minY,s=e.range.minY+l;break;case"NE":n=e.range.minX+l,a=e.range.maxX,o=e.range.minY,s=e.range.minY+l;break;case"SW":n=e.range.minX,a=e.range.minX+l,o=e.range.minY+l,s=e.range.maxY;break;case"SE":n=e.range.minX+l,a=e.range.maxX,o=e.range.minY+l,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,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,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),r}(),bhe=function(){function r(i,e,t){R(this,r),this._rng=xu("REPULSION SOLVER"),this.body=i,this.physicsBody=e,this.setOptions(t)}return D(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o,s,l,u,d=this.body.nodes,c=this.physicsBody.physicsNodeIndices,h=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,p=4/3,g=0;g<c.length-1;g++){l=d[c[g]];for(var y=g+1;y<c.length;y++)u=d[c[y]],e=u.x-l.x,t=u.y-l.y,n=Math.sqrt(e*e+t*t),n===0&&(n=.1*this._rng(),e=n),n<2*f&&(n<.5*f?s=1:s=v*n+p,s=s/n,a=e*s,o=t*s,h[l.id].x-=a,h[l.id].y-=o,h[u.id].x+=a,h[u.id].y+=o)}}}]),r}(),$he=function(){function r(i,e,t){R(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return D(r,[{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,t=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,a=this.options.nodeDistance,o=0;o<t.length-1;o++)for(var s=e[t[o]],l=o+1;l<t.length;l++){var u=e[t[l]];if(s.level===u.level){var d=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(u.shape.radius||0)/2),c=u.x-s.x,h=u.y-s.y,f=Math.sqrt(c*c+h*h),v=.05,p=void 0;f<d?p=-Math.pow(v*f,2)+Math.pow(v*d,2):p=0,f!==0&&(p=p/f);var g=c*p,y=h*p;n[s.id].x-=g,n[s.id].y-=y,n[u.id].x+=g,n[u.id].y+=y}}}}]),r}(),Wc=function(){function r(i,e,t){R(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return D(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n=this.physicsBody.physicsEdgeIndices,a=this.body.edges,o,s,l,u=0;u<n.length;u++)t=a[n[u]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via!==void 0?(e=t.options.length===void 0?this.options.springLength:t.options.length,o=t.to,s=t.edgeType.via,l=t.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,l,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}},{key:"_calculateSpringForce",value:function(e,t,n){var a=e.x-t.x,o=e.y-t.y,s=Math.max(Math.sqrt(a*a+o*o),.01),l=this.options.springConstant*(n-s)/s,u=a*l,d=o*l;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=u,this.physicsBody.forces[e.id].y+=d),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=u,this.physicsBody.forces[t.id].y-=d)}}]),r}(),whe=function(){function r(i,e,t){R(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return D(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o,s,l,u,d=this.body.edges,c=.5,h=this.physicsBody.physicsEdgeIndices,f=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces,p=0;p<f.length;p++){var g=f[p];v[g].springFx=0,v[g].springFy=0}for(var y=0;y<h.length;y++)t=d[h[y]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,n=t.from.x-t.to.x,a=t.from.y-t.to.y,u=Math.sqrt(n*n+a*a),u=u===0?.01:u,l=this.options.springConstant*(e-u)/u,o=n*l,s=a*l,t.to.level!=t.from.level?(v[t.toId]!==void 0&&(v[t.toId].springFx-=o,v[t.toId].springFy-=s),v[t.fromId]!==void 0&&(v[t.fromId].springFx+=o,v[t.fromId].springFy+=s)):(v[t.toId]!==void 0&&(v[t.toId].x-=c*o,v[t.toId].y-=c*s),v[t.fromId]!==void 0&&(v[t.fromId].x+=c*o,v[t.fromId].y+=c*s)));l=1;for(var m,w,b=0;b<f.length;b++){var E=f[b];m=Math.min(l,Math.max(-l,v[E].springFx)),w=Math.min(l,Math.max(-l,v[E].springFy)),v[E].x+=m,v[E].y+=w}for(var O=0,S=0,T=0;T<f.length;T++){var C=f[T];O+=v[C].x,S+=v[C].y}for(var N=O/f.length,L=S/f.length,Q=0;Q<f.length;Q++){var W=f[Q];v[W].x-=N,v[W].y-=L}}}]),r}(),tl=function(){function r(i,e,t){R(this,r),this.body=i,this.physicsBody=e,this.setOptions(t)}return D(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,u=0;u<s.length;u++){var d=s[u];a=o[d],e=-a.x,t=-a.y,n=Math.sqrt(e*e+t*t),this._calculateForces(n,e,t,l,a)}}},{key:"_calculateForces",value:function(e,t,n,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=t*s,a[o.id].y=n*s}}]),r}();function _he(r){var i=Ehe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Ehe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var She=function(r){se(e,r);var i=_he(e);function e(t,n,a){var o;return R(this,e),o=i.call(this,t,n,a),o._rng=xu("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return D(e,[{key:"_calculateForces",value:function(n,a,o,s,l){n===0&&(n=.1*this._rng(),a=n),this.overlapAvoidanceFactor<1&&s.shape.radius&&(n=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,n-s.shape.radius));var u=s.edges.length+1,d=this.options.gravitationalConstant*l.mass*s.options.mass*u/Math.pow(n,2),c=a*d,h=o*d;this.physicsBody.forces[s.id].x+=c,this.physicsBody.forces[s.id].y+=h}}]),e}(ZO);function Ohe(r){var i=The();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function The(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Ihe=function(r){se(e,r);var i=Ohe(e);function e(t,n,a){return R(this,e),i.call(this,t,n,a)}return D(e,[{key:"_calculateForces",value:function(n,a,o,s,l){if(n>0){var u=l.edges.length+1,d=this.options.centralGravity*u*l.options.mass;s[l.id].x=a*d,s[l.id].y=o*d}}}]),e}(tl),Phe=function(){function r(i){R(this,r),this.body=i,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}},Be(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return D(r,[{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,Il(["stabilization"],this.options,e),Vt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!="number"||of(t.x))&&(t.x=0),(typeof t.y!="number"||of(t.y))&&(t.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 She(this.body,this.physicsBody,e),this.edgesSolver=new Wc(this.body,this.physicsBody,e),this.gravitySolver=new Ihe(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new bhe(this.body,this.physicsBody,e),this.edgesSolver=new Wc(this.body,this.physicsBody,e),this.gravitySolver=new tl(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new $he(this.body,this.physicsBody,e),this.edgesSolver=new whe(this.body,this.physicsBody,e),this.gravitySolver=new tl(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new ZO(this.body,this.physicsBody,e),this.edgesSolver=new Wc(this.body,this.physicsBody,e),this.gravitySolver=new tl(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=P(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=El();this.physicsTick();var t=El()-e;(t<.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,t=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:t}),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,t=this.body.edges;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[n].id);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&t[a].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[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 l in this.physicsBody.velocities)e[l]===void 0&&delete this.physicsBody.velocities[l]}},{key:"revert",value:function(){var e=Ee(this.previousStates),t=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(var a=0;a<e.length;a++){var o=e[a];t[o]!==void 0?t[o].options.physics===!0&&(this.referenceState[o]={positions:{x:t[o].x,y:t[o].y}},n[o].x=this.previousStates[o].vx,n[o].y=this.previousStates[o].vy,t[o].x=this.previousStates[o].x,t[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var e,t,n,a=this.body.nodes,o=this.referenceState,s=.3;for(var l in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,l)&&a[l]!==void 0&&(e=a[l].x-o[l].positions.x,t=a[l].y-o[l].positions.y,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),n>s))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,n=0,a=5,o=0;o<e.length;o++){var s=e[o],l=this._performStep(s);t=Math.max(t,l),n+=l}this.adaptiveTimestepEnabled=n/e.length<a,this.stabilized=t<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,t,n){var a=this.modelOptions.damping*e,o=(t-a)/n;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 t=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:t.x,y:t.y,vx:a.x,vy:a.y},t.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,n.x,t.options.mass),t.x+=a.x*this.timestep):(n.x=0,a.x=0),t.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,n.y,t.options.mass),t.y+=a.y*this.timestep):(n.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 t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){var n=e[t].options.fixed;this.freezeCache[t]={x:n.x,y:n.y},n.x=!0,n.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof t!="number"&&(t=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),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=t,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,t=function(){return e.stabilized===!1&&e.stabilizationIterations<e.targetIterations},n=function(){e.body.emitter.emit("stabilizationProgress",{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&n();for(var a=0;t()&&a<this.options.stabilization.updateInterval;)this.physicsTick(),a++;if(n(),t()){var o;gr(P(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 t=0;t<this.physicsBody.physicsNodeIndices.length;t++){var n=this.physicsBody.physicsNodeIndices[t],a=this.body.nodes[n],o=this.physicsBody.forces[n],s=20,l=.03,u=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),d=Math.min(Math.max(5,u),15),c=3*d,h=rf((180-Math.min(1,Math.max(0,l*u))*180)/360,1,1),f={x:a.x+s*o.x,y:a.y+s*o.y};e.lineWidth=d,e.strokeStyle=h,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=h,QO.draw(e,{type:"arrow",point:f,angle:v,length:c}),qo(e).call(e)}}}]),r}();let Ds;const khe=new Uint8Array(16);function Che(){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(khe)}const et=[];for(let r=0;r<256;++r)et.push((r+256).toString(16).slice(1));function xhe(r,i=0){return et[r[i+0]]+et[r[i+1]]+et[r[i+2]]+et[r[i+3]]+"-"+et[r[i+4]]+et[r[i+5]]+"-"+et[r[i+6]]+et[r[i+7]]+"-"+et[r[i+8]]+et[r[i+9]]+"-"+et[r[i+10]]+et[r[i+11]]+et[r[i+12]]+et[r[i+13]]+et[r[i+14]]+et[r[i+15]]}const Ahe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var R$={randomUUID:Ahe};function Ha(r,i,e){if(R$.randomUUID&&!i&&!r)return R$.randomUUID();r=r||{};const t=r.random||(r.rng||Che)();return t[6]=t[6]&15|64,t[8]=t[8]&63|128,xhe(t)}var vt=function(){function r(){R(this,r)}return D(r,null,[{key:"getRange",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,l;if(t.length>0)for(var u=0;u<t.length;u++)l=e[t[u]],o>l.shape.boundingBox.left&&(o=l.shape.boundingBox.left),s<l.shape.boundingBox.right&&(s=l.shape.boundingBox.right),n>l.shape.boundingBox.top&&(n=l.shape.boundingBox.top),a<l.shape.boundingBox.bottom&&(a=l.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,maxY:a}}},{key:"getRangeCore",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,l;if(t.length>0)for(var u=0;u<t.length;u++)l=e[t[u]],o>l.x&&(o=l.x),s<l.x&&(s=l.x),n>l.y&&(n=l.y),a<l.y&&(a=l.y);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,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,t){var n={};return t===void 0||t==="node"?(pe(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):pe(n,e.options,!0),n}}]),r}();function Rhe(r){var i=Dhe();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Dhe(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var Mhe=function(r){se(e,r);var i=Rhe(e);function e(t,n,a,o,s,l){var u;return R(this,e),u=i.call(this,t,n,a,o,s,l),u.isCluster=!0,u.containedNodes={},u.containedEdges={},u}return D(e,[{key:"_openChildCluster",value:function(n){var a=this,o=this.body.nodes[n];if(this.containedNodes[n]===void 0)throw new Error("node with id: "+n+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+n+" is not a cluster");delete this.containedNodes[n],re(o.edges,function(s){delete a.containedEdges[s.id]}),re(o.containedNodes,function(s,l){a.containedNodes[l]=s}),o.containedNodes={},re(o.containedEdges,function(s,l){a.containedEdges[l]=s}),o.containedEdges={},re(o.edges,function(s){re(a.edges,function(l){var u,d,c=ne(u=l.clusteringEdgeReplacingIds).call(u,s.id);c!==-1&&(re(s.clusteringEdgeReplacingIds,function(h){l.clusteringEdgeReplacingIds.push(h),a.body.edges[h].edgeReplacedById=l.id}),kr(d=l.clusteringEdgeReplacingIds).call(d,c,1))})}),o.edges=[]}}]),e}(Mt),Nhe=function(){function r(i){var e=this;R(this,r),this.body=i,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Be(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return D(r,[{key:"clusterByHubsize",value:function(e,t){e===void 0?e=this._getHubSize():ce(e)==="object"&&(t=this._checkOptions(e),e=this._getHubSize());for(var n=[],a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];o.edges.length>=e&&n.push(o.id)}for(var s=0;s<n.length;s++)this.clusterByConnection(n[s],t,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);var a={},o={};re(this.body.nodes,function(s,l){s.options&&t.joinCondition(s.options)===!0&&(a[l]=s,re(s.edges,function(u){e.clusteredEdges[u.id]===void 0&&(o[u.id]=u)}))}),this._cluster(a,o,t,n)}},{key:"clusterByEdgeCount",value:function(e,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);for(var o=[],s={},l,u,d,c=function(){var p={},g={},y=n.body.nodeIndices[h],m=n.body.nodes[y];if(s[y]===void 0){d=0,u=[];for(var w=0;w<m.edges.length;w++)l=m.edges[w],n.clusteredEdges[l.id]===void 0&&(l.toId!==l.fromId&&d++,u.push(l));if(d===e){for(var b=function(W){if(t.joinCondition===void 0||t.joinCondition===null)return!0;var Z=vt.cloneOptions(W);return t.joinCondition(Z)},E=!0,O=0;O<u.length;O++){l=u[O];var S=n._getConnectedId(l,y);if(b(m))g[l.id]=l,p[y]=m,p[S]=n.body.nodes[S],s[y]=!0;else{E=!1;break}}if(Ee(p).length>0&&Ee(g).length>0&&E===!0){var T=function(){for(var W=0;W<o.length;++W)for(var Z in p)if(o[W].nodes[Z]!==void 0)return o[W]},C=T();if(C!==void 0){for(var N in p)C.nodes[N]===void 0&&(C.nodes[N]=p[N]);for(var L in g)C.edges[L]===void 0&&(C.edges[L]=g[L])}else o.push({nodes:p,edges:g})}}}},h=0;h<this.body.nodeIndices.length;h++)c();for(var f=0;f<o.length;f++)this._cluster(o[f].nodes,o[f].edges,t,!1);a===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}},{key:"clusterBridges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}},{key:"clusterByConnection",value:function(e,t){var n,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];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},l={},u=o.id,d=vt.cloneOptions(o);s[u]=o;for(var c=0;c<o.edges.length;c++){var h=o.edges[c];if(this.clusteredEdges[h.id]===void 0){var f=this._getConnectedId(h,u);if(this.clusteredNodes[f]===void 0)if(f!==u)if(t.joinCondition===void 0)l[h.id]=h,s[f]=this.body.nodes[f];else{var v=vt.cloneOptions(this.body.nodes[f]);t.joinCondition(d,v)===!0&&(l[h.id]=h,s[f]=this.body.nodes[f])}else l[h.id]=h}}var p=Vi(n=Ee(s)).call(n,function(b){return s[b].id});for(var g in s)if(Object.prototype.hasOwnProperty.call(s,g))for(var y=s[g],m=0;m<y.edges.length;m++){var w=y.edges[m];ne(p).call(p,this._getConnectedId(w,y.id))>-1&&(l[w.id]=w)}this._cluster(s,l,t,a)}},{key:"_createClusterEdges",value:function(e,t,n,a){for(var o,s,l,u,d,c,h=Ee(e),f=[],v=0;v<h.length;v++){s=h[v],l=e[s];for(var p=0;p<l.edges.length;p++)o=l.edges[p],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?t[o.id]=o:o.toId==s?(u=n.id,d=o.fromId,c=d):(u=o.toId,d=n.id,c=u),e[c]===void 0&&f.push({edge:o,fromId:d,toId:u}))}for(var g=[],y=function(S){for(var T=0;T<g.length;T++){var C=g[T],N=S.fromId===C.fromId&&S.toId===C.toId,L=S.fromId===C.toId&&S.toId===C.fromId;if(N||L)return C}return null},m=0;m<f.length;m++){var w=f[m],b=w.edge,E=y(w);E===null?(E=this._createClusteredEdge(w.fromId,w.toId,b,a),g.push(E)):E.clusteringEdgeReplacingIds.push(b.id),this.body.edges[b.id].edgeReplacedById=E.id,this._backupEdgeOptions(b),b.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,t,n){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 l=0;l<o.length;++l)delete e[o[l]];if(Ee(e).length!=0&&!(Ee(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=!0)){var u=pe({},n.clusterNodeProperties);if(n.processProperties!==void 0){var d=[];for(var c in e)if(Object.prototype.hasOwnProperty.call(e,c)){var h=vt.cloneOptions(e[c]);d.push(h)}var f=[];for(var v in t)if(Object.prototype.hasOwnProperty.call(t,v)&&v.substr(0,12)!=="clusterEdge:"){var p=vt.cloneOptions(t[v],"edge");f.push(p)}if(u=n.processProperties(u,d,f),!u)throw new Error("The processProperties function does not return properties!")}u.id===void 0&&(u.id="cluster:"+Ha());var g=u.id;u.label===void 0&&(u.label="cluster");var y=void 0;u.x===void 0&&(y=this._getClusterPosition(e),u.x=y.x),u.y===void 0&&(y===void 0&&(y=this._getClusterPosition(e)),u.y=y.y),u.id=g;var m=this.body.functions.createNode(u,Mhe);m.containedNodes=e,m.containedEdges=t,m.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[u.id]=m,this._clusterEdges(e,t,u,n.clusterEdgeProperties),u.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 t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.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 t=Ee(e),n=e[t[0]].x,a=e[t[0]].x,o=e[t[0]].y,s=e[t[0]].y,l,u=1;u<t.length;u++)l=e[t[u]],n=l.x<n?l.x:n,a=l.x>a?l.x:a,o=l.y<o?l.y:o,s=l.y>s?l.y:s;return{x:.5*(n+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,t){var n=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=ne(o).call(o,e)-1;if(s>=0){var l=o[s],u=this.body.nodes[l];u._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged");return}var d=a.containedNodes,c=a.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){var h={},f={x:a.x,y:a.y};for(var v in d)if(Object.prototype.hasOwnProperty.call(d,v)){var p=this.body.nodes[v];h[v]={x:p.x,y:p.y}}var g=t.releaseFunction(f,h);for(var y in d)if(Object.prototype.hasOwnProperty.call(d,y)){var m=this.body.nodes[y];g[y]!==void 0&&(m.x=g[y].x===void 0?a.x:g[y].x,m.y=g[y].y===void 0?a.y:g[y].y)}}else re(d,function(dt){dt.options.fixed.x===!1&&(dt.x=a.x),dt.options.fixed.y===!1&&(dt.y=a.y)});for(var w in d)if(Object.prototype.hasOwnProperty.call(d,w)){var b=this.body.nodes[w];b.vx=a.vx,b.vy=a.vy,b.setOptions({physics:!0}),delete this.clusteredNodes[w]}for(var E=[],O=0;O<a.edges.length;O++)E.push(a.edges[O]);for(var S=0;S<E.length;S++){for(var T=E[S],C=this._getConnectedId(T,e),N=this.clusteredNodes[C],L=0;L<T.clusteringEdgeReplacingIds.length;L++){var Q=T.clusteringEdgeReplacingIds[L],W=this.body.edges[Q];if(W!==void 0)if(N!==void 0){var Z=this.body.nodes[N.clusterId];Z.containedEdges[W.id]=W,delete c[W.id];var Me=W.fromId,fe=W.toId;W.toId==C?fe=N.clusterId:Me=N.clusterId,this._createClusteredEdge(Me,fe,W,Z.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(W)}T.remove()}for(var At in c)Object.prototype.hasOwnProperty.call(c,At)&&this._restoreEdge(c[At]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var t=[];if(this.isCluster(e)===!0){var n=this.body.nodes[e].containedNodes;for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.push(this.body.nodes[a].id)}return t}},{key:"findNode",value:function(e){for(var t=[],n=100,a=0,o;this.clusteredNodes[e]!==void 0&&a<n;){if(o=this.body.nodes[e],o===void 0)return[];t.push(o.id),e=this.clusteredNodes[e].clusterId,a++}return o=this.body.nodes[e],o===void 0?[]:(t.push(o.id),Rn(t).call(t),t)}},{key:"updateClusteredNode",value:function(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===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(t),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===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 n=this.getClusteredEdges(e),a=0;a<n.length;a++){var o=this.body.edges[n[a]];o.setOptions(t)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var t=[],n=100,a=0;e!==void 0&&this.body.edges[e]!==void 0&&a<n;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return Rn(t).call(t),t}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var t=[e],n=[],a=[],o=100,s=0;t.length>0&&s<o;){var l=t.pop();if(l!==void 0){var u=this.body.edges[l];if(u!==void 0){s++;var d=u.clusteringEdgeReplacingIds;if(d===void 0)a.push(l);else for(var c=0;c<d.length;++c){var h=d[c];ne(t).call(t,d)!==-1||ne(n).call(n,d)!==-1||t.push(h)}n.push(l)}}}return a}},{key:"_getConnectedId",value:function(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}},{key:"_getHubSize",value:function(){for(var e=0,t=0,n=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,t+=Math.pow(s.edges.length,2),n+=1}e=e/n,t=t/n;var l=t-Math.pow(e,2),u=Math.sqrt(l),d=Math.floor(e+2*u);return d>a&&(d=a),d}},{key:"_createClusteredEdge",value:function(e,t,n,a,o){var s=vt.cloneOptions(n,"edge");pe(s,a),s.from=e,s.to=t,s.id="clusterEdge:"+Ha(),o!==void 0&&pe(s,o);var l=this.body.functions.createEdge(s);return l.clusteringEdgeReplacingIds=[n.id],l.connect(),this.body.edges[l.id]=l,l}},{key:"_clusterEdges",value:function(e,t,n,a){if(t instanceof Di){var o=t,s={};s[o.id]=o,t=s}if(e instanceof Mt){var l=e,u={};u[l.id]=l,e=u}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,a);for(var d in t)if(Object.prototype.hasOwnProperty.call(t,d)&&this.body.edges[d]!==void 0){var c=this.body.edges[d];this._backupEdgeOptions(c),c.setOptions({physics:!1})}for(var h in e)Object.prototype.hasOwnProperty.call(e,h)&&(this.clusteredNodes[h]={clusterId:n.id,node:this.body.nodes[h]},this.body.nodes[h].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var t=this.clusteredNodes[e];if(t!==void 0){var n=t.clusterId;if(n!==void 0)return this.body.nodes[n]}}}},{key:"_filter",value:function(e,t){var n=[];return re(e,function(a){t(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,t,n=[],a={},o=function(v){re(e.body.nodes,function(p){p.isCluster===!0&&v(p)})};for(t in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,t)){var s=this.body.nodes[t];s===void 0&&n.push(t)}o(function(f){for(var v=0;v<n.length;v++)delete f.containedNodes[n[v]]});for(var l=0;l<n.length;l++)delete this.clusteredNodes[n[l]];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,g=f.clusteringEdgeReplacingIds;if(g!==void 0){var y=0;re(g,function(m){var w=e.body.edges[m];w!==void 0&&w.endPointsValid()&&(y+=1)}),p=y>0}(!f.endPointsValid()||!p)&&(a[v]=v)}),o(function(f){re(a,function(v){delete f.containedEdges[v],re(f.edges,function(p,g){if(p.id===v){f.edges[g]=null;return}p.clusteringEdgeReplacingIds=e._filter(p.clusteringEdgeReplacingIds,function(y){return!a[y]})}),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 u=Ee(this.body.edges);re(u,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 g=e._getClusterNodeForNode(v.fromId);g!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,g);var y=e._getClusterNodeForNode(v.toId);y!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,y)}else delete e._clusterEdges[f],e._restoreEdge(v)});for(var d=!1,c=!0,h=function(){var v=[];o(function(g){var y=Ee(g.containedNodes).length,m=g.options.allowSingleNodeCluster===!0;(m&&y<1||!m&&y<2)&&v.push(g.id)});for(var p=0;p<v.length;++p)e.openCluster(v[p],{},!1);c=v.length>0,d=d||c};c;)h();d&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),r}();function Fhe(){var r;window!==void 0&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),r===void 0?window.requestAnimationFrame=function(i){i()}:window.requestAnimationFrame=r}var Bhe=function(){function r(i,e){R(this,r),Fhe(),this.body=i,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},Be(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return D(r,[{key:"bindEventListeners",value:function(){var e=this,t;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 n;e.zooming=!1,P(n=e._requestRedraw).call(n,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",P(t=this._requestRedraw).call(t,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 t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];_a(t,this.options,e)}}},{key:"_requestNextFrame",value:function(e,t){if(!(typeof window>"u")){var n,a=window;return this.requiresTimeout===!0?n=gr(e,t):a.requestAnimationFrame&&(n=a.requestAnimationFrame(e)),n}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(P(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 t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var n=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.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(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(n,e),l=s.drawExternalLabels;t.drawExternalLabels=l}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(n),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.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 t=this.body.nodes,n;for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n=t[a],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.nodes,a=this.body.nodeIndices,o,s=[],l=[],u=20,d=this.canvas.DOMtoCanvas({x:-u,y:-u}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),h={top:d.y,left:d.x,bottom:c.y,right:c.x},f=[],v=0;v<a.length;v++)if(o=n[a[v]],o.hover)l.push(a[v]);else if(o.isSelected())s.push(a[v]);else if(t===!0){var p=o.draw(e);p.drawExternalLabel!=null&&f.push(p.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(h)===!0){var g=o.draw(e);g.drawExternalLabel!=null&&f.push(g.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);var y,m=s.length,w=l.length;for(y=0;y<m;y++){o=n[s[y]];var b=o.draw(e);b.drawExternalLabel!=null&&f.push(b.drawExternalLabel)}for(y=0;y<w;y++){o=n[l[y]];var E=o.draw(e);E.drawExternalLabel!=null&&f.push(E.drawExternalLabel)}return{drawExternalLabels:function(){for(var S=0,T=f;S<T.length;S++){var C=T[S];C()}}}}},{key:"_drawEdges",value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,a=0;a<n.length;a++){var o=t[n[a]];o.connected===!0&&o.draw(e)}}},{key:"_drawArrows",value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,a=0;a<n.length;a++){var o=t[n[a]];o.connected===!0&&o.drawArrows(e)}}},{key:"_determineBrowserMethod",value:function(){if(typeof window<"u"){var e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,ne(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:ne(e).call(e,"safari")!=-1&&ne(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 t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,n=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,t,n),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}]),r}(),Lhe=ae,jhe=Lhe.setInterval,zhe=jhe,Hhe=z(zhe);function xl(r,i){i.inputHandler=function(e){e.isFirst&&i(e)},r.on("hammer.input",i.inputHandler)}function eT(r,i){return i.inputHandler=function(e){e.isFinal&&i(e)},r.on("hammer.input",i.inputHandler)}var Whe=function(){function r(i){R(this,r),this.body=i,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Be(this.options,this.defaultOptions),this.bindEventListeners()}return D(r,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.once("resize",function(n){n.width!==0&&(e.body.view.translation.x=n.width*.5),n.height!==0&&(e.body.view.translation.y=n.height*.5)}),this.body.emitter.on("setSize",P(t=this.setSize).call(t,this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var t=this;if(e!==void 0){var n=["width","height","autoResize"];_a(n,this.options,e)}if(this._cleanUp(),this.options.autoResize===!0){var a;if(window.ResizeObserver){var o=new ResizeObserver(function(){var d=t.setSize();d===!0&&t.body.emitter.emit("_requestRedraw")}),s=this.frame;o.observe(s),this._cleanupCallbacks.push(function(){o.unobserve(s)})}else{var l=Hhe(function(){var d=t.setSize();d===!0&&t.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(l)})}var u=P(a=this._onResize).call(a,this);window.addEventListener("resize",u),this._cleanupCallbacks.push(function(){window.removeEventListener("resize",u)})}}},{key:"_cleanUp",value:function(){var e,t,n;he(e=Rn(t=kr(n=this._cleanupCallbacks).call(n,0)).call(t)).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,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;e!=1&&t!=1?n=this.cameraState.scale*.5*(e+t):e!=1?n=this.cameraState.scale*e:t!=1&&(n=this.cameraState.scale*t),this.body.view.scale=n;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(ne(e).call(e,"%")!==-1||ne(e).call(e,"px")!==-1)return e;if(ne(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 Ri(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ri.DIRECTION_ALL}),xl(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("wheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new Ri(this.frame),eT(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var n=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{var l=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==l||this.frame.canvas.height!==u)&&this._getCameraState(s),this.frame.canvas.width!==l&&(this.frame.canvas.width=l,n=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,n=!0)}return n===!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,n}},{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 t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);var n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}},{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)}}}]),r}();function Vhe(r,i){var e=Be({nodes:i,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!ue(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=i),!(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 Uhe=function(){function r(i,e){var t,n=this,a;R(this,r),this.body=i,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",P(t=this.fit).call(t,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",P(a=this.releaseNode).call(a,this))}return D(r,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Vhe(e,this.body.nodeIndices);var n=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(n===0||a===0)s=1,o=vt.getRange(this.body.nodes,e.nodes);else if(t===!0){var l=0;for(var u in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,u)){var d=this.body.nodes[u];d.predefinedPosition===!0&&(l+=1)}if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=vt.getRange(this.body.nodes,e.nodes);var c=this.body.nodeIndices.length;s=12.662/(c+7.4147)+.0964822;var h=Math.min(n/600,a/600);s*=h}else{this.body.emitter.emit("_resizeNodes"),o=vt.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=n/f,g=a/v;s=p<=g?p:g}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var y=vt.findCenter(o),m={position:y,scale:s,animation:e.animation};this.moveTo(m)}},{key:"focus",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=n,t.lockedOnNode=e,this.moveTo(t)}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,!Tn(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!Tn(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!Tn(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!Tn(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}},{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 t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=P(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=P(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},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.x,y:t.y-e.y},a=this.body.view.translation,o={x:a.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+n.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 t=Pae[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=P(n=this._lockedRedraw).call(n,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})}}]),r}();function D$(r){var i=r&&r.preventDefault||!1,e=r&&r.container||window,t={},n={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(d){u(d,"keydown")},l=function(d){u(d,"keyup")},u=function(d,c){if(n[c][d.keyCode]!==void 0){for(var h=n[c][d.keyCode],f=0;f<h.length;f++)(h[f].shift===void 0||h[f].shift==!0&&d.shiftKey==!0||h[f].shift==!1&&d.shiftKey==!1)&&h[f].fn(d);i==!0&&d.preventDefault()}};return t.bind=function(d,c,h){if(h===void 0&&(h="keydown"),a[d]===void 0)throw new Error("unsupported key: "+d);n[h][a[d].code]===void 0&&(n[h][a[d].code]=[]),n[h][a[d].code].push({fn:c,shift:a[d].shift})},t.bindAll=function(d,c){c===void 0&&(c="keydown");for(var h in a)a.hasOwnProperty(h)&&t.bind(h,d,c)},t.getKey=function(d){for(var c in a)if(a.hasOwnProperty(c)){if(d.shiftKey==!0&&a[c].shift==!0&&d.keyCode==a[c].code)return c;if(d.shiftKey==!1&&a[c].shift==!1&&d.keyCode==a[c].code)return c;if(d.keyCode==a[c].code&&c=="shift")return c}return"unknown key, currently not supported"},t.unbind=function(d,c,h){if(h===void 0&&(h="keydown"),a[d]===void 0)throw new Error("unsupported key: "+d);if(c!==void 0){var f=[],v=n[h][a[d].code];if(v!==void 0)for(var p=0;p<v.length;p++)v[p].fn==c&&v[p].shift==a[d].shift||f.push(n[h][a[d].code][p]);n[h][a[d].code]=f}else n[h][a[d].code]=[]},t.reset=function(){n={keydown:{},keyup:{}}},t.destroy=function(){n={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",l,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",l,!0),t}var Ghe=function(){function r(i,e){var t=this;R(this,r),this.body=i,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){t.activated=!0,t.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){t.activated=!1,t.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){t.keycharm!==void 0&&t.keycharm.destroy()}),this.options={}}return D(r,[{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 t=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],n=["_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<t.length;a++){this.navigationDOM[t[a]]=document.createElement("div"),this.navigationDOM[t[a]].className="vis-button vis-"+t[a],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[a]]);var o=new Ri(this.navigationDOM[t[a]]);if(n[a]==="_fit"){var s;xl(o,P(s=this._fit).call(s,this))}else{var l;xl(o,P(l=this.bindToRedraw).call(l,this,n[a]))}this.navigationHammers.push(o)}var u=new Ri(this.canvas.frame);eT(u,function(){e._stopMovement()}),this.navigationHammers.push(u),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=P(t=this[e]).call(t,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,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,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,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,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=D$({container:window,preventDefault:!0}):this.keycharm=D$({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var t,n,a,o,s,l,u,d,c,h,f,v,p,g,y,m,w,b,E,O,S,T,C,N;P(t=this.keycharm).call(t,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),P(n=this.keycharm).call(n,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),P(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),P(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),P(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),P(l=this.keycharm).call(l,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),P(u=this.keycharm).call(u,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),P(d=this.keycharm).call(d,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),P(c=this.keycharm).call(c,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),P(h=this.keycharm).call(h,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),P(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),P(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),P(p=this.keycharm).call(p,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),P(g=this.keycharm).call(g,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),P(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),P(m=this.keycharm).call(m,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),P(w=this.keycharm).call(w,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),P(b=this.keycharm).call(b,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),P(E=this.keycharm).call(E,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),P(O=this.keycharm).call(O,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),P(S=this.keycharm).call(S,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),P(T=this.keycharm).call(T,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),P(C=this.keycharm).call(C,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),P(N=this.keycharm).call(N,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),r}();function Khe(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(ue(r)||(e=qhe(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function qhe(r,i){var e;if(r){if(typeof r=="string")return M$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M$(r,i)}}function M$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var Yhe=function(){function r(i,e,t){var n,a,o,s,l,u,d,c,h,f,v,p,g;R(this,r),this.body=i,this.canvas=e,this.selectionHandler=t,this.navigationHandler=new Ghe(i,e),this.body.eventListeners.onTap=P(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=P(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=P(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=P(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=P(l=this.onDragStart).call(l,this),this.body.eventListeners.onDrag=P(u=this.onDrag).call(u,this),this.body.eventListeners.onDragEnd=P(d=this.onDragEnd).call(d,this),this.body.eventListeners.onMouseWheel=P(c=this.onMouseWheel).call(c,this),this.body.eventListeners.onPinch=P(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=P(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=P(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=P(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=P(g=this.getPointer).call(g,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},Be(this.options,this.defaultOptions),this.bindEventListeners()}return D(r,[{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 t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];Il(t,this.options,e),Vt(this.options,e,"keyboard"),e.tooltip&&(Be(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=tf(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-Sae(this.canvas.frame.canvas),y:e.y-Oae(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 t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,t){var n=function(o,s){for(var l=[],u=0;u<o.length;u++){var d=o[u];ne(s).call(s,d)===-1&&l.push(d)}return l};return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}},{key:"onDragStart",value:function(e){if(!this.drag.dragging){this.drag.pointer===void 0&&this.onTouch(e);var t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Be({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;var n=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);var a=Khe(this.selectionHandler.getSelectedNodes()),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,l={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(l)}}catch(u){a.e(u)}finally{a.f()}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(e){var t=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var n=this.getPointer(e.center),a=this.drag.selection;if(a&&a.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,n);var o=n.x-this.drag.pointer.x,s=n.y-this.drag.pointer.y;he(a).call(a,function(d){var c=d.node;d.xFixed===!1&&(c.x=t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(d.x)+o)),d.yFixed===!1&&(c.y=t.canvas._YconvertDOMtoCanvas(t.canvas._YconvertCanvasToDOM(d.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,n,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,n,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}var l=n.x-this.drag.pointer.x,u=n.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+l,y:this.drag.translation.y+u},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(e){var t=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var n;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(n=this.body.nodeIndices).call(n,function(d){var c=t.body.nodes[d];return c.x>=o.minX&&c.x<=o.maxX&&c.y>=o.minY&&c.y<=o.maxY});he(s).call(s,function(d){return t.selectionHandler.selectObject(t.body.nodes[d])});var l=this.getPointer(e.center);this.selectionHandler.commitAndEmit(l,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var u=this.drag.selection;u&&u.length?(he(u).call(u,function(d){d.node.options.fixed.x=d.xFixed,d.node.options.fixed.y=d.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 t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var n=this.pinch.scale*e.scale;this.zoom(n,t)}},{key:"zoom",value:function(e,t){if(this.options.zoomView===!0){var n=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/n,l=(1-s)*t.x+o.x*s,u=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:l,y:u},a!=null){var d=this.canvas.canvasToDOM(a);this.drag.pointer.x=d.x,this.drag.pointer.y=d.y}this.body.emitter.emit("_requestRedraw"),n<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}},{key:"onMouseWheel",value:function(e){if(this.options.zoomView===!0){if(e.deltaY!==0){var t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);var n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,n)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,n=this.getPointer({x:e.clientX,y:e.clientY}),a=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(n),this.popup.hidden===!1&&(a=!0,this.popup.setPosition(n.x+3,n.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 t._checkShowPopup(n)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,n)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),a={left:t,top:n,right:t,bottom:n},o=this.popupObj===void 0?void 0:this.popupObj.id,s=!1,l="node";if(this.popupObj===void 0){for(var u=this.body.nodeIndices,d=this.body.nodes,c,h=[],f=0;f<u.length;f++)c=d[u[f]],c.isOverlappingWith(a)===!0&&(s=!0,c.getTitle()!==void 0&&h.push(u[f]));h.length>0&&(this.popupObj=d[h[h.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,p=this.body.edges,g,y=[],m=0;m<v.length;m++)g=p[v[m]],g.isOverlappingWith(a)===!0&&g.connected===!0&&g.getTitle()!==void 0&&y.push(v[m]);y.length>0&&(this.popupObj=p[y[y.length-1]],l="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new Nae(this.canvas.frame)),this.popup.popupTargetType=l,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 t=this.selectionHandler._pointerToPositionObject(e),n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),n===!0)){var a=this.selectionHandler.getNodeAt(e);n=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),r}(),Xhe=Bv,Qhe=AO;Xhe("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Qhe);var Jhe=ae,Zhe=Jhe.Set,efe=Zhe,tfe=efe,rfe=tfe,En=z(rfe),nfe=oe,N$=Lv,Ms=Au.getWeakData,ife=Fv,afe=Ht,ofe=ca,Vc=Xe,sfe=Nv,tT=fn,F$=Qe,rT=ti,lfe=rT.set,ufe=rT.getterFor,dfe=tT.find,cfe=tT.findIndex,hfe=nfe([].splice),ffe=0,Ns=function(r){return r.frozen||(r.frozen=new nT)},nT=function(){this.entries=[]},Uc=function(r,i){return dfe(r.entries,function(e){return e[0]===i})};nT.prototype={get:function(r){var i=Uc(this,r);if(i)return i[1]},has:function(r){return!!Uc(this,r)},set:function(r,i){var e=Uc(this,r);e?e[1]=i:this.entries.push([r,i])},delete:function(r){var i=cfe(this.entries,function(e){return e[0]===r});return~i&&hfe(this.entries,i,1),!!~i}};var vfe={getConstructor:function(r,i,e,t){var n=r(function(l,u){ife(l,a),lfe(l,{type:i,id:ffe++,frozen:void 0}),ofe(u)||sfe(u,l[t],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=ufe(i),s=function(l,u,d){var c=o(l),h=Ms(afe(u),!0);return h===!0?Ns(c).set(u,d):h[c.id]=d,l};return N$(a,{delete:function(l){var u=o(this);if(!Vc(l))return!1;var d=Ms(l);return d===!0?Ns(u).delete(l):d&&F$(d,u.id)&&delete d[u.id]},has:function(u){var d=o(this);if(!Vc(u))return!1;var c=Ms(u);return c===!0?Ns(d).has(u):c&&F$(c,d.id)}}),N$(a,e?{get:function(u){var d=o(this);if(Vc(u)){var c=Ms(u);return c===!0?Ns(d).get(u):c?c[d.id]:void 0}},set:function(u,d){return s(this,u,d)}}:{add:function(u){return s(this,u,!0)}}),n}},pfe=PO,B$=Pe,rl=oe,L$=Lv,gfe=Au,yfe=Bv,iT=vfe,Fs=Xe,Bs=ti.enforce,mfe=ie,bfe=mE,es=Object,$fe=Array.isArray,Ls=es.isExtensible,aT=es.isFrozen,wfe=es.isSealed,oT=es.freeze,_fe=es.seal,j$={},z$={},Efe=!B$.ActiveXObject&&"ActiveXObject"in B$,ka,sT=function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},lT=yfe("WeakMap",sT,iT),mi=lT.prototype,nl=rl(mi.set),Sfe=function(){return pfe&&mfe(function(){var r=oT([]);return nl(new lT,r,1),!aT(r)})};if(bfe)if(Efe){ka=iT.getConstructor(sT,"WeakMap",!0),gfe.enable();var H$=rl(mi.delete),js=rl(mi.has),W$=rl(mi.get);L$(mi,{delete:function(r){if(Fs(r)&&!Ls(r)){var i=Bs(this);return i.frozen||(i.frozen=new ka),H$(this,r)||i.frozen.delete(r)}return H$(this,r)},has:function(i){if(Fs(i)&&!Ls(i)){var e=Bs(this);return e.frozen||(e.frozen=new ka),js(this,i)||e.frozen.has(i)}return js(this,i)},get:function(i){if(Fs(i)&&!Ls(i)){var e=Bs(this);return e.frozen||(e.frozen=new ka),js(this,i)?W$(this,i):e.frozen.get(i)}return W$(this,i)},set:function(i,e){if(Fs(i)&&!Ls(i)){var t=Bs(this);t.frozen||(t.frozen=new ka),js(this,i)?nl(this,i,e):t.frozen.set(i,e)}else nl(this,i,e);return this}})}else Sfe()&&L$(mi,{set:function(i,e){var t;return $fe(i)&&(aT(i)?t=j$:wfe(i)&&(t=z$)),nl(this,i,e),t===j$&&oT(i),t===z$&&_fe(i),this}});var Ofe=ae,Tfe=Ofe.WeakMap,Ife=Tfe,Pfe=Ife,kfe=Pfe,Wa=z(kfe);function ve(r,i,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?r!==i||!t:!i.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(r):t?t.value:i.get(r)}function df(r,i,e,t,n){if(typeof i=="function"?r!==i||!n:!i.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i.set(r,e),e}function cf(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(ue(r)||(e=Cfe(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Cfe(r,i){var e;if(r){if(typeof r=="string")return V$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return V$(r,i)}}function V$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var $n,Wt,Wr,Vr,il;function U$(r,i){var e=new En,t=cf(i),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;r.has(a)||e.add(a)}}catch(o){t.e(o)}finally{t.f()}return e}var G$=function(){function r(){R(this,r),$n.set(this,new En),Wt.set(this,new En)}return D(r,[{key:"size",get:function(){return ve(this,Wt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var a=0,o=t;a<o.length;a++){var s=o[a];ve(this,Wt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var a=0,o=t;a<o.length;a++){var s=o[a];ve(this,Wt,"f").delete(s)}}},{key:"clear",value:function(){ve(this,Wt,"f").clear()}},{key:"getSelection",value:function(){return cr(ve(this,Wt,"f"))}},{key:"getChanges",value:function(){return{added:cr(U$(ve(this,$n,"f"),ve(this,Wt,"f"))),deleted:cr(U$(ve(this,Wt,"f"),ve(this,$n,"f"))),previous:cr(new En(ve(this,$n,"f"))),current:cr(new En(ve(this,Wt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();df(this,$n,ve(this,Wt,"f")),df(this,Wt,new En(ve(this,$n,"f")));var t=cf(e.added),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;a.select()}}catch(u){t.e(u)}finally{t.f()}var o=cf(e.deleted),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;l.unselect()}}catch(u){o.e(u)}finally{o.f()}return e}}]),r}();$n=new Wa,Wt=new Wa;var xfe=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};R(this,r),Wr.set(this,new G$),Vr.set(this,new G$),il.set(this,void 0),df(this,il,i)}return D(r,[{key:"sizeNodes",get:function(){return ve(this,Wr,"f").size}},{key:"sizeEdges",get:function(){return ve(this,Vr,"f").size}},{key:"getNodes",value:function(){return ve(this,Wr,"f").getSelection()}},{key:"getEdges",value:function(){return ve(this,Vr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=ve(this,Wr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=ve(this,Vr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){ve(this,Wr,"f").delete(e)}},{key:"deleteEdges",value:function(e){ve(this,Vr,"f").delete(e)}},{key:"clear",value:function(){ve(this,Wr,"f").clear(),ve(this,Vr,"f").clear()}},{key:"commit",value:function(){for(var e,t,n={nodes:ve(this,Wr,"f").commit(),edges:ve(this,Vr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=ve(this,il,"f")).call.apply(e,wv(t=[this,n]).call(t,o)),n}}]),r}();Wr=new Wa,Vr=new Wa,il=new Wa;function K$(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(ue(r)||(e=Afe(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Afe(r,i){var e;if(r){if(typeof r=="string")return q$(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q$(r,i)}}function q$(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var Rfe=function(){function r(i,e){var t=this;R(this,r),this.body=i,this.canvas=e,this._selectionAccumulator=new xfe,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Be(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){t.updateSelection()})}return D(r,[{key:"setOptions",value:function(e){if(e!==void 0){var t=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];_a(t,this.options,e)}}},{key:"selectOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(t=this.selectObject(n)),this.body.emitter.emit("_requestRedraw")}return t}},{key:"selectAdditionalOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(t=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit("_requestRedraw"))}return t}},{key:"_initBaseEvent",value:function(e,t){var n={};return n.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},n.event=e,n}},{key:"generateClickEvent",value:function(e,t,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(t,n);if(o===!0)s.nodes=[],s.edges=[];else{var l=this.getSelection();s.nodes=l.nodes,s.edges=l.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof Mt){if(t===!0){var n;(n=this._selectionAccumulator).addEdges.apply(n,cr(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 t=[],n=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];n[o].isOverlappingWith(e)&&t.push(o)}return t}},{key:"_pointerToPositionObject",value:function(e){var t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}},{key:"getNodeAt",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(n);if(a.length>0)return t===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var n=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];n[o].isOverlappingWith(e)&&t.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var t=[];return this._getEdgesOverlappingWith(e,t),t}},{key:"getEdgeAt",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,l=0;l<this.body.edgeIndices.length;l++){var u=this.body.edgeIndices[l],d=s[u];if(d.connected){var c=d.from.x,h=d.from.y,f=d.to.x,v=d.to.y,p=d.edgeType.getDistanceToEdge(c,h,f,v,n.x,n.y);p<a&&(o=u,a=p)}}if(o!==null)return t===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof Mt?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof Mt){var t;this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,cr(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 t=0;t<e.edges.length;t++){var n=e.edges[t];n.hover=!0,this._addToHover(n)}}},{key:"emitBlurEvent",value:function(e,t,n){var a=this._initBaseEvent(e,t);n.hover===!0&&(n.hover=!1,n instanceof Mt?(a.node=n.id,this.body.emitter.emit("blurNode",a)):(a.edge=n.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,t,n){var a=this._initBaseEvent(e,t),o=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),o=!0,n instanceof Mt?(a.node=n.id,this.body.emitter.emit("hoverNode",a)):(a.edge=n.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,t){var n=this.getNodeAt(t);n===void 0&&(n=this.getEdgeAt(t));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(n===void 0||n instanceof Mt&&n.id!=o||n instanceof Di)&&(this.emitBlurEvent(e,t,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]):(n===void 0||n instanceof Di&&n.id!=s||n instanceof Mt&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(n!==void 0){var l=Ee(this.hoverObj.edges).length,u=Ee(this.hoverObj.nodes).length,d=n instanceof Di&&l===0&&u===0,c=n instanceof Mt&&l===0&&u===0;(a||d||c)&&(a=this.emitHoverEvent(e,t,n)),n instanceof Mt&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,t){var n=!1,a=this._selectionAccumulator.commit(),o={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,o),n=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),n=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),n=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),n=!0),n===!0&&this.generateClickEvent("select",t,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 Vi(e=this._selectionAccumulator.getNodes()).call(e,function(t){return t.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Vi(e=this._selectionAccumulator.getEdges()).call(e,function(t){return t.id})}},{key:"setSelection",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes){var n=K$(e.nodes),a;try{for(n.s();!(a=n.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,t.highlightEdges)}}catch(h){n.e(h)}finally{n.f()}}if(e.edges){var l=K$(e.edges),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,c=this.body.edges[d];if(!c)throw new RangeError('Edge with id "'+d+'" not found');this.selectObject(c)}}catch(h){l.e(h)}finally{l.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}},{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 t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:"getClickedItems",value:function(e){for(var t=this.canvas.DOMtoCanvas(e),n=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var l=o[a[s]],u=l.getItemsOnPoint(t);n.push.apply(n,u)}for(var d=this.body.edgeIndices,c=this.body.edges,h=d.length-1;h>=0;h--){var f=c[d[h]],v=f.getItemsOnPoint(t);n.push.apply(n,v)}return n}}]),r}(),Y$=GE,Dfe=Math.floor,hf=function(r,i){var e=r.length,t=Dfe(e/2);return e<8?Mfe(r,i):Nfe(r,hf(Y$(r,0,t),i),hf(Y$(r,t),i),i)},Mfe=function(r,i){for(var e=r.length,t=1,n,a;t<e;){for(a=t,n=r[t];a&&i(r[a-1],n)>0;)r[a]=r[--a];a!==t++&&(r[a]=n)}return r},Nfe=function(r,i,e,t){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)r[o+s]=o<n&&s<a?t(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return r},Ffe=hf,Bfe=Ro,X$=Bfe.match(/firefox\/(\d+)/i),Lfe=!!X$&&+X$[1],jfe=Ro,zfe=/MSIE|Trident/.test(jfe),Hfe=Ro,Q$=Hfe.match(/AppleWebKit\/(\d+)\./),Wfe=!!Q$&&+Q$[1],Vfe=G,uT=oe,Ufe=Zn,Gfe=xt,J$=Xt,Kfe=AS,Z$=wr,Uv=ie,qfe=Ffe,Yfe=$a,e1=Lfe,Xfe=zfe,t1=Do,r1=Wfe,Xr=[],n1=uT(Xr.sort),Qfe=uT(Xr.push),Jfe=Uv(function(){Xr.sort(void 0)}),Zfe=Uv(function(){Xr.sort(null)}),eve=Yfe("sort"),dT=!Uv(function(){if(t1)return t1<70;if(!(e1&&e1>3)){if(Xfe)return!0;if(r1)return r1<603;var r="",i,e,t,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Xr.push({k:e+n,v:t})}for(Xr.sort(function(a,o){return o.v-a.v}),n=0;n<Xr.length;n++)e=Xr[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),tve=Jfe||!Zfe||!eve||!dT,rve=function(r){return function(i,e){return e===void 0?-1:i===void 0?1:r!==void 0?+r(i,e)||0:Z$(i)>Z$(e)?1:-1}};Vfe({target:"Array",proto:!0,forced:tve},{sort:function(i){i!==void 0&&Ufe(i);var e=Gfe(this);if(dT)return i===void 0?n1(e):n1(e,i);var t=[],n=J$(e),a,o;for(o=0;o<n;o++)o in e&&Qfe(t,e[o]);for(qfe(t,rve(i)),a=J$(t),o=0;o<a;)e[o]=t[o++];for(;o<n;)Kfe(e,o++);return e}});var nve=Je,ive=nve("Array").sort,ave=De,ove=ive,Gc=Array.prototype,sve=function(r){var i=r.sort;return r===Gc||ave(Gc,r)&&i===Gc.sort?ove:i},lve=sve,uve=lve,dve=uve,Va=z(dve),cve=Zn,hve=xt,fve=du,vve=Xt,pve=TypeError,i1=function(r){return function(i,e,t,n){cve(e);var a=hve(i),o=fve(a),s=vve(a),l=r?s-1:0,u=r?-1:1;if(t<2)for(;;){if(l in o){n=o[l],l+=u;break}if(l+=u,r?l<0:s<=l)throw new pve("Reduce of empty array with no initial value")}for(;r?l>=0:s>l;l+=u)l in o&&(n=e(n,o[l],l,a));return n}},gve={left:i1(!1),right:i1(!0)},yve=Pe,mve=Lr,bve=mve(yve.process)==="process",$ve=G,wve=gve.left,_ve=$a,a1=Do,Eve=bve,Sve=!Eve&&a1>79&&a1<83,Ove=Sve||!_ve("reduce");$ve({target:"Array",proto:!0,forced:Ove},{reduce:function(i){var e=arguments.length;return wve(this,i,e,e>1?arguments[1]:void 0)}});var Tve=Je,Ive=Tve("Array").reduce,Pve=De,kve=Ive,Kc=Array.prototype,Cve=function(r){var i=r.reduce;return r===Kc||Pve(Kc,r)&&i===Kc.reduce?kve:i},xve=Cve,Ave=xve,Rve=Ave,cT=z(Rve);function hT(r){var i=Dve();return function(){var t=F(r),n;if(i){var a=F(this).constructor;n=_(t,arguments,a)}else n=t.apply(this,arguments);return de(this,n)}}function Dve(){if(typeof Reflect>"u"||!_||_.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_(Boolean,[],function(){})),!0}catch{return!1}}var fT=function(){function r(){R(this,r)}return D(r,[{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,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),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,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),r}(),Mve=function(r){se(e,r);var i=hT(e);function e(t){var n;return R(this,e),n=i.call(this),n.layout=t,n}return D(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(n){return n.x}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.x=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(n){Va(n).call(n,function(a,o){return a.x-o.x})}},{key:"fix",value:function(n,a){n.y=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.y=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].x+=a}}]),e}(fT),Nve=function(r){se(e,r);var i=hT(e);function e(t){var n;return R(this,e),n=i.call(this),n.layout=t,n}return D(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(n){return n.y}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.y=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(n){Va(n).call(n,function(a,o){return a.y-o.y})}},{key:"fix",value:function(n,a){n.x=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.x=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].y+=a}}]),e}(fT),Fve=G,Bve=fn.every,Lve=$a,jve=Lve("every");Fve({target:"Array",proto:!0,forced:!jve},{every:function(i){return Bve(this,i,arguments.length>1?arguments[1]:void 0)}});var zve=Je,Hve=zve("Array").every,Wve=De,Vve=Hve,qc=Array.prototype,Uve=function(r){var i=r.every;return r===qc||Wve(qc,r)&&i===qc.every?Vve:i},Gve=Uve,Kve=Gve,qve=Kve,vT=z(qve);function Yve(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(ue(r)||(e=Xve(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Xve(r,i){var e;if(r){if(typeof r=="string")return o1(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o1(r,i)}}function o1(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}function Qve(r,i){var e=new En;return he(r).call(r,function(t){var n;he(n=t.edges).call(n,function(a){a.connected&&e.add(a)})}),he(e).call(e,function(t){var n=t.from.id,a=t.to.id;i[n]==null&&(i[n]=0),(i[a]==null||i[n]>=i[a])&&(i[a]=i[n]+1)}),i}function Jve(r){return pT(function(i){var e,t;return vT(e=Ot(t=i.edges).call(t,function(n){return r.has(n.toId)})).call(e,function(n){return n.to===i})},function(i,e){return e>i},"from",r)}function Zve(r){return pT(function(i){var e,t;return vT(e=Ot(t=i.edges).call(t,function(n){return r.has(n.toId)})).call(e,function(n){return n.from===i})},function(i,e){return e<i},"to",r)}function pT(r,i,e,t){var n,a=Dn(null),o=cT(n=cr(VO(t).call(t))).call(n,function(f,v){return f+1+v.edges.length},0),s=e+"Id",l=e==="to"?1:-1,u=Yve(t),d;try{var c=function(){var v=Oe(d.value,2),p=v[0],g=v[1];if(!t.has(p)||!r(g))return 0;a[p]=0;for(var y=[g],m=0,w,b=function(){var S,T;if(!t.has(p))return 0;var C=a[w.id]+l;if(he(S=Ot(T=w.edges).call(T,function(N){return N.connected&&N.to!==N.from&&N[e]!==w&&t.has(N.toId)&&t.has(N.fromId)})).call(S,function(N){var L=N[s],Q=a[L];(Q==null||i(C,Q))&&(a[L]=C,y.push(N[e]))}),m>o)return{v:{v:Qve(t,a)}};++m},E;w=y.pop();)if(E=b(),E!==0&&E)return E.v},h;for(u.s();!(d=u.n()).done;)if(h=c(),h!==0&&h)return h.v}catch(f){u.e(f)}finally{u.f()}return a}var epe=function(){function r(){R(this,r),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return D(r,[{key:"addRelation",value:function(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}},{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,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var t=this,n={},a=function o(s){if(n[s]!==void 0)return n[s];var l=t.levels[s];if(t.childrenReference[s]){var u=t.childrenReference[s];if(u.length>0)for(var d=0;d<u.length;d++)l=Math.max(l,o(u[d]))}return n[s]=l,l};return a(e)}},{key:"levelDownstream",value:function(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var t=1e9;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.levels[n]!==void 0&&(t=Math.min(this.levels[n],t));for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(this.levels[a]-=t)}},{key:"getTreeSize",value:function(e,t){var n=1e9,a=-1e9,o=1e9,s=-1e9;for(var l in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,l)&&this.trees[l]===t){var u=e[l];n=Math.min(u.x,n),a=Math.max(u.x,a),o=Math.min(u.y,o),s=Math.max(u.y,s)}return{min_x:n,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,t){var n=this.parentReference[e.id],a=this.parentReference[t.id];if(n===void 0||a===void 0)return!1;for(var o=0;o<n.length;o++)for(var s=0;s<a.length;s++)if(n[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:"getLevels",value:function(){return Ee(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);var n=!1,a=this.distributionOrdering[t];for(var o in a)if(a[o]===e){n=!0;break}n||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),r}(),tpe=function(){function r(i){R(this,r),this.body=i,this._resetRNG(Math.random()+":"+El()),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"}},Be(this.options,this.defaultOptions),this.bindEventListeners()}return D(r,[{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 t=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",t,!1)}})}},{key:"setOptions",value:function(e,t){if(e!==void 0){var n=this.options.hierarchical,a=n.enabled;if(_a(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Vt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),n.direction==="RL"||n.direction==="DU"?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(a===!0)return this.body.emitter.emit("refresh"),pe(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=xu(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):ce(e.physics)==="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var n=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:n};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(n=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:n,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,n=0;n<e.length;n++){var a=e[n],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=t*Math.cos(o)),a.y===void 0&&(a.y=t*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,t=0,n=0;n<e.length;n++){var a=this.body.nodes[e[n]];a.predefinedPosition===!0&&(t+=1)}if(t<.5*e.length){var o=10,s=0,l=this.options.clusterThreshold,u={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>l){for(var d=e.length;e.length>l&&s<=o;){s+=1;var c=e.length;s%3===0?this.body.modules.clustering.clusterBridges(u):this.body.modules.clustering.clusterOutliers(u);var h=e.length;if(c==h&&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*d)})}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=vt.getRangeCore(this.body.nodes,this.body.nodeIndices),t=vt.findCenter(e),n=0;n<this.body.nodeIndices.length;n++){var a=this.body.nodes[this.body.nodeIndices[n]];a.x-=t.x,a.y-=t.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!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,t,n=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new epe;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(n=!0,this.hierarchical.levels[t]=e.options.level):a=!0);if(a===!0&&n===!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 l=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(l),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,n={},a=function(){for(var w=s(),b=0,E=0;E<w.length-1;E++){var O=w[E].max-w[E+1].min;b+=O+e.options.hierarchical.treeSpacing,o(E+1,b)}},o=function(w,b){var E=e.hierarchical.trees;for(var O in E)Object.prototype.hasOwnProperty.call(E,O)&&E[O]===w&&e.direction.shift(O,b)},s=function(){for(var w=[],b=0;b<e.hierarchical.numTrees();b++)w.push(e.direction.getTreeSize(b));return w},l=function m(w,b){if(!b[w.id]&&(b[w.id]=!0,e.hierarchical.childrenReference[w.id])){var E=e.hierarchical.childrenReference[w.id];if(E.length>0)for(var O=0;O<E.length;O++)m(e.body.nodes[E[O]],b)}},u=function(w){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,E=1e9,O=1e9,S=1e9,T=-1e9;for(var C in w)if(Object.prototype.hasOwnProperty.call(w,C)){var N=e.body.nodes[C],L=e.hierarchical.levels[N.id],Q=e.direction.getPosition(N),W=e._getSpaceAroundNode(N,w),Z=Oe(W,2),Me=Z[0],fe=Z[1];E=Math.min(Me,E),O=Math.min(fe,O),L<=b&&(S=Math.min(Q,S),T=Math.max(Q,T))}return[S,T,E,O]},d=function(w,b){var E=e.hierarchical.getMaxLevel(w.id),O=e.hierarchical.getMaxLevel(b.id);return Math.min(E,O)},c=function(w,b,E){for(var O=e.hierarchical,S=0;S<b.length;S++){var T=b[S],C=O.distributionOrdering[T];if(C.length>1)for(var N=0;N<C.length-1;N++){var L=C[N],Q=C[N+1];O.hasSameParent(L,Q)&&O.inSameSubNetwork(L,Q)&&w(L,Q,E)}}},h=function(w,b){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,O=e.direction.getPosition(w),S=e.direction.getPosition(b),T=Math.abs(S-O),C=e.options.hierarchical.nodeSpacing;if(T>C){var N={},L={};l(w,N),l(b,L);var Q=d(w,b),W=u(N,Q),Z=u(L,Q),Me=W[1],fe=Z[0],At=Z[2],dt=Math.abs(Me-fe);if(dt>C){var nt=Me-fe+C;nt<-At+C&&(nt=-At+C),nt<0&&(e._shiftBlock(b.id,nt),t=!0,E===!0&&e._centerParent(b))}}},f=function(w,b){for(var E=b.id,O=b.edges,S=e.hierarchical.levels[b.id],T=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,C={},N=[],L=0;L<O.length;L++){var Q=O[L];if(Q.toId!=Q.fromId){var W=Q.toId==E?Q.from:Q.to;C[O[L].id]=W,e.hierarchical.levels[W.id]<S&&N.push(Q)}}var Z=function(it,ye){for(var Ne=0,xe=0;xe<ye.length;xe++)if(C[ye[xe].id]!==void 0){var at=e.direction.getPosition(C[ye[xe].id])-it;Ne+=at/Math.sqrt(at*at+T)}return Ne},Me=function(it,ye){for(var Ne=0,xe=0;xe<ye.length;xe++)if(C[ye[xe].id]!==void 0){var at=e.direction.getPosition(C[ye[xe].id])-it;Ne-=T*Math.pow(at*at+T,-1.5)}return Ne},fe=function(it,ye){for(var Ne=e.direction.getPosition(b),xe={},at=0;at<it;at++){var _r=Z(Ne,ye),Dt=Me(Ne,ye),ot=40,M=Math.max(-ot,Math.min(ot,Math.round(_r/Dt)));if(Ne=Ne-M,xe[Ne]!==void 0)break;xe[Ne]=at}return Ne},At=function(it){var ye=e.direction.getPosition(b);if(n[b.id]===void 0){var Ne={};l(b,Ne),n[b.id]=Ne}var xe=u(n[b.id]),at=xe[2],_r=xe[3],Dt=it-ye,ot=0;Dt>0?ot=Math.min(Dt,_r-e.options.hierarchical.nodeSpacing):Dt<0&&(ot=-Math.min(-Dt,at-e.options.hierarchical.nodeSpacing)),ot!=0&&(e._shiftBlock(b.id,ot),t=!0)},dt=function(it){var ye=e.direction.getPosition(b),Ne=e._getSpaceAroundNode(b),xe=Oe(Ne,2),at=xe[0],_r=xe[1],Dt=it-ye,ot=ye;Dt>0?ot=Math.min(ye+(_r-e.options.hierarchical.nodeSpacing),it):Dt<0&&(ot=Math.max(ye-(at-e.options.hierarchical.nodeSpacing),it)),ot!==ye&&(e.direction.setPosition(b,ot),t=!0)},nt=fe(w,N);At(nt),nt=fe(w,O),dt(nt)},v=function(w){var b=e.hierarchical.getLevels();b=Rn(b).call(b);for(var E=0;E<w;E++){t=!1;for(var O=0;O<b.length;O++)for(var S=b[O],T=e.hierarchical.distributionOrdering[S],C=0;C<T.length;C++)f(1e3,T[C]);if(t!==!0)break}},p=function(w){var b=e.hierarchical.getLevels();b=Rn(b).call(b);for(var E=0;E<w&&(t=!1,c(h,b,!0),t===!0);E++);},g=function(){for(var w in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,w)&&e._centerParent(e.body.nodes[w])},y=function(){var w=e.hierarchical.getLevels();w=Rn(w).call(w);for(var b=0;b<w.length;b++)for(var E=w[b],O=e.hierarchical.distributionOrdering[E],S=0;S<O.length;S++)e._centerParent(O[S])};this.options.hierarchical.blockShifting===!0&&(p(5),g()),this.options.hierarchical.edgeMinimization===!0&&v(20),this.options.hierarchical.parentCentralization===!0&&y(),a()}},{key:"_getSpaceAroundNode",value:function(e,t){var n=!0;t===void 0&&(n=!1);var a=this.hierarchical.levels[e.id];if(a!==void 0){var o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),l=this.hierarchical.distributionOrdering[a],u=1e9,d=1e9;if(o!==0){var c=l[o-1];if(n===!0&&t[c.id]===void 0||n===!1){var h=this.direction.getPosition(c);u=s-h}}if(o!=l.length-1){var f=l[o+1];if(n===!0&&t[f.id]===void 0||n===!1){var v=this.direction.getPosition(f);d=Math.min(d,v-s)}}return[u,d]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var t=this.hierarchical.parentReference[e.id],n=0;n<t.length;n++){var a=t[n],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var l=this._getCenterPosition(s),u=this.direction.getPosition(o),d=this._getSpaceAroundNode(o),c=Oe(d,2),h=c[0],f=c[1],v=u-l;(v<0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<h-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,l)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n,a=Ee(e[t]);a=this._indexArrayToNodes(a),Va(n=this.direction).call(n,a);for(var o=0,s=0;s<a.length;s++){var l=a[s];if(this.positionedNodes[l.id]===void 0){var u=this.options.hierarchical.nodeSpacing,d=u*o;o>0&&(d=this.direction.getPosition(a[s-1])+u),this.direction.setPosition(l,d,t),this._validatePositionAndContinue(l,t,d),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){var n,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]]);Va(n=this.direction).call(n,o);for(var l=0;l<o.length;l++){var u=o[l],d=this.hierarchical.levels[u.id];if(d>t&&this.positionedNodes[u.id]===void 0){var c=this.options.hierarchical.nodeSpacing,h=void 0;l===0?h=this.direction.getPosition(this.body.nodes[e]):h=this.direction.getPosition(o[l-1])+c,this.direction.setPosition(u,h,d),this._validatePositionAndContinue(u,d,h)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-n,s=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}},{key:"_indexArrayToNodes",value:function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.body.nodes[e[n]]);return t}},{key:"_getDistribution",value:function(){var e={},t,n;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){n=this.body.nodes[t];var a=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(n,a),e[a]===void 0&&(e[a]={}),e[a][t]=n}return e}},{key:"_getActiveEdges",value:function(e){var t=this,n=[];return re(e.edges,function(a){var o;ne(o=t.body.edgeIndices).call(o,a.id)!==-1&&n.push(a)}),n}},{key:"_getHubSizes",value:function(){var e=this,t={},n=this.body.nodeIndices;re(n,function(o){var s=e.body.nodes[o],l=e._getActiveEdges(s).length;t[l]=!0});var a=[];return re(t,function(o){a.push(Number(o))}),Va(a).call(a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,t=function(l,u){e.hierarchical.levelDownstream(l,u)},n=this._getHubSizes(),a=function(){var l=n[o];if(l===0)return 1;re(e.body.nodeIndices,function(u){var d=e.body.nodes[u];l===e._getActiveEdges(d).length&&e._crawlNetwork(t,u)})},o=0;o<n.length&&!a();++o);}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,t=1e5,n=function(s,l,u){},a=function(s,l,u){var d=e.hierarchical.levels[s.id];d===void 0&&(d=e.hierarchical.levels[s.id]=t);var c=n(vt.cloneOptions(s,"node"),vt.cloneOptions(l,"node"),vt.cloneOptions(u,"edge"));e.hierarchical.levels[l.id]=d+c};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,t=this,n=cT(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,t.body.nodes[o]),a},new RO);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Zve(n):this.hierarchical.levels=Jve(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,t=function(a,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(t),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,a={},o=function h(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var p,g=e._getActiveEdges(f),y=0;y<g.length;y++){var m=g[y];m.connected===!0&&(m.toId==f.id?p=m.from:p=m.to,f.id!=p.id&&(t(f,p,m),h(p,v)))}}};if(n===void 0)for(var s=0,l=0;l<this.body.nodeIndices.length;l++){var u=this.body.nodeIndices[l];if(a[u]===void 0){var d=this.body.nodes[u];o(d,s),s+=1}}else{var c=this.body.nodes[n];if(c===void 0){console.error("Node not found:",n);return}o(c)}}},{key:"_shiftBlock",value:function(e,t){var n=this,a={},o=function s(l){if(!a[l]){a[l]=!0,n.direction.shift(l,t);var u=n.hierarchical.childrenReference[l];if(u!==void 0)for(var d=0;d<u.length;d++)s(u[d])}};o(e)}},{key:"_findCommonParent",value:function(e,t){var n=this,a={},o=function l(u,d){var c=n.hierarchical.parentReference[d];if(c!==void 0)for(var h=0;h<c.length;h++){var f=c[h];u[f]=!0,l(u,f)}},s=function l(u,d){var c=n.hierarchical.parentReference[d];if(c!==void 0)for(var h=0;h<c.length;h++){var f=c[h];if(u[f]!==void 0)return{foundParent:f,withChild:d};var v=l(u,f);if(v.foundParent!==null)return v}return{foundParent:null,withChild:d}};return o(a,e),s(a,t)}},{key:"setDirectionStrategy",value:function(){var e=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";e?this.direction=new Mve(this):this.direction=new Nve(this)}},{key:"_getCenterPosition",value:function(e){for(var t=1e9,n=-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 l=this.direction.getPosition(o);t=Math.min(t,l),n=Math.max(n,l)}return .5*(t+n)}}]),r}();function rpe(r,i){var e=typeof vn<"u"&&ni(r)||r["@@iterator"];if(!e){if(ue(r)||(e=npe(r))||i){e&&(r=e);var t=0,n=function(){};return{s:n,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:n}}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(r)},n:function(){var u=e.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function npe(r,i){var e;if(r){if(typeof r=="string")return s1(r,i);var t=tt(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return ri(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s1(r,i)}}function s1(r,i){(i==null||i>r.length)&&(i=r.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=r[e];return t}var ipe=function(){function r(i,e,t,n){var a=this,o,s;R(this,r),this.body=i,this.canvas=e,this.selectionHandler=t,this.interactionHandler=n,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}},Be(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",P(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",P(s=this._restore).call(s,this))}return D(r,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,t,n){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=n.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,pe(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,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var n=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=n+a,s=this.options.locales[this.options.locale],l=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),l=!0),this.options.addEdge!==!1&&(l===!0?this._createSeperator(1):l=!0,this._createAddEdgeButton(s)),n===1&&typeof this.options.editNode=="function"?(l===!0?this._createSeperator(2):l=!0,this._createEditNodeButton(s)):a===1&&n===0&&this.options.editEdge!==!1&&(l===!0?this._createSeperator(3):l=!0,this._createEditEdgeButton(s)),o!==0&&(n>0&&this.options.deleteNode!==!1?(l===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(l===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,P(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",P(t=this.showManipulatorToolbar).call(t,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 t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,P(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",P(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(t.isCluster!==!0){var n=pe({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length===2)this.options.editNode(n,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,t,n,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,l=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(l),this._createSeperator(),this._createDescription(l.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,P(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",P(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",P(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",P(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",P(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",P(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",ce(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 t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,P(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,l,u=this.body.edges[this.edgeBeingEditedId],d=this._getNewTargetNode(u.from.x,u.from.y),c=this._getNewTargetNode(u.to.x,u.to.y);this.temporaryIds.nodes.push(d.id),this.temporaryIds.nodes.push(c.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this._temporaryBindUI("onTouch",P(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",P(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",P(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",P(l=this._controlNodeDragEnd).call(l,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(h){var f=u.edgeType.findBorderPositions(h);d.selected===!1&&(d.x=f.from.x,d.y=f.from.y),c.selected===!1&&(c.x=f.to.x,c.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 t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(t.length>0){for(var o=0;o<t.length;o++)if(this.body.nodes[t[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 n.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:n};if(a.length===2)a(s,function(l){l!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(l.edges),e.body.data.nodes.getDataSet().remove(l.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(n),this.body.data.nodes.getDataSet().remove(t),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,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,t){var n=pe({},this.options.controlNodeStyle);n.id="targetNode"+Ha(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Gr(this.editModeDiv);var t=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,P(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Gr(this.editModeDiv),Gr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=rpe(kr(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Gr(this.manipulationDiv),Gr(this.editModeDiv),Gr(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 t,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,P(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,n){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 "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,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,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Ko(Ee(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 t=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,t){var n=new Ri(e,{});xl(n,t),this._domEventListenerCleanupQueue.push(function(){n.destroy()});var a=function(s){var l=s.keyCode,u=s.key;(u==="Enter"||u===" "||l===13||l===32)&&t()};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 t;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var n=ne(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);if(n!==-1){var a;kr(a=this.body.edgeIndices).call(a,n,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var l=ne(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(l!==-1){var u;kr(u=this.body.nodeIndices).call(u,l,1)}}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Be({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),n=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=n.isOverlappingWith(t),l=a.isOverlappingWith(t);s===!0?(this.selectedControlNode=n,o.edgeType.from=n):l===!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 t=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--)if(o[l]!==this.selectedControlNode.id){s=this.body.nodes[o[l]];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 u=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===u.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=Be({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Ha(),from:n.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 t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--){var u;if(ne(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){var d=this.body.nodes[this.temporaryIds.nodes[0]];d.x=this.canvas._XconvertDOMtoCanvas(t.x),d.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,l=o.length-1;l>=0;l--){var u;if(ne(u=this.temporaryIds.nodes).call(u,o[l])===-1){s=this.body.nodes[o[l]];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,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,n={id:Ha(),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(n,function(a){a!=null&&t.inMode==="addNode"&&t.body.data.nodes.getDataSet().add(a),t.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(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var n=this,a={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.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,t){var n=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(ce(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.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()}}]),r}(),A="string",I="boolean",$="number",Ra="array",j="object",gT="dom",ape="any",Yc=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Xc={borderWidth:{number:$},borderWidthSelected:{number:$,undefined:"undefined"},brokenImage:{string:A,undefined:"undefined"},chosen:{label:{boolean:I,function:"function"},node:{boolean:I,function:"function"},__type__:{object:j,boolean:I}},color:{border:{string:A},background:{string:A},highlight:{border:{string:A},background:{string:A},__type__:{object:j,string:A}},hover:{border:{string:A},background:{string:A},__type__:{object:j,string:A}},__type__:{object:j,string:A}},opacity:{number:$,undefined:"undefined"},fixed:{x:{boolean:I},y:{boolean:I},__type__:{object:j,boolean:I}},font:{align:{string:A},color:{string:A},size:{number:$},face:{string:A},background:{string:A},strokeWidth:{number:$},strokeColor:{string:A},vadjust:{number:$},multi:{boolean:I,string:A},bold:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},boldital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},ital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},mono:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},__type__:{object:j,string:A}},group:{string:A,number:$,undefined:"undefined"},heightConstraint:{minimum:{number:$},valign:{string:A},__type__:{object:j,boolean:I,number:$}},hidden:{boolean:I},icon:{face:{string:A},code:{string:A},size:{number:$},color:{string:A},weight:{string:A,number:$},__type__:{object:j}},id:{string:A,number:$},image:{selected:{string:A,undefined:"undefined"},unselected:{string:A,undefined:"undefined"},__type__:{object:j,string:A}},imagePadding:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:j,number:$}},label:{string:A,undefined:"undefined"},labelHighlightBold:{boolean:I},level:{number:$,undefined:"undefined"},margin:{top:{number:$},right:{number:$},bottom:{number:$},left:{number:$},__type__:{object:j,number:$}},mass:{number:$},physics:{boolean:I},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:I},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:j,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:j}},shadow:{enabled:{boolean:I},color:{string:A},size:{number:$},x:{number:$},y:{number:$},__type__:{object:j,boolean:I}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:I,array:Ra},borderRadius:{number:$},interpolation:{boolean:I},useImageSize:{boolean:I},useBorderWithImage:{boolean:I},coordinateOrigin:{string:["center","top-left"]},__type__:{object:j}},size:{number:$},title:{string:A,dom:gT,undefined:"undefined"},value:{number:$,undefined:"undefined"},widthConstraint:{minimum:{number:$},maximum:{number:$},__type__:{object:j,boolean:I,number:$}},x:{number:$},y:{number:$},__type__:{object:j}},ope={configure:{enabled:{boolean:I},filter:{boolean:I,string:A,array:Ra,function:"function"},container:{dom:gT},showButton:{boolean:I},__type__:{object:j,boolean:I,string:A,array:Ra,function:"function"}},edges:{arrows:{to:{enabled:{boolean:I},scaleFactor:{number:$},type:{string:Yc},imageHeight:{number:$},imageWidth:{number:$},src:{string:A},__type__:{object:j,boolean:I}},middle:{enabled:{boolean:I},scaleFactor:{number:$},type:{string:Yc},imageWidth:{number:$},imageHeight:{number:$},src:{string:A},__type__:{object:j,boolean:I}},from:{enabled:{boolean:I},scaleFactor:{number:$},type:{string:Yc},imageWidth:{number:$},imageHeight:{number:$},src:{string:A},__type__:{object:j,boolean:I}},__type__:{string:["from","to","middle"],object:j}},endPointOffset:{from:{number:$},to:{number:$},__type__:{object:j,number:$}},arrowStrikethrough:{boolean:I},background:{enabled:{boolean:I},color:{string:A},size:{number:$},dashes:{boolean:I,array:Ra},__type__:{object:j,boolean:I}},chosen:{label:{boolean:I,function:"function"},edge:{boolean:I,function:"function"},__type__:{object:j,boolean:I}},color:{color:{string:A},highlight:{string:A},hover:{string:A},inherit:{string:["from","to","both"],boolean:I},opacity:{number:$},__type__:{object:j,string:A}},dashes:{boolean:I,array:Ra},font:{color:{string:A},size:{number:$},face:{string:A},background:{string:A},strokeWidth:{number:$},strokeColor:{string:A},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:$},multi:{boolean:I,string:A},bold:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},boldital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},ital:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},mono:{color:{string:A},size:{number:$},face:{string:A},mod:{string:A},vadjust:{number:$},__type__:{object:j,string:A}},__type__:{object:j,string:A}},hidden:{boolean:I},hoverWidth:{function:"function",number:$},label:{string:A,undefined:"undefined"},labelHighlightBold:{boolean:I},length:{number:$,undefined:"undefined"},physics:{boolean:I},scaling:{min:{number:$},max:{number:$},label:{enabled:{boolean:I},min:{number:$},max:{number:$},maxVisible:{number:$},drawThreshold:{number:$},__type__:{object:j,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:j}},selectionWidth:{function:"function",number:$},selfReferenceSize:{number:$},selfReference:{size:{number:$},angle:{number:$},renderBehindTheNode:{boolean:I},__type__:{object:j}},shadow:{enabled:{boolean:I},color:{string:A},size:{number:$},x:{number:$},y:{number:$},__type__:{object:j,boolean:I}},smooth:{enabled:{boolean:I},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:$},forceDirection:{string:["horizontal","vertical","none"],boolean:I},__type__:{object:j,boolean:I}},title:{string:A,undefined:"undefined"},width:{number:$},widthConstraint:{maximum:{number:$},__type__:{object:j,boolean:I,number:$}},value:{number:$,undefined:"undefined"},__type__:{object:j}},groups:{useDefaultGroups:{boolean:I},__any__:Xc,__type__:{object:j}},interaction:{dragNodes:{boolean:I},dragView:{boolean:I},hideEdgesOnDrag:{boolean:I},hideEdgesOnZoom:{boolean:I},hideNodesOnDrag:{boolean:I},hover:{boolean:I},keyboard:{enabled:{boolean:I},speed:{x:{number:$},y:{number:$},zoom:{number:$},__type__:{object:j}},bindToWindow:{boolean:I},autoFocus:{boolean:I},__type__:{object:j,boolean:I}},multiselect:{boolean:I},navigationButtons:{boolean:I},selectable:{boolean:I},selectConnectedEdges:{boolean:I},hoverConnectedEdges:{boolean:I},tooltipDelay:{number:$},zoomView:{boolean:I},zoomSpeed:{number:$},__type__:{object:j}},layout:{randomSeed:{undefined:"undefined",number:$,string:A},improvedLayout:{boolean:I},clusterThreshold:{number:$},hierarchical:{enabled:{boolean:I},levelSeparation:{number:$},nodeSpacing:{number:$},treeSpacing:{number:$},blockShifting:{boolean:I},edgeMinimization:{boolean:I},parentCentralization:{boolean:I},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:j,boolean:I}},__type__:{object:j}},manipulation:{enabled:{boolean:I},initiallyActive:{boolean:I},addNode:{boolean:I,function:"function"},addEdge:{boolean:I,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:j,boolean:I,function:"function"}},deleteNode:{boolean:I,function:"function"},deleteEdge:{boolean:I,function:"function"},controlNodeStyle:Xc,__type__:{object:j,boolean:I}},nodes:Xc,physics:{enabled:{boolean:I},barnesHut:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:j}},forceAtlas2Based:{theta:{number:$},gravitationalConstant:{number:$},centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:j}},repulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},__type__:{object:j}},hierarchicalRepulsion:{centralGravity:{number:$},springLength:{number:$},springConstant:{number:$},nodeDistance:{number:$},damping:{number:$},avoidOverlap:{number:$},__type__:{object:j}},maxVelocity:{number:$},minVelocity:{number:$},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:I},iterations:{number:$},updateInterval:{number:$},onlyDynamicEdges:{boolean:I},fit:{boolean:I},__type__:{object:j,boolean:I}},timestep:{number:$},adaptiveTimestep:{boolean:I},wind:{x:{number:$},y:{number:$},__type__:{object:j}},__type__:{object:j,boolean:I}},autoResize:{boolean:I},clickToUse:{boolean:I},locale:{string:A},locales:{__any__:{any:ape},__type__:{object:j}},height:{string:A},width:{string:A},__type__:{object:j}},yT={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]}}},spe=function(i,e,t){var n;return!!(tn(i).call(i,"physics")&&tn(n=yT.physics.solver).call(n,e)&&t.physics.solver!==e&&e!=="wind")},lpe=function(){function r(){R(this,r)}return D(r,[{key:"getDistances",value:function(e,t,n){for(var a={},o=e.edges,s=0;s<t.length;s++){var l=t[s],u={};a[l]=u;for(var d=0;d<t.length;d++)u[t[d]]=s==d?0:1e9}for(var c=0;c<n.length;c++){var h=o[n[c]];h.connected===!0&&a[h.fromId]!==void 0&&a[h.toId]!==void 0&&(a[h.fromId][h.toId]=1,a[h.toId][h.fromId]=1)}for(var f=t.length,v=0;v<f;v++)for(var p=t[v],g=a[p],y=0;y<f-1;y++)for(var m=t[y],w=a[m],b=y+1;b<f;b++){var E=t[b],O=a[E],S=Math.min(w[E],w[p]+g[E]);w[E]=S,O[m]=S}return a}}]),r}(),upe=function(){function r(i,e,t){R(this,r),this.body=i,this.springLength=e,this.springConstant=t,this.distanceSolver=new lpe}return D(r,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,l=0,u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),d=5,c=1e9,h=0,f=0,v=0,p=0,g=0;c>o&&l<u;){l+=1;var y=this._getHighestEnergyNode(n),m=Oe(y,4);for(h=m[0],c=m[1],f=m[2],v=m[3],p=c,g=0;p>s&&g<d;){g+=1,this._moveNode(h,f,v);var w=this._getEnergy(h),b=Oe(w,3);p=b[0],f=b[1],v=b[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,a=0,o=t[0],s=0,l=0,u=0;u<t.length;u++){var d=t[u];if(n[d].predefinedPosition!==!0||n[d].isCluster===!0&&e===!0||n[d].options.fixed.x!==!0||n[d].options.fixed.y!==!0){var c=this._getEnergy(d),h=Oe(c,3),f=h[0],v=h[1],p=h[2];a<f&&(a=f,o=d,s=v,l=p)}}return[o,a,s,l]}},{key:"_getEnergy",value:function(e){var t=Oe(this.E_sums[e],2),n=t[0],a=t[1],o=Math.sqrt(Math.pow(n,2)+Math.pow(a,2));return[o,n,a]}},{key:"_moveNode",value:function(e,t,n){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,l=0,u=0,d=o[e].x,c=o[e].y,h=this.K_matrix[e],f=this.L_matrix[e],v=0;v<a.length;v++){var p=a[v];if(p!==e){var g=o[p].x,y=o[p].y,m=h[p],w=f[p],b=1/Math.pow(Math.pow(d-g,2)+Math.pow(c-y,2),1.5);s+=m*(1-w*Math.pow(c-y,2)*b),l+=m*(w*(d-g)*(c-y)*b),u+=m*(1-w*Math.pow(d-g,2)*b)}}var E=s,O=l,S=t,T=u,C=n,N=(S/E+C/O)/(O/E-T/O),L=-(O*N+S)/E;o[e].x+=L,o[e].y+=N,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var a=0;a<t.length;a++){this.L_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.L_matrix[t[a]][t[o]]=n*e[t[a]][t[o]]}}},{key:"_createK_matrix",value:function(e){var t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var a=0;a<t.length;a++){this.K_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.K_matrix[t[a]][t[o]]=n*Math.pow(e[t[a]][t[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=t[o].x,l=t[o].y,u=0,d=0,c=a;c<e.length;c++){var h=e[c];if(h!==o){var f=t[h].x,v=t[h].y,p=1/Math.sqrt(Math.pow(s-f,2)+Math.pow(l-v,2));this.E_matrix[o][c]=[this.K_matrix[o][h]*(s-f-this.L_matrix[o][h]*(s-f)*p),this.K_matrix[o][h]*(l-v-this.L_matrix[o][h]*(l-v)*p)],this.E_matrix[h][a]=this.E_matrix[o][c],u+=this.E_matrix[o][c][0],d+=this.E_matrix[o][c][1]}}this.E_sums[o]=[u,d]}}},{key:"_updateE_matrix",value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],l=n[e].x,u=n[e].y,d=0,c=0,h=0;h<t.length;h++){var f=t[h];if(f!==e){var v=a[h],p=v[0],g=v[1],y=n[f].x,m=n[f].y,w=1/Math.sqrt(Math.pow(l-y,2)+Math.pow(u-m,2)),b=o[f]*(l-y-s[f]*(l-y)*w),E=o[f]*(u-m-s[f]*(u-m)*w);a[h]=[b,E],d+=b,c+=E;var O=this.E_sums[f];O[0]+=b-p,O[1]+=E-g}}this.E_sums[e]=[d,c]}}]),r}();function B(r,i,e){var t,n,a,o,s=this;if(!(this instanceof B))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:ooe,clickToUse:!1},Be(this.options,this.defaultOptions),this.body={container:r,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:P(t=this.on).call(t,this),off:P(n=this.off).call(n,this),emit:P(a=this.emit).call(a,this),once:P(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 uoe(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Tse,this.canvas=new Whe(this.body),this.selectionHandler=new Rfe(this.body,this.canvas),this.interactionHandler=new Yhe(this.body,this.canvas,this.selectionHandler),this.view=new Uhe(this.body,this.canvas),this.renderer=new Bhe(this.body,this.canvas),this.physics=new Phe(this.body),this.layoutEngine=new tpe(this.body),this.clustering=new Nhe(this.body),this.manipulation=new ipe(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new cce(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new mhe(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new upe(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}gE(B.prototype);B.prototype.setOptions=function(r){var i=this;if(r===null&&(r=void 0),r!==void 0){var e=Fae.validate(r,ope);e===!0&&console.error("%cErrors have been found in the supplied options object.",bO);var t=["locale","locales","clickToUse"];if(_a(t,this.options,r),r.locale!==void 0&&(r.locale=soe(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new Mae(this,this.body.container,yT,this.canvas.pixelRatio,spe)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};pe(n.nodes,this.nodesHandler.options),pe(n.edges,this.edgesHandler.options),pe(n.layout,this.layoutEngine.options),pe(n.interaction,this.selectionHandler.options),pe(n.interaction,this.renderer.options),pe(n.interaction,this.interactionHandler.options),pe(n.manipulation,this.manipulation.options),pe(n.physics,this.physics.options),pe(n.global,this.canvas.options),pe(n.global,this.options),this.configurator.setModuleOptions(n)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new Dae(this.canvas.frame),this.activator.on("change",function(){i.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")}};B.prototype._updateVisibleIndices=function(){var r=this.body.nodes,i=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&!this.clustering._isClusteredNode(e)&&r[e].options.hidden===!1&&this.body.nodeIndices.push(r[e].id);for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var n=i[t],a=r[n.fromId],o=r[n.toId],s=a!==void 0&&o!==void 0,l=!this.clustering._isClusteredEdge(t)&&n.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;l&&this.body.edgeIndices.push(n.id)}};B.prototype.bindEventListeners=function(){var r=this;this.body.emitter.on("_dataChanged",function(){r.edgesHandler._updateState(),r.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){r.clustering._updateState(),r._updateVisibleIndices(),r._updateValueRange(r.body.nodes),r._updateValueRange(r.body.edges),r.body.emitter.emit("startSimulation"),r.body.emitter.emit("_requestRedraw")})};B.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var i=Kae(r.dot);this.setData(i);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var e=qae(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};B.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 r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&delete this.body.edges[i];Gr(this.body.container)};B.prototype._updateValueRange=function(r){var i,e=void 0,t=void 0,n=0;for(i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var a=r[i].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),t=t===void 0?a:Math.max(a,t),n+=a)}if(e!==void 0&&t!==void 0)for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&r[i].setValueRange(e,t,n)};B.prototype.isActive=function(){return!this.activator||this.activator.active};B.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};B.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};B.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};B.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};B.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};B.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};B.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};B.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};B.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};B.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};B.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};B.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};B.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};B.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};B.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};B.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};B.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};B.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};B.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};B.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};B.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};B.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};B.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};B.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};B.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};B.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};B.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};B.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};B.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};B.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};B.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};B.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};B.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};B.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};B.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};B.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};B.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};B.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};B.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};B.prototype.getNodeAt=function(){var r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};B.prototype.getEdgeAt=function(){var r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};B.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};B.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};B.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};B.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};B.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};B.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};B.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};B.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};B.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};B.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};B.prototype.getOptionsFromConfigurator=function(){var r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const dpe={flex:"~ gap-4 wrap","w-full":""},cpe=X("span",{op75:""},"Show pages",-1),hpe=X("span",{op75:""},"Show layouts",-1),fpe=X("span",{op75:""},"Show workspace",-1),vpe=X("span",{op75:""},"Show node_modules",-1),ppe=X("span",{op75:""},"Show global components",-1),gpe=X("div",{"i-carbon-close":""},null,-1),ype=X("div",{"flex-auto":""},null,-1),mpe={relative:"","h-full":"","w-full":""},bpe=X("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[X("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),X("div",{op50:""}," Component "),X("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),X("div",{op50:""}," Global Component "),X("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),X("div",{op50:""}," Page "),X("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[X("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),X("div",{op50:""}," Layout "),X("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),X("div",{op50:""}," Library Component "),X("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),X("div",{op50:""}," Unknown ")],-1),$pe={key:0,py4:"",pt4:"",flex:"~ col"},wpe={border:"t base",p4:""},_pe=Yi({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(r){const i=r,e=_n(),t=_n(),n=bT(),a=_n(),o=$T(),s=wT(),l=_T(),{componentsGraphShowNodeModules:u,componentsGraphShowGlobalComponents:d,componentsGraphShowPages:c,componentsGraphShowLayouts:h,componentsGraphShowWorkspace:f}=l1(),v=_n(),p=_n(""),g=ET(p,300),y=rr(()=>{const O=i.relationships||[];if(v.value){let S=function(C){!C||T.has(C)||(T.add(C),C.deps.forEach(N=>{S(O.find(L=>L.id===N))}))};const T=new Set;return S(v.value),Array.from(T)}return O}),m=rr(()=>{const O=y.value.map(T=>{const C=i.components.find(fe=>fe.filePath===T.id),N=o.value?.find(fe=>fe.file===T.id),L=l.value?.find(fe=>fe.file===T.id),Q=T.id.replace(/\?.*$/,"").replace(/#.*$/,""),W=T.id.includes("/node_modules/")?"lib":C?C.global?"global":"user":L?"layout":N?"page":"unknown";if(!u.value&&W==="lib"||!c.value&&W==="page"||!h.value&&W==="layout"||!f.value&&W==="user"&&s.value&&!T.id.startsWith(s.value.rootDir)||!d.value&&W==="global")return null;const Z=W==="layout"?"hexagon":W==="page"?"square":"dot",Me=g.value&&!T.id.toLowerCase().includes(g.value.toLowerCase());return{id:T.id,label:Q.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:W,shape:Z,size:15+Math.min(T.deps.length/2,8),font:{color:Me?"#8885":n.value==="dark"?"white":"black"},color:Me?"#8885":v.value?.id===T.id?"#82c742":void 0,extra:{id:T.id,component:C,page:N,layout:L,relationship:T}}}).filter(T=>!!T),S=y.value.flatMap(T=>T.deps.map(C=>({from:T.id,to:C,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:O,edges:S}}),w=rr(()=>a.value?.component?i.relationships?.find(S=>S.id===a.value?.component?.filePath)?.deps?.map(S=>i.relationships?.find(T=>T.id===S)?.id).filter(Boolean):[]),b=rr(()=>a.value?.component?i.relationships?.filter(S=>S.deps.includes(a.value.component.filePath))?.map(S=>i.relationships?.find(T=>T.id===S.id)?.id).filter(Boolean):[]);ST(()=>{const O={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"}}},S=new B(e.value,m.value,O);S.on("click",T=>{const C=T.nodes?.[0],N=m.value.nodes?.find(L=>L.id===C)?.extra;N&&(a.value=N)}),OT(m,()=>{S.setData(m.value)})});function E(){v.value=a.value?.relationship,a.value=void 0}return(O,S)=>{const T=jT,C=u1,N=TT,L=v1,Q=ff,W=zT;return te(),Se(dr,null,[_e(C,{ref_key:"navbar",ref:t,search:K(p),"onUpdate:search":S[6]||(S[6]=Z=>Ur(p)?p.value=Z:null),absolute:"","left-0":"","right-0":"","top-0":""},{actions:He(()=>[X("div",dpe,[_e(T,{modelValue:K(c),"onUpdate:modelValue":S[0]||(S[0]=Z=>Ur(c)?c.value=Z:null),n:"primary sm"},{default:He(()=>[cpe]),_:1},8,["modelValue"]),_e(T,{modelValue:K(h),"onUpdate:modelValue":S[1]||(S[1]=Z=>Ur(h)?h.value=Z:null),n:"primary sm"},{default:He(()=>[hpe]),_:1},8,["modelValue"]),_e(T,{modelValue:K(f),"onUpdate:modelValue":S[2]||(S[2]=Z=>Ur(f)?f.value=Z:null),n:"primary sm"},{default:He(()=>[fpe]),_:1},8,["modelValue"]),_e(T,{modelValue:K(u),"onUpdate:modelValue":S[3]||(S[3]=Z=>Ur(u)?u.value=Z:null),n:"primary sm"},{default:He(()=>[vpe]),_:1},8,["modelValue"]),_e(T,{modelValue:K(d),"onUpdate:modelValue":S[4]||(S[4]=Z=>Ur(d)?d.value=Z:null),n:"primary sm"},{default:He(()=>[ppe]),_:1},8,["modelValue"])]),K(v)?(te(),Se("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:S[5]||(S[5]=Z=>v.value=void 0)},[Qc(" Clear filter "),gpe])):lt("",!0),ype,Al(O.$slots,"default")]),_:3},8,["search"]),X("div",mpe,[X("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),_e(N,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","n-glass-effect":""},{default:He(()=>[bpe]),_:1}),_e(W,{"model-value":!!(K(a)&&K(a).component),top:K(t),border:"t l base","w-80":"",onClose:S[8]||(S[8]=Z=>a.value=void 0)},{default:He(()=>[K(a)&&K(a).component?(te(),Se("div",$pe,[_e(L,{component:K(a).component,dependencies:K(w),dependents:K(b)},null,8,["component","dependencies","dependents"]),X("div",wpe,[_e(Q,{n:"primary solid",onClick:S[7]||(S[7]=Z=>E())},{default:He(()=>[Qc(" Filter to this component ")]),_:1})])])):lt("",!0)]),_:1},8,["model-value","top"])])],64)}}}),Epe={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},Spe={key:0,"ml--1":"","text-primary":""},Ope=Yi({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(r){const i=r,e=rr(()=>i.component.filePath||i.component.file||i.component.__file||"");return(t,n)=>{const a=f1,o=v1,s=IT("VDropdown"),l=d1,u=c1;return te(),Se("div",Epe,[_e(s,null,{popper:He(()=>[_e(o,{component:t.component,dependencies:t.dependencies,dependents:t.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:He(()=>[X("button",{"hover:text-primary":"",class:PT(t.dependents&&t.dependents.length===0?"op50":"")},[_e(a,{component:t.component},null,8,["component"])],2)]),_:1}),t.dependents?.length?(te(),Se("sup",Spe," x"+al(t.dependents?.length),1)):lt("",!0),t.component.global?(te(),st(l,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):lt("",!0),Al(t.$slots,"default"),K(e)?(te(),st(u,{key:2,filepath:K(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):lt("",!0)])}}}),Tpe={flex:"~ gap-2 items-center"},Ipe={pl4:""},Ppe=Yi({__name:"ComponentsList",props:{components:{},relationships:{}},setup(r){const i=r,e=_n(""),t=_n("all"),n=rr(()=>{const s=i.components.map(l=>kT(l,i.relationships));return t.value==="using"?s.filter(l=>l.dependents?.length):t.value==="not-used"?s.filter(l=>!l.dependents?.length):s}),a=rr(()=>new CT(n.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),o=rr(()=>{const s=[],l=new Map,u=[],d=[],c={user:0,lib:0,builtin:0,runtime:0};return(e.value?a.value.search(e.value).map(f=>f.item):n.value).forEach(f=>{const v=f.component;if(v.filePath&&xT(v.filePath)){const p=AT(v.filePath);if(!p)return;p==="nuxt"?(u.push(f),c.builtin++):(l.has(p)||l.set(p,[]),l.get(p).push(f),c.lib++)}else v.global&&!v.filePath?(d.push(f),c.runtime++):(s.push(f),c.user++)}),{count:c,user:s,builtin:u,lib:l,runtime:d}});return(s,l)=>{const u=RT,d=HT,c=u1,h=Ope,f=WT,v=VT;return te(),Se(dr,null,[_e(c,{search:K(e),"onUpdate:search":l[1]||(l[1]=p=>Ur(e)?e.value=p:null),pb3:""},{actions:He(()=>[Al(s.$slots,"default")]),default:He(()=>[X("div",Tpe,[_e(u,{icon:"carbon-filter",op50:""}),_e(d,{modelValue:K(t),"onUpdate:modelValue":l[0]||(l[0]=p=>Ur(t)?t.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"]),K(o).user.length?(te(),st(f,{key:0,icon:"carbon-nominal",text:"User components",open:K(o).user.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:K(Nu)),description:`Total components: ${K(o).count.user}`},{default:He(()=>[(te(!0),Se(dr,null,wn(K(o).user,p=>(te(),st(h,ts({key:p.component.filePath,ref_for:!0},p),null,16))),128))]),_:1},8,["open","description"])):lt("",!0),K(o).runtime.length?(te(),st(f,{key:1,icon:"carbon-load-balancer-global",open:K(o).runtime.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:K(Nu)),text:"Runtime components",description:`Total components: ${K(o).count.runtime}`},{default:He(()=>[(te(!0),Se(dr,null,wn(K(o).runtime,p=>(te(),st(h,ts({key:p.component.filePath,ref_for:!0},p),null,16))),128))]),_:1},8,["open","description"])):lt("",!0),K(o).builtin.length?(te(),st(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${K(o).count.builtin}`},{default:He(()=>[(te(!0),Se(dr,null,wn(K(o).builtin,p=>(te(),st(h,ts({key:p.component.filePath,ref_for:!0},p),null,16))),128))]),_:1},8,["description"])):lt("",!0),K(o).lib.size?(te(),st(f,{key:3,open:K(o).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:K(Nu)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${K(o).count.lib} components from ${K(o).lib.size} packages`},{default:He(()=>[(te(!0),Se(dr,null,wn(K(o).lib.entries(),([p,g])=>(te(),Se("div",{key:p,"ml-2":""},[_e(v,{text:`${p} (${g.length})`,py1:"",op50:""},null,8,["text"]),X("div",Ipe,[(te(!0),Se(dr,null,wn(g,y=>(te(),st(h,ts({key:y.component.filePath,ref_for:!0},y),null,16))),128))])]))),128))]),_:1},8,["open","description"])):lt("",!0)],64)}}}),kpe={relative:"","h-full":"","of-auto":""},Cpe={"flex-none":"",flex:"~ gap3"},Wpe=Yi({__name:"components",setup(r){const i=DT(),e=BT(),t=LT(),{componentsView:n}=l1();function a(){i.value?.inspector?.instance&&i.value.inspector.enable()}function o(){n.value=n.value==="list"?"graph":"list"}return(s,l)=>{const u=ff,d=JT,c=FT,h=MT("tooltip");return te(),Se(dr,null,[X("div",kpe,[(te(),st(NT(K(n)==="list"?Ppe:_pe),{components:K(e),relationships:K(t)},{default:He(()=>[X("div",Cpe,[Gv(_e(u,{"text-lg":"",border:!1,icon:K(n)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:o},null,8,["icon"]),[[h,"Toggle View",void 0,{"bottom-end":!0}]]),K(i)?.inspector?.instance?Gv((te(),st(u,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:a},null,512)),[[h,"Inspect Vue components",void 0,{"bottom-end":!0}]]):lt("",!0)])]),_:1},8,["components","relationships"]))]),_e(c,null,{default:He(()=>[_e(d)]),_:1})],64)}}});export{Wpe as default};